From 550af6319aee075ecffe1e06fba9f35bf2b6904c Mon Sep 17 00:00:00 2001 From: jqll Date: Tue, 16 Jul 2019 17:50:43 -0700 Subject: [PATCH] Squashed 'third_party/googleapis/' changes from 475d72b7..96d5a051 96d5a051 Synchronize new proto/yaml changes. 2c7bc0a1 Synchronize new proto/yaml changes. 7f3e6ebf Synchronize new proto/yaml changes. 47bd0c2b Synchronize new proto/yaml changes. b73d9238 Synchronize new proto/yaml changes. c87049c9 Synchronize new proto/yaml changes. c50d9e82 Synchronize new proto/yaml changes. 16c0ea3c Synchronize new proto/yaml changes. b4c73fac Synchronize new proto/yaml changes. dbf13ce4 Synchronize new proto/yaml changes. 91d9692c Synchronize new proto/yaml changes. 69916b6f Synchronize new proto/yaml changes. d7ad2090 Synchronize new proto/yaml changes. e08295d8 Synchronize new proto/yaml changes. 5322233f Synchronize new proto/yaml changes. 7106c2cf Synchronize new proto/yaml changes. 7152063c Synchronize new proto/yaml changes. 4896ff35 Synchronize new proto/yaml changes. 89bea46b Synchronize new proto/yaml changes. 84c8ad4e Synchronize new proto/yaml changes. f46206af Synchronize new proto/yaml changes. 90e28b21 Synchronize new proto/yaml changes. 1f24e7e9 Synchronize new proto/yaml changes. b0bea56a Synchronize new proto/yaml changes. 373cc2aa Synchronize new proto/yaml changes. 3a152bcd Synchronize new proto/yaml changes. de1150cc Synchronize new proto/yaml changes. c9546320 Synchronize new proto/yaml changes. 4f24ddf6 Synchronize new proto/yaml changes. f01a8871 Synchronize new proto/yaml changes. 277703d5 Synchronize new proto/yaml changes. a85bea32 Synchronize new proto/yaml changes. 45e125f9 Synchronize new proto/yaml changes. cc233544 Synchronize new proto/yaml changes. ac13167e Synchronize new proto/yaml changes. 8b3af833 Synchronize new proto/yaml changes. 384aa843 Synchronize new proto/yaml changes. 7b58b375 Synchronize new proto/yaml changes. f5a2c22d Synchronize new proto/yaml changes. 27b33236 Synchronize new proto/yaml changes. 939c8115 Synchronize new proto/yaml changes. afa7c031 Synchronize new proto/yaml changes. d1dec550 Synchronize new proto/yaml changes. dd923f12 Synchronize new proto/yaml changes. c23b68ee Synchronize new proto/yaml changes. a9a85bc8 Synchronize new proto/yaml changes. d4f40c55 Synchronize new proto/yaml changes. 6a70521f Synchronize new proto/yaml changes. ad63761f Synchronize new proto/yaml changes. 78dc641b Synchronize new proto/yaml changes. 46bfd341 Synchronize new proto/yaml changes. 3f118f98 Synchronize new proto/yaml changes. f117dac4 Synchronize new proto/yaml changes. 89bb3e91 Synchronize new proto/yaml changes. 701704db Synchronize new proto/yaml changes. cc3ec169 Synchronize new proto/yaml changes. 744feb96 Synchronize new proto/yaml changes. 4145cd9e Synchronize new proto/yaml changes. a12347ec Synchronize new proto/yaml changes. 7a5025c8 Synchronize new proto/yaml changes. 0264cd17 Synchronize new proto/yaml changes. 9bf61518 Synchronize new proto/yaml changes. 15fdbe57 Synchronize new proto/yaml changes. c6adcaba Synchronize new proto/yaml changes. f03bf213 Synchronize new proto/yaml changes. 17ed79ad Synchronize new proto/yaml changes. 5487c789 Synchronize new proto/yaml changes. 47c142a7 Synchronize new proto/yaml changes. 4f3516a6 Synchronize new proto/yaml changes. e266a1ca Synchronize new proto/yaml changes. 0026f4b8 Synchronize new proto/yaml changes. f3d0a743 Synchronize new proto/yaml changes. 10049e8e Synchronize new proto/yaml changes. 797024a0 Synchronize new proto/yaml changes. a8ee1416 Synchronize new proto/yaml changes. 152dabdf Synchronize new proto/yaml changes. 1079c999 Synchronize new proto/yaml changes. 2c30d35b Revert "Synchronize new proto/yaml changes." (#554) 95aa3a2a Synchronize new proto/yaml changes. aa5dec99 Synchronize new proto/yaml changes. 5d17f032 Synchronize new proto/yaml changes. fa15c300 Synchronize new proto/yaml changes. 8f6588f6 Synchronize new proto/yaml changes. d8c02100 Synchronize new proto/yaml changes. 21ebe70c Synchronize new proto/yaml changes. 0212b5bc Synchronize new proto/yaml changes. c6399efb Synchronize new proto/yaml changes. 24472d0e Synchronize new proto/yaml changes. 7ca19138 Synchronize new proto/yaml changes. c6935543 Synchronize new proto/yaml changes. e01ef4bb Synchronize new proto/yaml changes. c39b7e88 Synchronize new proto/yaml changes. 05371894 Synchronize new proto/yaml changes. 56ce2365 Synchronize new proto/yaml changes. 98590066 Synchronize new proto/yaml changes. 2e95f389 Synchronize new proto/yaml changes. 326272b3 Synchronize new proto/yaml changes. 6a2f0244 Synchronize new proto/yaml changes. 777d1849 Synchronize new proto/yaml changes. 8c21a66d Synchronize new proto/yaml changes. 9de1bc00 Synchronize new proto/yaml changes. 12bbae0e Synchronize new proto/yaml changes. f7923032 Synchronize new proto/yaml changes. 9fd48dcb Synchronize new proto/yaml changes. 6ea045ad Synchronize new proto/yaml changes. 3801b571 Synchronize new proto/yaml changes. 32a10f69 Synchronize new proto/yaml changes. ad24d2f8 Synchronize new proto/yaml changes. 64f0053a Synchronize new proto/yaml changes. ab437f2b Synchronize new proto/yaml changes. 99efb144 Synchronize new proto/yaml changes. bf595eb3 Synchronize new proto/yaml changes. 03269e76 Synchronize new proto/yaml changes. fcf9612e Synchronize new proto/yaml changes. 109e3ac5 Synchronize new proto/yaml changes. a37b06d0 Synchronize new proto/yaml changes. 3debfc07 Synchronize new proto/yaml changes. 275cdfcd Synchronize new proto/yaml changes. 2d64a741 Synchronize new proto/yaml changes. 329c2979 Synchronize new proto/yaml changes. eb269146 Synchronize new proto/yaml changes. ffa25664 Synchronize new proto/yaml changes. 399f2415 Synchronize new proto/yaml changes. bb798133 Synchronize new proto/yaml changes. aa254238 Synchronize new proto/yaml changes. 987c8665 Synchronize new proto/yaml changes. 97a9d48a Synchronize new proto/yaml changes. 32b08107 Synchronize new proto/yaml changes. d84bde86 Synchronize new proto/yaml changes. e94ba030 Synchronize new proto/yaml changes. 2a4c4f0d Synchronize new proto/yaml changes. d09a6177 Synchronize new proto/yaml changes. 1b694ae9 Synchronize new proto/yaml changes. fa85d52e Synchronize new proto/yaml changes. 07883be5 Synchronize new proto/yaml changes. f86c9531 Synchronize new proto/yaml changes. 2f6e293d Synchronize new proto/yaml changes. 51145ff7 Synchronize new proto/yaml changes. 9497e697 Synchronize new proto/yaml changes. 16b030f7 Synchronize new proto/yaml changes. 7ae6af0c Synchronize new proto/yaml changes. 5aeb4179 Synchronize new proto/yaml changes. 478efc17 Synchronize new proto/yaml changes. 9cbb8dc7 Synchronize new proto/yaml changes. 4b96c13c Synchronize new proto/yaml changes. 39c876cc Synchronize new proto/yaml changes. bc671f6d Synchronize new proto/yaml changes. 809bf586 Synchronize new proto/yaml changes. fe77c673 Synchronize new proto/yaml changes. cec43ca6 Synchronize new proto/yaml changes. 378c3c33 Synchronize new proto/yaml changes. 302cdeee Synchronize new proto/yaml changes. d9008e61 Synchronize new proto/yaml changes. 68ac1339 Synchronize new proto/yaml changes. dd42335a Synchronize new proto/yaml changes. 316b54c4 Synchronize new proto/yaml changes. be3005c8 Synchronize new proto/yaml changes. dce0f900 Synchronize new proto/yaml changes. 0d3f88c7 Synchronize new proto/yaml changes. c84841f6 Synchronize new proto/yaml changes. 808110e2 Synchronize new proto/yaml changes. 9855995f Bump gapic-generator version (#547) 6718646f Synchronize new proto/yaml changes. e40cee88 Synchronize new proto/yaml changes. c33d58bf Synchronize new proto/yaml changes. 25cbfd4a Synchronize new proto/yaml changes. fc37c47e Synchronize new proto/yaml changes. c2a6b0e7 Synchronize new proto/yaml changes. 45199a22 Synchronize new proto/yaml changes. 2adb4dd3 Synchronize new proto/yaml changes. 547e19e7 Synchronize new proto/yaml changes. 9491fe29 Synchronize new proto/yaml changes. fa39cea1 Synchronize new proto/yaml changes. 3369c803 Synchronize new proto/yaml changes. 9a89b944 Synchronize new proto/yaml changes. 52690192 Synchronize new proto/yaml changes. d35ca350 Synchronize new proto/yaml changes. 6f7c8618 Synchronize new proto/yaml changes. b7f88d88 Synchronize new proto/yaml changes. 1a479920 Synchronize new proto/yaml changes. d003fe34 Synchronize new proto/yaml changes. f218d405 Synchronize new proto/yaml changes. 43a32491 Synchronize new proto/yaml changes. fecf169b Synchronize new proto/yaml changes. 875f7519 Synchronize new proto/yaml changes. 3f57de2f Synchronize new proto/yaml changes. 549bf4a6 Synchronize new proto/yaml changes. 07b408e7 Synchronize new proto/yaml changes. 9c5ae8a3 Synchronize new proto/yaml changes. 2c0815ac Synchronize new proto/yaml changes. 9a02c5ac Synchronize new proto/yaml changes. 266aaef1 Synchronize new proto/yaml changes. 8082820d Synchronize new proto/yaml changes. 327ff9c0 Synchronize new proto/yaml changes. 1666c6c3 Synchronize new proto/yaml changes. b0b5b852 Synchronize new proto/yaml changes. 63f41f06 Synchronize new proto/yaml changes. b6609c74 Synchronize new proto/yaml changes. 04193ea2 Synchronize new proto/yaml changes. 7dc718e9 Synchronize new proto/yaml changes. f2b42568 Synchronize new proto/yaml changes. 233e5348 Synchronize new proto/yaml changes. 5a0dd239 Synchronize new proto/yaml changes. a2c49e2b Synchronize new proto/yaml changes. 8dab717b Synchronize new proto/yaml changes. 0e78a149 Synchronize new proto/yaml changes. 64906662 Synchronize new proto/yaml changes. 1ef3f7ae Synchronize new proto/yaml changes. ca5ac189 Synchronize new proto/yaml changes. 5985a1da Synchronize new proto/yaml changes. 908f8fb1 Synchronize new proto/yaml changes. 4b6f2b11 Synchronize new proto/yaml changes. 0e86713b Synchronize new proto/yaml changes. 6c48ab5a Synchronize new proto/yaml changes. 93416634 Synchronize new proto/yaml changes. 1e20c384 Synchronize new proto/yaml changes. 62baea94 Synchronize new proto/yaml changes. 97b4ae85 Synchronize new proto/yaml changes. 396a6110 Synchronize new proto/yaml changes. fd67be4b Synchronize new proto/yaml changes. 15423e76 Synchronize new proto/yaml changes. 15970e05 Synchronize new proto/yaml changes. 71f37c50 Add bazel build instructions to README (#543) 72d21983 Synchronize new proto/yaml changes. 65b0f874 Synchronize new proto/yaml changes. 61282bc7 Synchronize new proto/yaml changes. 650c0a3f Synchronize new proto/yaml changes. 37386f1e Synchronize new proto/yaml changes. 760dbab0 Synchronize new proto/yaml changes. 5206c82b Synchronize new proto/yaml changes. d5b868e3 Synchronize new proto/yaml changes. 6a84b326 Synchronize new proto/yaml changes. 645364a4 Synchronize new proto/yaml changes. 1119e688 Synchronize new proto/yaml changes. d4d57d76 Synchronize new proto/yaml changes. 5dd768f8 Synchronize new proto/yaml changes. 85132443 Synchronize new proto/yaml changes. 5fe8a4f6 Synchronize new proto/yaml changes. 0a3fc706 Synchronize new proto/yaml changes. f2b7be2d Synchronize new proto/yaml changes. e80435a1 Synchronize new proto/yaml changes. 621908b5 Synchronize new proto/yaml changes. e2a116ac Synchronize new proto/yaml changes. 76f1680c Synchronize new proto/yaml changes. d542a0b2 Synchronize new proto/yaml changes. 8c71ea47 Synchronize new proto/yaml changes. 285b7fb4 Synchronize new proto/yaml changes. 6e18ed1d Synchronize new proto/yaml changes. 6d247eee Synchronize new proto/yaml changes. dab002e2 Synchronize new proto/yaml changes. 234d29cb Synchronize new proto/yaml changes. 16fbbc6f Synchronize new proto/yaml changes. 291dbae8 Synchronize new proto/yaml changes. d3583136 Synchronize new proto/yaml changes. d05a746b Synchronize new proto/yaml changes. 18d67092 Synchronize new proto/yaml changes. 245caff6 Synchronize new proto/yaml changes. 1cb76908 Synchronize new proto/yaml changes. 51767e76 Synchronize new proto/yaml changes. e340f4a0 Synchronize new proto/yaml changes. e2f63891 Synchronize new proto/yaml changes. bb81e1cd Synchronize new proto/yaml changes. abd1c9a9 Synchronize new proto/yaml changes. 4d96a080 Synchronize new proto/yaml changes. 5c4d8933 Synchronize new proto/yaml changes. 8ecc5ed4 Synchronize new proto/yaml changes. 84b79e56 Synchronize new proto/yaml changes. eba92c8f Synchronize new proto/yaml changes. c1a591be Synchronize new proto/yaml changes. c986e1d9 Add bazel build output to gitignore (#540) 6df9a80f Synchronize new proto/yaml changes. b56ebb3c Synchronize new proto/yaml changes. 85611750 Synchronize new proto/yaml changes. 344961db Synchronize new proto/yaml changes. 8610b13d Synchronize new proto/yaml changes. 59b55924 Synchronize new proto/yaml changes. b4a22569 Synchronize new proto/yaml changes. 33b17eba Synchronize new proto/yaml changes. 359c7016 Synchronize new proto/yaml changes. 41d72d44 Synchronize new proto/yaml changes. eae7fe03 Synchronize new proto/yaml changes. 4d13d7a8 Synchronize new proto/yaml changes. 6cf73b53 Synchronize new proto/yaml changes. 2a18b588 Synchronize new proto/yaml changes. aee52e90 Synchronize new proto/yaml changes. f48dcc4e Synchronize new proto/yaml changes. 9c769d3a Synchronize new proto/yaml changes. f13e888c Synchronize new proto/yaml changes. 29f098cb Synchronize new proto/yaml changes. 2123ee7e Synchronize new proto/yaml changes. 20c31dd9 Synchronize new proto/yaml changes. a86da329 Synchronize new proto/yaml changes. c6f5707c Synchronize new proto/yaml changes. 0c90fefa Synchronize new proto/yaml changes. 540a500e Synchronize new proto/yaml changes. e406445a Synchronize new proto/yaml changes. f28ec08a Synchronize new proto/yaml changes. 3c04bbed Synchronize new proto/yaml changes. f36f3358 Synchronize new proto/yaml changes. b1f8d4cd Synchronize new proto/yaml changes. 07244bb7 Synchronize new proto/yaml changes. 6598bda8 Synchronize new proto/yaml changes. 219c19f9 Synchronize new proto/yaml changes. 738b3fa5 Synchronize new proto/yaml changes. 5a90fbea Synchronize new proto/yaml changes. 58ac0335 Synchronize new proto/yaml changes. 1c32fb18 Synchronize new proto/yaml changes. ad88e35b Synchronize new proto/yaml changes. ff7e79ad Synchronize new proto/yaml changes. 59f2494f Synchronize new proto/yaml changes. 668b4f35 Synchronize new proto/yaml changes. ccdcb03b Synchronize new proto/yaml changes. a36242d9 Synchronize new proto/yaml changes. acf32a44 Synchronize new proto/yaml changes. 9cf63704 Synchronize new proto/yaml changes. cec070c1 Synchronize new proto/yaml changes. 52164e34 Synchronize new proto/yaml changes. 18ab81ee Synchronize new proto/yaml changes. 0ce342a3 Synchronize new proto/yaml changes. 96cb6853 Synchronize new proto/yaml changes. 40629283 Synchronize new proto/yaml changes. 9578ae42 Synchronize new proto/yaml changes. 3b65205d Synchronize new proto/yaml changes. 1397ed2b Synchronize new proto/yaml changes. 1cc9058f Synchronize new proto/yaml changes. 1a4f0f12 Synchronize new proto/yaml changes. 0b81123e Synchronize new proto/yaml changes. ca618988 Synchronize new proto/yaml changes. 7f54ebf9 Synchronize new proto/yaml changes. 6d8420ba Synchronize new proto/yaml changes. c0c7e28c Synchronize new proto/yaml changes. 84f9bf2c Synchronize new proto/yaml changes. 49b7906b Synchronize new proto/yaml changes. c1e4972e Synchronize new proto/yaml changes. fb6037c6 Synchronize new proto/yaml changes. f26c727d Synchronize new proto/yaml changes. bce093da Synchronize new proto/yaml changes. acb5253c Synchronize new proto/yaml changes. 9607c399 Synchronize new proto/yaml changes. 8526811e Synchronize new proto/yaml changes. b1b6c9fd Synchronize new proto/yaml changes. f0195b40 Synchronize new proto/yaml changes. 3cdb7227 Synchronize new proto/yaml changes. a6b43984 Synchronize new proto/yaml changes. bb746ecb Synchronize new proto/yaml changes. 9aac88a2 Synchronize new proto/yaml changes. f581f5c5 Synchronize new proto/yaml changes. 33a4e6a0 Synchronize new proto/yaml changes. 96adaf6d Synchronize new proto/yaml changes. c3e6909a Synchronize new proto/yaml changes. 0ac60e21 Synchronize new proto/yaml changes. b4aa941f Synchronize new proto/yaml changes. e0706ecc Synchronize new proto/yaml changes. 7a81902f Synchronize new proto/yaml changes. f8d9c85c Synchronize new proto/yaml changes. ac33855e Synchronize new proto/yaml changes. 2156b349 Synchronize new proto/yaml changes. d16dcddc Synchronize new proto/yaml changes. 445901aa Synchronize new proto/yaml changes. 73babd10 Synchronize new proto/yaml changes. 1579fcf4 Synchronize new proto/yaml changes. fb44301b Synchronize new proto/yaml changes. deeb0a29 Synchronize new proto/yaml changes. 5125f979 Synchronize new proto/yaml changes. 659d66ec Synchronize new proto/yaml changes. cc4903c5 Synchronize new proto/yaml changes. c911062b Synchronize new proto/yaml changes. a111a53c Synchronize new proto/yaml changes. c050b888 Synchronize new proto/yaml changes. 4930597b Synchronize new proto/yaml changes. 2a5caab4 Synchronize new proto/yaml changes. dcf53d82 Synchronize new proto/yaml changes. 9efcd835 Synchronize new proto/yaml changes. b509315f Synchronize new proto/yaml changes. 7da57e24 Synchronize new proto/yaml changes. a39d8ac7 Synchronize new proto/yaml changes. 980cdfa8 Synchronize new proto/yaml changes. c04bc0dc Synchronize new proto/yaml changes. 0f9c82d6 Synchronize new proto/yaml changes. fe9310e4 Synchronize new proto/yaml changes. a207551d Synchronize new proto/yaml changes. 7260ddc1 Synchronize new proto/yaml changes. bbafa41f Synchronize new proto/yaml changes. d1f77b13 Synchronize new proto/yaml changes. 6f6505a6 Synchronize new proto/yaml changes. 200fbbe5 Synchronize new proto/yaml changes. e4ad4191 Synchronize new proto/yaml changes. 58249308 Synchronize new proto/yaml changes. e3f7a615 Synchronize new proto/yaml changes. 3cef6c23 Synchronize new proto/yaml changes. 0aa59b1d Synchronize new proto/yaml changes. 0e345901 Synchronize new proto/yaml changes. efa39a96 Synchronize new proto/yaml changes. b7a1d68e Synchronize new proto/yaml changes. 6f5b4632 Synchronize new proto/yaml changes. b4bfda93 Synchronize new proto/yaml changes. 36f292fa Synchronize new proto/yaml changes. 5a57f0c1 Synchronize new proto/yaml changes. e26f9c7c Synchronize new proto/yaml changes. fa657fcb Synchronize new proto/yaml changes. 80ed4d0b Synchronize new proto/yaml changes. b605b319 Synchronize new proto/yaml changes. 5e7316da Synchronize new proto/yaml changes. 8eaf1892 Synchronize new proto/yaml changes. bab91dd4 Synchronize new proto/yaml changes. 188ad84d Synchronize new proto/yaml changes. 8027f174 Synchronize new proto/yaml changes. f89dd4fc Synchronize new proto/yaml changes. e128801f Synchronize new proto/yaml changes. 21ee5472 Synchronize new proto/yaml changes. b92c0fc1 Synchronize new proto/yaml changes. 46a1b77c Synchronize new proto/yaml changes. 27aa9a66 Synchronize new proto/yaml changes. fc08bcc6 Synchronize new proto/yaml changes. 58ecdb1f Synchronize new proto/yaml changes. c44d1e89 Synchronize new proto/yaml changes. c4838226 Synchronize new proto/yaml changes. 39c5674b Synchronize new proto/yaml changes. f9f50870 Synchronize new proto/yaml changes. 36ccda19 Synchronize new proto/yaml changes. 826d54d0 Synchronize new proto/yaml changes. efd5555f Synchronize new proto/yaml changes. caa431d9 Synchronize new proto/yaml changes. 58863d90 Synchronize new proto/yaml changes. 7ad2c813 Synchronize new proto/yaml changes. e434fade Synchronize new proto/yaml changes. 65ee9650 Synchronize new proto/yaml changes. ae909b82 Synchronize new proto/yaml changes. b09f5ff6 Synchronize new proto/yaml changes. 3afba2fd Synchronize new proto/yaml changes. bee79fbe Synchronize new proto/yaml changes. 742b6445 Synchronize new proto/yaml changes. ddb39a21 Synchronize new proto/yaml changes. 02111201 Synchronize new proto/yaml changes. 48d6f426 Synchronize new proto/yaml changes. 84588c65 Synchronize new proto/yaml changes. ea879bed Synchronize new proto/yaml changes. 7b34e5a3 Synchronize new proto/yaml changes. 8f1de3d4 Synchronize new proto/yaml changes. cd17066d Synchronize new proto/yaml changes. d57ed0de Synchronize new proto/yaml changes. 8bec26a9 Synchronize new proto/yaml changes. 6e91dea1 Synchronize new proto/yaml changes. 3051b727 Synchronize new proto/yaml changes. b71d0c74 Synchronize new proto/yaml changes. 062c4507 Synchronize new proto/yaml changes. 071efb9a Synchronize new proto/yaml changes. 8d64b123 Synchronize new proto/yaml changes. 9d0fbbbc Synchronize new proto/yaml changes. f9dc2594 Synchronize new proto/yaml changes. 444cd88d Synchronize new proto/yaml changes. 837973f5 Synchronize new proto/yaml changes. 187ee24f Synchronize new proto/yaml changes. 7457268e Synchronize new proto/yaml changes. 575652a7 Synchronize new proto/yaml changes. f9f72b1e Synchronize new proto/yaml changes. 8d2b2fb0 Synchronize new proto/yaml changes. 41baf3f3 Synchronize new proto/yaml changes. 59036b03 Synchronize new proto/yaml changes. 78f10b20 Synchronize new proto/yaml changes. 254c358c Synchronize new proto/yaml changes. 5338cfd5 Synchronize new proto/yaml changes. 9f426eaf Synchronize new proto/yaml changes. 7696d3c3 Synchronize new proto/yaml changes. 8fe40cc1 Synchronize new proto/yaml changes. 82b6c2e6 Synchronize new proto/yaml changes. 680c98c9 Synchronize new proto/yaml changes. 79ab27f3 Synchronize new proto/yaml changes. edcd9a93 Synchronize new proto/yaml changes. 2a57c315 Synchronize new proto/yaml changes. 098a5976 Synchronize new proto/yaml changes. 04aa50dd Synchronize new proto/yaml changes. c5961868 Synchronize new proto/yaml changes. bdd31f00 Synchronize new proto/yaml changes. 0ea69a04 Synchronize new proto/yaml changes. 468e07f7 Synchronize new proto/yaml changes. 288ebfec Synchronize new proto/yaml changes. 0010da62 Synchronize new proto/yaml changes. d2067c96 Synchronize new proto/yaml changes. ca015bbd Synchronize new proto/yaml changes. b1daa9a1 Rollback remaining parts of #273 (#516) 0642f710 Synchronize new proto/yaml changes. cd031b10 Synchronize new proto/yaml changes. 3c06c24f Synchronize new proto/yaml changes. a0d06e43 Synchronize new proto/yaml changes. 2abfda53 Synchronize new proto/yaml changes. a4b52a27 Synchronize new proto/yaml changes. d777a7f6 Synchronize new proto/yaml changes. b752db63 Synchronize new proto/yaml changes. 67e68a3c Synchronize new proto/yaml changes. abaec121 Synchronize new proto/yaml changes. a31e5f07 Synchronize new proto/yaml changes. 0a75f3e4 Synchronize new proto/yaml changes. 3e68e194 Synchronize new proto/yaml changes. 2c07771e Synchronize new proto/yaml changes. 3b3acb6f Synchronize new proto/yaml changes. dd70db5c Synchronize new proto/yaml changes. 3544ab16 Synchronize new proto/yaml changes. a0cd2566 Synchronize new proto/yaml changes. c2c18bd4 Synchronize new proto/yaml changes. f47204e8 Synchronize new proto/yaml changes. 28b7eb3a Synchronize new proto/yaml changes. 8dfde277 Synchronize new proto/yaml changes. 201d7be7 Synchronize new proto/yaml changes. 2aa0a83c Synchronize new proto/yaml changes. 90c93cde Synchronize new proto/yaml changes. d646c7cd Synchronize new proto/yaml changes. 3ab16d75 Synchronize new proto/yaml changes. a6c0a323 Synchronize new proto/yaml changes. f71c8b70 Synchronize new proto/yaml changes. 9e5eadf7 Synchronize new proto/yaml changes. b24b3a74 Synchronize new proto/yaml changes. 2c9964f1 Synchronize new proto/yaml changes. bae7672e Synchronize new proto/yaml changes. 95eb08fe Synchronize new proto/yaml changes. 1d9cbcbe Synchronize new proto/yaml changes. 00cb39ef Synchronize new proto/yaml changes. ec526abe Synchronize new proto/yaml changes. d8c99588 Synchronize new proto/yaml changes. 01aee5ba Synchronize new proto/yaml changes. 9aac8c3d Synchronize new proto/yaml changes. 78abf015 Synchronize new proto/yaml changes. 6c719c00 Synchronize new proto/yaml changes. 9c3174ae Synchronize new proto/yaml changes. 0554eb8a Synchronize new proto/yaml changes. 380eba07 Synchronize new proto/yaml changes. 2584090f Synchronize new proto/yaml changes. fe2e4815 Synchronize new proto/yaml changes. c602cf2f Synchronize new proto/yaml changes. e24e2936 Synchronize new proto/yaml changes. 8b436afb Synchronize new proto/yaml changes. ef645654 use latest artman image d6c8c3fb use latest artman image 685f641a Synchronize new proto/yaml changes. a49569cc Synchronize new proto/yaml changes. 70192f3c Synchronize new proto/yaml changes. 913ad3a0 Synchronize new proto/yaml changes. 61a69d1f Synchronize new proto/yaml changes. git-subtree-dir: third_party/googleapis git-subtree-split: 96d5a05171e99b6a2378eb0a3423f765351878b7 --- .bazelrc | 2 + .circleci/config.yml | 2 +- .cloudbuild/Dockerfile.bazel-gapic | 7 + .cloudbuild/cloudbuild.yaml | 20 + .cloudbuild/write-latest.sh | 3 + .gitignore | 1 + .gitmodules | 12 - BUILD | 1 - BUILD.bazel | 129 ++ README.md | 44 + WORKSPACE | 179 +- google/BUILD.bazel | 0 google/ads/googleads/README.md | 21 + google/ads/googleads/base.yaml | 276 +++ google/ads/googleads/v1/common/ad_asset.proto | 64 + .../googleads/v1/common/ad_type_infos.proto | 573 +++++ .../ads/googleads/v1/common/asset_types.proto | 82 + google/ads/googleads/v1/common/bidding.proto | 224 ++ .../googleads/v1/common/click_location.proto | 50 + google/ads/googleads/v1/common/criteria.proto | 606 ++++++ .../criterion_category_availability.proto | 88 + .../v1/common/custom_parameter.proto | 42 + google/ads/googleads/v1/common/dates.proto | 41 + .../explorer_auto_optimizer_setting.proto | 40 + .../ads/googleads/v1/common/extensions.proto | 353 +++ .../ads/googleads/v1/common/feed_common.proto | 41 + .../googleads/v1/common/final_app_url.proto | 49 + .../googleads/v1/common/frequency_cap.proto | 66 + .../v1/common/keyword_plan_common.proto | 43 + .../v1/common/matching_function.proto | 131 ++ google/ads/googleads/v1/common/metrics.proto | 542 +++++ google/ads/googleads/v1/common/policy.proto | 220 ++ .../v1/common/real_time_bidding_setting.proto | 39 + google/ads/googleads/v1/common/segments.proto | 319 +++ .../ads/googleads/v1/common/simulation.proto | 160 ++ .../ads/googleads/v1/common/tag_snippet.proto | 53 + .../v1/common/targeting_setting.proto | 58 + .../ads/googleads/v1/common/text_label.proto | 42 + .../googleads/v1/common/url_collection.proto | 47 + .../ads/googleads/v1/common/user_lists.proto | 306 +++ google/ads/googleads/v1/common/value.proto | 52 + .../googleads/v1/enums/access_reason.proto | 56 + .../account_budget_proposal_status.proto | 62 + .../enums/account_budget_proposal_type.proto | 55 + .../v1/enums/account_budget_status.proto | 52 + .../ad_customizer_placeholder_field.proto | 55 + .../v1/enums/ad_group_ad_rotation_mode.proto | 52 + .../v1/enums/ad_group_ad_status.proto | 54 + .../ad_group_criterion_approval_status.proto | 55 + .../v1/enums/ad_group_criterion_status.proto | 54 + .../googleads/v1/enums/ad_group_status.proto | 54 + .../googleads/v1/enums/ad_group_type.proto | 83 + .../googleads/v1/enums/ad_network_type.proto | 61 + .../ad_serving_optimization_status.proto | 63 + .../ads/googleads/v1/enums/ad_strength.proto | 61 + google/ads/googleads/v1/enums/ad_type.proto | 103 + .../enums/advertising_channel_sub_type.proto | 86 + .../v1/enums/advertising_channel_type.proto | 63 + ...iate_location_feed_relationship_type.proto | 47 + ...affiliate_location_placeholder_field.proto | 76 + .../googleads/v1/enums/age_range_type.proto | 64 + .../v1/enums/app_campaign_app_store.proto | 49 + ..._campaign_bidding_strategy_goal_type.proto | 63 + .../v1/enums/app_payment_model_type.proto | 46 + .../v1/enums/app_placeholder_field.proto | 74 + google/ads/googleads/v1/enums/app_store.proto | 49 + .../enums/app_url_operating_system_type.proto | 49 + .../ads/googleads/v1/enums/asset_type.proto | 55 + .../v1/enums/attribution_model.proto | 71 + .../v1/enums/bid_modifier_source.proto | 50 + .../googleads/v1/enums/bidding_source.proto | 54 + .../v1/enums/bidding_strategy_status.proto | 51 + .../v1/enums/bidding_strategy_type.proto | 107 + .../v1/enums/billing_setup_status.proto | 57 + .../v1/enums/brand_safety_suitability.proto | 72 + .../v1/enums/budget_delivery_method.proto | 52 + .../googleads/v1/enums/budget_period.proto | 52 + .../googleads/v1/enums/budget_status.proto | 49 + .../ads/googleads/v1/enums/budget_type.proto | 65 + .../call_conversion_reporting_state.proto | 55 + .../v1/enums/call_placeholder_field.proto | 65 + .../v1/enums/callout_placeholder_field.proto | 46 + .../v1/enums/campaign_criterion_status.proto | 56 + .../v1/enums/campaign_draft_status.proto | 66 + .../v1/enums/campaign_experiment_status.proto | 78 + ...mpaign_experiment_traffic_split_type.proto | 54 + .../v1/enums/campaign_experiment_type.proto | 58 + .../v1/enums/campaign_serving_status.proto | 60 + .../v1/enums/campaign_shared_set_status.proto | 49 + .../googleads/v1/enums/campaign_status.proto | 52 + .../v1/enums/change_status_operation.proto | 53 + .../enums/change_status_resource_type.proto | 75 + .../ads/googleads/v1/enums/click_type.proto | 202 ++ .../v1/enums/content_label_type.proto | 88 + .../v1/enums/conversion_action_category.proto | 60 + .../conversion_action_counting_type.proto | 51 + .../v1/enums/conversion_action_status.proto | 53 + .../v1/enums/conversion_action_type.proto | 72 + .../v1/enums/conversion_adjustment_type.proto | 51 + .../conversion_attribution_event_type.proto | 47 + .../v1/enums/conversion_lag_bucket.proto | 116 + .../conversion_or_adjustment_lag_bucket.proto | 205 ++ ...n_category_channel_availability_mode.proto | 57 + ...on_category_locale_availability_mode.proto | 60 + .../criterion_system_serving_status.proto | 49 + .../googleads/v1/enums/criterion_type.proto | 133 ++ .../enums/custom_interest_member_type.proto | 49 + .../v1/enums/custom_interest_status.proto | 50 + .../v1/enums/custom_interest_type.proto | 49 + .../v1/enums/custom_placeholder_field.proto | 128 ++ .../customer_match_upload_key_type.proto | 52 + ...onversion_eligibility_failure_reason.proto | 67 + .../v1/enums/data_driven_model_status.proto | 61 + .../ads/googleads/v1/enums/day_of_week.proto | 64 + google/ads/googleads/v1/enums/device.proto | 58 + .../v1/enums/display_ad_format_setting.proto | 53 + .../enums/display_upload_product_type.proto | 96 + .../enums/dsa_page_feed_criterion_field.proto | 50 + .../enums/education_placeholder_field.proto | 110 + .../v1/enums/extension_setting_device.proto | 51 + .../googleads/v1/enums/extension_type.proto | 80 + .../v1/enums/external_conversion_source.proto | 129 ++ .../v1/enums/feed_attribute_type.proto | 82 + .../feed_item_quality_approval_status.proto | 51 + ...feed_item_quality_disapproval_reason.proto | 98 + .../googleads/v1/enums/feed_item_status.proto | 49 + .../v1/enums/feed_item_target_device.proto | 47 + .../v1/enums/feed_item_target_type.proto | 52 + .../enums/feed_item_validation_status.proto | 52 + .../googleads/v1/enums/feed_link_status.proto | 49 + .../enums/feed_mapping_criterion_type.proto | 49 + .../v1/enums/feed_mapping_status.proto | 49 + .../ads/googleads/v1/enums/feed_origin.proto | 52 + .../ads/googleads/v1/enums/feed_status.proto | 49 + .../v1/enums/flight_placeholder_field.proto | 117 + .../v1/enums/frequency_cap_event_type.proto | 49 + .../v1/enums/frequency_cap_level.proto | 53 + .../v1/enums/frequency_cap_time_unit.proto | 52 + .../ads/googleads/v1/enums/gender_type.proto | 52 + .../v1/enums/geo_target_constant_status.proto | 51 + .../v1/enums/geo_targeting_restriction.proto | 48 + .../v1/enums/geo_targeting_type.proto | 49 + .../v1/enums/google_ads_field_category.proto | 60 + .../v1/enums/google_ads_field_data_type.proto | 101 + .../v1/enums/hotel_date_selection_type.proto | 49 + .../v1/enums/hotel_placeholder_field.proto | 123 ++ .../googleads/v1/enums/hotel_rate_type.proto | 63 + .../v1/enums/income_range_type.proto | 64 + .../v1/enums/interaction_event_type.proto | 61 + .../googleads/v1/enums/interaction_type.proto | 46 + .../v1/enums/job_placeholder_field.proto | 114 + .../v1/enums/keyword_match_type.proto | 52 + .../keyword_plan_competition_level.proto | 56 + .../keyword_plan_forecast_interval.proto | 55 + .../v1/enums/keyword_plan_network.proto | 49 + .../ads/googleads/v1/enums/label_status.proto | 47 + .../legacy_app_install_ad_app_store.proto | 58 + .../listing_custom_attribute_index.proto | 58 + .../v1/enums/listing_group_type.proto | 51 + .../v1/enums/local_placeholder_field.proto | 118 + ..._extension_targeting_criterion_field.proto | 61 + .../enums/location_group_radius_units.proto | 49 + .../v1/enums/location_placeholder_field.proto | 67 + .../v1/enums/manager_link_status.proto | 58 + .../matching_function_context_type.proto | 49 + .../v1/enums/matching_function_operator.proto | 64 + .../ads/googleads/v1/enums/media_type.proto | 63 + .../enums/merchant_center_link_status.proto | 52 + .../v1/enums/message_placeholder_field.proto | 60 + google/ads/googleads/v1/enums/mime_type.proto | 81 + .../googleads/v1/enums/minute_of_hour.proto | 55 + .../v1/enums/mobile_device_type.proto | 49 + .../googleads/v1/enums/month_of_year.proto | 79 + .../v1/enums/mutate_job_status.proto | 52 + .../v1/enums/negative_geo_target_type.proto | 51 + ...erating_system_version_operator_type.proto | 49 + .../page_one_promoted_strategy_goal.proto | 50 + .../v1/enums/parental_status_type.proto | 52 + .../ads/googleads/v1/enums/payment_mode.proto | 58 + .../googleads/v1/enums/placeholder_type.proto | 120 ++ .../googleads/v1/enums/placement_type.proto | 58 + .../v1/enums/policy_approval_status.proto | 60 + .../v1/enums/policy_review_status.proto | 55 + .../v1/enums/policy_topic_entry_type.proto | 65 + ...idence_destination_mismatch_url_type.proto | 61 + ...dence_destination_not_working_device.proto | 56 + .../v1/enums/positive_geo_target_type.proto | 55 + .../v1/enums/preferred_content_type.proto | 46 + .../price_extension_price_qualifier.proto | 52 + .../v1/enums/price_extension_price_unit.proto | 61 + .../v1/enums/price_extension_type.proto | 70 + .../v1/enums/price_placeholder_field.proto | 239 +++ .../product_bidding_category_level.proto | 56 + .../product_bidding_category_status.proto | 49 + .../googleads/v1/enums/product_channel.proto | 49 + .../enums/product_channel_exclusivity.proto | 51 + .../v1/enums/product_condition.proto | 52 + .../v1/enums/product_type_level.proto | 58 + ...romotion_extension_discount_modifier.proto | 47 + .../enums/promotion_extension_occasion.proto | 156 ++ .../enums/promotion_placeholder_field.proto | 94 + .../v1/enums/proximity_radius_units.proto | 49 + .../v1/enums/quality_score_bucket.proto | 52 + .../enums/real_estate_placeholder_field.proto | 114 + .../v1/enums/recommendation_type.proto | 91 + .../search_engine_results_page_type.proto | 53 + .../v1/enums/search_term_match_type.proto | 58 + .../enums/search_term_targeting_status.proto | 57 + .../v1/enums/served_asset_field_type.proto | 60 + .../v1/enums/shared_set_status.proto | 49 + .../googleads/v1/enums/shared_set_type.proto | 49 + .../simulation_modification_method.proto | 53 + .../googleads/v1/enums/simulation_type.proto | 55 + .../v1/enums/sitelink_placeholder_field.proto | 68 + google/ads/googleads/v1/enums/slot.proto | 64 + .../v1/enums/spending_limit_type.proto | 47 + ...structured_snippet_placeholder_field.proto | 55 + .../enums/system_managed_entity_source.proto | 46 + ...arget_cpa_opt_in_recommendation_goal.proto | 56 + .../target_impression_share_location.proto | 54 + .../v1/enums/targeting_dimension.proto | 73 + google/ads/googleads/v1/enums/time_type.proto | 50 + .../v1/enums/tracking_code_page_format.proto | 49 + .../v1/enums/tracking_code_type.proto | 54 + .../v1/enums/travel_placeholder_field.proto | 127 ++ .../enums/user_interest_taxonomy_type.proto | 58 + .../v1/enums/user_list_access_status.proto | 49 + .../v1/enums/user_list_closing_reason.proto | 47 + .../user_list_combined_rule_operator.proto | 47 + .../user_list_crm_data_source_type.proto | 50 + .../user_list_date_rule_item_operator.proto | 53 + .../user_list_logical_rule_operator.proto | 50 + .../enums/user_list_membership_status.proto | 51 + .../user_list_number_rule_item_operator.proto | 59 + .../user_list_prepopulation_status.proto | 50 + .../v1/enums/user_list_rule_type.proto | 47 + .../v1/enums/user_list_size_range.proto | 91 + .../user_list_string_rule_item_operator.proto | 65 + .../googleads/v1/enums/user_list_type.proto | 62 + .../vanity_pharma_display_url_mode.proto | 49 + .../v1/enums/vanity_pharma_text.proto | 86 + .../v1/enums/webpage_condition_operand.proto | 58 + .../v1/enums/webpage_condition_operator.proto | 50 + .../account_budget_proposal_error.proto | 113 + .../v1/errors/ad_customizer_error.proto | 58 + google/ads/googleads/v1/errors/ad_error.proto | 453 ++++ .../v1/errors/ad_group_ad_error.proto | 69 + .../errors/ad_group_bid_modifier_error.proto | 50 + .../v1/errors/ad_group_criterion_error.proto | 164 ++ .../googleads/v1/errors/ad_group_error.proto | 82 + .../v1/errors/ad_group_feed_error.proto | 66 + .../v1/errors/ad_parameter_error.proto | 49 + .../v1/errors/ad_sharing_error.proto | 53 + .../ads/googleads/v1/errors/adx_error.proto | 46 + .../ads/googleads/v1/errors/asset_error.proto | 60 + .../v1/errors/authentication_error.proto | 102 + .../v1/errors/authorization_error.proto | 81 + .../googleads/v1/errors/bidding_error.proto | 118 + .../v1/errors/bidding_strategy_error.proto | 60 + .../v1/errors/billing_setup_error.proto | 100 + .../v1/errors/campaign_budget_error.proto | 93 + .../v1/errors/campaign_criterion_error.proto | 80 + .../v1/errors/campaign_draft_error.proto | 80 + .../googleads/v1/errors/campaign_error.proto | 174 ++ .../v1/errors/campaign_experiment_error.proto | 82 + .../v1/errors/campaign_feed_error.proto | 62 + .../v1/errors/campaign_shared_set_error.proto | 46 + .../v1/errors/change_status_error.proto | 46 + .../v1/errors/collection_size_error.proto | 49 + .../googleads/v1/errors/context_error.proto | 49 + .../v1/errors/conversion_action_error.proto | 74 + .../conversion_adjustment_upload_error.proto | 79 + .../v1/errors/conversion_upload_error.proto | 131 ++ .../v1/errors/country_code_error.proto | 46 + .../googleads/v1/errors/criterion_error.proto | 368 ++++ .../v1/errors/custom_interest_error.proto | 65 + .../errors/customer_client_link_error.proto | 64 + .../googleads/v1/errors/customer_error.proto | 50 + .../v1/errors/customer_feed_error.proto | 65 + .../errors/customer_manager_link_error.proto | 70 + .../googleads/v1/errors/database_error.proto | 47 + .../ads/googleads/v1/errors/date_error.proto | 73 + .../v1/errors/date_range_error.proto | 58 + .../googleads/v1/errors/distinct_error.proto | 49 + .../ads/googleads/v1/errors/enum_error.proto | 46 + google/ads/googleads/v1/errors/errors.proto | 556 +++++ .../v1/errors/extension_feed_item_error.proto | 187 ++ .../v1/errors/extension_setting_error.proto | 256 +++ .../feed_attribute_reference_error.proto | 52 + .../ads/googleads/v1/errors/feed_error.proto | 104 + .../googleads/v1/errors/feed_item_error.proto | 70 + .../v1/errors/feed_item_target_error.proto | 63 + .../errors/feed_item_validation_error.proto | 346 +++ .../v1/errors/feed_mapping_error.proto | 96 + .../ads/googleads/v1/errors/field_error.proto | 64 + .../v1/errors/field_mask_error.proto | 57 + .../googleads/v1/errors/function_error.proto | 92 + .../v1/errors/function_parsing_error.proto | 76 + ...geo_target_constant_suggestion_error.proto | 55 + .../googleads/v1/errors/header_error.proto | 46 + google/ads/googleads/v1/errors/id_error.proto | 46 + .../ads/googleads/v1/errors/image_error.proto | 155 ++ .../googleads/v1/errors/internal_error.proto | 54 + .../errors/keyword_plan_ad_group_error.proto | 52 + .../errors/keyword_plan_campaign_error.proto | 61 + .../v1/errors/keyword_plan_error.proto | 90 + .../v1/errors/keyword_plan_idea_error.proto | 49 + .../errors/keyword_plan_keyword_error.proto | 64 + .../keyword_plan_negative_keyword_error.proto | 45 + .../ads/googleads/v1/errors/label_error.proto | 72 + .../v1/errors/language_code_error.proto | 49 + .../v1/errors/list_operation_error.proto | 49 + .../v1/errors/manager_link_error.proto | 88 + .../v1/errors/media_bundle_error.proto | 109 + .../v1/errors/media_file_error.proto | 112 + .../v1/errors/media_upload_error.proto | 55 + .../v1/errors/multiplier_error.proto | 80 + .../googleads/v1/errors/mutate_error.proto | 62 + .../v1/errors/mutate_job_error.proto | 59 + .../errors/new_resource_creation_error.proto | 53 + .../googleads/v1/errors/not_empty_error.proto | 46 + .../v1/errors/not_whitelisted_error.proto | 48 + .../ads/googleads/v1/errors/null_error.proto | 46 + .../operation_access_denied_error.proto | 73 + .../googleads/v1/errors/operator_error.proto | 46 + .../v1/errors/partial_failure_error.proto | 47 + .../v1/errors/policy_finding_error.proto | 50 + .../policy_validation_parameter_error.proto | 54 + .../v1/errors/policy_violation_error.proto | 46 + .../ads/googleads/v1/errors/query_error.proto | 213 ++ .../ads/googleads/v1/errors/quota_error.proto | 52 + .../ads/googleads/v1/errors/range_error.proto | 49 + .../v1/errors/recommendation_error.proto | 89 + .../v1/errors/region_code_error.proto | 46 + .../googleads/v1/errors/request_error.proto | 100 + .../errors/resource_access_denied_error.proto | 46 + .../resource_count_limit_exceeded_error.proto | 87 + .../googleads/v1/errors/setting_error.proto | 106 + .../v1/errors/shared_criterion_error.proto | 46 + .../v1/errors/shared_set_error.proto | 55 + .../v1/errors/size_limit_error.proto | 49 + .../v1/errors/string_format_error.proto | 49 + .../v1/errors/string_length_error.proto | 49 + .../googleads/v1/errors/url_field_error.proto | 214 ++ .../googleads/v1/errors/user_list_error.proto | 128 ++ .../youtube_video_registration_error.proto | 49 + .../v1/resources/account_budget.proto | 241 +++ .../resources/account_budget_proposal.proto | 148 ++ google/ads/googleads/v1/resources/ad.proto | 166 ++ .../ads/googleads/v1/resources/ad_group.proto | 154 ++ .../googleads/v1/resources/ad_group_ad.proto | 78 + .../v1/resources/ad_group_ad_label.proto | 46 + .../v1/resources/ad_group_audience_view.proto | 43 + .../v1/resources/ad_group_bid_modifier.proto | 91 + .../v1/resources/ad_group_criterion.proto | 253 +++ .../resources/ad_group_criterion_label.proto | 47 + .../ad_group_criterion_simulation.proto | 75 + .../ad_group_extension_setting.proto | 65 + .../v1/resources/ad_group_feed.proto | 64 + .../v1/resources/ad_group_label.proto | 46 + .../v1/resources/ad_group_simulation.proto | 87 + .../googleads/v1/resources/ad_parameter.proto | 68 + .../v1/resources/ad_schedule_view.proto | 41 + .../v1/resources/age_range_view.proto | 40 + google/ads/googleads/v1/resources/asset.proto | 68 + .../v1/resources/bidding_strategy.proto | 112 + .../v1/resources/billing_setup.proto | 125 ++ .../ads/googleads/v1/resources/campaign.proto | 360 ++++ .../v1/resources/campaign_audience_view.proto | 45 + .../v1/resources/campaign_bid_modifier.proto | 59 + .../v1/resources/campaign_budget.proto | 151 ++ .../v1/resources/campaign_criterion.proto | 153 ++ .../campaign_criterion_simulation.proto | 76 + .../v1/resources/campaign_draft.proto | 78 + .../v1/resources/campaign_experiment.proto | 101 + .../campaign_extension_setting.proto | 65 + .../v1/resources/campaign_feed.proto | 64 + .../v1/resources/campaign_label.proto | 46 + .../v1/resources/campaign_shared_set.proto | 58 + .../v1/resources/carrier_constant.proto | 51 + .../v1/resources/change_status.proto | 86 + .../googleads/v1/resources/click_view.proto | 58 + .../v1/resources/conversion_action.proto | 139 ++ .../v1/resources/custom_interest.proto | 82 + .../ads/googleads/v1/resources/customer.proto | 128 ++ .../v1/resources/customer_client.proto | 56 + .../v1/resources/customer_client_link.proto | 57 + .../customer_extension_setting.proto | 57 + .../v1/resources/customer_feed.proto | 61 + .../v1/resources/customer_label.proto | 52 + .../v1/resources/customer_manager_link.proto | 52 + .../customer_negative_criterion.proto | 73 + .../v1/resources/detail_placement_view.proto | 63 + .../v1/resources/display_keyword_view.proto | 40 + .../v1/resources/domain_category.proto | 76 + .../dynamic_search_ads_search_term_view.proto | 62 + .../expanded_landing_page_view.proto | 46 + .../v1/resources/extension_feed_item.proto | 127 ++ google/ads/googleads/v1/resources/feed.proto | 182 ++ .../googleads/v1/resources/feed_item.proto | 206 ++ .../v1/resources/feed_item_target.proto | 76 + .../googleads/v1/resources/feed_mapping.proto | 195 ++ .../v1/resources/feed_placeholder_view.proto | 45 + .../googleads/v1/resources/gender_view.proto | 40 + .../v1/resources/geo_target_constant.proto | 62 + .../v1/resources/geographic_view.proto | 55 + .../v1/resources/google_ads_field.proto | 109 + .../v1/resources/group_placement_view.proto | 58 + .../v1/resources/hotel_group_view.proto | 40 + .../v1/resources/hotel_performance_view.proto | 40 + .../googleads/v1/resources/keyword_plan.proto | 72 + .../v1/resources/keyword_plan_ad_group.proto | 59 + .../v1/resources/keyword_plan_campaign.proto | 84 + .../v1/resources/keyword_plan_keyword.proto | 60 + .../keyword_plan_negative_keyword.proto | 57 + .../googleads/v1/resources/keyword_view.proto | 40 + google/ads/googleads/v1/resources/label.proto | 56 + .../v1/resources/landing_page_view.proto | 46 + .../v1/resources/language_constant.proto | 54 + .../v1/resources/location_view.proto | 41 + .../v1/resources/managed_placement_view.proto | 41 + .../googleads/v1/resources/media_file.proto | 114 + .../v1/resources/merchant_center_link.proto | 55 + .../mobile_app_category_constant.proto | 47 + .../v1/resources/mobile_device_constant.proto | 57 + .../googleads/v1/resources/mutate_job.proto | 84 + .../operating_system_version_constant.proto | 64 + .../paid_organic_search_term_view.proto | 46 + .../v1/resources/parental_status_view.proto | 40 + .../v1/resources/payments_account.proto | 60 + .../product_bidding_category_constant.proto | 70 + .../v1/resources/product_group_view.proto | 40 + .../v1/resources/recommendation.proto | 292 +++ .../v1/resources/remarketing_action.proto | 56 + .../v1/resources/search_term_view.proto | 55 + .../v1/resources/shared_criterion.proto | 78 + .../googleads/v1/resources/shared_set.proto | 67 + .../resources/shopping_performance_view.proto | 44 + .../v1/resources/topic_constant.proto | 59 + .../googleads/v1/resources/topic_view.proto | 40 + .../v1/resources/user_interest.proto | 63 + .../googleads/v1/resources/user_list.proto | 165 ++ google/ads/googleads/v1/resources/video.proto | 53 + .../account_budget_proposal_service.proto | 128 ++ .../v1/services/account_budget_service.proto | 52 + .../services/ad_group_ad_label_service.proto | 117 + .../v1/services/ad_group_ad_service.proto | 126 ++ .../ad_group_audience_view_service.proto | 49 + .../ad_group_bid_modifier_service.proto | 125 ++ .../ad_group_criterion_label_service.proto | 117 + .../services/ad_group_criterion_service.proto | 135 ++ ...d_group_criterion_simulation_service.proto | 50 + .../ad_group_extension_setting_service.proto | 127 ++ .../v1/services/ad_group_feed_service.proto | 123 ++ .../v1/services/ad_group_label_service.proto | 116 + .../v1/services/ad_group_service.proto | 120 ++ .../ad_group_simulation_service.proto | 50 + .../v1/services/ad_parameter_service.proto | 124 ++ .../services/ad_schedule_view_service.proto | 50 + .../v1/services/age_range_view_service.proto | 50 + .../googleads/v1/services/asset_service.proto | 93 + .../services/bidding_strategy_service.proto | 124 ++ .../v1/services/billing_setup_service.proto | 106 + .../campaign_audience_view_service.proto | 50 + .../campaign_bid_modifier_service.proto | 124 ++ .../v1/services/campaign_budget_service.proto | 123 ++ .../services/campaign_criterion_service.proto | 122 ++ ...ampaign_criterion_simulation_service.proto | 50 + .../v1/services/campaign_draft_service.proto | 181 ++ .../campaign_experiment_service.proto | 265 +++ .../campaign_extension_setting_service.proto | 127 ++ .../v1/services/campaign_feed_service.proto | 123 ++ .../v1/services/campaign_label_service.proto | 116 + .../v1/services/campaign_service.proto | 122 ++ .../campaign_shared_set_service.proto | 116 + .../services/carrier_constant_service.proto | 50 + .../v1/services/change_status_service.proto | 50 + .../v1/services/click_view_service.proto | 50 + .../services/conversion_action_service.proto | 125 ++ ...conversion_adjustment_upload_service.proto | 166 ++ .../services/conversion_upload_service.proto | 224 ++ .../v1/services/custom_interest_service.proto | 104 + .../customer_client_link_service.proto | 96 + .../v1/services/customer_client_service.proto | 50 + .../customer_extension_setting_service.proto | 126 ++ .../v1/services/customer_feed_service.proto | 123 ++ .../v1/services/customer_label_service.proto | 116 + .../customer_manager_link_service.proto | 96 + .../customer_negative_criterion_service.proto | 114 + .../v1/services/customer_service.proto | 142 ++ .../detail_placement_view_service.proto | 50 + .../display_keyword_view_service.proto | 50 + .../v1/services/domain_category_service.proto | 50 + ..._search_ads_search_term_view_service.proto | 52 + .../expanded_landing_page_view_service.proto | 51 + .../extension_feed_item_service.proto | 112 + .../v1/services/feed_item_service.proto | 123 ++ .../services/feed_item_target_service.proto | 98 + .../v1/services/feed_mapping_service.proto | 115 + .../feed_placeholder_view_service.proto | 50 + .../googleads/v1/services/feed_service.proto | 121 ++ .../v1/services/gender_view_service.proto | 50 + .../geo_target_constant_service.proto | 124 ++ .../v1/services/geographic_view_service.proto | 50 + .../services/google_ads_field_service.proto | 91 + .../v1/services/google_ads_service.proto | 880 ++++++++ .../group_placement_view_service.proto | 50 + .../services/hotel_group_view_service.proto | 50 + .../hotel_performance_view_service.proto | 50 + .../keyword_plan_ad_group_service.proto | 125 ++ .../keyword_plan_campaign_service.proto | 125 ++ .../services/keyword_plan_idea_service.proto | 117 + .../keyword_plan_keyword_service.proto | 125 ++ ...eyword_plan_negative_keyword_service.proto | 129 ++ .../v1/services/keyword_plan_service.proto | 248 +++ .../v1/services/keyword_view_service.proto | 50 + .../googleads/v1/services/label_service.proto | 118 + .../services/landing_page_view_service.proto | 51 + .../services/language_constant_service.proto | 50 + .../v1/services/location_view_service.proto | 50 + .../managed_placement_view_service.proto | 50 + .../v1/services/media_file_service.proto | 108 + .../merchant_center_link_service.proto | 126 ++ ...mobile_app_category_constant_service.proto | 48 + .../mobile_device_constant_service.proto | 50 + .../v1/services/mutate_job_service.proto | 193 ++ ...ting_system_version_constant_service.proto | 52 + ...aid_organic_search_term_view_service.proto | 50 + .../parental_status_view_service.proto | 50 + .../services/payments_account_service.proto | 60 + ...ct_bidding_category_constant_service.proto | 52 + .../services/product_group_view_service.proto | 50 + .../v1/services/recommendation_service.proto | 254 +++ .../services/remarketing_action_service.proto | 117 + .../services/search_term_view_service.proto | 50 + .../services/shared_criterion_service.proto | 115 + .../v1/services/shared_set_service.proto | 122 ++ .../shopping_performance_view_service.proto | 50 + .../v1/services/topic_constant_service.proto | 50 + .../v1/services/topic_view_service.proto | 50 + .../v1/services/user_interest_service.proto | 50 + .../v1/services/user_list_service.proto | 122 ++ .../googleads/v1/services/video_service.proto | 50 + google/ads/googleads/v2/common/ad_asset.proto | 63 + .../googleads/v2/common/ad_type_infos.proto | 580 +++++ .../ads/googleads/v2/common/asset_types.proto | 82 + google/ads/googleads/v2/common/bidding.proto | 234 ++ .../googleads/v2/common/click_location.proto | 50 + google/ads/googleads/v2/common/criteria.proto | 594 ++++++ .../criterion_category_availability.proto | 84 + .../v2/common/custom_parameter.proto | 42 + google/ads/googleads/v2/common/dates.proto | 41 + .../explorer_auto_optimizer_setting.proto | 40 + .../ads/googleads/v2/common/extensions.proto | 347 +++ .../ads/googleads/v2/common/feed_common.proto | 41 + .../googleads/v2/common/final_app_url.proto | 48 + .../googleads/v2/common/frequency_cap.proto | 63 + .../v2/common/keyword_plan_common.proto | 42 + .../v2/common/matching_function.proto | 128 ++ google/ads/googleads/v2/common/metrics.proto | 530 +++++ google/ads/googleads/v2/common/policy.proto | 224 ++ .../v2/common/real_time_bidding_setting.proto | 39 + google/ads/googleads/v2/common/segments.proto | 310 +++ .../ads/googleads/v2/common/simulation.proto | 173 ++ .../ads/googleads/v2/common/tag_snippet.proto | 52 + .../v2/common/targeting_setting.proto | 57 + .../ads/googleads/v2/common/text_label.proto | 42 + .../googleads/v2/common/url_collection.proto | 47 + .../ads/googleads/v2/common/user_lists.proto | 293 +++ google/ads/googleads/v2/common/value.proto | 52 + .../googleads/v2/enums/access_reason.proto | 58 + .../ads/googleads/v2/enums/access_role.proto | 52 + .../account_budget_proposal_status.proto | 64 + .../enums/account_budget_proposal_type.proto | 57 + .../v2/enums/account_budget_status.proto | 54 + .../ad_customizer_placeholder_field.proto | 57 + .../v2/enums/ad_group_ad_rotation_mode.proto | 54 + .../v2/enums/ad_group_ad_status.proto | 56 + .../ad_group_criterion_approval_status.proto | 57 + .../v2/enums/ad_group_criterion_status.proto | 56 + .../googleads/v2/enums/ad_group_status.proto | 56 + .../googleads/v2/enums/ad_group_type.proto | 85 + .../googleads/v2/enums/ad_network_type.proto | 63 + .../ad_serving_optimization_status.proto | 65 + .../ads/googleads/v2/enums/ad_strength.proto | 63 + google/ads/googleads/v2/enums/ad_type.proto | 105 + .../enums/advertising_channel_sub_type.proto | 88 + .../v2/enums/advertising_channel_type.proto | 65 + ...iate_location_feed_relationship_type.proto | 49 + ...affiliate_location_placeholder_field.proto | 78 + .../googleads/v2/enums/age_range_type.proto | 66 + .../v2/enums/app_campaign_app_store.proto | 51 + ..._campaign_bidding_strategy_goal_type.proto | 65 + .../v2/enums/app_payment_model_type.proto | 48 + .../v2/enums/app_placeholder_field.proto | 76 + google/ads/googleads/v2/enums/app_store.proto | 51 + .../enums/app_url_operating_system_type.proto | 51 + .../googleads/v2/enums/asset_field_type.proto | 63 + .../v2/enums/asset_performance_label.proto | 63 + .../ads/googleads/v2/enums/asset_type.proto | 57 + .../v2/enums/attribution_model.proto | 73 + .../v2/enums/bid_modifier_source.proto | 52 + .../googleads/v2/enums/bidding_source.proto | 56 + .../v2/enums/bidding_strategy_status.proto | 53 + .../v2/enums/bidding_strategy_type.proto | 111 + .../v2/enums/billing_setup_status.proto | 59 + .../v2/enums/brand_safety_suitability.proto | 74 + .../v2/enums/budget_delivery_method.proto | 54 + .../googleads/v2/enums/budget_period.proto | 54 + .../googleads/v2/enums/budget_status.proto | 51 + .../ads/googleads/v2/enums/budget_type.proto | 67 + .../call_conversion_reporting_state.proto | 57 + .../v2/enums/call_placeholder_field.proto | 67 + .../v2/enums/callout_placeholder_field.proto | 48 + .../v2/enums/campaign_criterion_status.proto | 56 + .../v2/enums/campaign_draft_status.proto | 66 + .../v2/enums/campaign_experiment_status.proto | 78 + ...mpaign_experiment_traffic_split_type.proto | 54 + .../v2/enums/campaign_experiment_type.proto | 60 + .../v2/enums/campaign_serving_status.proto | 62 + .../v2/enums/campaign_shared_set_status.proto | 51 + .../googleads/v2/enums/campaign_status.proto | 54 + .../v2/enums/change_status_operation.proto | 55 + .../enums/change_status_resource_type.proto | 77 + .../ads/googleads/v2/enums/click_type.proto | 204 ++ .../v2/enums/content_label_type.proto | 93 + .../v2/enums/conversion_action_category.proto | 62 + .../conversion_action_counting_type.proto | 53 + .../v2/enums/conversion_action_status.proto | 55 + .../v2/enums/conversion_action_type.proto | 74 + .../v2/enums/conversion_adjustment_type.proto | 53 + .../conversion_attribution_event_type.proto | 49 + .../v2/enums/conversion_lag_bucket.proto | 118 + .../conversion_or_adjustment_lag_bucket.proto | 207 ++ ...n_category_channel_availability_mode.proto | 59 + ...on_category_locale_availability_mode.proto | 62 + .../criterion_system_serving_status.proto | 51 + .../googleads/v2/enums/criterion_type.proto | 135 ++ .../enums/custom_interest_member_type.proto | 51 + .../v2/enums/custom_interest_status.proto | 52 + .../v2/enums/custom_interest_type.proto | 51 + .../v2/enums/custom_placeholder_field.proto | 130 ++ .../customer_match_upload_key_type.proto | 54 + ...onversion_eligibility_failure_reason.proto | 69 + .../v2/enums/data_driven_model_status.proto | 63 + .../ads/googleads/v2/enums/day_of_week.proto | 66 + google/ads/googleads/v2/enums/device.proto | 60 + .../v2/enums/display_ad_format_setting.proto | 55 + .../enums/display_upload_product_type.proto | 98 + .../googleads/v2/enums/distance_bucket.proto | 128 ++ .../enums/dsa_page_feed_criterion_field.proto | 52 + .../enums/education_placeholder_field.proto | 112 + .../v2/enums/extension_setting_device.proto | 53 + .../googleads/v2/enums/extension_type.proto | 79 + .../v2/enums/external_conversion_source.proto | 131 ++ .../v2/enums/feed_attribute_type.proto | 84 + .../feed_item_quality_approval_status.proto | 53 + ...feed_item_quality_disapproval_reason.proto | 100 + .../googleads/v2/enums/feed_item_status.proto | 51 + .../v2/enums/feed_item_target_device.proto | 49 + .../v2/enums/feed_item_target_type.proto | 54 + .../enums/feed_item_validation_status.proto | 54 + .../googleads/v2/enums/feed_link_status.proto | 51 + .../enums/feed_mapping_criterion_type.proto | 51 + .../v2/enums/feed_mapping_status.proto | 51 + .../ads/googleads/v2/enums/feed_origin.proto | 54 + .../ads/googleads/v2/enums/feed_status.proto | 51 + .../v2/enums/flight_placeholder_field.proto | 119 ++ .../v2/enums/frequency_cap_event_type.proto | 51 + .../v2/enums/frequency_cap_level.proto | 55 + .../v2/enums/frequency_cap_time_unit.proto | 54 + .../ads/googleads/v2/enums/gender_type.proto | 54 + .../v2/enums/geo_target_constant_status.proto | 53 + .../v2/enums/geo_targeting_restriction.proto | 50 + .../v2/enums/geo_targeting_type.proto | 51 + .../v2/enums/google_ads_field_category.proto | 62 + .../v2/enums/google_ads_field_data_type.proto | 103 + .../v2/enums/hotel_date_selection_type.proto | 51 + .../v2/enums/hotel_placeholder_field.proto | 125 ++ .../googleads/v2/enums/hotel_rate_type.proto | 63 + .../v2/enums/income_range_type.proto | 66 + .../v2/enums/interaction_event_type.proto | 63 + .../googleads/v2/enums/interaction_type.proto | 48 + .../v2/enums/job_placeholder_field.proto | 116 + .../v2/enums/keyword_match_type.proto | 54 + .../keyword_plan_competition_level.proto | 58 + .../keyword_plan_forecast_interval.proto | 57 + .../v2/enums/keyword_plan_network.proto | 51 + .../ads/googleads/v2/enums/label_status.proto | 49 + .../legacy_app_install_ad_app_store.proto | 60 + .../listing_custom_attribute_index.proto | 60 + .../v2/enums/listing_group_type.proto | 53 + .../v2/enums/local_placeholder_field.proto | 120 ++ ..._extension_targeting_criterion_field.proto | 63 + .../enums/location_group_radius_units.proto | 51 + .../v2/enums/location_placeholder_field.proto | 69 + .../v2/enums/manager_link_status.proto | 60 + .../matching_function_context_type.proto | 51 + .../v2/enums/matching_function_operator.proto | 66 + .../ads/googleads/v2/enums/media_type.proto | 65 + .../enums/merchant_center_link_status.proto | 54 + .../v2/enums/message_placeholder_field.proto | 62 + google/ads/googleads/v2/enums/mime_type.proto | 83 + .../googleads/v2/enums/minute_of_hour.proto | 57 + .../v2/enums/mobile_device_type.proto | 51 + .../googleads/v2/enums/month_of_year.proto | 81 + .../v2/enums/mutate_job_status.proto | 54 + .../v2/enums/negative_geo_target_type.proto | 53 + ...erating_system_version_operator_type.proto | 51 + .../page_one_promoted_strategy_goal.proto | 52 + .../v2/enums/parental_status_type.proto | 54 + .../ads/googleads/v2/enums/payment_mode.proto | 60 + .../googleads/v2/enums/placeholder_type.proto | 122 ++ .../googleads/v2/enums/placement_type.proto | 60 + .../v2/enums/policy_approval_status.proto | 62 + .../v2/enums/policy_review_status.proto | 57 + .../v2/enums/policy_topic_entry_type.proto | 67 + ...idence_destination_mismatch_url_type.proto | 63 + ...dence_destination_not_working_device.proto | 58 + ...stination_not_working_dns_error_type.proto | 57 + .../v2/enums/positive_geo_target_type.proto | 57 + .../v2/enums/preferred_content_type.proto | 48 + .../price_extension_price_qualifier.proto | 54 + .../v2/enums/price_extension_price_unit.proto | 63 + .../v2/enums/price_extension_type.proto | 72 + .../v2/enums/price_placeholder_field.proto | 241 +++ .../product_bidding_category_level.proto | 58 + .../product_bidding_category_status.proto | 51 + .../googleads/v2/enums/product_channel.proto | 51 + .../enums/product_channel_exclusivity.proto | 53 + .../v2/enums/product_condition.proto | 54 + .../v2/enums/product_type_level.proto | 60 + ...romotion_extension_discount_modifier.proto | 49 + .../enums/promotion_extension_occasion.proto | 158 ++ .../enums/promotion_placeholder_field.proto | 96 + .../v2/enums/proximity_radius_units.proto | 51 + .../v2/enums/quality_score_bucket.proto | 54 + .../enums/real_estate_placeholder_field.proto | 116 + .../v2/enums/recommendation_type.proto | 93 + .../search_engine_results_page_type.proto | 55 + .../v2/enums/search_term_match_type.proto | 60 + .../enums/search_term_targeting_status.proto | 59 + .../v2/enums/served_asset_field_type.proto | 62 + .../v2/enums/shared_set_status.proto | 51 + .../googleads/v2/enums/shared_set_type.proto | 51 + .../simulation_modification_method.proto | 55 + .../googleads/v2/enums/simulation_type.proto | 57 + .../v2/enums/sitelink_placeholder_field.proto | 70 + google/ads/googleads/v2/enums/slot.proto | 66 + .../v2/enums/spending_limit_type.proto | 49 + ...structured_snippet_placeholder_field.proto | 56 + .../enums/system_managed_entity_source.proto | 48 + ...arget_cpa_opt_in_recommendation_goal.proto | 58 + .../target_impression_share_location.proto | 56 + .../v2/enums/targeting_dimension.proto | 75 + google/ads/googleads/v2/enums/time_type.proto | 52 + .../v2/enums/tracking_code_page_format.proto | 51 + .../v2/enums/tracking_code_type.proto | 60 + .../v2/enums/travel_placeholder_field.proto | 129 ++ .../enums/user_interest_taxonomy_type.proto | 60 + .../v2/enums/user_list_access_status.proto | 51 + .../v2/enums/user_list_closing_reason.proto | 49 + .../user_list_combined_rule_operator.proto | 49 + .../user_list_crm_data_source_type.proto | 52 + .../user_list_date_rule_item_operator.proto | 55 + .../user_list_logical_rule_operator.proto | 52 + .../enums/user_list_membership_status.proto | 53 + .../user_list_number_rule_item_operator.proto | 61 + .../user_list_prepopulation_status.proto | 52 + .../v2/enums/user_list_rule_type.proto | 49 + .../v2/enums/user_list_size_range.proto | 93 + .../user_list_string_rule_item_operator.proto | 67 + .../googleads/v2/enums/user_list_type.proto | 64 + .../vanity_pharma_display_url_mode.proto | 51 + .../v2/enums/vanity_pharma_text.proto | 88 + .../v2/enums/webpage_condition_operand.proto | 60 + .../v2/enums/webpage_condition_operator.proto | 52 + .../v2/errors/access_invitation_error.proto | 51 + .../account_budget_proposal_error.proto | 115 + .../v2/errors/ad_customizer_error.proto | 60 + google/ads/googleads/v2/errors/ad_error.proto | 455 ++++ .../v2/errors/ad_group_ad_error.proto | 71 + .../errors/ad_group_bid_modifier_error.proto | 52 + .../v2/errors/ad_group_criterion_error.proto | 166 ++ .../googleads/v2/errors/ad_group_error.proto | 84 + .../v2/errors/ad_group_feed_error.proto | 68 + .../v2/errors/ad_parameter_error.proto | 51 + .../v2/errors/ad_sharing_error.proto | 55 + .../ads/googleads/v2/errors/adx_error.proto | 48 + .../ads/googleads/v2/errors/asset_error.proto | 62 + .../v2/errors/authentication_error.proto | 104 + .../v2/errors/authorization_error.proto | 82 + .../googleads/v2/errors/bidding_error.proto | 119 ++ .../v2/errors/bidding_strategy_error.proto | 62 + .../v2/errors/billing_setup_error.proto | 102 + .../v2/errors/campaign_budget_error.proto | 95 + .../v2/errors/campaign_criterion_error.proto | 82 + .../v2/errors/campaign_draft_error.proto | 80 + .../googleads/v2/errors/campaign_error.proto | 180 ++ .../v2/errors/campaign_experiment_error.proto | 82 + .../v2/errors/campaign_feed_error.proto | 64 + .../v2/errors/campaign_shared_set_error.proto | 48 + .../v2/errors/change_status_error.proto | 48 + .../v2/errors/collection_size_error.proto | 51 + .../googleads/v2/errors/context_error.proto | 51 + .../v2/errors/conversion_action_error.proto | 76 + .../conversion_adjustment_upload_error.proto | 80 + .../v2/errors/conversion_upload_error.proto | 131 ++ .../v2/errors/country_code_error.proto | 48 + .../googleads/v2/errors/criterion_error.proto | 370 ++++ .../v2/errors/currency_code_error.proto | 48 + .../v2/errors/custom_interest_error.proto | 67 + .../errors/customer_client_link_error.proto | 66 + .../googleads/v2/errors/customer_error.proto | 52 + .../v2/errors/customer_feed_error.proto | 67 + .../errors/customer_manager_link_error.proto | 72 + .../googleads/v2/errors/database_error.proto | 53 + .../ads/googleads/v2/errors/date_error.proto | 75 + .../v2/errors/date_range_error.proto | 60 + .../googleads/v2/errors/distinct_error.proto | 51 + .../ads/googleads/v2/errors/enum_error.proto | 48 + google/ads/googleads/v2/errors/errors.proto | 538 +++++ .../v2/errors/extension_feed_item_error.proto | 189 ++ .../v2/errors/extension_setting_error.proto | 258 +++ .../feed_attribute_reference_error.proto | 54 + .../ads/googleads/v2/errors/feed_error.proto | 106 + .../googleads/v2/errors/feed_item_error.proto | 72 + .../v2/errors/feed_item_target_error.proto | 71 + .../errors/feed_item_validation_error.proto | 348 +++ .../v2/errors/feed_mapping_error.proto | 98 + .../ads/googleads/v2/errors/field_error.proto | 66 + .../v2/errors/field_mask_error.proto | 59 + .../googleads/v2/errors/function_error.proto | 94 + .../v2/errors/function_parsing_error.proto | 78 + ...geo_target_constant_suggestion_error.proto | 57 + .../googleads/v2/errors/header_error.proto | 48 + google/ads/googleads/v2/errors/id_error.proto | 48 + .../ads/googleads/v2/errors/image_error.proto | 157 ++ .../googleads/v2/errors/internal_error.proto | 56 + .../errors/keyword_plan_ad_group_error.proto | 54 + .../errors/keyword_plan_campaign_error.proto | 63 + .../v2/errors/keyword_plan_error.proto | 92 + .../v2/errors/keyword_plan_idea_error.proto | 51 + .../errors/keyword_plan_keyword_error.proto | 66 + .../keyword_plan_negative_keyword_error.proto | 47 + .../ads/googleads/v2/errors/label_error.proto | 74 + .../v2/errors/language_code_error.proto | 51 + .../v2/errors/list_operation_error.proto | 51 + .../v2/errors/manager_link_error.proto | 88 + .../v2/errors/media_bundle_error.proto | 111 + .../v2/errors/media_file_error.proto | 114 + .../v2/errors/media_upload_error.proto | 57 + .../v2/errors/multiplier_error.proto | 82 + .../googleads/v2/errors/mutate_error.proto | 64 + .../v2/errors/mutate_job_error.proto | 61 + .../errors/new_resource_creation_error.proto | 55 + .../googleads/v2/errors/not_empty_error.proto | 48 + .../v2/errors/not_whitelisted_error.proto | 48 + .../ads/googleads/v2/errors/null_error.proto | 48 + .../operation_access_denied_error.proto | 75 + .../googleads/v2/errors/operator_error.proto | 48 + .../v2/errors/partial_failure_error.proto | 49 + .../v2/errors/policy_finding_error.proto | 52 + .../policy_validation_parameter_error.proto | 55 + .../v2/errors/policy_violation_error.proto | 48 + .../ads/googleads/v2/errors/query_error.proto | 219 ++ .../ads/googleads/v2/errors/quota_error.proto | 54 + .../ads/googleads/v2/errors/range_error.proto | 51 + .../v2/errors/recommendation_error.proto | 91 + .../v2/errors/region_code_error.proto | 48 + .../googleads/v2/errors/request_error.proto | 113 + .../errors/resource_access_denied_error.proto | 48 + .../resource_count_limit_exceeded_error.proto | 94 + .../googleads/v2/errors/setting_error.proto | 106 + .../v2/errors/shared_criterion_error.proto | 48 + .../v2/errors/shared_set_error.proto | 57 + .../v2/errors/size_limit_error.proto | 51 + .../v2/errors/string_format_error.proto | 51 + .../v2/errors/string_length_error.proto | 51 + .../googleads/v2/errors/url_field_error.proto | 216 ++ .../googleads/v2/errors/user_list_error.proto | 130 ++ .../youtube_video_registration_error.proto | 51 + .../v2/resources/account_budget.proto | 232 ++ .../resources/account_budget_proposal.proto | 140 ++ google/ads/googleads/v2/resources/ad.proto | 163 ++ .../ads/googleads/v2/resources/ad_group.proto | 151 ++ .../googleads/v2/resources/ad_group_ad.proto | 75 + .../v2/resources/ad_group_ad_asset_view.proto | 74 + .../v2/resources/ad_group_ad_label.proto | 46 + .../v2/resources/ad_group_audience_view.proto | 43 + .../v2/resources/ad_group_bid_modifier.proto | 87 + .../v2/resources/ad_group_criterion.proto | 240 +++ .../resources/ad_group_criterion_label.proto | 46 + .../ad_group_criterion_simulation.proto | 74 + .../ad_group_extension_setting.proto | 62 + .../v2/resources/ad_group_feed.proto | 63 + .../v2/resources/ad_group_label.proto | 46 + .../v2/resources/ad_group_simulation.proto | 82 + .../googleads/v2/resources/ad_parameter.proto | 67 + .../v2/resources/ad_schedule_view.proto | 41 + .../v2/resources/age_range_view.proto | 40 + google/ads/googleads/v2/resources/asset.proto | 68 + .../v2/resources/bidding_strategy.proto | 117 + .../v2/resources/billing_setup.proto | 124 ++ .../ads/googleads/v2/resources/campaign.proto | 360 ++++ .../v2/resources/campaign_audience_view.proto | 44 + .../v2/resources/campaign_bid_modifier.proto | 59 + .../v2/resources/campaign_budget.proto | 146 ++ .../v2/resources/campaign_criterion.proto | 149 ++ .../campaign_criterion_simulation.proto | 74 + .../v2/resources/campaign_draft.proto | 78 + .../v2/resources/campaign_experiment.proto | 101 + .../campaign_extension_setting.proto | 62 + .../v2/resources/campaign_feed.proto | 63 + .../v2/resources/campaign_label.proto | 46 + .../v2/resources/campaign_shared_set.proto | 57 + .../v2/resources/carrier_constant.proto | 51 + .../v2/resources/change_status.proto | 84 + .../googleads/v2/resources/click_view.proto | 61 + .../v2/resources/conversion_action.proto | 133 ++ .../v2/resources/custom_interest.proto | 79 + .../ads/googleads/v2/resources/customer.proto | 125 ++ .../v2/resources/customer_client.proto | 55 + .../v2/resources/customer_client_link.proto | 55 + .../customer_extension_setting.proto | 55 + .../v2/resources/customer_feed.proto | 60 + .../v2/resources/customer_label.proto | 52 + .../v2/resources/customer_manager_link.proto | 50 + .../customer_negative_criterion.proto | 72 + .../v2/resources/detail_placement_view.proto | 61 + .../v2/resources/display_keyword_view.proto | 40 + .../v2/resources/distance_view.proto | 52 + .../v2/resources/domain_category.proto | 75 + .../dynamic_search_ads_search_term_view.proto | 61 + .../expanded_landing_page_view.proto | 45 + .../v2/resources/extension_feed_item.proto | 126 ++ google/ads/googleads/v2/resources/feed.proto | 180 ++ .../googleads/v2/resources/feed_item.proto | 199 ++ .../v2/resources/feed_item_target.proto | 73 + .../googleads/v2/resources/feed_mapping.proto | 170 ++ .../v2/resources/feed_placeholder_view.proto | 44 + .../googleads/v2/resources/gender_view.proto | 40 + .../v2/resources/geo_target_constant.proto | 61 + .../v2/resources/geographic_view.proto | 53 + .../v2/resources/google_ads_field.proto | 107 + .../v2/resources/group_placement_view.proto | 56 + .../v2/resources/hotel_group_view.proto | 40 + .../v2/resources/hotel_performance_view.proto | 40 + .../googleads/v2/resources/keyword_plan.proto | 72 + .../v2/resources/keyword_plan_ad_group.proto | 59 + .../v2/resources/keyword_plan_campaign.proto | 83 + .../v2/resources/keyword_plan_keyword.proto | 59 + .../keyword_plan_negative_keyword.proto | 55 + .../googleads/v2/resources/keyword_view.proto | 40 + google/ads/googleads/v2/resources/label.proto | 56 + .../v2/resources/landing_page_view.proto | 45 + .../v2/resources/language_constant.proto | 54 + .../v2/resources/location_view.proto | 41 + .../v2/resources/managed_placement_view.proto | 40 + .../googleads/v2/resources/media_file.proto | 114 + .../v2/resources/merchant_center_link.proto | 54 + .../mobile_app_category_constant.proto | 47 + .../v2/resources/mobile_device_constant.proto | 57 + .../googleads/v2/resources/mutate_job.proto | 84 + .../operating_system_version_constant.proto | 60 + .../paid_organic_search_term_view.proto | 46 + .../v2/resources/parental_status_view.proto | 40 + .../v2/resources/payments_account.proto | 60 + .../product_bidding_category_constant.proto | 68 + .../v2/resources/product_group_view.proto | 40 + .../v2/resources/recommendation.proto | 293 +++ .../v2/resources/remarketing_action.proto | 56 + .../v2/resources/search_term_view.proto | 53 + .../v2/resources/shared_criterion.proto | 77 + .../googleads/v2/resources/shared_set.proto | 67 + .../resources/shopping_performance_view.proto | 44 + .../v2/resources/topic_constant.proto | 56 + .../googleads/v2/resources/topic_view.proto | 40 + .../v2/resources/user_interest.proto | 61 + .../googleads/v2/resources/user_list.proto | 157 ++ .../v2/resources/user_location_view.proto | 52 + google/ads/googleads/v2/resources/video.proto | 53 + .../account_budget_proposal_service.proto | 129 ++ .../v2/services/account_budget_service.proto | 54 + .../ad_group_ad_asset_view_service.proto | 51 + .../services/ad_group_ad_label_service.proto | 115 + .../v2/services/ad_group_ad_service.proto | 123 ++ .../ad_group_audience_view_service.proto | 51 + .../ad_group_bid_modifier_service.proto | 122 ++ .../ad_group_criterion_label_service.proto | 116 + .../services/ad_group_criterion_service.proto | 132 ++ ...d_group_criterion_simulation_service.proto | 52 + .../ad_group_extension_setting_service.proto | 126 ++ .../v2/services/ad_group_feed_service.proto | 121 ++ .../v2/services/ad_group_label_service.proto | 114 + .../v2/services/ad_group_service.proto | 119 ++ .../ad_group_simulation_service.proto | 51 + .../v2/services/ad_parameter_service.proto | 121 ++ .../services/ad_schedule_view_service.proto | 51 + .../googleads/v2/services/ad_service.proto | 96 + .../v2/services/age_range_view_service.proto | 51 + .../googleads/v2/services/asset_service.proto | 93 + .../services/bidding_strategy_service.proto | 122 ++ .../v2/services/billing_setup_service.proto | 107 + .../campaign_audience_view_service.proto | 51 + .../campaign_bid_modifier_service.proto | 122 ++ .../v2/services/campaign_budget_service.proto | 121 ++ .../services/campaign_criterion_service.proto | 120 ++ ...ampaign_criterion_simulation_service.proto | 52 + .../v2/services/campaign_draft_service.proto | 183 ++ .../campaign_experiment_service.proto | 267 +++ .../campaign_extension_setting_service.proto | 126 ++ .../v2/services/campaign_feed_service.proto | 121 ++ .../v2/services/campaign_label_service.proto | 114 + .../v2/services/campaign_service.proto | 120 ++ .../campaign_shared_set_service.proto | 113 + .../services/carrier_constant_service.proto | 51 + .../v2/services/change_status_service.proto | 51 + .../v2/services/click_view_service.proto | 51 + .../services/conversion_action_service.proto | 122 ++ ...conversion_adjustment_upload_service.proto | 166 ++ .../services/conversion_upload_service.proto | 221 ++ .../v2/services/custom_interest_service.proto | 102 + .../customer_client_link_service.proto | 94 + .../v2/services/customer_client_service.proto | 51 + .../customer_extension_setting_service.proto | 126 ++ .../v2/services/customer_feed_service.proto | 121 ++ .../v2/services/customer_label_service.proto | 114 + .../customer_manager_link_service.proto | 95 + .../customer_negative_criterion_service.proto | 114 + .../v2/services/customer_service.proto | 148 ++ .../detail_placement_view_service.proto | 51 + .../display_keyword_view_service.proto | 51 + .../v2/services/distance_view_service.proto | 51 + .../v2/services/domain_category_service.proto | 52 + ..._search_ads_search_term_view_service.proto | 52 + .../expanded_landing_page_view_service.proto | 52 + .../extension_feed_item_service.proto | 123 ++ .../v2/services/feed_item_service.proto | 121 ++ .../services/feed_item_target_service.proto | 96 + .../v2/services/feed_mapping_service.proto | 113 + .../feed_placeholder_view_service.proto | 51 + .../googleads/v2/services/feed_service.proto | 121 ++ .../v2/services/gender_view_service.proto | 51 + .../geo_target_constant_service.proto | 122 ++ .../v2/services/geographic_view_service.proto | 51 + .../services/google_ads_field_service.proto | 89 + .../v2/services/google_ads_service.proto | 867 ++++++++ .../group_placement_view_service.proto | 51 + .../services/hotel_group_view_service.proto | 51 + .../hotel_performance_view_service.proto | 51 + .../keyword_plan_ad_group_service.proto | 123 ++ .../keyword_plan_campaign_service.proto | 124 ++ .../services/keyword_plan_idea_service.proto | 117 + .../keyword_plan_keyword_service.proto | 123 ++ ...eyword_plan_negative_keyword_service.proto | 127 ++ .../v2/services/keyword_plan_service.proto | 239 +++ .../v2/services/keyword_view_service.proto | 51 + .../googleads/v2/services/label_service.proto | 118 + .../services/landing_page_view_service.proto | 51 + .../services/language_constant_service.proto | 51 + .../v2/services/location_view_service.proto | 51 + .../managed_placement_view_service.proto | 51 + .../v2/services/media_file_service.proto | 107 + .../merchant_center_link_service.proto | 121 ++ ...mobile_app_category_constant_service.proto | 50 + .../mobile_device_constant_service.proto | 51 + .../v2/services/mutate_job_service.proto | 186 ++ ...ting_system_version_constant_service.proto | 52 + ...aid_organic_search_term_view_service.proto | 52 + .../parental_status_view_service.proto | 51 + .../services/payments_account_service.proto | 60 + ...ct_bidding_category_constant_service.proto | 52 + .../services/product_group_view_service.proto | 51 + .../v2/services/recommendation_service.proto | 246 +++ .../services/remarketing_action_service.proto | 116 + .../services/search_term_view_service.proto | 51 + .../services/shared_criterion_service.proto | 114 + .../v2/services/shared_set_service.proto | 121 ++ .../shopping_performance_view_service.proto | 52 + .../v2/services/topic_constant_service.proto | 51 + .../v2/services/topic_view_service.proto | 51 + .../v2/services/user_interest_service.proto | 51 + .../v2/services/user_list_service.proto | 121 ++ .../services/user_location_view_service.proto | 51 + .../googleads/v2/services/video_service.proto | 51 + google/api/BUILD.bazel | 526 +++++ google/api/auth.proto | 27 +- google/api/backend.proto | 80 +- google/api/billing.proto | 5 +- google/api/client.proto | 100 + google/api/config_change.proto | 6 +- google/api/consumer.proto | 1 - google/api/context.proto | 31 +- google/api/control.proto | 4 +- google/api/distribution.proto | 149 +- google/api/documentation.proto | 18 +- google/api/endpoint.proto | 15 +- .../experimental/authorization_config.proto | 40 - google/api/expr/BUILD.bazel | 1 + google/api/expr/artman_cel.yaml | 37 + google/api/expr/cel.yaml | 61 + google/api/expr/v1alpha1/BUILD.bazel | 265 +++ google/api/expr/v1alpha1/cel_gapic.yaml | 248 +++ google/api/expr/v1alpha1/cel_service.proto | 44 + google/api/expr/v1alpha1/checked.proto | 336 +++ .../expr/v1alpha1/conformance_service.proto | 165 ++ google/api/expr/v1alpha1/eval.proto | 119 ++ google/api/expr/v1alpha1/explain.proto | 54 + google/api/expr/v1alpha1/syntax.proto | 322 +++ google/api/expr/v1alpha1/value.proto | 116 + google/api/expr/v1beta1/BUILD.bazel | 89 + google/api/expr/v1beta1/decl.proto | 84 + google/api/expr/v1beta1/eval.proto | 125 ++ google/api/expr/v1beta1/expr.proto | 269 +++ google/api/expr/v1beta1/source.proto | 62 + google/api/expr/v1beta1/value.proto | 114 + google/api/field_behavior.proto | 79 + google/api/http.proto | 297 ++- google/api/httpbody.proto | 12 +- google/api/label.proto | 4 +- google/api/launch_stage.proto | 67 + google/api/log.proto | 4 +- google/api/logging.proto | 6 +- google/api/metric.proto | 37 +- google/api/monitored_resource.proto | 17 +- google/api/monitoring.proto | 26 +- google/api/quota.proto | 96 +- google/api/resource.proto | 175 ++ google/api/service.proto | 18 +- google/api/serviceconfig.yaml | 24 + google/api/servicecontrol/BUILD.bazel | 0 .../api/servicecontrol/v1/check_error.proto | 5 +- .../api/servicecontrol/v1/distribution.proto | 1 - google/api/servicecontrol/v1/log_entry.proto | 1 - .../api/servicecontrol/v1/metric_value.proto | 6 +- google/api/servicecontrol/v1/operation.proto | 7 +- .../servicecontrol/v1/quota_controller.proto | 12 +- .../v1/service_controller.proto | 43 +- google/api/servicemanagement/BUILD.bazel | 0 .../artman_servicemanagement_v1.yaml | 21 - .../api/servicemanagement/v1/resources.proto | 5 +- .../v1/servicemanagement_gapic.yaml | 25 - .../servicemanagement/v1/servicemanager.proto | 64 +- google/api/source_info.proto | 4 +- google/api/system_parameter.proto | 4 +- google/api/usage.proto | 6 +- google/appengine/artman_appengine.yaml | 17 +- google/appengine/legacy/audit_data.proto | 1 - google/appengine/logging/v1/request_log.proto | 1 - google/appengine/v1/app_yaml.proto | 6 +- google/appengine/v1/appengine.proto | 103 +- google/appengine/v1/application.proto | 1 - google/appengine/v1/audit_data.proto | 1 - google/appengine/v1/deploy.proto | 1 - google/appengine/v1/instance.proto | 1 - google/appengine/v1/location.proto | 4 +- google/appengine/v1/operation.proto | 4 +- google/appengine/v1/service.proto | 1 - google/appengine/v1/version.proto | 7 +- google/artman_core.yaml | 17 +- google/artman_logging_external_types.yaml | 18 +- .../v1alpha1/embedded_assistant.proto | 12 +- .../v1alpha2/embedded_assistant.proto | 22 +- google/bigtable/BUILD.bazel | 1 + google/bigtable/admin/BUILD.bazel | 1 + .../bigtable/admin/artman_bigtableadmin.yaml | 66 +- google/bigtable/admin/bigtableadmin.yaml | 2 + .../cluster/v1/bigtable_cluster_data.proto | 1 - .../cluster/v1/bigtable_cluster_service.proto | 44 +- .../bigtable_cluster_service_messages.proto | 5 +- .../admin/table/v1/bigtable_table_data.proto | 5 +- .../table/v1/bigtable_table_service.proto | 48 +- .../v1/bigtable_table_service_messages.proto | 1 - google/bigtable/admin/v2/BUILD.bazel | 161 ++ .../admin/v2/bigtable_instance_admin.proto | 64 +- .../admin/v2/bigtable_table_admin.proto | 23 +- .../admin/v2/bigtableadmin_gapic.yaml | 126 +- google/bigtable/admin/v2/common.proto | 4 +- google/bigtable/admin/v2/instance.proto | 8 +- google/bigtable/admin/v2/table.proto | 4 +- google/bigtable/artman_bigtable.yaml | 75 - google/bigtable/v1/bigtable_data.proto | 5 +- google/bigtable/v1/bigtable_service.proto | 7 +- .../v1/bigtable_service_messages.proto | 1 - google/bigtable/v2/BUILD.bazel | 144 ++ google/bigtable/v2/bigtable.proto | 14 +- google/bigtable/v2/bigtable_gapic.yaml | 24 +- google/bigtable/v2/data.proto | 5 +- google/bytestream/bytestream.proto | 4 +- google/cloud/asset/BUILD.bazel | 1 + google/cloud/asset/artman_cloudasset_v1.yaml | 35 + .../asset/artman_cloudasset_v1beta1.yaml | 35 + google/cloud/asset/asset_v1.yaml | 50 + google/cloud/asset/asset_v1beta1.yaml | 56 + google/cloud/asset/v1/asset_service.proto | 171 ++ google/cloud/asset/v1/assets.proto | 118 + google/cloud/asset/v1/cloudasset_gapic.yaml | 142 ++ google/cloud/asset/v1beta1/BUILD.bazel | 150 ++ .../cloud/asset/v1beta1/asset_service.proto | 182 ++ google/cloud/asset/v1beta1/assets.proto | 117 + .../cloud/asset/v1beta1/cloudasset_gapic.yaml | 146 ++ google/cloud/audit/audit_log.proto | 4 +- google/cloud/automl/BUILD.bazel | 1 + .../cloud/automl/artman_automl_v1beta1.yaml | 34 + google/cloud/automl/automl_v1beta1.yaml | 129 ++ google/cloud/automl/v1beta1/BUILD.bazel | 186 ++ .../automl/v1beta1/annotation_payload.proto | 78 + .../automl/v1beta1/annotation_spec.proto | 45 + google/cloud/automl/v1beta1/automl_gapic.yaml | 730 +++++++ .../cloud/automl/v1beta1/classification.proto | 208 ++ google/cloud/automl/v1beta1/column_spec.proto | 78 + google/cloud/automl/v1beta1/data_items.proto | 111 + google/cloud/automl/v1beta1/data_stats.proto | 167 ++ google/cloud/automl/v1beta1/data_types.proto | 114 + google/cloud/automl/v1beta1/dataset.proto | 91 + google/cloud/automl/v1beta1/detection.proto | 140 ++ google/cloud/automl/v1beta1/geometry.proto | 47 + google/cloud/automl/v1beta1/image.proto | 151 ++ google/cloud/automl/v1beta1/io.proto | 998 +++++++++ google/cloud/automl/v1beta1/model.proto | 107 + .../automl/v1beta1/model_evaluation.proto | 115 + google/cloud/automl/v1beta1/operations.proto | 190 ++ .../automl/v1beta1/prediction_service.proto | 201 ++ .../automl/v1beta1/ranges.proto} | 26 +- google/cloud/automl/v1beta1/regression.proto | 45 + google/cloud/automl/v1beta1/service.proto | 646 ++++++ google/cloud/automl/v1beta1/table_spec.proto | 69 + google/cloud/automl/v1beta1/tables.proto | 278 +++ google/cloud/automl/v1beta1/temporal.proto | 38 + google/cloud/automl/v1beta1/text.proto | 67 + .../automl/v1beta1/text_extraction.proto | 69 + .../cloud/automl/v1beta1/text_segment.proto | 42 + .../cloud/automl/v1beta1/text_sentiment.proto | 81 + google/cloud/automl/v1beta1/translation.proto | 69 + google/cloud/automl/v1beta1/video.proto | 49 + google/cloud/bigquery/artman_bigquery_v2.yaml | 34 + google/cloud/bigquery/bigquery_v2.yaml | 35 + .../cloud/bigquery/datatransfer/BUILD.bazel | 1 + .../artman_bigquerydatatransfer.yaml | 21 - .../datatransfer/bigquerydatatransfer.yaml | 19 + .../bigquery/datatransfer/v1/BUILD.bazel | 156 ++ .../v1/bigquerydatatransfer_gapic.yaml | 52 +- .../bigquery/datatransfer/v1/datasource.proto | 542 +++++ .../datatransfer/v1/datatransfer.proto | 119 +- .../bigquery/datatransfer/v1/transfer.proto | 128 +- .../bigquery/logging/v1/audit_data.proto | 1 - google/cloud/bigquery/storage/BUILD.bazel | 1 + .../artman_bigquerystorage_v1beta1.yaml | 34 + .../bigquery/storage/storage_v1beta1.yaml | 15 + .../bigquery/storage/v1beta1/BUILD.bazel | 148 ++ .../bigquery/storage/v1beta1/arrow.proto | 37 + .../cloud/bigquery/storage/v1beta1/avro.proto | 38 + .../v1beta1/bigquerystorage_gapic.yaml | 202 ++ .../storage/v1beta1/read_options.proto | 41 + .../bigquery/storage/v1beta1/storage.proto | 362 ++++ .../storage/v1beta1/table_reference.proto | 42 + google/cloud/bigquery/v2/bigquery_gapic.yaml | 175 ++ google/cloud/bigquery/v2/model.proto | 555 +++++ .../cloud/bigquery/v2/model_reference.proto | 38 + google/cloud/bigquery/v2/standard_sql.proto | 109 + google/cloud/billing/v1/cloud_billing.proto | 34 +- .../artman_binaryauthorization_v1beta1.yaml | 34 + .../binaryauthorization_v1beta1.yaml | 62 + .../v1beta1/binaryauthorization_gapic.yaml | 198 ++ .../v1beta1/resources.proto | 296 +++ .../binaryauthorization/v1beta1/service.proto | 183 ++ .../artman_datacatalog_v1beta1.yaml | 34 + .../datacatalog/datacatalog_v1beta1.yaml | 48 + .../datacatalog/v1beta1/datacatalog.proto | 634 ++++++ .../v1beta1/datacatalog_gapic.yaml | 370 ++++ google/cloud/datacatalog/v1beta1/schema.proto | 52 + google/cloud/datacatalog/v1beta1/search.proto | 67 + .../datacatalog/v1beta1/table_spec.proto | 88 + google/cloud/datacatalog/v1beta1/tags.proto | 177 ++ .../datacatalog/v1beta1/timestamps.proto | 38 + .../artman_datalabeling_v1beta1.yaml | 34 + .../datalabeling/datalabeling_v1beta1.yaml | 74 + .../datalabeling/v1beta1/annotation.proto | 342 +++ .../v1beta1/annotation_spec_set.proto | 58 + .../v1beta1/data_labeling_service.proto | 966 +++++++++ .../datalabeling/v1beta1/data_payloads.proto | 75 + .../v1beta1/datalabeling_gapic.yaml | 669 ++++++ .../cloud/datalabeling/v1beta1/dataset.proto | 304 +++ .../datalabeling/v1beta1/evaluation.proto | 167 ++ .../datalabeling/v1beta1/evaluation_job.proto | 151 ++ .../v1beta1/human_annotation_config.proto | 208 ++ .../datalabeling/v1beta1/instruction.proto | 83 + .../datalabeling/v1beta1/operations.proto | 233 ++ google/cloud/dataproc/BUILD.bazel | 0 google/cloud/dataproc/artman_dataproc_v1.yaml | 21 - .../dataproc/artman_dataproc_v1beta2.yaml | 8 +- google/cloud/dataproc/dataproc.yaml | 175 +- google/cloud/dataproc/v1/BUILD.bazel | 159 ++ google/cloud/dataproc/v1/clusters.proto | 266 ++- google/cloud/dataproc/v1/dataproc.yaml | 2 + google/cloud/dataproc/v1/dataproc_gapic.yaml | 335 ++- google/cloud/dataproc/v1/jobs.proto | 127 +- google/cloud/dataproc/v1/operations.proto | 30 +- google/cloud/dataproc/v1/shared.proto | 43 + .../dataproc/v1/workflow_templates.proto | 661 ++++++ google/cloud/dataproc/v1beta2/BUILD.bazel | 160 ++ .../v1beta2/autoscaling_policies.proto | 276 +++ google/cloud/dataproc/v1beta2/clusters.proto | 281 ++- google/cloud/dataproc/v1beta2/dataproc.yaml | 1 + .../dataproc/v1beta2/dataproc_gapic.yaml | 335 ++- google/cloud/dataproc/v1beta2/jobs.proto | 99 +- .../cloud/dataproc/v1beta2/operations.proto | 4 +- google/cloud/dataproc/v1beta2/shared.proto | 32 +- .../dataproc/v1beta2/workflow_templates.proto | 143 +- google/cloud/dialogflow/BUILD.bazel | 1 + .../dialogflow/artman_dialogflow_v2.yaml | 21 - .../artman_dialogflow_v2beta1_java.yaml | 15 - google/cloud/dialogflow/dialogflow_v2.yaml | 162 +- .../cloud/dialogflow/dialogflow_v2beta1.yaml | 172 +- google/cloud/dialogflow/v2/BUILD.bazel | 241 +++ google/cloud/dialogflow/v2/agent.proto | 161 +- google/cloud/dialogflow/v2/audio_config.proto | 262 +++ google/cloud/dialogflow/v2/context.proto | 27 +- .../cloud/dialogflow/v2/dialogflow_gapic.yaml | 121 +- google/cloud/dialogflow/v2/entity_type.proto | 145 +- google/cloud/dialogflow/v2/intent.proto | 150 +- google/cloud/dialogflow/v2/session.proto | 254 +-- .../dialogflow/v2/session_entity_type.proto | 30 +- google/cloud/dialogflow/v2/webhook.proto | 32 +- google/cloud/dialogflow/v2beta1/BUILD.bazel | 177 ++ google/cloud/dialogflow/v2beta1/agent.proto | 161 +- .../dialogflow/v2beta1/audio_config.proto | 306 +++ google/cloud/dialogflow/v2beta1/context.proto | 74 +- .../dialogflow/v2beta1/dialogflow_gapic.yaml | 524 ++++- .../cloud/dialogflow/v2beta1/document.proto | 296 +++ .../dialogflow/v2beta1/entity_type.proto | 145 +- google/cloud/dialogflow/v2beta1/intent.proto | 470 +++- .../dialogflow/v2beta1/knowledge_base.proto | 188 ++ google/cloud/dialogflow/v2beta1/session.proto | 373 ++-- .../v2beta1/session_entity_type.proto | 70 +- google/cloud/dialogflow/v2beta1/webhook.proto | 40 +- google/cloud/functions/artman_functions.yaml | 60 - .../cloud/functions/v1beta2/functions.proto | 37 +- .../functions/v1beta2/functions_gapic.yaml | 9 - .../cloud/functions/v1beta2/operations.proto | 1 - google/cloud/iot/BUILD.bazel | 1 + google/cloud/iot/artman_cloudiot.yaml | 7 +- google/cloud/iot/v1/BUILD.bazel | 156 ++ google/cloud/iot/v1/cloudiot_gapic.yaml | 91 +- google/cloud/iot/v1/device_manager.proto | 211 +- google/cloud/iot/v1/resources.proto | 93 +- google/cloud/irm/artman_irm_v1alpha2.yaml | 34 + google/cloud/irm/irm_v1alpha2.yaml | 23 + google/cloud/irm/v1alpha2/incidents.proto | 491 +++++ .../irm/v1alpha2/incidents_service.proto | 914 ++++++++ google/cloud/irm/v1alpha2/irm_gapic.yaml | 723 +++++++ google/cloud/kms/BUILD.bazel | 1 + google/cloud/kms/artman_cloudkms.yaml | 77 +- google/cloud/kms/cloudkms.yaml | 55 +- google/cloud/kms/v1/BUILD.bazel | 162 ++ google/cloud/kms/v1/cloudkms_gapic.yaml | 181 +- google/cloud/kms/v1/resources.proto | 401 +++- google/cloud/kms/v1/service.proto | 382 +++- google/cloud/language/BUILD.bazel | 1 + google/cloud/language/artman_language_v1.yaml | 101 +- .../language/artman_language_v1beta2.yaml | 75 - google/cloud/language/language.yaml | 3 + google/cloud/language/language_v1.yaml | 20 +- google/cloud/language/v1/BUILD.bazel | 196 ++ google/cloud/language/v1/language.tests.yaml | 123 ++ google/cloud/language/v1/language_gapic.yaml | 348 ++- .../cloud/language/v1/language_service.proto | 176 +- .../language/v1beta1/language_gapic.yaml | 6 - .../language/v1beta1/language_service.proto | 57 +- google/cloud/language/v1beta2/BUILD.bazel | 132 ++ .../language/v1beta2/language_gapic.yaml | 9 - .../language/v1beta2/language_service.proto | 81 +- google/cloud/location/locations.proto | 10 +- google/cloud/ml/v1/job_service.proto | 20 +- google/cloud/ml/v1/model_service.proto | 47 +- google/cloud/ml/v1/operation_metadata.proto | 2 - google/cloud/ml/v1/prediction_service.proto | 7 +- google/cloud/ml/v1/project_service.proto | 6 +- google/cloud/oslogin/BUILD.bazel | 1 + google/cloud/oslogin/artman_oslogin_v1.yaml | 21 - .../cloud/oslogin/artman_oslogin_v1beta.yaml | 6 - google/cloud/oslogin/common/BUILD.bazel | 61 + google/cloud/oslogin/common/common.proto | 1 - google/cloud/oslogin/v1/BUILD.bazel | 165 ++ google/cloud/oslogin/v1/oslogin.proto | 42 +- google/cloud/oslogin/v1/oslogin_gapic.yaml | 16 - google/cloud/oslogin/v1alpha/oslogin.proto | 42 +- google/cloud/oslogin/v1beta/BUILD.bazel | 165 ++ google/cloud/oslogin/v1beta/oslogin.proto | 42 +- .../cloud/oslogin/v1beta/oslogin_gapic.yaml | 16 - .../artman_phishingprotection_v1beta1.yaml | 34 + .../phishingprotection.yaml | 14 + .../v1beta1/phishingprotection.proto | 57 + .../v1beta1/phishingprotection_gapic.yaml | 135 ++ .../artman_recaptchaenterprise_v1beta1.yaml | 34 + .../recaptchaenterprise_v1beta1.yaml | 18 + .../v1beta1/recaptchaenterprise.proto | 183 ++ .../v1beta1/recaptchaenterprise_gapic.yaml | 155 ++ .../artman_recommender_v1beta1.yaml | 34 + .../recommender/recommender_v1beta1.yaml | 19 + .../recommender/v1beta1/recommendation.proto | 234 ++ .../v1beta1/recommender_gapic.yaml | 174 ++ .../v1beta1/recommender_service.proto | 190 ++ google/cloud/redis/BUILD.bazel | 1 + google/cloud/redis/artman_redis_v1.yaml | 34 + google/cloud/redis/artman_redis_v1beta1.yaml | 23 +- google/cloud/redis/redis_v1.yaml | 47 + google/cloud/redis/redis_v1beta1.yaml | 40 +- google/cloud/redis/v1/BUILD.bazel | 153 ++ google/cloud/redis/v1/cloud_redis.proto | 514 +++++ google/cloud/redis/v1/redis_gapic.yaml | 299 +++ google/cloud/redis/v1beta1/BUILD.bazel | 155 ++ google/cloud/redis/v1beta1/cloud_redis.proto | 206 +- google/cloud/redis/v1beta1/redis_gapic.yaml | 121 +- .../artman_cloudresourcemanager.yaml | 7 +- .../v2/cloudresourcemanager_gapic.yaml | 21 +- google/cloud/resourcemanager/v2/folders.proto | 64 +- google/cloud/runtimeconfig/BUILD.bazel | 0 .../runtimeconfig/v1beta1/resources.proto | 26 +- .../runtimeconfig/v1beta1/runtimeconfig.proto | 98 +- google/cloud/scheduler/BUILD.bazel | 1 + .../scheduler/artman_cloudscheduler_v1.yaml | 34 + .../artman_cloudscheduler_v1beta1.yaml | 34 + google/cloud/scheduler/cloudscheduler_v1.yaml | 22 + .../scheduler/cloudscheduler_v1beta1.yaml | 22 + .../cloud/scheduler/v1/cloudscheduler.proto | 237 +++ .../scheduler/v1/cloudscheduler_gapic.yaml | 262 +++ google/cloud/scheduler/v1/job.proto | 232 ++ google/cloud/scheduler/v1/target.proto | 348 +++ google/cloud/scheduler/v1beta1/BUILD.bazel | 149 ++ .../scheduler/v1beta1/cloudscheduler.proto | 237 +++ .../v1beta1/cloudscheduler_gapic.yaml | 258 +++ google/cloud/scheduler/v1beta1/job.proto | 234 ++ google/cloud/scheduler/v1beta1/target.proto | 348 +++ google/cloud/securitycenter/BUILD.bazel | 1 + .../artman_securitycenter_v1.yaml | 36 + .../artman_securitycenter_v1beta1.yaml | 34 + .../securitycenter/securitycenter_v1.yaml | 80 + .../securitycenter_v1beta1.yaml | 74 + google/cloud/securitycenter/v1/asset.proto | 104 + google/cloud/securitycenter/v1/finding.proto | 102 + .../v1/organization_settings.proto | 79 + .../v1/run_asset_discovery_response.proto | 54 + .../securitycenter/v1/security_marks.proto | 49 + .../v1/securitycenter_gapic.yaml | 478 +++++ .../v1/securitycenter_service.proto | 953 +++++++++ google/cloud/securitycenter/v1/source.proto | 58 + .../cloud/securitycenter/v1beta1/BUILD.bazel | 163 ++ .../cloud/securitycenter/v1beta1/asset.proto | 86 + .../securitycenter/v1beta1/finding.proto | 99 + .../v1beta1/organization_settings.proto | 74 + .../v1beta1/security_marks.proto | 45 + .../v1beta1/securitycenter_gapic.yaml | 460 ++++ .../v1beta1/securitycenter_service.proto | 755 +++++++ .../cloud/securitycenter/v1beta1/source.proto | 53 + google/cloud/speech/BUILD.bazel | 1 + google/cloud/speech/artman_speech_v1.yaml | 100 +- .../cloud/speech/artman_speech_v1beta1.yaml | 97 - .../cloud/speech/artman_speech_v1p1beta1.yaml | 21 - google/cloud/speech/sample_resources.yaml | 26 + google/cloud/speech/speech_v1.yaml | 66 +- google/cloud/speech/speech_v1beta1.yaml | 35 - google/cloud/speech/speech_v1p1beta1.yaml | 14 +- google/cloud/speech/v1/BUILD.bazel | 155 ++ google/cloud/speech/v1/cloud_speech.proto | 359 +++- .../cloud/speech/v1/cloud_speech_gapic.yaml | 98 - .../samples/speech_transcribe_async.test.yaml | 26 + .../v1/samples/speech_transcribe_async.yaml | 35 + .../speech_transcribe_async_gcs.test.yaml | 26 + .../samples/speech_transcribe_async_gcs.yaml | 35 + ...ribe_async_word_time_offsets_gcs.test.yaml | 35 + ...ranscribe_async_word_time_offsets_gcs.yaml | 38 + ...speech_transcribe_enhanced_model.test.yaml | 27 + .../speech_transcribe_enhanced_model.yaml | 38 + ...peech_transcribe_model_selection.test.yaml | 50 + .../speech_transcribe_model_selection.yaml | 34 + ...h_transcribe_model_selection_gcs.test.yaml | 50 + ...speech_transcribe_model_selection_gcs.yaml | 34 + .../speech_transcribe_multichannel.test.yaml | 29 + .../speech_transcribe_multichannel.yaml | 40 + ...eech_transcribe_multichannel_gcs.test.yaml | 30 + .../speech_transcribe_multichannel_gcs.yaml | 40 + .../samples/speech_transcribe_sync.test.yaml | 26 + .../v1/samples/speech_transcribe_sync.yaml | 35 + .../speech_transcribe_sync_gcs.test.yaml | 26 + .../samples/speech_transcribe_sync_gcs.yaml | 35 + google/cloud/speech/v1/speech_gapic.yaml | 499 +++++ .../cloud/speech/v1beta1/cloud_speech.proto | 421 ---- .../speech/v1beta1/cloud_speech_gapic.yaml | 93 - google/cloud/speech/v1p1beta1/BUILD.bazel | 155 ++ .../cloud/speech/v1p1beta1/cloud_speech.proto | 116 +- .../samples/speech_adaptation_beta.test.yaml | 9 + .../speech_contexts_classes_beta.test.yaml | 9 + .../samples/speech_quickstart_beta.test.yaml | 9 + ...transcribe_auto_punctuation_beta.test.yaml | 26 + ...eech_transcribe_auto_punctuation_beta.yaml | 34 + ...eech_transcribe_diarization_beta.test.yaml | 38 + .../speech_transcribe_diarization_beta.yaml | 46 + ...ch_transcribe_multilanguage_beta.test.yaml | 31 + .../speech_transcribe_multilanguage_beta.yaml | 37 + ...scribe_recognition_metadata_beta.test.yaml | 25 + ..._transcribe_recognition_metadata_beta.yaml | 42 + ...cribe_word_level_confidence_beta.test.yaml | 33 + ...transcribe_word_level_confidence_beta.yaml | 38 + .../cloud/speech/v1p1beta1/speech_gapic.yaml | 357 +++- google/cloud/support/common.proto | 1 - .../support/v1alpha1/cloud_support.proto | 55 +- .../cloud/talent/artman_talent_v4beta1.yaml | 36 + google/cloud/talent/talent_v4beta1.yaml | 95 + google/cloud/talent/v4beta1/application.proto | 176 ++ .../talent/v4beta1/application_service.proto | 169 ++ google/cloud/talent/v4beta1/batch.proto | 121 ++ google/cloud/talent/v4beta1/common.proto | 1006 +++++++++ google/cloud/talent/v4beta1/company.proto | 115 + .../talent/v4beta1/company_service.proto | 193 ++ .../talent/v4beta1/completion_service.proto | 170 ++ google/cloud/talent/v4beta1/event.proto | 303 +++ .../cloud/talent/v4beta1/event_service.proto | 70 + google/cloud/talent/v4beta1/filters.proto | 740 +++++++ google/cloud/talent/v4beta1/histogram.proto | 64 + google/cloud/talent/v4beta1/job.proto | 376 ++++ google/cloud/talent/v4beta1/job_service.proto | 927 ++++++++ google/cloud/talent/v4beta1/profile.proto | 735 +++++++ .../talent/v4beta1/profile_service.proto | 463 ++++ google/cloud/talent/v4beta1/talent_gapic.yaml | 1890 +++++++++++++++++ google/cloud/talent/v4beta1/tenant.proto | 79 + .../cloud/talent/v4beta1/tenant_service.proto | 158 ++ google/cloud/tasks/BUILD.bazel | 1 + google/cloud/tasks/artman_cloudtasks_v2.yaml | 36 + .../tasks/artman_cloudtasks_v2beta2.yaml | 34 + .../tasks/artman_cloudtasks_v2beta3.yaml | 36 + google/cloud/tasks/cloudtasks_v2.yaml | 29 + ...loudtasks.yaml => cloudtasks_v2beta2.yaml} | 2 +- google/cloud/tasks/cloudtasks_v2beta3.yaml | 29 + google/cloud/tasks/v2/cloudtasks.proto | 605 ++++++ google/cloud/tasks/v2/cloudtasks_gapic.yaml | 440 ++++ google/cloud/tasks/v2/queue.proto | 341 +++ google/cloud/tasks/v2/target.proto | 274 +++ google/cloud/tasks/v2/task.proto | 181 ++ google/cloud/tasks/v2beta2/BUILD.bazel | 161 ++ google/cloud/tasks/v2beta2/cloudtasks.proto | 460 ++-- .../cloud/tasks/v2beta2/cloudtasks_gapic.yaml | 33 +- google/cloud/tasks/v2beta2/queue.proto | 193 +- google/cloud/tasks/v2beta2/target.proto | 204 +- google/cloud/tasks/v2beta2/task.proto | 74 +- google/cloud/tasks/v2beta3/BUILD.bazel | 162 ++ google/cloud/tasks/v2beta3/cloudtasks.proto | 605 ++++++ .../cloud/tasks/v2beta3/cloudtasks_gapic.yaml | 435 ++++ google/cloud/tasks/v2beta3/queue.proto | 352 +++ google/cloud/tasks/v2beta3/target.proto | 440 ++++ google/cloud/tasks/v2beta3/task.proto | 188 ++ google/cloud/texttospeech/BUILD.bazel | 1 + .../texttospeech/artman_texttospeech.yaml | 21 - .../texttospeech/artman_texttospeech_v1.yaml | 21 - .../artman_texttospeech_v1beta1.yaml | 21 - google/cloud/texttospeech/v1/BUILD.bazel | 127 ++ google/cloud/texttospeech/v1/cloud_tts.proto | 20 +- .../texttospeech/v1/texttospeech_gapic.yaml | 19 +- google/cloud/texttospeech/v1beta1/BUILD.bazel | 127 ++ .../texttospeech/v1beta1/cloud_tts.proto | 4 +- .../v1beta1/texttospeech_gapic.yaml | 19 +- .../translate/artman_translate_v3beta1.yaml | 34 + google/cloud/translate/translate_v3beta1.yaml | 68 + .../translate/v3beta1/translate_gapic.yaml | 235 ++ .../v3beta1/translation_service.proto | 790 +++++++ google/cloud/videointelligence/BUILD.bazel | 1 + .../artman_videointelligence_v1.yaml | 79 - .../artman_videointelligence_v1beta1.yaml | 79 - .../artman_videointelligence_v1beta2.yaml | 79 - .../artman_videointelligence_v1p1beta1.yaml | 79 - .../artman_videointelligence_v1p2beta1.yaml | 35 + .../artman_videointelligence_v1p3beta1.yaml | 35 + google/cloud/videointelligence/v1/BUILD.bazel | 153 ++ .../v1/video_intelligence.proto | 346 ++- .../v1/videointelligence_gapic.yaml | 8 +- .../videointelligence/v1beta1/BUILD.bazel | 152 ++ .../v1beta1/video_intelligence.proto | 21 +- .../v1beta1/videointelligence_gapic.yaml | 6 +- .../videointelligence/v1beta2/BUILD.bazel | 153 ++ .../v1beta2/video_intelligence.proto | 22 +- .../v1beta2/videointelligence_gapic.yaml | 6 +- .../videointelligence/v1p1beta1/BUILD.bazel | 153 ++ .../v1p1beta1/video_intelligence.proto | 17 +- .../v1p1beta1/videointelligence_gapic.yaml | 10 +- .../videointelligence/v1p2beta1/BUILD.bazel | 153 ++ .../v1p2beta1/video_intelligence.proto | 467 ++++ .../v1p2beta1/videointelligence_gapic.yaml | 63 + .../videointelligence/v1p3beta1/BUILD.bazel | 154 ++ .../v1p3beta1/video_intelligence.proto | 897 ++++++++ .../v1p3beta1/videointelligence_gapic.yaml | 91 + .../videointelligence_v1p2beta1.yaml | 52 + .../videointelligence_v1p3beta1.yaml | 55 + google/cloud/vision/BUILD.bazel | 1 + google/cloud/vision/artman_vision_v1.yaml | 77 - .../cloud/vision/artman_vision_v1p1beta1.yaml | 77 - .../cloud/vision/artman_vision_v1p2beta1.yaml | 78 - .../cloud/vision/artman_vision_v1p3beta1.yaml | 41 + .../cloud/vision/artman_vision_v1p4beta1.yaml | 34 + google/cloud/vision/v1/BUILD.bazel | 195 ++ google/cloud/vision/v1/geometry.proto | 8 +- google/cloud/vision/v1/image_annotator.proto | 221 +- google/cloud/vision/v1/product_search.proto | 104 + .../vision/v1/product_search_service.proto | 838 ++++++++ ...sion_async_batch_annotate_images_test.yaml | 18 + .../vision_batch_annotate_files_gcs_test.yaml | 41 + .../vision_batch_annotate_files_test.yaml | 41 + google/cloud/vision/v1/text_annotation.proto | 15 +- google/cloud/vision/v1/vision_gapic.yaml | 552 ++++- google/cloud/vision/v1/web_detection.proto | 28 +- google/cloud/vision/v1p1beta1/BUILD.bazel | 158 ++ .../vision/v1p1beta1/image_annotator.proto | 3 +- .../cloud/vision/v1p1beta1/vision_gapic.yaml | 6 +- google/cloud/vision/v1p2beta1/BUILD.bazel | 159 ++ google/cloud/vision/v1p2beta1/geometry.proto | 1 - .../vision/v1p2beta1/image_annotator.proto | 7 +- .../vision/v1p2beta1/text_annotation.proto | 6 +- .../cloud/vision/v1p2beta1/vision_gapic.yaml | 7 +- .../vision/v1p2beta1/web_detection.proto | 1 - google/cloud/vision/v1p3beta1/BUILD.bazel | 163 ++ google/cloud/vision/v1p3beta1/geometry.proto | 75 + .../vision/v1p3beta1/image_annotator.proto | 803 +++++++ .../vision/v1p3beta1/product_search.proto | 162 ++ .../v1p3beta1/product_search_service.proto | 842 ++++++++ .../vision/v1p3beta1/text_annotation.proto | 259 +++ .../cloud/vision/v1p3beta1/vision_gapic.yaml | 444 ++++ .../vision/v1p3beta1/web_detection.proto | 104 + google/cloud/vision/v1p4beta1/BUILD.bazel | 163 ++ google/cloud/vision/v1p4beta1/geometry.proto | 71 + .../vision/v1p4beta1/image_annotator.proto | 905 ++++++++ .../vision/v1p4beta1/product_search.proto | 102 + .../v1p4beta1/product_search_service.proto | 857 ++++++++ .../vision/v1p4beta1/text_annotation.proto | 261 +++ .../cloud/vision/v1p4beta1/vision_gapic.yaml | 603 ++++++ .../vision/v1p4beta1/web_detection.proto | 107 + google/cloud/vision/vision_v1.yaml | 16 +- google/cloud/vision/vision_v1p3beta1.yaml | 37 + google/cloud/vision/vision_v1p4beta1.yaml | 39 + .../cloud/webrisk/artman_webrisk_v1beta1.yaml | 34 + google/cloud/webrisk/v1beta1/webrisk.proto | 295 +++ .../cloud/webrisk/v1beta1/webrisk_gapic.yaml | 141 ++ google/cloud/webrisk/webrisk.yaml | 14 + google/cloud/websecurityscanner/BUILD.bazel | 1 + .../artman_websecurityscanner_v1alpha.yaml | 21 - .../artman_websecurityscanner_v1beta.yaml | 34 + .../websecurityscanner/v1alpha/BUILD.bazel | 147 ++ .../v1alpha/crawled_url.proto | 1 - .../websecurityscanner/v1alpha/finding.proto | 1 - .../v1alpha/finding_addon.proto | 1 - .../v1alpha/finding_type_stats.proto | 1 - .../v1alpha/scan_config.proto | 1 - .../websecurityscanner/v1alpha/scan_run.proto | 1 - .../v1alpha/web_security_scanner.proto | 13 +- .../v1alpha/websecurityscanner_gapic.yaml | 72 +- .../v1beta/crawled_url.proto | 44 + .../websecurityscanner/v1beta/finding.proto | 107 + .../v1beta/finding_addon.proto | 90 + .../v1beta/finding_type_stats.proto | 38 + .../v1beta/scan_config.proto | 189 ++ .../v1beta/scan_config_error.proto | 187 ++ .../websecurityscanner/v1beta/scan_run.proto | 121 ++ .../v1beta/scan_run_error_trace.proto | 77 + .../v1beta/scan_run_warning_trace.proto | 58 + .../v1beta/web_security_scanner.proto | 347 +++ .../v1beta/websecurityscanner_gapic.yaml | 294 +++ .../websecurityscanner_v1beta.yaml | 22 + google/container/BUILD.bazel | 1 + google/container/artman_container_v1.yaml | 34 + .../container/artman_container_v1beta1.yaml | 34 + google/container/container.yaml | 19 - google/container/container_v1.yaml | 82 + google/container/container_v1beta1.yaml | 86 + google/container/v1/BUILD.bazel | 126 ++ google/container/v1/cluster_service.proto | 1045 ++++++--- google/container/v1/container_gapic.yaml | 100 +- .../container/v1beta1/cluster_service.proto | 1621 +++++++++++--- google/container/v1beta1/container_gapic.yaml | 552 +++++ google/datastore/BUILD.bazel | 1 + .../admin/artman_datastore_admin.yaml | 23 +- google/datastore/admin/datastore_admin.yaml | 1 + .../datastore/admin/v1/datastore_admin.proto | 97 +- .../admin/v1/datastore_admin_gapic.yaml | 12 - google/datastore/admin/v1/index.proto | 122 ++ .../admin/v1beta1/datastore_admin.proto | 10 +- google/datastore/artman_datastore.yaml | 67 - google/datastore/v1/BUILD.bazel | 151 ++ google/datastore/v1/datastore.proto | 51 +- google/datastore/v1/datastore_gapic.yaml | 11 +- google/datastore/v1/entity.proto | 8 +- google/datastore/v1/query.proto | 20 +- google/datastore/v1beta3/datastore.proto | 69 +- google/datastore/v1beta3/entity.proto | 8 +- google/datastore/v1beta3/query.proto | 19 +- google/devtools/artman_clouddebugger.yaml | 60 - .../build/artman_buildeventservice.yaml | 34 + google/devtools/build/buildeventservice.yaml | 17 + google/devtools/build/v1/build_events.proto | 22 +- google/devtools/build/v1/build_status.proto | 4 +- .../build/v1/buildeventservice_gapic.yaml | 126 ++ .../build/v1/publish_build_event.proto | 47 +- google/devtools/cloudbuild/cloudbuild.yaml | 14 +- .../devtools/cloudbuild/v1/cloudbuild.proto | 169 +- .../cloudbuild/v1/cloudbuild_gapic.yaml | 21 +- google/devtools/clouddebugger/BUILD.bazel | 1 + .../devtools/clouddebugger/clouddebugger.yaml | 52 +- google/devtools/clouddebugger/v2/BUILD.bazel | 153 ++ .../clouddebugger/v2/clouddebugger_gapic.yaml | 11 - .../clouddebugger/v2/controller.proto | 33 +- google/devtools/clouddebugger/v2/data.proto | 23 +- .../devtools/clouddebugger/v2/debugger.proto | 33 +- .../devtools/clouderrorreporting/BUILD.bazel | 1 + .../artman_errorreporting.yaml | 75 - .../clouderrorreporting/v1beta1/BUILD.bazel | 151 ++ .../clouderrorreporting/v1beta1/common.proto | 1 - .../v1beta1/error_group_service.proto | 10 +- .../v1beta1/error_stats_service.proto | 17 +- .../v1beta1/errorreporting_gapic.yaml | 9 - .../v1beta1/report_errors_service.proto | 21 +- .../devtools/cloudprofiler/cloudprofiler.yaml | 15 +- .../devtools/cloudprofiler/v2/profiler.proto | 123 +- google/devtools/cloudtrace/BUILD.bazel | 1 + .../cloudtrace/artman_cloudtrace_v1.yaml | 21 - .../cloudtrace/artman_cloudtrace_v2.yaml | 21 - google/devtools/cloudtrace/v1/BUILD.bazel | 140 ++ .../cloudtrace/v1/cloudtrace_gapic.yaml | 7 +- google/devtools/cloudtrace/v1/trace.proto | 14 +- google/devtools/cloudtrace/v2/BUILD.bazel | 167 ++ .../cloudtrace/v2/cloudtrace_gapic.yaml | 12 +- google/devtools/cloudtrace/v2/trace.proto | 1 - google/devtools/cloudtrace/v2/tracing.proto | 11 +- google/devtools/containeranalysis/BUILD.bazel | 1 + .../artman_containeranalysis.yaml | 5 +- .../artman_containeranalysis_v1.yaml} | 23 +- .../artman_containeranalysis_v1beta1.yaml | 56 + .../containeranalysis_v1.yaml | 27 + .../containeranalysis_v1beta1.yaml | 68 + .../v1/containeranalysis.proto | 101 + .../v1/containeranalysis_gapic.yaml | 181 ++ .../v1alpha1/bill_of_materials.proto | 3 - .../v1alpha1/containeranalysis.proto | 35 +- .../v1alpha1/containeranalysis_gapic.yaml | 28 +- .../v1alpha1/image_basis.proto | 3 - .../v1alpha1/package_vulnerability.proto | 1 - .../v1alpha1/provenance.proto | 1 - .../v1alpha1/source_context.proto | 1 - .../containeranalysis/v1beta1/BUILD.bazel | 233 ++ .../v1beta1/attestation/BUILD.bazel | 60 + .../v1beta1/attestation/attestation.proto | 132 ++ .../v1beta1/build/BUILD.bazel | 63 + .../v1beta1/build/build.proto | 96 + .../v1beta1/common/BUILD.bazel | 60 + .../v1beta1/common/common.proto | 50 + .../v1beta1/containeranalysis.proto | 190 ++ .../v1beta1/containeranalysis_gapic.yaml | 597 ++++++ .../v1beta1/deployment/BUILD.bazel | 61 + .../v1beta1/deployment/deployment.proto | 74 + .../v1beta1/discovery/BUILD.bazel | 66 + .../v1beta1/discovery/discovery.proto | 85 + .../v1beta1/grafeas/BUILD.bazel | 86 + .../v1beta1/grafeas/grafeas.proto | 502 +++++ .../v1beta1/image/BUILD.bazel | 59 + .../v1beta1/image/image.proto | 144 ++ .../v1beta1/package/BUILD.bazel | 60 + .../v1beta1/package/package.proto | 127 ++ .../v1beta1/provenance/BUILD.bazel | 65 + .../v1beta1/provenance/provenance.proto | 164 ++ .../v1beta1/source/BUILD.bazel | 60 + .../v1beta1/source/source.proto | 134 ++ .../v1beta1/vulnerability/BUILD.bazel | 66 + .../v1beta1/vulnerability/vulnerability.proto | 145 ++ .../v1test/remote_execution.proto | 35 +- .../v1test2/artman_remoteworkers.yaml | 6 - .../devtools/remoteworkers/v1test2/bots.proto | 62 +- .../remoteworkers/v1test2/command.proto | 98 +- .../remoteworkers/v1test2/remote_workers.yaml | 1 + .../v1test2/remoteworkers_gapic.yaml | 20 - .../remoteworkers/v1test2/tasks.proto | 24 +- .../remoteworkers/v1test2/worker.proto | 39 +- .../resultstore/artman_resultstore.yaml | 21 - .../resultstore/resultstore-service.yaml | 1 + google/devtools/resultstore/v2/action.proto | 8 +- google/devtools/resultstore/v2/common.proto | 10 +- .../resultstore/v2/configuration.proto | 4 +- .../resultstore/v2/configured_target.proto | 10 +- google/devtools/resultstore/v2/coverage.proto | 4 +- .../resultstore/v2/coverage_summary.proto | 4 +- google/devtools/resultstore/v2/file.proto | 25 +- google/devtools/resultstore/v2/file_set.proto | 4 +- .../devtools/resultstore/v2/invocation.proto | 26 +- .../resultstore/v2/resultstore_download.proto | 22 +- .../v2/resultstore_file_download.proto | 4 +- .../resultstore/v2/resultstore_gapic.yaml | 327 ++- .../resultstore/v2/resultstore_upload.proto | 636 ++++++ google/devtools/resultstore/v2/target.proto | 6 +- .../devtools/resultstore/v2/test_suite.proto | 18 +- google/devtools/source/v1/BUILD.bazel | 58 + .../devtools/source/v1/source_context.proto | 9 +- .../devtools/sourcerepo/v1/sourcerepo.proto | 41 +- google/example/library/BUILD.bazel | 1 + .../library/artman_library_example_v1.yaml | 34 + google/example/library/library.yaml | 7 - .../example/library/library_example_v1.yaml | 41 + google/example/library/v1/BUILD.bazel | 140 ++ google/example/library/v1/library.proto | 143 +- .../library/v1/library_example_gapic.yaml | 254 +++ .../connection/fcmconnection_v1alpha1.yaml | 17 + .../connection/v1alpha1/connection_api.proto | 89 + google/firestore/BUILD.bazel | 1 + .../firestore/admin/artman_firestore_v1.yaml | 34 + .../firestore/admin/firestore_admin_v1.yaml | 48 + google/firestore/admin/v1/field.proto | 96 + .../firestore/admin/v1/firestore_admin.proto | 274 +++ .../admin/v1/firestore_gapic.yaml} | 173 +- google/firestore/admin/v1/index.proto | 149 ++ google/firestore/admin/v1/location.proto | 35 + google/firestore/admin/v1/operation.proto | 204 ++ .../admin/v1beta1/firestore_admin.proto | 172 +- google/firestore/admin/v1beta1/index.proto | 7 +- google/firestore/admin/v1beta1/location.proto | 34 + google/firestore/admin/v1beta2/field.proto | 95 + .../admin/v1beta2/firestore_admin.proto | 273 +++ google/firestore/admin/v1beta2/index.proto | 148 ++ .../firestore/admin/v1beta2/operation.proto | 203 ++ google/firestore/artman_firestore.yaml | 27 +- google/firestore/artman_firestore_v1.yaml | 34 + google/firestore/firestore_v1.yaml | 15 + ...{firestore.yaml => firestore_v1beta1.yaml} | 4 - google/firestore/v1/common.proto | 84 + google/firestore/v1/document.proto | 151 ++ google/firestore/v1/firestore.proto | 761 +++++++ google/firestore/v1/firestore_gapic.yaml | 232 ++ google/firestore/v1/query.proto | 236 ++ google/firestore/v1/write.proto | 255 +++ google/firestore/v1beta1/BUILD.bazel | 154 ++ google/firestore/v1beta1/common.proto | 5 +- google/firestore/v1beta1/document.proto | 12 +- google/firestore/v1beta1/firestore.proto | 76 +- google/firestore/v1beta1/firestore_gapic.yaml | 118 +- google/firestore/v1beta1/query.proto | 36 +- google/firestore/v1beta1/write.proto | 80 +- google/genomics/v1/annotations.proto | 67 +- google/genomics/v1/cigar.proto | 1 - google/genomics/v1/datasets.proto | 52 +- google/genomics/v1/operations.proto | 1 - google/genomics/v1/position.proto | 1 - google/genomics/v1/range.proto | 1 - google/genomics/v1/readalignment.proto | 1 - google/genomics/v1/readgroup.proto | 1 - google/genomics/v1/readgroupset.proto | 1 - google/genomics/v1/reads.proto | 58 +- google/genomics/v1/references.proto | 29 +- google/genomics/v1/variants.proto | 105 +- google/genomics/v1alpha2/pipelines.proto | 38 +- google/home/graph/v1/device.proto | 19 +- google/home/graph/v1/homegraph.proto | 24 +- google/home/graph/v1/homegraph_gapic.yaml | 15 - google/iam/BUILD.bazel | 1 + google/iam/admin/v1/BUILD.bazel | 78 + google/iam/admin/v1/iam.proto | 142 +- google/iam/admin/v1/iam_gapic.yaml | 18 - google/iam/artman_iam.yaml | 16 - google/iam/artman_iam_admin.yaml | 11 - google/iam/artman_iam_meta_api.yaml | 34 + google/iam/credentials/BUILD.bazel | 1 + .../credentials/artman_iamcredentials_v1.yaml | 34 + google/iam/credentials/iamcredentials_v1.yaml | 17 + google/iam/credentials/v1/BUILD.bazel | 141 ++ google/iam/credentials/v1/common.proto | 154 ++ .../iam/credentials/v1/iamcredentials.proto | 71 + .../credentials/v1/iamcredentials_gapic.yaml | 133 ++ google/iam/iam_meta_api.yaml | 85 + google/iam/v1/BUILD.bazel | 83 + google/iam/v1/iam_gapic.yaml | 3 - google/iam/v1/iam_meta_api_gapic.yaml | 132 ++ google/iam/v1/iam_policy.proto | 42 +- google/iam/v1/logging/BUILD.bazel | 60 + google/iam/v1/logging/audit_data.proto | 1 - google/iam/v1/options.proto | 37 + google/iam/v1/policy.proto | 85 +- google/logging/BUILD.bazel | 1 + google/logging/artman_logging.yaml | 21 - google/logging/logging.yaml | 2 +- google/logging/type/BUILD.bazel | 74 + google/logging/type/http_request.proto | 10 +- google/logging/type/log_severity.proto | 4 +- google/logging/v2/BUILD.bazel | 187 ++ google/logging/v2/log_entry.proto | 24 +- google/logging/v2/logging.proto | 72 +- google/logging/v2/logging_config.proto | 124 +- google/logging/v2/logging_gapic.yaml | 25 +- google/logging/v2/logging_metrics.proto | 11 +- google/longrunning/BUILD.bazel | 112 + google/longrunning/artman_longrunning.yaml | 59 - google/longrunning/longrunning.yaml | 70 +- google/longrunning/longrunning_gapic.yaml | 20 +- google/longrunning/operations.proto | 99 +- google/monitoring/BUILD.bazel | 1 + google/monitoring/artman_monitoring.yaml | 76 +- google/monitoring/monitoring.yaml | 14 + google/monitoring/v3/BUILD | 42 - google/monitoring/v3/BUILD.bazel | 202 ++ google/monitoring/v3/alert.proto | 31 +- google/monitoring/v3/alert_service.proto | 10 +- google/monitoring/v3/common.proto | 19 +- google/monitoring/v3/dropped_labels.proto | 45 + google/monitoring/v3/group.proto | 7 +- google/monitoring/v3/group_service.proto | 41 +- google/monitoring/v3/metric.proto | 35 +- google/monitoring/v3/metric_service.proto | 95 +- google/monitoring/v3/monitoring_gapic.yaml | 77 +- google/monitoring/v3/mutation_record.proto | 4 +- google/monitoring/v3/notification.proto | 14 +- .../monitoring/v3/notification_service.proto | 43 +- google/monitoring/v3/span_context.proto | 43 + google/monitoring/v3/uptime.proto | 99 +- google/monitoring/v3/uptime_service.proto | 78 +- google/privacy/dlp/BUILD.bazel | 1 + google/privacy/dlp/artman_dlp_v2.yaml | 79 - google/privacy/dlp/dlp_v2.yaml | 52 +- google/privacy/dlp/v2/BUILD.bazel | 159 ++ google/privacy/dlp/v2/dlp.proto | 706 +++++- google/privacy/dlp/v2/dlp_gapic.yaml | 120 +- google/privacy/dlp/v2/storage.proto | 284 ++- google/pubsub/BUILD.bazel | 1 + google/pubsub/artman_pubsub.yaml | 84 +- google/pubsub/v1/BUILD.bazel | 219 ++ google/pubsub/v1/pubsub.proto | 663 +++--- google/pubsub/v1/pubsub_gapic.yaml | 169 +- google/pubsub/v1beta2/pubsub.proto | 13 +- google/rpc/BUILD.bazel | 87 + google/rpc/code.proto | 1 - google/rpc/error_details.proto | 4 +- google/rpc/status.proto | 32 +- google/spanner/BUILD.bazel | 1 + google/spanner/admin/database/BUILD.bazel | 1 + .../artman_spanner_admin_database.yaml | 60 +- google/spanner/admin/database/v1/BUILD.bazel | 169 ++ .../v1/spanner_admin_database_gapic.yaml | 18 +- .../database/v1/spanner_database_admin.proto | 73 +- google/spanner/admin/instance/BUILD.bazel | 1 + .../artman_spanner_admin_instance.yaml | 60 +- google/spanner/admin/instance/v1/BUILD.bazel | 157 ++ .../v1/spanner_admin_instance_gapic.yaml | 13 - .../instance/v1/spanner_instance_admin.proto | 99 +- google/spanner/artman_spanner.yaml | 83 +- google/spanner/v1/BUILD.bazel | 154 ++ google/spanner/v1/keys.proto | 10 +- google/spanner/v1/mutation.proto | 44 +- google/spanner/v1/query_plan.proto | 42 +- google/spanner/v1/result_set.proto | 62 +- google/spanner/v1/spanner.proto | 332 ++- google/spanner/v1/spanner_gapic.yaml | 63 +- google/spanner/v1/transaction.proto | 105 +- google/spanner/v1/type.proto | 25 +- google/storagetransfer/v1/transfer.proto | 51 +- .../storagetransfer/v1/transfer_types.proto | 28 +- .../publish/streetview_publish_gapic.yaml | 12 - google/streetview/publish/v1/resources.proto | 98 +- .../streetview/publish/v1/rpcmessages.proto | 188 +- .../publish/v1/streetview_publish.proto | 237 ++- google/type/BUILD.bazel | 219 ++ google/type/calendar_period.proto | 58 + google/type/color.proto | 13 +- google/type/date.proto | 26 +- google/type/dayofweek.proto | 3 +- google/type/expr.proto | 52 + google/type/fraction.proto | 35 + google/type/latlng.proto | 38 +- google/type/money.proto | 4 +- google/type/postal_address.proto | 3 +- google/type/quaternion.proto | 97 + google/type/timeofday.proto | 6 +- google/type/type.yaml | 33 + google/watcher/v1/watch.proto | 13 +- .../artman_grafeas_v1.yaml | 19 +- grafeas/grafeas_v1.yaml | 53 + grafeas/v1/attestation.proto | 73 + grafeas/v1/build.proto | 50 + grafeas/v1/common.proto | 101 + grafeas/v1/cvss.proto | 85 + grafeas/v1/deployment.proto | 66 + grafeas/v1/discovery.proto | 76 + grafeas/v1/grafeas.proto | 452 ++++ grafeas/v1/grafeas_gapic.yaml | 384 ++++ grafeas/v1/image.proto | 83 + grafeas/v1/package.proto | 124 ++ grafeas/v1/provenance.proto | 265 +++ grafeas/v1/vulnerability.proto | 216 ++ repository_rules.bzl | 222 ++ third_party/boringssl-with-bazel | 1 - third_party/nanopb | 1 - third_party/protobuf | 1 - third_party/zlib | 1 - 1993 files changed, 186901 insertions(+), 9961 deletions(-) create mode 100644 .bazelrc create mode 100644 .cloudbuild/Dockerfile.bazel-gapic create mode 100644 .cloudbuild/cloudbuild.yaml create mode 100644 .cloudbuild/write-latest.sh delete mode 100644 .gitmodules delete mode 100644 BUILD create mode 100644 BUILD.bazel create mode 100644 google/BUILD.bazel create mode 100644 google/ads/googleads/README.md create mode 100644 google/ads/googleads/base.yaml create mode 100644 google/ads/googleads/v1/common/ad_asset.proto create mode 100644 google/ads/googleads/v1/common/ad_type_infos.proto create mode 100644 google/ads/googleads/v1/common/asset_types.proto create mode 100644 google/ads/googleads/v1/common/bidding.proto create mode 100644 google/ads/googleads/v1/common/click_location.proto create mode 100644 google/ads/googleads/v1/common/criteria.proto create mode 100644 google/ads/googleads/v1/common/criterion_category_availability.proto create mode 100644 google/ads/googleads/v1/common/custom_parameter.proto create mode 100644 google/ads/googleads/v1/common/dates.proto create mode 100644 google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto create mode 100644 google/ads/googleads/v1/common/extensions.proto create mode 100644 google/ads/googleads/v1/common/feed_common.proto create mode 100644 google/ads/googleads/v1/common/final_app_url.proto create mode 100644 google/ads/googleads/v1/common/frequency_cap.proto create mode 100644 google/ads/googleads/v1/common/keyword_plan_common.proto create mode 100644 google/ads/googleads/v1/common/matching_function.proto create mode 100644 google/ads/googleads/v1/common/metrics.proto create mode 100644 google/ads/googleads/v1/common/policy.proto create mode 100644 google/ads/googleads/v1/common/real_time_bidding_setting.proto create mode 100644 google/ads/googleads/v1/common/segments.proto create mode 100644 google/ads/googleads/v1/common/simulation.proto create mode 100644 google/ads/googleads/v1/common/tag_snippet.proto create mode 100644 google/ads/googleads/v1/common/targeting_setting.proto create mode 100644 google/ads/googleads/v1/common/text_label.proto create mode 100644 google/ads/googleads/v1/common/url_collection.proto create mode 100644 google/ads/googleads/v1/common/user_lists.proto create mode 100644 google/ads/googleads/v1/common/value.proto create mode 100644 google/ads/googleads/v1/enums/access_reason.proto create mode 100644 google/ads/googleads/v1/enums/account_budget_proposal_status.proto create mode 100644 google/ads/googleads/v1/enums/account_budget_proposal_type.proto create mode 100644 google/ads/googleads/v1/enums/account_budget_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_ad_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_criterion_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_group_type.proto create mode 100644 google/ads/googleads/v1/enums/ad_network_type.proto create mode 100644 google/ads/googleads/v1/enums/ad_serving_optimization_status.proto create mode 100644 google/ads/googleads/v1/enums/ad_strength.proto create mode 100644 google/ads/googleads/v1/enums/ad_type.proto create mode 100644 google/ads/googleads/v1/enums/advertising_channel_sub_type.proto create mode 100644 google/ads/googleads/v1/enums/advertising_channel_type.proto create mode 100644 google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto create mode 100644 google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/age_range_type.proto create mode 100644 google/ads/googleads/v1/enums/app_campaign_app_store.proto create mode 100644 google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto create mode 100644 google/ads/googleads/v1/enums/app_payment_model_type.proto create mode 100644 google/ads/googleads/v1/enums/app_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/app_store.proto create mode 100644 google/ads/googleads/v1/enums/app_url_operating_system_type.proto create mode 100644 google/ads/googleads/v1/enums/asset_type.proto create mode 100644 google/ads/googleads/v1/enums/attribution_model.proto create mode 100644 google/ads/googleads/v1/enums/bid_modifier_source.proto create mode 100644 google/ads/googleads/v1/enums/bidding_source.proto create mode 100644 google/ads/googleads/v1/enums/bidding_strategy_status.proto create mode 100644 google/ads/googleads/v1/enums/bidding_strategy_type.proto create mode 100644 google/ads/googleads/v1/enums/billing_setup_status.proto create mode 100644 google/ads/googleads/v1/enums/brand_safety_suitability.proto create mode 100644 google/ads/googleads/v1/enums/budget_delivery_method.proto create mode 100644 google/ads/googleads/v1/enums/budget_period.proto create mode 100644 google/ads/googleads/v1/enums/budget_status.proto create mode 100644 google/ads/googleads/v1/enums/budget_type.proto create mode 100644 google/ads/googleads/v1/enums/call_conversion_reporting_state.proto create mode 100644 google/ads/googleads/v1/enums/call_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/callout_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/campaign_criterion_status.proto create mode 100644 google/ads/googleads/v1/enums/campaign_draft_status.proto create mode 100644 google/ads/googleads/v1/enums/campaign_experiment_status.proto create mode 100644 google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto create mode 100644 google/ads/googleads/v1/enums/campaign_experiment_type.proto create mode 100644 google/ads/googleads/v1/enums/campaign_serving_status.proto create mode 100644 google/ads/googleads/v1/enums/campaign_shared_set_status.proto create mode 100644 google/ads/googleads/v1/enums/campaign_status.proto create mode 100644 google/ads/googleads/v1/enums/change_status_operation.proto create mode 100644 google/ads/googleads/v1/enums/change_status_resource_type.proto create mode 100644 google/ads/googleads/v1/enums/click_type.proto create mode 100644 google/ads/googleads/v1/enums/content_label_type.proto create mode 100644 google/ads/googleads/v1/enums/conversion_action_category.proto create mode 100644 google/ads/googleads/v1/enums/conversion_action_counting_type.proto create mode 100644 google/ads/googleads/v1/enums/conversion_action_status.proto create mode 100644 google/ads/googleads/v1/enums/conversion_action_type.proto create mode 100644 google/ads/googleads/v1/enums/conversion_adjustment_type.proto create mode 100644 google/ads/googleads/v1/enums/conversion_attribution_event_type.proto create mode 100644 google/ads/googleads/v1/enums/conversion_lag_bucket.proto create mode 100644 google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto create mode 100644 google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto create mode 100644 google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto create mode 100644 google/ads/googleads/v1/enums/criterion_system_serving_status.proto create mode 100644 google/ads/googleads/v1/enums/criterion_type.proto create mode 100644 google/ads/googleads/v1/enums/custom_interest_member_type.proto create mode 100644 google/ads/googleads/v1/enums/custom_interest_status.proto create mode 100644 google/ads/googleads/v1/enums/custom_interest_type.proto create mode 100644 google/ads/googleads/v1/enums/custom_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/customer_match_upload_key_type.proto create mode 100644 google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto create mode 100644 google/ads/googleads/v1/enums/data_driven_model_status.proto create mode 100644 google/ads/googleads/v1/enums/day_of_week.proto create mode 100644 google/ads/googleads/v1/enums/device.proto create mode 100644 google/ads/googleads/v1/enums/display_ad_format_setting.proto create mode 100644 google/ads/googleads/v1/enums/display_upload_product_type.proto create mode 100644 google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto create mode 100644 google/ads/googleads/v1/enums/education_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/extension_setting_device.proto create mode 100644 google/ads/googleads/v1/enums/extension_type.proto create mode 100644 google/ads/googleads/v1/enums/external_conversion_source.proto create mode 100644 google/ads/googleads/v1/enums/feed_attribute_type.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_status.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_target_device.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_target_type.proto create mode 100644 google/ads/googleads/v1/enums/feed_item_validation_status.proto create mode 100644 google/ads/googleads/v1/enums/feed_link_status.proto create mode 100644 google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto create mode 100644 google/ads/googleads/v1/enums/feed_mapping_status.proto create mode 100644 google/ads/googleads/v1/enums/feed_origin.proto create mode 100644 google/ads/googleads/v1/enums/feed_status.proto create mode 100644 google/ads/googleads/v1/enums/flight_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/frequency_cap_event_type.proto create mode 100644 google/ads/googleads/v1/enums/frequency_cap_level.proto create mode 100644 google/ads/googleads/v1/enums/frequency_cap_time_unit.proto create mode 100644 google/ads/googleads/v1/enums/gender_type.proto create mode 100644 google/ads/googleads/v1/enums/geo_target_constant_status.proto create mode 100644 google/ads/googleads/v1/enums/geo_targeting_restriction.proto create mode 100644 google/ads/googleads/v1/enums/geo_targeting_type.proto create mode 100644 google/ads/googleads/v1/enums/google_ads_field_category.proto create mode 100644 google/ads/googleads/v1/enums/google_ads_field_data_type.proto create mode 100644 google/ads/googleads/v1/enums/hotel_date_selection_type.proto create mode 100644 google/ads/googleads/v1/enums/hotel_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/hotel_rate_type.proto create mode 100644 google/ads/googleads/v1/enums/income_range_type.proto create mode 100644 google/ads/googleads/v1/enums/interaction_event_type.proto create mode 100644 google/ads/googleads/v1/enums/interaction_type.proto create mode 100644 google/ads/googleads/v1/enums/job_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/keyword_match_type.proto create mode 100644 google/ads/googleads/v1/enums/keyword_plan_competition_level.proto create mode 100644 google/ads/googleads/v1/enums/keyword_plan_forecast_interval.proto create mode 100644 google/ads/googleads/v1/enums/keyword_plan_network.proto create mode 100644 google/ads/googleads/v1/enums/label_status.proto create mode 100644 google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto create mode 100644 google/ads/googleads/v1/enums/listing_custom_attribute_index.proto create mode 100644 google/ads/googleads/v1/enums/listing_group_type.proto create mode 100644 google/ads/googleads/v1/enums/local_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto create mode 100644 google/ads/googleads/v1/enums/location_group_radius_units.proto create mode 100644 google/ads/googleads/v1/enums/location_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/manager_link_status.proto create mode 100644 google/ads/googleads/v1/enums/matching_function_context_type.proto create mode 100644 google/ads/googleads/v1/enums/matching_function_operator.proto create mode 100644 google/ads/googleads/v1/enums/media_type.proto create mode 100644 google/ads/googleads/v1/enums/merchant_center_link_status.proto create mode 100644 google/ads/googleads/v1/enums/message_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/mime_type.proto create mode 100644 google/ads/googleads/v1/enums/minute_of_hour.proto create mode 100644 google/ads/googleads/v1/enums/mobile_device_type.proto create mode 100644 google/ads/googleads/v1/enums/month_of_year.proto create mode 100644 google/ads/googleads/v1/enums/mutate_job_status.proto create mode 100644 google/ads/googleads/v1/enums/negative_geo_target_type.proto create mode 100644 google/ads/googleads/v1/enums/operating_system_version_operator_type.proto create mode 100644 google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto create mode 100644 google/ads/googleads/v1/enums/parental_status_type.proto create mode 100644 google/ads/googleads/v1/enums/payment_mode.proto create mode 100644 google/ads/googleads/v1/enums/placeholder_type.proto create mode 100644 google/ads/googleads/v1/enums/placement_type.proto create mode 100644 google/ads/googleads/v1/enums/policy_approval_status.proto create mode 100644 google/ads/googleads/v1/enums/policy_review_status.proto create mode 100644 google/ads/googleads/v1/enums/policy_topic_entry_type.proto create mode 100644 google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto create mode 100644 google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto create mode 100644 google/ads/googleads/v1/enums/positive_geo_target_type.proto create mode 100644 google/ads/googleads/v1/enums/preferred_content_type.proto create mode 100644 google/ads/googleads/v1/enums/price_extension_price_qualifier.proto create mode 100644 google/ads/googleads/v1/enums/price_extension_price_unit.proto create mode 100644 google/ads/googleads/v1/enums/price_extension_type.proto create mode 100644 google/ads/googleads/v1/enums/price_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/product_bidding_category_level.proto create mode 100644 google/ads/googleads/v1/enums/product_bidding_category_status.proto create mode 100644 google/ads/googleads/v1/enums/product_channel.proto create mode 100644 google/ads/googleads/v1/enums/product_channel_exclusivity.proto create mode 100644 google/ads/googleads/v1/enums/product_condition.proto create mode 100644 google/ads/googleads/v1/enums/product_type_level.proto create mode 100644 google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto create mode 100644 google/ads/googleads/v1/enums/promotion_extension_occasion.proto create mode 100644 google/ads/googleads/v1/enums/promotion_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/proximity_radius_units.proto create mode 100644 google/ads/googleads/v1/enums/quality_score_bucket.proto create mode 100644 google/ads/googleads/v1/enums/real_estate_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/recommendation_type.proto create mode 100644 google/ads/googleads/v1/enums/search_engine_results_page_type.proto create mode 100644 google/ads/googleads/v1/enums/search_term_match_type.proto create mode 100644 google/ads/googleads/v1/enums/search_term_targeting_status.proto create mode 100644 google/ads/googleads/v1/enums/served_asset_field_type.proto create mode 100644 google/ads/googleads/v1/enums/shared_set_status.proto create mode 100644 google/ads/googleads/v1/enums/shared_set_type.proto create mode 100644 google/ads/googleads/v1/enums/simulation_modification_method.proto create mode 100644 google/ads/googleads/v1/enums/simulation_type.proto create mode 100644 google/ads/googleads/v1/enums/sitelink_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/slot.proto create mode 100644 google/ads/googleads/v1/enums/spending_limit_type.proto create mode 100644 google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/system_managed_entity_source.proto create mode 100644 google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto create mode 100644 google/ads/googleads/v1/enums/target_impression_share_location.proto create mode 100644 google/ads/googleads/v1/enums/targeting_dimension.proto create mode 100644 google/ads/googleads/v1/enums/time_type.proto create mode 100644 google/ads/googleads/v1/enums/tracking_code_page_format.proto create mode 100644 google/ads/googleads/v1/enums/tracking_code_type.proto create mode 100644 google/ads/googleads/v1/enums/travel_placeholder_field.proto create mode 100644 google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto create mode 100644 google/ads/googleads/v1/enums/user_list_access_status.proto create mode 100644 google/ads/googleads/v1/enums/user_list_closing_reason.proto create mode 100644 google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto create mode 100644 google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto create mode 100644 google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto create mode 100644 google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto create mode 100644 google/ads/googleads/v1/enums/user_list_membership_status.proto create mode 100644 google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto create mode 100644 google/ads/googleads/v1/enums/user_list_prepopulation_status.proto create mode 100644 google/ads/googleads/v1/enums/user_list_rule_type.proto create mode 100644 google/ads/googleads/v1/enums/user_list_size_range.proto create mode 100644 google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto create mode 100644 google/ads/googleads/v1/enums/user_list_type.proto create mode 100644 google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto create mode 100644 google/ads/googleads/v1/enums/vanity_pharma_text.proto create mode 100644 google/ads/googleads/v1/enums/webpage_condition_operand.proto create mode 100644 google/ads/googleads/v1/enums/webpage_condition_operator.proto create mode 100644 google/ads/googleads/v1/errors/account_budget_proposal_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_customizer_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_group_ad_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_group_criterion_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_group_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_group_feed_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_parameter_error.proto create mode 100644 google/ads/googleads/v1/errors/ad_sharing_error.proto create mode 100644 google/ads/googleads/v1/errors/adx_error.proto create mode 100644 google/ads/googleads/v1/errors/asset_error.proto create mode 100644 google/ads/googleads/v1/errors/authentication_error.proto create mode 100644 google/ads/googleads/v1/errors/authorization_error.proto create mode 100644 google/ads/googleads/v1/errors/bidding_error.proto create mode 100644 google/ads/googleads/v1/errors/bidding_strategy_error.proto create mode 100644 google/ads/googleads/v1/errors/billing_setup_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_budget_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_criterion_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_draft_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_experiment_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_feed_error.proto create mode 100644 google/ads/googleads/v1/errors/campaign_shared_set_error.proto create mode 100644 google/ads/googleads/v1/errors/change_status_error.proto create mode 100644 google/ads/googleads/v1/errors/collection_size_error.proto create mode 100644 google/ads/googleads/v1/errors/context_error.proto create mode 100644 google/ads/googleads/v1/errors/conversion_action_error.proto create mode 100644 google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto create mode 100644 google/ads/googleads/v1/errors/conversion_upload_error.proto create mode 100644 google/ads/googleads/v1/errors/country_code_error.proto create mode 100644 google/ads/googleads/v1/errors/criterion_error.proto create mode 100644 google/ads/googleads/v1/errors/custom_interest_error.proto create mode 100644 google/ads/googleads/v1/errors/customer_client_link_error.proto create mode 100644 google/ads/googleads/v1/errors/customer_error.proto create mode 100644 google/ads/googleads/v1/errors/customer_feed_error.proto create mode 100644 google/ads/googleads/v1/errors/customer_manager_link_error.proto create mode 100644 google/ads/googleads/v1/errors/database_error.proto create mode 100644 google/ads/googleads/v1/errors/date_error.proto create mode 100644 google/ads/googleads/v1/errors/date_range_error.proto create mode 100644 google/ads/googleads/v1/errors/distinct_error.proto create mode 100644 google/ads/googleads/v1/errors/enum_error.proto create mode 100644 google/ads/googleads/v1/errors/errors.proto create mode 100644 google/ads/googleads/v1/errors/extension_feed_item_error.proto create mode 100644 google/ads/googleads/v1/errors/extension_setting_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_attribute_reference_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_item_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_item_target_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_item_validation_error.proto create mode 100644 google/ads/googleads/v1/errors/feed_mapping_error.proto create mode 100644 google/ads/googleads/v1/errors/field_error.proto create mode 100644 google/ads/googleads/v1/errors/field_mask_error.proto create mode 100644 google/ads/googleads/v1/errors/function_error.proto create mode 100644 google/ads/googleads/v1/errors/function_parsing_error.proto create mode 100644 google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto create mode 100644 google/ads/googleads/v1/errors/header_error.proto create mode 100644 google/ads/googleads/v1/errors/id_error.proto create mode 100644 google/ads/googleads/v1/errors/image_error.proto create mode 100644 google/ads/googleads/v1/errors/internal_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_idea_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto create mode 100644 google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto create mode 100644 google/ads/googleads/v1/errors/label_error.proto create mode 100644 google/ads/googleads/v1/errors/language_code_error.proto create mode 100644 google/ads/googleads/v1/errors/list_operation_error.proto create mode 100644 google/ads/googleads/v1/errors/manager_link_error.proto create mode 100644 google/ads/googleads/v1/errors/media_bundle_error.proto create mode 100644 google/ads/googleads/v1/errors/media_file_error.proto create mode 100644 google/ads/googleads/v1/errors/media_upload_error.proto create mode 100644 google/ads/googleads/v1/errors/multiplier_error.proto create mode 100644 google/ads/googleads/v1/errors/mutate_error.proto create mode 100644 google/ads/googleads/v1/errors/mutate_job_error.proto create mode 100644 google/ads/googleads/v1/errors/new_resource_creation_error.proto create mode 100644 google/ads/googleads/v1/errors/not_empty_error.proto create mode 100644 google/ads/googleads/v1/errors/not_whitelisted_error.proto create mode 100644 google/ads/googleads/v1/errors/null_error.proto create mode 100644 google/ads/googleads/v1/errors/operation_access_denied_error.proto create mode 100644 google/ads/googleads/v1/errors/operator_error.proto create mode 100644 google/ads/googleads/v1/errors/partial_failure_error.proto create mode 100644 google/ads/googleads/v1/errors/policy_finding_error.proto create mode 100644 google/ads/googleads/v1/errors/policy_validation_parameter_error.proto create mode 100644 google/ads/googleads/v1/errors/policy_violation_error.proto create mode 100644 google/ads/googleads/v1/errors/query_error.proto create mode 100644 google/ads/googleads/v1/errors/quota_error.proto create mode 100644 google/ads/googleads/v1/errors/range_error.proto create mode 100644 google/ads/googleads/v1/errors/recommendation_error.proto create mode 100644 google/ads/googleads/v1/errors/region_code_error.proto create mode 100644 google/ads/googleads/v1/errors/request_error.proto create mode 100644 google/ads/googleads/v1/errors/resource_access_denied_error.proto create mode 100644 google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto create mode 100644 google/ads/googleads/v1/errors/setting_error.proto create mode 100644 google/ads/googleads/v1/errors/shared_criterion_error.proto create mode 100644 google/ads/googleads/v1/errors/shared_set_error.proto create mode 100644 google/ads/googleads/v1/errors/size_limit_error.proto create mode 100644 google/ads/googleads/v1/errors/string_format_error.proto create mode 100644 google/ads/googleads/v1/errors/string_length_error.proto create mode 100644 google/ads/googleads/v1/errors/url_field_error.proto create mode 100644 google/ads/googleads/v1/errors/user_list_error.proto create mode 100644 google/ads/googleads/v1/errors/youtube_video_registration_error.proto create mode 100644 google/ads/googleads/v1/resources/account_budget.proto create mode 100644 google/ads/googleads/v1/resources/account_budget_proposal.proto create mode 100644 google/ads/googleads/v1/resources/ad.proto create mode 100644 google/ads/googleads/v1/resources/ad_group.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_ad.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_ad_label.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_audience_view.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_bid_modifier.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_criterion.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_criterion_label.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_extension_setting.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_feed.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_label.proto create mode 100644 google/ads/googleads/v1/resources/ad_group_simulation.proto create mode 100644 google/ads/googleads/v1/resources/ad_parameter.proto create mode 100644 google/ads/googleads/v1/resources/ad_schedule_view.proto create mode 100644 google/ads/googleads/v1/resources/age_range_view.proto create mode 100644 google/ads/googleads/v1/resources/asset.proto create mode 100644 google/ads/googleads/v1/resources/bidding_strategy.proto create mode 100644 google/ads/googleads/v1/resources/billing_setup.proto create mode 100644 google/ads/googleads/v1/resources/campaign.proto create mode 100644 google/ads/googleads/v1/resources/campaign_audience_view.proto create mode 100644 google/ads/googleads/v1/resources/campaign_bid_modifier.proto create mode 100644 google/ads/googleads/v1/resources/campaign_budget.proto create mode 100644 google/ads/googleads/v1/resources/campaign_criterion.proto create mode 100644 google/ads/googleads/v1/resources/campaign_criterion_simulation.proto create mode 100644 google/ads/googleads/v1/resources/campaign_draft.proto create mode 100644 google/ads/googleads/v1/resources/campaign_experiment.proto create mode 100644 google/ads/googleads/v1/resources/campaign_extension_setting.proto create mode 100644 google/ads/googleads/v1/resources/campaign_feed.proto create mode 100644 google/ads/googleads/v1/resources/campaign_label.proto create mode 100644 google/ads/googleads/v1/resources/campaign_shared_set.proto create mode 100644 google/ads/googleads/v1/resources/carrier_constant.proto create mode 100644 google/ads/googleads/v1/resources/change_status.proto create mode 100644 google/ads/googleads/v1/resources/click_view.proto create mode 100644 google/ads/googleads/v1/resources/conversion_action.proto create mode 100644 google/ads/googleads/v1/resources/custom_interest.proto create mode 100644 google/ads/googleads/v1/resources/customer.proto create mode 100644 google/ads/googleads/v1/resources/customer_client.proto create mode 100644 google/ads/googleads/v1/resources/customer_client_link.proto create mode 100644 google/ads/googleads/v1/resources/customer_extension_setting.proto create mode 100644 google/ads/googleads/v1/resources/customer_feed.proto create mode 100644 google/ads/googleads/v1/resources/customer_label.proto create mode 100644 google/ads/googleads/v1/resources/customer_manager_link.proto create mode 100644 google/ads/googleads/v1/resources/customer_negative_criterion.proto create mode 100644 google/ads/googleads/v1/resources/detail_placement_view.proto create mode 100644 google/ads/googleads/v1/resources/display_keyword_view.proto create mode 100644 google/ads/googleads/v1/resources/domain_category.proto create mode 100644 google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto create mode 100644 google/ads/googleads/v1/resources/expanded_landing_page_view.proto create mode 100644 google/ads/googleads/v1/resources/extension_feed_item.proto create mode 100644 google/ads/googleads/v1/resources/feed.proto create mode 100644 google/ads/googleads/v1/resources/feed_item.proto create mode 100644 google/ads/googleads/v1/resources/feed_item_target.proto create mode 100644 google/ads/googleads/v1/resources/feed_mapping.proto create mode 100644 google/ads/googleads/v1/resources/feed_placeholder_view.proto create mode 100644 google/ads/googleads/v1/resources/gender_view.proto create mode 100644 google/ads/googleads/v1/resources/geo_target_constant.proto create mode 100644 google/ads/googleads/v1/resources/geographic_view.proto create mode 100644 google/ads/googleads/v1/resources/google_ads_field.proto create mode 100644 google/ads/googleads/v1/resources/group_placement_view.proto create mode 100644 google/ads/googleads/v1/resources/hotel_group_view.proto create mode 100644 google/ads/googleads/v1/resources/hotel_performance_view.proto create mode 100644 google/ads/googleads/v1/resources/keyword_plan.proto create mode 100644 google/ads/googleads/v1/resources/keyword_plan_ad_group.proto create mode 100644 google/ads/googleads/v1/resources/keyword_plan_campaign.proto create mode 100644 google/ads/googleads/v1/resources/keyword_plan_keyword.proto create mode 100644 google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto create mode 100644 google/ads/googleads/v1/resources/keyword_view.proto create mode 100644 google/ads/googleads/v1/resources/label.proto create mode 100644 google/ads/googleads/v1/resources/landing_page_view.proto create mode 100644 google/ads/googleads/v1/resources/language_constant.proto create mode 100644 google/ads/googleads/v1/resources/location_view.proto create mode 100644 google/ads/googleads/v1/resources/managed_placement_view.proto create mode 100644 google/ads/googleads/v1/resources/media_file.proto create mode 100644 google/ads/googleads/v1/resources/merchant_center_link.proto create mode 100644 google/ads/googleads/v1/resources/mobile_app_category_constant.proto create mode 100644 google/ads/googleads/v1/resources/mobile_device_constant.proto create mode 100644 google/ads/googleads/v1/resources/mutate_job.proto create mode 100644 google/ads/googleads/v1/resources/operating_system_version_constant.proto create mode 100644 google/ads/googleads/v1/resources/paid_organic_search_term_view.proto create mode 100644 google/ads/googleads/v1/resources/parental_status_view.proto create mode 100644 google/ads/googleads/v1/resources/payments_account.proto create mode 100644 google/ads/googleads/v1/resources/product_bidding_category_constant.proto create mode 100644 google/ads/googleads/v1/resources/product_group_view.proto create mode 100644 google/ads/googleads/v1/resources/recommendation.proto create mode 100644 google/ads/googleads/v1/resources/remarketing_action.proto create mode 100644 google/ads/googleads/v1/resources/search_term_view.proto create mode 100644 google/ads/googleads/v1/resources/shared_criterion.proto create mode 100644 google/ads/googleads/v1/resources/shared_set.proto create mode 100644 google/ads/googleads/v1/resources/shopping_performance_view.proto create mode 100644 google/ads/googleads/v1/resources/topic_constant.proto create mode 100644 google/ads/googleads/v1/resources/topic_view.proto create mode 100644 google/ads/googleads/v1/resources/user_interest.proto create mode 100644 google/ads/googleads/v1/resources/user_list.proto create mode 100644 google/ads/googleads/v1/resources/video.proto create mode 100644 google/ads/googleads/v1/services/account_budget_proposal_service.proto create mode 100644 google/ads/googleads/v1/services/account_budget_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_ad_label_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_ad_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_audience_view_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_criterion_label_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_criterion_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_extension_setting_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_feed_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_label_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_service.proto create mode 100644 google/ads/googleads/v1/services/ad_group_simulation_service.proto create mode 100644 google/ads/googleads/v1/services/ad_parameter_service.proto create mode 100644 google/ads/googleads/v1/services/ad_schedule_view_service.proto create mode 100644 google/ads/googleads/v1/services/age_range_view_service.proto create mode 100644 google/ads/googleads/v1/services/asset_service.proto create mode 100644 google/ads/googleads/v1/services/bidding_strategy_service.proto create mode 100644 google/ads/googleads/v1/services/billing_setup_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_audience_view_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_bid_modifier_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_budget_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_criterion_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_draft_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_experiment_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_extension_setting_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_feed_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_label_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_service.proto create mode 100644 google/ads/googleads/v1/services/campaign_shared_set_service.proto create mode 100644 google/ads/googleads/v1/services/carrier_constant_service.proto create mode 100644 google/ads/googleads/v1/services/change_status_service.proto create mode 100644 google/ads/googleads/v1/services/click_view_service.proto create mode 100644 google/ads/googleads/v1/services/conversion_action_service.proto create mode 100644 google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto create mode 100644 google/ads/googleads/v1/services/conversion_upload_service.proto create mode 100644 google/ads/googleads/v1/services/custom_interest_service.proto create mode 100644 google/ads/googleads/v1/services/customer_client_link_service.proto create mode 100644 google/ads/googleads/v1/services/customer_client_service.proto create mode 100644 google/ads/googleads/v1/services/customer_extension_setting_service.proto create mode 100644 google/ads/googleads/v1/services/customer_feed_service.proto create mode 100644 google/ads/googleads/v1/services/customer_label_service.proto create mode 100644 google/ads/googleads/v1/services/customer_manager_link_service.proto create mode 100644 google/ads/googleads/v1/services/customer_negative_criterion_service.proto create mode 100644 google/ads/googleads/v1/services/customer_service.proto create mode 100644 google/ads/googleads/v1/services/detail_placement_view_service.proto create mode 100644 google/ads/googleads/v1/services/display_keyword_view_service.proto create mode 100644 google/ads/googleads/v1/services/domain_category_service.proto create mode 100644 google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.proto create mode 100644 google/ads/googleads/v1/services/expanded_landing_page_view_service.proto create mode 100644 google/ads/googleads/v1/services/extension_feed_item_service.proto create mode 100644 google/ads/googleads/v1/services/feed_item_service.proto create mode 100644 google/ads/googleads/v1/services/feed_item_target_service.proto create mode 100644 google/ads/googleads/v1/services/feed_mapping_service.proto create mode 100644 google/ads/googleads/v1/services/feed_placeholder_view_service.proto create mode 100644 google/ads/googleads/v1/services/feed_service.proto create mode 100644 google/ads/googleads/v1/services/gender_view_service.proto create mode 100644 google/ads/googleads/v1/services/geo_target_constant_service.proto create mode 100644 google/ads/googleads/v1/services/geographic_view_service.proto create mode 100644 google/ads/googleads/v1/services/google_ads_field_service.proto create mode 100644 google/ads/googleads/v1/services/google_ads_service.proto create mode 100644 google/ads/googleads/v1/services/group_placement_view_service.proto create mode 100644 google/ads/googleads/v1/services/hotel_group_view_service.proto create mode 100644 google/ads/googleads/v1/services/hotel_performance_view_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_campaign_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_idea_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_keyword_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_plan_service.proto create mode 100644 google/ads/googleads/v1/services/keyword_view_service.proto create mode 100644 google/ads/googleads/v1/services/label_service.proto create mode 100644 google/ads/googleads/v1/services/landing_page_view_service.proto create mode 100644 google/ads/googleads/v1/services/language_constant_service.proto create mode 100644 google/ads/googleads/v1/services/location_view_service.proto create mode 100644 google/ads/googleads/v1/services/managed_placement_view_service.proto create mode 100644 google/ads/googleads/v1/services/media_file_service.proto create mode 100644 google/ads/googleads/v1/services/merchant_center_link_service.proto create mode 100644 google/ads/googleads/v1/services/mobile_app_category_constant_service.proto create mode 100644 google/ads/googleads/v1/services/mobile_device_constant_service.proto create mode 100644 google/ads/googleads/v1/services/mutate_job_service.proto create mode 100644 google/ads/googleads/v1/services/operating_system_version_constant_service.proto create mode 100644 google/ads/googleads/v1/services/paid_organic_search_term_view_service.proto create mode 100644 google/ads/googleads/v1/services/parental_status_view_service.proto create mode 100644 google/ads/googleads/v1/services/payments_account_service.proto create mode 100644 google/ads/googleads/v1/services/product_bidding_category_constant_service.proto create mode 100644 google/ads/googleads/v1/services/product_group_view_service.proto create mode 100644 google/ads/googleads/v1/services/recommendation_service.proto create mode 100644 google/ads/googleads/v1/services/remarketing_action_service.proto create mode 100644 google/ads/googleads/v1/services/search_term_view_service.proto create mode 100644 google/ads/googleads/v1/services/shared_criterion_service.proto create mode 100644 google/ads/googleads/v1/services/shared_set_service.proto create mode 100644 google/ads/googleads/v1/services/shopping_performance_view_service.proto create mode 100644 google/ads/googleads/v1/services/topic_constant_service.proto create mode 100644 google/ads/googleads/v1/services/topic_view_service.proto create mode 100644 google/ads/googleads/v1/services/user_interest_service.proto create mode 100644 google/ads/googleads/v1/services/user_list_service.proto create mode 100644 google/ads/googleads/v1/services/video_service.proto create mode 100644 google/ads/googleads/v2/common/ad_asset.proto create mode 100644 google/ads/googleads/v2/common/ad_type_infos.proto create mode 100644 google/ads/googleads/v2/common/asset_types.proto create mode 100644 google/ads/googleads/v2/common/bidding.proto create mode 100644 google/ads/googleads/v2/common/click_location.proto create mode 100644 google/ads/googleads/v2/common/criteria.proto create mode 100644 google/ads/googleads/v2/common/criterion_category_availability.proto create mode 100644 google/ads/googleads/v2/common/custom_parameter.proto create mode 100644 google/ads/googleads/v2/common/dates.proto create mode 100644 google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto create mode 100644 google/ads/googleads/v2/common/extensions.proto create mode 100644 google/ads/googleads/v2/common/feed_common.proto create mode 100644 google/ads/googleads/v2/common/final_app_url.proto create mode 100644 google/ads/googleads/v2/common/frequency_cap.proto create mode 100644 google/ads/googleads/v2/common/keyword_plan_common.proto create mode 100644 google/ads/googleads/v2/common/matching_function.proto create mode 100644 google/ads/googleads/v2/common/metrics.proto create mode 100644 google/ads/googleads/v2/common/policy.proto create mode 100644 google/ads/googleads/v2/common/real_time_bidding_setting.proto create mode 100644 google/ads/googleads/v2/common/segments.proto create mode 100644 google/ads/googleads/v2/common/simulation.proto create mode 100644 google/ads/googleads/v2/common/tag_snippet.proto create mode 100644 google/ads/googleads/v2/common/targeting_setting.proto create mode 100644 google/ads/googleads/v2/common/text_label.proto create mode 100644 google/ads/googleads/v2/common/url_collection.proto create mode 100644 google/ads/googleads/v2/common/user_lists.proto create mode 100644 google/ads/googleads/v2/common/value.proto create mode 100644 google/ads/googleads/v2/enums/access_reason.proto create mode 100644 google/ads/googleads/v2/enums/access_role.proto create mode 100644 google/ads/googleads/v2/enums/account_budget_proposal_status.proto create mode 100644 google/ads/googleads/v2/enums/account_budget_proposal_type.proto create mode 100644 google/ads/googleads/v2/enums/account_budget_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_ad_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_criterion_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_group_type.proto create mode 100644 google/ads/googleads/v2/enums/ad_network_type.proto create mode 100644 google/ads/googleads/v2/enums/ad_serving_optimization_status.proto create mode 100644 google/ads/googleads/v2/enums/ad_strength.proto create mode 100644 google/ads/googleads/v2/enums/ad_type.proto create mode 100644 google/ads/googleads/v2/enums/advertising_channel_sub_type.proto create mode 100644 google/ads/googleads/v2/enums/advertising_channel_type.proto create mode 100644 google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto create mode 100644 google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/age_range_type.proto create mode 100644 google/ads/googleads/v2/enums/app_campaign_app_store.proto create mode 100644 google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto create mode 100644 google/ads/googleads/v2/enums/app_payment_model_type.proto create mode 100644 google/ads/googleads/v2/enums/app_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/app_store.proto create mode 100644 google/ads/googleads/v2/enums/app_url_operating_system_type.proto create mode 100644 google/ads/googleads/v2/enums/asset_field_type.proto create mode 100644 google/ads/googleads/v2/enums/asset_performance_label.proto create mode 100644 google/ads/googleads/v2/enums/asset_type.proto create mode 100644 google/ads/googleads/v2/enums/attribution_model.proto create mode 100644 google/ads/googleads/v2/enums/bid_modifier_source.proto create mode 100644 google/ads/googleads/v2/enums/bidding_source.proto create mode 100644 google/ads/googleads/v2/enums/bidding_strategy_status.proto create mode 100644 google/ads/googleads/v2/enums/bidding_strategy_type.proto create mode 100644 google/ads/googleads/v2/enums/billing_setup_status.proto create mode 100644 google/ads/googleads/v2/enums/brand_safety_suitability.proto create mode 100644 google/ads/googleads/v2/enums/budget_delivery_method.proto create mode 100644 google/ads/googleads/v2/enums/budget_period.proto create mode 100644 google/ads/googleads/v2/enums/budget_status.proto create mode 100644 google/ads/googleads/v2/enums/budget_type.proto create mode 100644 google/ads/googleads/v2/enums/call_conversion_reporting_state.proto create mode 100644 google/ads/googleads/v2/enums/call_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/callout_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/campaign_criterion_status.proto create mode 100644 google/ads/googleads/v2/enums/campaign_draft_status.proto create mode 100644 google/ads/googleads/v2/enums/campaign_experiment_status.proto create mode 100644 google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto create mode 100644 google/ads/googleads/v2/enums/campaign_experiment_type.proto create mode 100644 google/ads/googleads/v2/enums/campaign_serving_status.proto create mode 100644 google/ads/googleads/v2/enums/campaign_shared_set_status.proto create mode 100644 google/ads/googleads/v2/enums/campaign_status.proto create mode 100644 google/ads/googleads/v2/enums/change_status_operation.proto create mode 100644 google/ads/googleads/v2/enums/change_status_resource_type.proto create mode 100644 google/ads/googleads/v2/enums/click_type.proto create mode 100644 google/ads/googleads/v2/enums/content_label_type.proto create mode 100644 google/ads/googleads/v2/enums/conversion_action_category.proto create mode 100644 google/ads/googleads/v2/enums/conversion_action_counting_type.proto create mode 100644 google/ads/googleads/v2/enums/conversion_action_status.proto create mode 100644 google/ads/googleads/v2/enums/conversion_action_type.proto create mode 100644 google/ads/googleads/v2/enums/conversion_adjustment_type.proto create mode 100644 google/ads/googleads/v2/enums/conversion_attribution_event_type.proto create mode 100644 google/ads/googleads/v2/enums/conversion_lag_bucket.proto create mode 100644 google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto create mode 100644 google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto create mode 100644 google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto create mode 100644 google/ads/googleads/v2/enums/criterion_system_serving_status.proto create mode 100644 google/ads/googleads/v2/enums/criterion_type.proto create mode 100644 google/ads/googleads/v2/enums/custom_interest_member_type.proto create mode 100644 google/ads/googleads/v2/enums/custom_interest_status.proto create mode 100644 google/ads/googleads/v2/enums/custom_interest_type.proto create mode 100644 google/ads/googleads/v2/enums/custom_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/customer_match_upload_key_type.proto create mode 100644 google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto create mode 100644 google/ads/googleads/v2/enums/data_driven_model_status.proto create mode 100644 google/ads/googleads/v2/enums/day_of_week.proto create mode 100644 google/ads/googleads/v2/enums/device.proto create mode 100644 google/ads/googleads/v2/enums/display_ad_format_setting.proto create mode 100644 google/ads/googleads/v2/enums/display_upload_product_type.proto create mode 100644 google/ads/googleads/v2/enums/distance_bucket.proto create mode 100644 google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto create mode 100644 google/ads/googleads/v2/enums/education_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/extension_setting_device.proto create mode 100644 google/ads/googleads/v2/enums/extension_type.proto create mode 100644 google/ads/googleads/v2/enums/external_conversion_source.proto create mode 100644 google/ads/googleads/v2/enums/feed_attribute_type.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_status.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_target_device.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_target_type.proto create mode 100644 google/ads/googleads/v2/enums/feed_item_validation_status.proto create mode 100644 google/ads/googleads/v2/enums/feed_link_status.proto create mode 100644 google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto create mode 100644 google/ads/googleads/v2/enums/feed_mapping_status.proto create mode 100644 google/ads/googleads/v2/enums/feed_origin.proto create mode 100644 google/ads/googleads/v2/enums/feed_status.proto create mode 100644 google/ads/googleads/v2/enums/flight_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/frequency_cap_event_type.proto create mode 100644 google/ads/googleads/v2/enums/frequency_cap_level.proto create mode 100644 google/ads/googleads/v2/enums/frequency_cap_time_unit.proto create mode 100644 google/ads/googleads/v2/enums/gender_type.proto create mode 100644 google/ads/googleads/v2/enums/geo_target_constant_status.proto create mode 100644 google/ads/googleads/v2/enums/geo_targeting_restriction.proto create mode 100644 google/ads/googleads/v2/enums/geo_targeting_type.proto create mode 100644 google/ads/googleads/v2/enums/google_ads_field_category.proto create mode 100644 google/ads/googleads/v2/enums/google_ads_field_data_type.proto create mode 100644 google/ads/googleads/v2/enums/hotel_date_selection_type.proto create mode 100644 google/ads/googleads/v2/enums/hotel_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/hotel_rate_type.proto create mode 100644 google/ads/googleads/v2/enums/income_range_type.proto create mode 100644 google/ads/googleads/v2/enums/interaction_event_type.proto create mode 100644 google/ads/googleads/v2/enums/interaction_type.proto create mode 100644 google/ads/googleads/v2/enums/job_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/keyword_match_type.proto create mode 100644 google/ads/googleads/v2/enums/keyword_plan_competition_level.proto create mode 100644 google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto create mode 100644 google/ads/googleads/v2/enums/keyword_plan_network.proto create mode 100644 google/ads/googleads/v2/enums/label_status.proto create mode 100644 google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto create mode 100644 google/ads/googleads/v2/enums/listing_custom_attribute_index.proto create mode 100644 google/ads/googleads/v2/enums/listing_group_type.proto create mode 100644 google/ads/googleads/v2/enums/local_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto create mode 100644 google/ads/googleads/v2/enums/location_group_radius_units.proto create mode 100644 google/ads/googleads/v2/enums/location_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/manager_link_status.proto create mode 100644 google/ads/googleads/v2/enums/matching_function_context_type.proto create mode 100644 google/ads/googleads/v2/enums/matching_function_operator.proto create mode 100644 google/ads/googleads/v2/enums/media_type.proto create mode 100644 google/ads/googleads/v2/enums/merchant_center_link_status.proto create mode 100644 google/ads/googleads/v2/enums/message_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/mime_type.proto create mode 100644 google/ads/googleads/v2/enums/minute_of_hour.proto create mode 100644 google/ads/googleads/v2/enums/mobile_device_type.proto create mode 100644 google/ads/googleads/v2/enums/month_of_year.proto create mode 100644 google/ads/googleads/v2/enums/mutate_job_status.proto create mode 100644 google/ads/googleads/v2/enums/negative_geo_target_type.proto create mode 100644 google/ads/googleads/v2/enums/operating_system_version_operator_type.proto create mode 100644 google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto create mode 100644 google/ads/googleads/v2/enums/parental_status_type.proto create mode 100644 google/ads/googleads/v2/enums/payment_mode.proto create mode 100644 google/ads/googleads/v2/enums/placeholder_type.proto create mode 100644 google/ads/googleads/v2/enums/placement_type.proto create mode 100644 google/ads/googleads/v2/enums/policy_approval_status.proto create mode 100644 google/ads/googleads/v2/enums/policy_review_status.proto create mode 100644 google/ads/googleads/v2/enums/policy_topic_entry_type.proto create mode 100644 google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto create mode 100644 google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto create mode 100644 google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto create mode 100644 google/ads/googleads/v2/enums/positive_geo_target_type.proto create mode 100644 google/ads/googleads/v2/enums/preferred_content_type.proto create mode 100644 google/ads/googleads/v2/enums/price_extension_price_qualifier.proto create mode 100644 google/ads/googleads/v2/enums/price_extension_price_unit.proto create mode 100644 google/ads/googleads/v2/enums/price_extension_type.proto create mode 100644 google/ads/googleads/v2/enums/price_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/product_bidding_category_level.proto create mode 100644 google/ads/googleads/v2/enums/product_bidding_category_status.proto create mode 100644 google/ads/googleads/v2/enums/product_channel.proto create mode 100644 google/ads/googleads/v2/enums/product_channel_exclusivity.proto create mode 100644 google/ads/googleads/v2/enums/product_condition.proto create mode 100644 google/ads/googleads/v2/enums/product_type_level.proto create mode 100644 google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto create mode 100644 google/ads/googleads/v2/enums/promotion_extension_occasion.proto create mode 100644 google/ads/googleads/v2/enums/promotion_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/proximity_radius_units.proto create mode 100644 google/ads/googleads/v2/enums/quality_score_bucket.proto create mode 100644 google/ads/googleads/v2/enums/real_estate_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/recommendation_type.proto create mode 100644 google/ads/googleads/v2/enums/search_engine_results_page_type.proto create mode 100644 google/ads/googleads/v2/enums/search_term_match_type.proto create mode 100644 google/ads/googleads/v2/enums/search_term_targeting_status.proto create mode 100644 google/ads/googleads/v2/enums/served_asset_field_type.proto create mode 100644 google/ads/googleads/v2/enums/shared_set_status.proto create mode 100644 google/ads/googleads/v2/enums/shared_set_type.proto create mode 100644 google/ads/googleads/v2/enums/simulation_modification_method.proto create mode 100644 google/ads/googleads/v2/enums/simulation_type.proto create mode 100644 google/ads/googleads/v2/enums/sitelink_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/slot.proto create mode 100644 google/ads/googleads/v2/enums/spending_limit_type.proto create mode 100644 google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/system_managed_entity_source.proto create mode 100644 google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto create mode 100644 google/ads/googleads/v2/enums/target_impression_share_location.proto create mode 100644 google/ads/googleads/v2/enums/targeting_dimension.proto create mode 100644 google/ads/googleads/v2/enums/time_type.proto create mode 100644 google/ads/googleads/v2/enums/tracking_code_page_format.proto create mode 100644 google/ads/googleads/v2/enums/tracking_code_type.proto create mode 100644 google/ads/googleads/v2/enums/travel_placeholder_field.proto create mode 100644 google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto create mode 100644 google/ads/googleads/v2/enums/user_list_access_status.proto create mode 100644 google/ads/googleads/v2/enums/user_list_closing_reason.proto create mode 100644 google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto create mode 100644 google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto create mode 100644 google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto create mode 100644 google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto create mode 100644 google/ads/googleads/v2/enums/user_list_membership_status.proto create mode 100644 google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto create mode 100644 google/ads/googleads/v2/enums/user_list_prepopulation_status.proto create mode 100644 google/ads/googleads/v2/enums/user_list_rule_type.proto create mode 100644 google/ads/googleads/v2/enums/user_list_size_range.proto create mode 100644 google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto create mode 100644 google/ads/googleads/v2/enums/user_list_type.proto create mode 100644 google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto create mode 100644 google/ads/googleads/v2/enums/vanity_pharma_text.proto create mode 100644 google/ads/googleads/v2/enums/webpage_condition_operand.proto create mode 100644 google/ads/googleads/v2/enums/webpage_condition_operator.proto create mode 100644 google/ads/googleads/v2/errors/access_invitation_error.proto create mode 100644 google/ads/googleads/v2/errors/account_budget_proposal_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_customizer_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_group_ad_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_group_criterion_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_group_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_group_feed_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_parameter_error.proto create mode 100644 google/ads/googleads/v2/errors/ad_sharing_error.proto create mode 100644 google/ads/googleads/v2/errors/adx_error.proto create mode 100644 google/ads/googleads/v2/errors/asset_error.proto create mode 100644 google/ads/googleads/v2/errors/authentication_error.proto create mode 100644 google/ads/googleads/v2/errors/authorization_error.proto create mode 100644 google/ads/googleads/v2/errors/bidding_error.proto create mode 100644 google/ads/googleads/v2/errors/bidding_strategy_error.proto create mode 100644 google/ads/googleads/v2/errors/billing_setup_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_budget_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_criterion_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_draft_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_experiment_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_feed_error.proto create mode 100644 google/ads/googleads/v2/errors/campaign_shared_set_error.proto create mode 100644 google/ads/googleads/v2/errors/change_status_error.proto create mode 100644 google/ads/googleads/v2/errors/collection_size_error.proto create mode 100644 google/ads/googleads/v2/errors/context_error.proto create mode 100644 google/ads/googleads/v2/errors/conversion_action_error.proto create mode 100644 google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto create mode 100644 google/ads/googleads/v2/errors/conversion_upload_error.proto create mode 100644 google/ads/googleads/v2/errors/country_code_error.proto create mode 100644 google/ads/googleads/v2/errors/criterion_error.proto create mode 100644 google/ads/googleads/v2/errors/currency_code_error.proto create mode 100644 google/ads/googleads/v2/errors/custom_interest_error.proto create mode 100644 google/ads/googleads/v2/errors/customer_client_link_error.proto create mode 100644 google/ads/googleads/v2/errors/customer_error.proto create mode 100644 google/ads/googleads/v2/errors/customer_feed_error.proto create mode 100644 google/ads/googleads/v2/errors/customer_manager_link_error.proto create mode 100644 google/ads/googleads/v2/errors/database_error.proto create mode 100644 google/ads/googleads/v2/errors/date_error.proto create mode 100644 google/ads/googleads/v2/errors/date_range_error.proto create mode 100644 google/ads/googleads/v2/errors/distinct_error.proto create mode 100644 google/ads/googleads/v2/errors/enum_error.proto create mode 100644 google/ads/googleads/v2/errors/errors.proto create mode 100644 google/ads/googleads/v2/errors/extension_feed_item_error.proto create mode 100644 google/ads/googleads/v2/errors/extension_setting_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_attribute_reference_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_item_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_item_target_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_item_validation_error.proto create mode 100644 google/ads/googleads/v2/errors/feed_mapping_error.proto create mode 100644 google/ads/googleads/v2/errors/field_error.proto create mode 100644 google/ads/googleads/v2/errors/field_mask_error.proto create mode 100644 google/ads/googleads/v2/errors/function_error.proto create mode 100644 google/ads/googleads/v2/errors/function_parsing_error.proto create mode 100644 google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto create mode 100644 google/ads/googleads/v2/errors/header_error.proto create mode 100644 google/ads/googleads/v2/errors/id_error.proto create mode 100644 google/ads/googleads/v2/errors/image_error.proto create mode 100644 google/ads/googleads/v2/errors/internal_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_idea_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto create mode 100644 google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto create mode 100644 google/ads/googleads/v2/errors/label_error.proto create mode 100644 google/ads/googleads/v2/errors/language_code_error.proto create mode 100644 google/ads/googleads/v2/errors/list_operation_error.proto create mode 100644 google/ads/googleads/v2/errors/manager_link_error.proto create mode 100644 google/ads/googleads/v2/errors/media_bundle_error.proto create mode 100644 google/ads/googleads/v2/errors/media_file_error.proto create mode 100644 google/ads/googleads/v2/errors/media_upload_error.proto create mode 100644 google/ads/googleads/v2/errors/multiplier_error.proto create mode 100644 google/ads/googleads/v2/errors/mutate_error.proto create mode 100644 google/ads/googleads/v2/errors/mutate_job_error.proto create mode 100644 google/ads/googleads/v2/errors/new_resource_creation_error.proto create mode 100644 google/ads/googleads/v2/errors/not_empty_error.proto create mode 100644 google/ads/googleads/v2/errors/not_whitelisted_error.proto create mode 100644 google/ads/googleads/v2/errors/null_error.proto create mode 100644 google/ads/googleads/v2/errors/operation_access_denied_error.proto create mode 100644 google/ads/googleads/v2/errors/operator_error.proto create mode 100644 google/ads/googleads/v2/errors/partial_failure_error.proto create mode 100644 google/ads/googleads/v2/errors/policy_finding_error.proto create mode 100644 google/ads/googleads/v2/errors/policy_validation_parameter_error.proto create mode 100644 google/ads/googleads/v2/errors/policy_violation_error.proto create mode 100644 google/ads/googleads/v2/errors/query_error.proto create mode 100644 google/ads/googleads/v2/errors/quota_error.proto create mode 100644 google/ads/googleads/v2/errors/range_error.proto create mode 100644 google/ads/googleads/v2/errors/recommendation_error.proto create mode 100644 google/ads/googleads/v2/errors/region_code_error.proto create mode 100644 google/ads/googleads/v2/errors/request_error.proto create mode 100644 google/ads/googleads/v2/errors/resource_access_denied_error.proto create mode 100644 google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto create mode 100644 google/ads/googleads/v2/errors/setting_error.proto create mode 100644 google/ads/googleads/v2/errors/shared_criterion_error.proto create mode 100644 google/ads/googleads/v2/errors/shared_set_error.proto create mode 100644 google/ads/googleads/v2/errors/size_limit_error.proto create mode 100644 google/ads/googleads/v2/errors/string_format_error.proto create mode 100644 google/ads/googleads/v2/errors/string_length_error.proto create mode 100644 google/ads/googleads/v2/errors/url_field_error.proto create mode 100644 google/ads/googleads/v2/errors/user_list_error.proto create mode 100644 google/ads/googleads/v2/errors/youtube_video_registration_error.proto create mode 100644 google/ads/googleads/v2/resources/account_budget.proto create mode 100644 google/ads/googleads/v2/resources/account_budget_proposal.proto create mode 100644 google/ads/googleads/v2/resources/ad.proto create mode 100644 google/ads/googleads/v2/resources/ad_group.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_ad.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_ad_label.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_audience_view.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_bid_modifier.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_criterion.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_criterion_label.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_extension_setting.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_feed.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_label.proto create mode 100644 google/ads/googleads/v2/resources/ad_group_simulation.proto create mode 100644 google/ads/googleads/v2/resources/ad_parameter.proto create mode 100644 google/ads/googleads/v2/resources/ad_schedule_view.proto create mode 100644 google/ads/googleads/v2/resources/age_range_view.proto create mode 100644 google/ads/googleads/v2/resources/asset.proto create mode 100644 google/ads/googleads/v2/resources/bidding_strategy.proto create mode 100644 google/ads/googleads/v2/resources/billing_setup.proto create mode 100644 google/ads/googleads/v2/resources/campaign.proto create mode 100644 google/ads/googleads/v2/resources/campaign_audience_view.proto create mode 100644 google/ads/googleads/v2/resources/campaign_bid_modifier.proto create mode 100644 google/ads/googleads/v2/resources/campaign_budget.proto create mode 100644 google/ads/googleads/v2/resources/campaign_criterion.proto create mode 100644 google/ads/googleads/v2/resources/campaign_criterion_simulation.proto create mode 100644 google/ads/googleads/v2/resources/campaign_draft.proto create mode 100644 google/ads/googleads/v2/resources/campaign_experiment.proto create mode 100644 google/ads/googleads/v2/resources/campaign_extension_setting.proto create mode 100644 google/ads/googleads/v2/resources/campaign_feed.proto create mode 100644 google/ads/googleads/v2/resources/campaign_label.proto create mode 100644 google/ads/googleads/v2/resources/campaign_shared_set.proto create mode 100644 google/ads/googleads/v2/resources/carrier_constant.proto create mode 100644 google/ads/googleads/v2/resources/change_status.proto create mode 100644 google/ads/googleads/v2/resources/click_view.proto create mode 100644 google/ads/googleads/v2/resources/conversion_action.proto create mode 100644 google/ads/googleads/v2/resources/custom_interest.proto create mode 100644 google/ads/googleads/v2/resources/customer.proto create mode 100644 google/ads/googleads/v2/resources/customer_client.proto create mode 100644 google/ads/googleads/v2/resources/customer_client_link.proto create mode 100644 google/ads/googleads/v2/resources/customer_extension_setting.proto create mode 100644 google/ads/googleads/v2/resources/customer_feed.proto create mode 100644 google/ads/googleads/v2/resources/customer_label.proto create mode 100644 google/ads/googleads/v2/resources/customer_manager_link.proto create mode 100644 google/ads/googleads/v2/resources/customer_negative_criterion.proto create mode 100644 google/ads/googleads/v2/resources/detail_placement_view.proto create mode 100644 google/ads/googleads/v2/resources/display_keyword_view.proto create mode 100644 google/ads/googleads/v2/resources/distance_view.proto create mode 100644 google/ads/googleads/v2/resources/domain_category.proto create mode 100644 google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto create mode 100644 google/ads/googleads/v2/resources/expanded_landing_page_view.proto create mode 100644 google/ads/googleads/v2/resources/extension_feed_item.proto create mode 100644 google/ads/googleads/v2/resources/feed.proto create mode 100644 google/ads/googleads/v2/resources/feed_item.proto create mode 100644 google/ads/googleads/v2/resources/feed_item_target.proto create mode 100644 google/ads/googleads/v2/resources/feed_mapping.proto create mode 100644 google/ads/googleads/v2/resources/feed_placeholder_view.proto create mode 100644 google/ads/googleads/v2/resources/gender_view.proto create mode 100644 google/ads/googleads/v2/resources/geo_target_constant.proto create mode 100644 google/ads/googleads/v2/resources/geographic_view.proto create mode 100644 google/ads/googleads/v2/resources/google_ads_field.proto create mode 100644 google/ads/googleads/v2/resources/group_placement_view.proto create mode 100644 google/ads/googleads/v2/resources/hotel_group_view.proto create mode 100644 google/ads/googleads/v2/resources/hotel_performance_view.proto create mode 100644 google/ads/googleads/v2/resources/keyword_plan.proto create mode 100644 google/ads/googleads/v2/resources/keyword_plan_ad_group.proto create mode 100644 google/ads/googleads/v2/resources/keyword_plan_campaign.proto create mode 100644 google/ads/googleads/v2/resources/keyword_plan_keyword.proto create mode 100644 google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto create mode 100644 google/ads/googleads/v2/resources/keyword_view.proto create mode 100644 google/ads/googleads/v2/resources/label.proto create mode 100644 google/ads/googleads/v2/resources/landing_page_view.proto create mode 100644 google/ads/googleads/v2/resources/language_constant.proto create mode 100644 google/ads/googleads/v2/resources/location_view.proto create mode 100644 google/ads/googleads/v2/resources/managed_placement_view.proto create mode 100644 google/ads/googleads/v2/resources/media_file.proto create mode 100644 google/ads/googleads/v2/resources/merchant_center_link.proto create mode 100644 google/ads/googleads/v2/resources/mobile_app_category_constant.proto create mode 100644 google/ads/googleads/v2/resources/mobile_device_constant.proto create mode 100644 google/ads/googleads/v2/resources/mutate_job.proto create mode 100644 google/ads/googleads/v2/resources/operating_system_version_constant.proto create mode 100644 google/ads/googleads/v2/resources/paid_organic_search_term_view.proto create mode 100644 google/ads/googleads/v2/resources/parental_status_view.proto create mode 100644 google/ads/googleads/v2/resources/payments_account.proto create mode 100644 google/ads/googleads/v2/resources/product_bidding_category_constant.proto create mode 100644 google/ads/googleads/v2/resources/product_group_view.proto create mode 100644 google/ads/googleads/v2/resources/recommendation.proto create mode 100644 google/ads/googleads/v2/resources/remarketing_action.proto create mode 100644 google/ads/googleads/v2/resources/search_term_view.proto create mode 100644 google/ads/googleads/v2/resources/shared_criterion.proto create mode 100644 google/ads/googleads/v2/resources/shared_set.proto create mode 100644 google/ads/googleads/v2/resources/shopping_performance_view.proto create mode 100644 google/ads/googleads/v2/resources/topic_constant.proto create mode 100644 google/ads/googleads/v2/resources/topic_view.proto create mode 100644 google/ads/googleads/v2/resources/user_interest.proto create mode 100644 google/ads/googleads/v2/resources/user_list.proto create mode 100644 google/ads/googleads/v2/resources/user_location_view.proto create mode 100644 google/ads/googleads/v2/resources/video.proto create mode 100644 google/ads/googleads/v2/services/account_budget_proposal_service.proto create mode 100644 google/ads/googleads/v2/services/account_budget_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_ad_label_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_ad_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_audience_view_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_criterion_label_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_criterion_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_extension_setting_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_feed_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_label_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_service.proto create mode 100644 google/ads/googleads/v2/services/ad_group_simulation_service.proto create mode 100644 google/ads/googleads/v2/services/ad_parameter_service.proto create mode 100644 google/ads/googleads/v2/services/ad_schedule_view_service.proto create mode 100644 google/ads/googleads/v2/services/ad_service.proto create mode 100644 google/ads/googleads/v2/services/age_range_view_service.proto create mode 100644 google/ads/googleads/v2/services/asset_service.proto create mode 100644 google/ads/googleads/v2/services/bidding_strategy_service.proto create mode 100644 google/ads/googleads/v2/services/billing_setup_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_audience_view_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_bid_modifier_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_budget_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_criterion_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_draft_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_experiment_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_extension_setting_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_feed_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_label_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_service.proto create mode 100644 google/ads/googleads/v2/services/campaign_shared_set_service.proto create mode 100644 google/ads/googleads/v2/services/carrier_constant_service.proto create mode 100644 google/ads/googleads/v2/services/change_status_service.proto create mode 100644 google/ads/googleads/v2/services/click_view_service.proto create mode 100644 google/ads/googleads/v2/services/conversion_action_service.proto create mode 100644 google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto create mode 100644 google/ads/googleads/v2/services/conversion_upload_service.proto create mode 100644 google/ads/googleads/v2/services/custom_interest_service.proto create mode 100644 google/ads/googleads/v2/services/customer_client_link_service.proto create mode 100644 google/ads/googleads/v2/services/customer_client_service.proto create mode 100644 google/ads/googleads/v2/services/customer_extension_setting_service.proto create mode 100644 google/ads/googleads/v2/services/customer_feed_service.proto create mode 100644 google/ads/googleads/v2/services/customer_label_service.proto create mode 100644 google/ads/googleads/v2/services/customer_manager_link_service.proto create mode 100644 google/ads/googleads/v2/services/customer_negative_criterion_service.proto create mode 100644 google/ads/googleads/v2/services/customer_service.proto create mode 100644 google/ads/googleads/v2/services/detail_placement_view_service.proto create mode 100644 google/ads/googleads/v2/services/display_keyword_view_service.proto create mode 100644 google/ads/googleads/v2/services/distance_view_service.proto create mode 100644 google/ads/googleads/v2/services/domain_category_service.proto create mode 100644 google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.proto create mode 100644 google/ads/googleads/v2/services/expanded_landing_page_view_service.proto create mode 100644 google/ads/googleads/v2/services/extension_feed_item_service.proto create mode 100644 google/ads/googleads/v2/services/feed_item_service.proto create mode 100644 google/ads/googleads/v2/services/feed_item_target_service.proto create mode 100644 google/ads/googleads/v2/services/feed_mapping_service.proto create mode 100644 google/ads/googleads/v2/services/feed_placeholder_view_service.proto create mode 100644 google/ads/googleads/v2/services/feed_service.proto create mode 100644 google/ads/googleads/v2/services/gender_view_service.proto create mode 100644 google/ads/googleads/v2/services/geo_target_constant_service.proto create mode 100644 google/ads/googleads/v2/services/geographic_view_service.proto create mode 100644 google/ads/googleads/v2/services/google_ads_field_service.proto create mode 100644 google/ads/googleads/v2/services/google_ads_service.proto create mode 100644 google/ads/googleads/v2/services/group_placement_view_service.proto create mode 100644 google/ads/googleads/v2/services/hotel_group_view_service.proto create mode 100644 google/ads/googleads/v2/services/hotel_performance_view_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_campaign_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_idea_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_keyword_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_plan_service.proto create mode 100644 google/ads/googleads/v2/services/keyword_view_service.proto create mode 100644 google/ads/googleads/v2/services/label_service.proto create mode 100644 google/ads/googleads/v2/services/landing_page_view_service.proto create mode 100644 google/ads/googleads/v2/services/language_constant_service.proto create mode 100644 google/ads/googleads/v2/services/location_view_service.proto create mode 100644 google/ads/googleads/v2/services/managed_placement_view_service.proto create mode 100644 google/ads/googleads/v2/services/media_file_service.proto create mode 100644 google/ads/googleads/v2/services/merchant_center_link_service.proto create mode 100644 google/ads/googleads/v2/services/mobile_app_category_constant_service.proto create mode 100644 google/ads/googleads/v2/services/mobile_device_constant_service.proto create mode 100644 google/ads/googleads/v2/services/mutate_job_service.proto create mode 100644 google/ads/googleads/v2/services/operating_system_version_constant_service.proto create mode 100644 google/ads/googleads/v2/services/paid_organic_search_term_view_service.proto create mode 100644 google/ads/googleads/v2/services/parental_status_view_service.proto create mode 100644 google/ads/googleads/v2/services/payments_account_service.proto create mode 100644 google/ads/googleads/v2/services/product_bidding_category_constant_service.proto create mode 100644 google/ads/googleads/v2/services/product_group_view_service.proto create mode 100644 google/ads/googleads/v2/services/recommendation_service.proto create mode 100644 google/ads/googleads/v2/services/remarketing_action_service.proto create mode 100644 google/ads/googleads/v2/services/search_term_view_service.proto create mode 100644 google/ads/googleads/v2/services/shared_criterion_service.proto create mode 100644 google/ads/googleads/v2/services/shared_set_service.proto create mode 100644 google/ads/googleads/v2/services/shopping_performance_view_service.proto create mode 100644 google/ads/googleads/v2/services/topic_constant_service.proto create mode 100644 google/ads/googleads/v2/services/topic_view_service.proto create mode 100644 google/ads/googleads/v2/services/user_interest_service.proto create mode 100644 google/ads/googleads/v2/services/user_list_service.proto create mode 100644 google/ads/googleads/v2/services/user_location_view_service.proto create mode 100644 google/ads/googleads/v2/services/video_service.proto create mode 100644 google/api/BUILD.bazel create mode 100644 google/api/client.proto delete mode 100644 google/api/experimental/authorization_config.proto create mode 100644 google/api/expr/BUILD.bazel create mode 100644 google/api/expr/artman_cel.yaml create mode 100644 google/api/expr/cel.yaml create mode 100644 google/api/expr/v1alpha1/BUILD.bazel create mode 100644 google/api/expr/v1alpha1/cel_gapic.yaml create mode 100644 google/api/expr/v1alpha1/cel_service.proto create mode 100644 google/api/expr/v1alpha1/checked.proto create mode 100644 google/api/expr/v1alpha1/conformance_service.proto create mode 100644 google/api/expr/v1alpha1/eval.proto create mode 100644 google/api/expr/v1alpha1/explain.proto create mode 100644 google/api/expr/v1alpha1/syntax.proto create mode 100644 google/api/expr/v1alpha1/value.proto create mode 100644 google/api/expr/v1beta1/BUILD.bazel create mode 100644 google/api/expr/v1beta1/decl.proto create mode 100644 google/api/expr/v1beta1/eval.proto create mode 100644 google/api/expr/v1beta1/expr.proto create mode 100644 google/api/expr/v1beta1/source.proto create mode 100644 google/api/expr/v1beta1/value.proto create mode 100644 google/api/field_behavior.proto create mode 100644 google/api/launch_stage.proto create mode 100644 google/api/resource.proto create mode 100644 google/api/serviceconfig.yaml create mode 100644 google/api/servicecontrol/BUILD.bazel create mode 100644 google/api/servicemanagement/BUILD.bazel create mode 100644 google/bigtable/BUILD.bazel create mode 100644 google/bigtable/admin/BUILD.bazel create mode 100644 google/bigtable/admin/v2/BUILD.bazel create mode 100644 google/bigtable/v2/BUILD.bazel create mode 100644 google/cloud/asset/BUILD.bazel create mode 100644 google/cloud/asset/artman_cloudasset_v1.yaml create mode 100644 google/cloud/asset/artman_cloudasset_v1beta1.yaml create mode 100644 google/cloud/asset/asset_v1.yaml create mode 100644 google/cloud/asset/asset_v1beta1.yaml create mode 100644 google/cloud/asset/v1/asset_service.proto create mode 100644 google/cloud/asset/v1/assets.proto create mode 100644 google/cloud/asset/v1/cloudasset_gapic.yaml create mode 100644 google/cloud/asset/v1beta1/BUILD.bazel create mode 100644 google/cloud/asset/v1beta1/asset_service.proto create mode 100644 google/cloud/asset/v1beta1/assets.proto create mode 100644 google/cloud/asset/v1beta1/cloudasset_gapic.yaml create mode 100644 google/cloud/automl/BUILD.bazel create mode 100644 google/cloud/automl/artman_automl_v1beta1.yaml create mode 100644 google/cloud/automl/automl_v1beta1.yaml create mode 100644 google/cloud/automl/v1beta1/BUILD.bazel create mode 100644 google/cloud/automl/v1beta1/annotation_payload.proto create mode 100644 google/cloud/automl/v1beta1/annotation_spec.proto create mode 100644 google/cloud/automl/v1beta1/automl_gapic.yaml create mode 100644 google/cloud/automl/v1beta1/classification.proto create mode 100644 google/cloud/automl/v1beta1/column_spec.proto create mode 100644 google/cloud/automl/v1beta1/data_items.proto create mode 100644 google/cloud/automl/v1beta1/data_stats.proto create mode 100644 google/cloud/automl/v1beta1/data_types.proto create mode 100644 google/cloud/automl/v1beta1/dataset.proto create mode 100644 google/cloud/automl/v1beta1/detection.proto create mode 100644 google/cloud/automl/v1beta1/geometry.proto create mode 100644 google/cloud/automl/v1beta1/image.proto create mode 100644 google/cloud/automl/v1beta1/io.proto create mode 100644 google/cloud/automl/v1beta1/model.proto create mode 100644 google/cloud/automl/v1beta1/model_evaluation.proto create mode 100644 google/cloud/automl/v1beta1/operations.proto create mode 100644 google/cloud/automl/v1beta1/prediction_service.proto rename google/{api/experimental/experimental.proto => cloud/automl/v1beta1/ranges.proto} (54%) create mode 100644 google/cloud/automl/v1beta1/regression.proto create mode 100644 google/cloud/automl/v1beta1/service.proto create mode 100644 google/cloud/automl/v1beta1/table_spec.proto create mode 100644 google/cloud/automl/v1beta1/tables.proto create mode 100644 google/cloud/automl/v1beta1/temporal.proto create mode 100644 google/cloud/automl/v1beta1/text.proto create mode 100644 google/cloud/automl/v1beta1/text_extraction.proto create mode 100644 google/cloud/automl/v1beta1/text_segment.proto create mode 100644 google/cloud/automl/v1beta1/text_sentiment.proto create mode 100644 google/cloud/automl/v1beta1/translation.proto create mode 100644 google/cloud/automl/v1beta1/video.proto create mode 100644 google/cloud/bigquery/artman_bigquery_v2.yaml create mode 100644 google/cloud/bigquery/bigquery_v2.yaml create mode 100644 google/cloud/bigquery/datatransfer/BUILD.bazel create mode 100644 google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml create mode 100644 google/cloud/bigquery/datatransfer/v1/BUILD.bazel create mode 100644 google/cloud/bigquery/datatransfer/v1/datasource.proto create mode 100644 google/cloud/bigquery/storage/BUILD.bazel create mode 100644 google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml create mode 100644 google/cloud/bigquery/storage/storage_v1beta1.yaml create mode 100644 google/cloud/bigquery/storage/v1beta1/BUILD.bazel create mode 100644 google/cloud/bigquery/storage/v1beta1/arrow.proto create mode 100644 google/cloud/bigquery/storage/v1beta1/avro.proto create mode 100644 google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml create mode 100644 google/cloud/bigquery/storage/v1beta1/read_options.proto create mode 100644 google/cloud/bigquery/storage/v1beta1/storage.proto create mode 100644 google/cloud/bigquery/storage/v1beta1/table_reference.proto create mode 100644 google/cloud/bigquery/v2/bigquery_gapic.yaml create mode 100644 google/cloud/bigquery/v2/model.proto create mode 100644 google/cloud/bigquery/v2/model_reference.proto create mode 100644 google/cloud/bigquery/v2/standard_sql.proto create mode 100644 google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml create mode 100644 google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml create mode 100644 google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml create mode 100644 google/cloud/binaryauthorization/v1beta1/resources.proto create mode 100644 google/cloud/binaryauthorization/v1beta1/service.proto create mode 100644 google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml create mode 100644 google/cloud/datacatalog/datacatalog_v1beta1.yaml create mode 100644 google/cloud/datacatalog/v1beta1/datacatalog.proto create mode 100644 google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml create mode 100644 google/cloud/datacatalog/v1beta1/schema.proto create mode 100644 google/cloud/datacatalog/v1beta1/search.proto create mode 100644 google/cloud/datacatalog/v1beta1/table_spec.proto create mode 100644 google/cloud/datacatalog/v1beta1/tags.proto create mode 100644 google/cloud/datacatalog/v1beta1/timestamps.proto create mode 100644 google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml create mode 100644 google/cloud/datalabeling/datalabeling_v1beta1.yaml create mode 100644 google/cloud/datalabeling/v1beta1/annotation.proto create mode 100644 google/cloud/datalabeling/v1beta1/annotation_spec_set.proto create mode 100644 google/cloud/datalabeling/v1beta1/data_labeling_service.proto create mode 100644 google/cloud/datalabeling/v1beta1/data_payloads.proto create mode 100644 google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml create mode 100644 google/cloud/datalabeling/v1beta1/dataset.proto create mode 100644 google/cloud/datalabeling/v1beta1/evaluation.proto create mode 100644 google/cloud/datalabeling/v1beta1/evaluation_job.proto create mode 100644 google/cloud/datalabeling/v1beta1/human_annotation_config.proto create mode 100644 google/cloud/datalabeling/v1beta1/instruction.proto create mode 100644 google/cloud/datalabeling/v1beta1/operations.proto create mode 100644 google/cloud/dataproc/BUILD.bazel create mode 100644 google/cloud/dataproc/v1/BUILD.bazel create mode 100644 google/cloud/dataproc/v1/shared.proto create mode 100644 google/cloud/dataproc/v1/workflow_templates.proto create mode 100644 google/cloud/dataproc/v1beta2/BUILD.bazel create mode 100644 google/cloud/dataproc/v1beta2/autoscaling_policies.proto create mode 100644 google/cloud/dialogflow/BUILD.bazel create mode 100644 google/cloud/dialogflow/v2/BUILD.bazel create mode 100644 google/cloud/dialogflow/v2/audio_config.proto create mode 100644 google/cloud/dialogflow/v2beta1/BUILD.bazel create mode 100644 google/cloud/dialogflow/v2beta1/audio_config.proto create mode 100644 google/cloud/dialogflow/v2beta1/document.proto create mode 100644 google/cloud/dialogflow/v2beta1/knowledge_base.proto create mode 100644 google/cloud/iot/BUILD.bazel create mode 100644 google/cloud/iot/v1/BUILD.bazel create mode 100644 google/cloud/irm/artman_irm_v1alpha2.yaml create mode 100644 google/cloud/irm/irm_v1alpha2.yaml create mode 100644 google/cloud/irm/v1alpha2/incidents.proto create mode 100644 google/cloud/irm/v1alpha2/incidents_service.proto create mode 100644 google/cloud/irm/v1alpha2/irm_gapic.yaml create mode 100644 google/cloud/kms/BUILD.bazel create mode 100644 google/cloud/kms/v1/BUILD.bazel create mode 100644 google/cloud/language/BUILD.bazel create mode 100644 google/cloud/language/v1/BUILD.bazel create mode 100644 google/cloud/language/v1/language.tests.yaml create mode 100644 google/cloud/language/v1beta2/BUILD.bazel create mode 100644 google/cloud/oslogin/BUILD.bazel create mode 100644 google/cloud/oslogin/common/BUILD.bazel create mode 100644 google/cloud/oslogin/v1/BUILD.bazel create mode 100644 google/cloud/oslogin/v1beta/BUILD.bazel create mode 100644 google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml create mode 100644 google/cloud/phishingprotection/phishingprotection.yaml create mode 100644 google/cloud/phishingprotection/v1beta1/phishingprotection.proto create mode 100644 google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml create mode 100644 google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml create mode 100644 google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml create mode 100644 google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto create mode 100644 google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml create mode 100644 google/cloud/recommender/artman_recommender_v1beta1.yaml create mode 100644 google/cloud/recommender/recommender_v1beta1.yaml create mode 100644 google/cloud/recommender/v1beta1/recommendation.proto create mode 100644 google/cloud/recommender/v1beta1/recommender_gapic.yaml create mode 100644 google/cloud/recommender/v1beta1/recommender_service.proto create mode 100644 google/cloud/redis/BUILD.bazel create mode 100644 google/cloud/redis/artman_redis_v1.yaml create mode 100644 google/cloud/redis/redis_v1.yaml create mode 100644 google/cloud/redis/v1/BUILD.bazel create mode 100644 google/cloud/redis/v1/cloud_redis.proto create mode 100644 google/cloud/redis/v1/redis_gapic.yaml create mode 100644 google/cloud/redis/v1beta1/BUILD.bazel create mode 100644 google/cloud/runtimeconfig/BUILD.bazel create mode 100644 google/cloud/scheduler/BUILD.bazel create mode 100644 google/cloud/scheduler/artman_cloudscheduler_v1.yaml create mode 100644 google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml create mode 100644 google/cloud/scheduler/cloudscheduler_v1.yaml create mode 100644 google/cloud/scheduler/cloudscheduler_v1beta1.yaml create mode 100644 google/cloud/scheduler/v1/cloudscheduler.proto create mode 100644 google/cloud/scheduler/v1/cloudscheduler_gapic.yaml create mode 100644 google/cloud/scheduler/v1/job.proto create mode 100644 google/cloud/scheduler/v1/target.proto create mode 100644 google/cloud/scheduler/v1beta1/BUILD.bazel create mode 100644 google/cloud/scheduler/v1beta1/cloudscheduler.proto create mode 100644 google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml create mode 100644 google/cloud/scheduler/v1beta1/job.proto create mode 100644 google/cloud/scheduler/v1beta1/target.proto create mode 100644 google/cloud/securitycenter/BUILD.bazel create mode 100644 google/cloud/securitycenter/artman_securitycenter_v1.yaml create mode 100644 google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml create mode 100644 google/cloud/securitycenter/securitycenter_v1.yaml create mode 100644 google/cloud/securitycenter/securitycenter_v1beta1.yaml create mode 100644 google/cloud/securitycenter/v1/asset.proto create mode 100644 google/cloud/securitycenter/v1/finding.proto create mode 100644 google/cloud/securitycenter/v1/organization_settings.proto create mode 100644 google/cloud/securitycenter/v1/run_asset_discovery_response.proto create mode 100644 google/cloud/securitycenter/v1/security_marks.proto create mode 100644 google/cloud/securitycenter/v1/securitycenter_gapic.yaml create mode 100644 google/cloud/securitycenter/v1/securitycenter_service.proto create mode 100644 google/cloud/securitycenter/v1/source.proto create mode 100644 google/cloud/securitycenter/v1beta1/BUILD.bazel create mode 100644 google/cloud/securitycenter/v1beta1/asset.proto create mode 100644 google/cloud/securitycenter/v1beta1/finding.proto create mode 100644 google/cloud/securitycenter/v1beta1/organization_settings.proto create mode 100644 google/cloud/securitycenter/v1beta1/security_marks.proto create mode 100644 google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml create mode 100644 google/cloud/securitycenter/v1beta1/securitycenter_service.proto create mode 100644 google/cloud/securitycenter/v1beta1/source.proto create mode 100644 google/cloud/speech/BUILD.bazel delete mode 100644 google/cloud/speech/artman_speech_v1beta1.yaml create mode 100644 google/cloud/speech/sample_resources.yaml delete mode 100644 google/cloud/speech/speech_v1beta1.yaml create mode 100644 google/cloud/speech/v1/BUILD.bazel delete mode 100644 google/cloud/speech/v1/cloud_speech_gapic.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_sync.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml create mode 100644 google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml create mode 100644 google/cloud/speech/v1/speech_gapic.yaml delete mode 100644 google/cloud/speech/v1beta1/cloud_speech.proto delete mode 100644 google/cloud/speech/v1beta1/cloud_speech_gapic.yaml create mode 100644 google/cloud/speech/v1p1beta1/BUILD.bazel create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml create mode 100644 google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml create mode 100644 google/cloud/talent/artman_talent_v4beta1.yaml create mode 100644 google/cloud/talent/talent_v4beta1.yaml create mode 100644 google/cloud/talent/v4beta1/application.proto create mode 100644 google/cloud/talent/v4beta1/application_service.proto create mode 100644 google/cloud/talent/v4beta1/batch.proto create mode 100644 google/cloud/talent/v4beta1/common.proto create mode 100644 google/cloud/talent/v4beta1/company.proto create mode 100644 google/cloud/talent/v4beta1/company_service.proto create mode 100644 google/cloud/talent/v4beta1/completion_service.proto create mode 100644 google/cloud/talent/v4beta1/event.proto create mode 100644 google/cloud/talent/v4beta1/event_service.proto create mode 100644 google/cloud/talent/v4beta1/filters.proto create mode 100644 google/cloud/talent/v4beta1/histogram.proto create mode 100644 google/cloud/talent/v4beta1/job.proto create mode 100644 google/cloud/talent/v4beta1/job_service.proto create mode 100644 google/cloud/talent/v4beta1/profile.proto create mode 100644 google/cloud/talent/v4beta1/profile_service.proto create mode 100644 google/cloud/talent/v4beta1/talent_gapic.yaml create mode 100644 google/cloud/talent/v4beta1/tenant.proto create mode 100644 google/cloud/talent/v4beta1/tenant_service.proto create mode 100644 google/cloud/tasks/BUILD.bazel create mode 100644 google/cloud/tasks/artman_cloudtasks_v2.yaml create mode 100644 google/cloud/tasks/artman_cloudtasks_v2beta2.yaml create mode 100644 google/cloud/tasks/artman_cloudtasks_v2beta3.yaml create mode 100644 google/cloud/tasks/cloudtasks_v2.yaml rename google/cloud/tasks/{cloudtasks.yaml => cloudtasks_v2beta2.yaml} (97%) create mode 100644 google/cloud/tasks/cloudtasks_v2beta3.yaml create mode 100644 google/cloud/tasks/v2/cloudtasks.proto create mode 100644 google/cloud/tasks/v2/cloudtasks_gapic.yaml create mode 100644 google/cloud/tasks/v2/queue.proto create mode 100644 google/cloud/tasks/v2/target.proto create mode 100644 google/cloud/tasks/v2/task.proto create mode 100644 google/cloud/tasks/v2beta2/BUILD.bazel create mode 100644 google/cloud/tasks/v2beta3/BUILD.bazel create mode 100644 google/cloud/tasks/v2beta3/cloudtasks.proto create mode 100644 google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml create mode 100644 google/cloud/tasks/v2beta3/queue.proto create mode 100644 google/cloud/tasks/v2beta3/target.proto create mode 100644 google/cloud/tasks/v2beta3/task.proto create mode 100644 google/cloud/texttospeech/BUILD.bazel create mode 100644 google/cloud/texttospeech/v1/BUILD.bazel create mode 100644 google/cloud/texttospeech/v1beta1/BUILD.bazel create mode 100644 google/cloud/translate/artman_translate_v3beta1.yaml create mode 100644 google/cloud/translate/translate_v3beta1.yaml create mode 100644 google/cloud/translate/v3beta1/translate_gapic.yaml create mode 100644 google/cloud/translate/v3beta1/translation_service.proto create mode 100644 google/cloud/videointelligence/BUILD.bazel create mode 100644 google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml create mode 100644 google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml create mode 100644 google/cloud/videointelligence/v1/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1beta1/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1beta2/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1p1beta1/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1p2beta1/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1p2beta1/video_intelligence.proto create mode 100644 google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml create mode 100644 google/cloud/videointelligence/v1p3beta1/BUILD.bazel create mode 100644 google/cloud/videointelligence/v1p3beta1/video_intelligence.proto create mode 100644 google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml create mode 100644 google/cloud/videointelligence/videointelligence_v1p2beta1.yaml create mode 100644 google/cloud/videointelligence/videointelligence_v1p3beta1.yaml create mode 100644 google/cloud/vision/BUILD.bazel create mode 100644 google/cloud/vision/artman_vision_v1p3beta1.yaml create mode 100644 google/cloud/vision/artman_vision_v1p4beta1.yaml create mode 100644 google/cloud/vision/v1/BUILD.bazel create mode 100644 google/cloud/vision/v1/product_search.proto create mode 100644 google/cloud/vision/v1/product_search_service.proto create mode 100644 google/cloud/vision/v1/samples/vision_async_batch_annotate_images_test.yaml create mode 100644 google/cloud/vision/v1/samples/vision_batch_annotate_files_gcs_test.yaml create mode 100644 google/cloud/vision/v1/samples/vision_batch_annotate_files_test.yaml create mode 100644 google/cloud/vision/v1p1beta1/BUILD.bazel create mode 100644 google/cloud/vision/v1p2beta1/BUILD.bazel create mode 100644 google/cloud/vision/v1p3beta1/BUILD.bazel create mode 100644 google/cloud/vision/v1p3beta1/geometry.proto create mode 100644 google/cloud/vision/v1p3beta1/image_annotator.proto create mode 100644 google/cloud/vision/v1p3beta1/product_search.proto create mode 100644 google/cloud/vision/v1p3beta1/product_search_service.proto create mode 100644 google/cloud/vision/v1p3beta1/text_annotation.proto create mode 100644 google/cloud/vision/v1p3beta1/vision_gapic.yaml create mode 100644 google/cloud/vision/v1p3beta1/web_detection.proto create mode 100644 google/cloud/vision/v1p4beta1/BUILD.bazel create mode 100644 google/cloud/vision/v1p4beta1/geometry.proto create mode 100644 google/cloud/vision/v1p4beta1/image_annotator.proto create mode 100644 google/cloud/vision/v1p4beta1/product_search.proto create mode 100644 google/cloud/vision/v1p4beta1/product_search_service.proto create mode 100644 google/cloud/vision/v1p4beta1/text_annotation.proto create mode 100644 google/cloud/vision/v1p4beta1/vision_gapic.yaml create mode 100644 google/cloud/vision/v1p4beta1/web_detection.proto create mode 100644 google/cloud/vision/vision_v1p3beta1.yaml create mode 100644 google/cloud/vision/vision_v1p4beta1.yaml create mode 100644 google/cloud/webrisk/artman_webrisk_v1beta1.yaml create mode 100644 google/cloud/webrisk/v1beta1/webrisk.proto create mode 100644 google/cloud/webrisk/v1beta1/webrisk_gapic.yaml create mode 100644 google/cloud/webrisk/webrisk.yaml create mode 100644 google/cloud/websecurityscanner/BUILD.bazel create mode 100644 google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml create mode 100644 google/cloud/websecurityscanner/v1alpha/BUILD.bazel create mode 100644 google/cloud/websecurityscanner/v1beta/crawled_url.proto create mode 100644 google/cloud/websecurityscanner/v1beta/finding.proto create mode 100644 google/cloud/websecurityscanner/v1beta/finding_addon.proto create mode 100644 google/cloud/websecurityscanner/v1beta/finding_type_stats.proto create mode 100644 google/cloud/websecurityscanner/v1beta/scan_config.proto create mode 100644 google/cloud/websecurityscanner/v1beta/scan_config_error.proto create mode 100644 google/cloud/websecurityscanner/v1beta/scan_run.proto create mode 100644 google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto create mode 100644 google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto create mode 100644 google/cloud/websecurityscanner/v1beta/web_security_scanner.proto create mode 100644 google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml create mode 100644 google/cloud/websecurityscanner/websecurityscanner_v1beta.yaml create mode 100644 google/container/BUILD.bazel create mode 100644 google/container/artman_container_v1.yaml create mode 100644 google/container/artman_container_v1beta1.yaml delete mode 100644 google/container/container.yaml create mode 100644 google/container/container_v1.yaml create mode 100644 google/container/container_v1beta1.yaml create mode 100644 google/container/v1/BUILD.bazel create mode 100644 google/container/v1beta1/container_gapic.yaml create mode 100644 google/datastore/BUILD.bazel create mode 100644 google/datastore/admin/v1/index.proto create mode 100644 google/datastore/v1/BUILD.bazel create mode 100644 google/devtools/build/artman_buildeventservice.yaml create mode 100644 google/devtools/build/buildeventservice.yaml create mode 100644 google/devtools/build/v1/buildeventservice_gapic.yaml create mode 100644 google/devtools/clouddebugger/BUILD.bazel create mode 100644 google/devtools/clouddebugger/v2/BUILD.bazel create mode 100644 google/devtools/clouderrorreporting/BUILD.bazel create mode 100644 google/devtools/clouderrorreporting/v1beta1/BUILD.bazel create mode 100644 google/devtools/cloudtrace/BUILD.bazel create mode 100644 google/devtools/cloudtrace/v1/BUILD.bazel create mode 100644 google/devtools/cloudtrace/v2/BUILD.bazel create mode 100644 google/devtools/containeranalysis/BUILD.bazel rename google/{cloud/tasks/artman_cloudtasks.yaml => devtools/containeranalysis/artman_containeranalysis_v1.yaml} (64%) create mode 100644 google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml create mode 100644 google/devtools/containeranalysis/containeranalysis_v1.yaml create mode 100644 google/devtools/containeranalysis/containeranalysis_v1beta1.yaml create mode 100644 google/devtools/containeranalysis/v1/containeranalysis.proto create mode 100644 google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml create mode 100644 google/devtools/containeranalysis/v1beta1/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/attestation/attestation.proto create mode 100644 google/devtools/containeranalysis/v1beta1/build/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/build/build.proto create mode 100644 google/devtools/containeranalysis/v1beta1/common/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/common/common.proto create mode 100644 google/devtools/containeranalysis/v1beta1/containeranalysis.proto create mode 100644 google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml create mode 100644 google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/deployment/deployment.proto create mode 100644 google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/discovery/discovery.proto create mode 100644 google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto create mode 100644 google/devtools/containeranalysis/v1beta1/image/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/image/image.proto create mode 100644 google/devtools/containeranalysis/v1beta1/package/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/package/package.proto create mode 100644 google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/provenance/provenance.proto create mode 100644 google/devtools/containeranalysis/v1beta1/source/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/source/source.proto create mode 100644 google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel create mode 100644 google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto create mode 100644 google/devtools/resultstore/v2/resultstore_upload.proto create mode 100644 google/devtools/source/v1/BUILD.bazel create mode 100644 google/example/library/BUILD.bazel create mode 100644 google/example/library/artman_library_example_v1.yaml delete mode 100644 google/example/library/library.yaml create mode 100644 google/example/library/library_example_v1.yaml create mode 100644 google/example/library/v1/BUILD.bazel create mode 100644 google/example/library/v1/library_example_gapic.yaml create mode 100644 google/firebase/fcm/connection/fcmconnection_v1alpha1.yaml create mode 100644 google/firebase/fcm/connection/v1alpha1/connection_api.proto create mode 100644 google/firestore/BUILD.bazel create mode 100644 google/firestore/admin/artman_firestore_v1.yaml create mode 100644 google/firestore/admin/firestore_admin_v1.yaml create mode 100644 google/firestore/admin/v1/field.proto create mode 100644 google/firestore/admin/v1/firestore_admin.proto rename google/{example/library/library_gapic.yaml => firestore/admin/v1/firestore_gapic.yaml} (54%) mode change 100755 => 100644 create mode 100644 google/firestore/admin/v1/index.proto create mode 100644 google/firestore/admin/v1/location.proto create mode 100644 google/firestore/admin/v1/operation.proto create mode 100644 google/firestore/admin/v1beta1/location.proto create mode 100644 google/firestore/admin/v1beta2/field.proto create mode 100644 google/firestore/admin/v1beta2/firestore_admin.proto create mode 100644 google/firestore/admin/v1beta2/index.proto create mode 100644 google/firestore/admin/v1beta2/operation.proto create mode 100644 google/firestore/artman_firestore_v1.yaml create mode 100644 google/firestore/firestore_v1.yaml rename google/firestore/{firestore.yaml => firestore_v1beta1.yaml} (72%) create mode 100644 google/firestore/v1/common.proto create mode 100644 google/firestore/v1/document.proto create mode 100644 google/firestore/v1/firestore.proto create mode 100644 google/firestore/v1/firestore_gapic.yaml create mode 100644 google/firestore/v1/query.proto create mode 100644 google/firestore/v1/write.proto create mode 100644 google/firestore/v1beta1/BUILD.bazel create mode 100644 google/iam/BUILD.bazel create mode 100644 google/iam/admin/v1/BUILD.bazel create mode 100644 google/iam/artman_iam_meta_api.yaml create mode 100644 google/iam/credentials/BUILD.bazel create mode 100644 google/iam/credentials/artman_iamcredentials_v1.yaml create mode 100644 google/iam/credentials/iamcredentials_v1.yaml create mode 100644 google/iam/credentials/v1/BUILD.bazel create mode 100644 google/iam/credentials/v1/common.proto create mode 100644 google/iam/credentials/v1/iamcredentials.proto create mode 100644 google/iam/credentials/v1/iamcredentials_gapic.yaml create mode 100644 google/iam/iam_meta_api.yaml create mode 100644 google/iam/v1/BUILD.bazel create mode 100644 google/iam/v1/iam_meta_api_gapic.yaml create mode 100644 google/iam/v1/logging/BUILD.bazel create mode 100644 google/iam/v1/options.proto create mode 100644 google/logging/BUILD.bazel create mode 100644 google/logging/type/BUILD.bazel create mode 100644 google/logging/v2/BUILD.bazel create mode 100644 google/longrunning/BUILD.bazel create mode 100644 google/monitoring/BUILD.bazel delete mode 100644 google/monitoring/v3/BUILD create mode 100644 google/monitoring/v3/BUILD.bazel create mode 100644 google/monitoring/v3/dropped_labels.proto create mode 100644 google/monitoring/v3/span_context.proto create mode 100644 google/privacy/dlp/BUILD.bazel create mode 100644 google/privacy/dlp/v2/BUILD.bazel create mode 100644 google/pubsub/BUILD.bazel create mode 100644 google/pubsub/v1/BUILD.bazel create mode 100644 google/rpc/BUILD.bazel create mode 100644 google/spanner/BUILD.bazel create mode 100644 google/spanner/admin/database/BUILD.bazel create mode 100644 google/spanner/admin/database/v1/BUILD.bazel create mode 100644 google/spanner/admin/instance/BUILD.bazel create mode 100644 google/spanner/admin/instance/v1/BUILD.bazel create mode 100644 google/spanner/v1/BUILD.bazel create mode 100644 google/type/BUILD.bazel create mode 100644 google/type/calendar_period.proto create mode 100644 google/type/expr.proto create mode 100644 google/type/fraction.proto create mode 100644 google/type/quaternion.proto create mode 100644 google/type/type.yaml rename google/container/artman_container.yaml => grafeas/artman_grafeas_v1.yaml (70%) create mode 100644 grafeas/grafeas_v1.yaml create mode 100644 grafeas/v1/attestation.proto create mode 100644 grafeas/v1/build.proto create mode 100644 grafeas/v1/common.proto create mode 100644 grafeas/v1/cvss.proto create mode 100644 grafeas/v1/deployment.proto create mode 100644 grafeas/v1/discovery.proto create mode 100644 grafeas/v1/grafeas.proto create mode 100644 grafeas/v1/grafeas_gapic.yaml create mode 100644 grafeas/v1/image.proto create mode 100644 grafeas/v1/package.proto create mode 100644 grafeas/v1/provenance.proto create mode 100644 grafeas/v1/vulnerability.proto create mode 100644 repository_rules.bzl delete mode 160000 third_party/boringssl-with-bazel delete mode 160000 third_party/nanopb delete mode 160000 third_party/protobuf delete mode 160000 third_party/zlib diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 000000000..bd7573426 --- /dev/null +++ b/.bazelrc @@ -0,0 +1,2 @@ +# To make proto_library rules to include source info in the descriptor +build --protocopt=--include_source_info diff --git a/.circleci/config.yml b/.circleci/config.yml index dea42d114..2ea704fc3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ jobs: working_directory: /var/code/googleapis/ smoke-all: docker: - - image: googleapis/artman:stable + - image: googleapis/artman:latest steps: - checkout - run: diff --git a/.cloudbuild/Dockerfile.bazel-gapic b/.cloudbuild/Dockerfile.bazel-gapic new file mode 100644 index 000000000..c44e33173 --- /dev/null +++ b/.cloudbuild/Dockerfile.bazel-gapic @@ -0,0 +1,7 @@ +FROM gcr.io/cloud-builders/bazel + +RUN apt-get update && apt-get install -y \ + zip \ + libxml2-dev \ + build-essential + diff --git a/.cloudbuild/cloudbuild.yaml b/.cloudbuild/cloudbuild.yaml new file mode 100644 index 000000000..2b7d3cc51 --- /dev/null +++ b/.cloudbuild/cloudbuild.yaml @@ -0,0 +1,20 @@ +steps: +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-f', '.cloudbuild/Dockerfile.bazel-gapic', '-t', 'bazel-gapic', '.'] +- name: 'bazel-gapic' + args: ['build', '--remote_http_cache=https://storage.googleapis.com/$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/bazel-remote-cache', '--google_default_credentials', '//:gapic-cloud-build'] +- name: 'ubuntu' + args: ['mkdir', 'gapic-cloud-build'] +- name: 'ubuntu' + args: ['tar', '-xf', 'bazel-bin/gapic-cloud-build.tar', '-C', 'gapic-cloud-build'] +- name: 'gcr.io/cloud-builders/gsutil' + args: ['-m', 'cp', '-r', 'gapic-cloud-build', 'gs://$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/$COMMIT_SHA/gapic-cloud-build'] +- name: 'ubuntu' + args: ['bash', './.cloudbuild/write-latest.sh', '$COMMIT_SHA'] +artifacts: + objects: + location: 'gs://$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/' + paths: + - 'cloud_build_latest' +options: + machineType: 'N1_HIGHCPU_32' diff --git a/.cloudbuild/write-latest.sh b/.cloudbuild/write-latest.sh new file mode 100644 index 000000000..568f992a3 --- /dev/null +++ b/.cloudbuild/write-latest.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo $1 > cloud_build_latest diff --git a/.gitignore b/.gitignore index 359b2818f..c4e73d4c1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ google/internal google/protobuf .project artman-genfiles/ +bazel-* diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a25fa8ce8..000000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "third_party/protobuf"] - path = third_party/protobuf - url = https://github.com/google/protobuf -[submodule "third_party/zlib"] - path = third_party/zlib - url = https://github.com/makdharma/zlib -[submodule "third_party/boringssl-with-bazel"] - path = third_party/boringssl-with-bazel - url = https://boringssl.googlesource.com/boringssl -[submodule "third_party/nanopb"] - path = third_party/nanopb - url = https://github.com/nanopb/nanopb diff --git a/BUILD b/BUILD deleted file mode 100644 index da25e6425..000000000 --- a/BUILD +++ /dev/null @@ -1 +0,0 @@ -# empty BUILD file diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 000000000..c93a75378 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,129 @@ +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', + ] +) diff --git a/README.md b/README.md index e3811703e..3e5a4cdd7 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,55 @@ Google APIs and help you to utilize them more efficiently. You can also use these definitions with open source tools to generate client libraries, documentation, and other artifacts. +## Building +### Bazel + +The recommended way to build the API client libraries is through +[Bazel](https://bazel.build/) >= 0.23.0. + +First, [install bazel](https://docs.bazel.build/versions/master/install.html). + +To build all libraries: + +``` +bazel build //... +``` + +To test all libraries: + +``` +bazel test //... +``` + +To build one library in all languages: + +``` +bazel build //google/example/library/v1/... +``` + +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. + +### Artman + API client libraries can be built directly from files in this repo using [Artman](https://github.com/googleapis/artman). The latest generation status can be tracked [here](https://circleci.com/gh/googleapis/googleapis) which currently has status [![CircleCI](https://circleci.com/gh/googleapis/googleapis.svg?style=svg)](https://circleci.com/gh/googleapis/googleapis). +To build the Java package for one library: + +``` +artman --config google/example/library/artman_library_example_v1.yaml generate java_gapic +``` + +Artman can only build one library in one language at a time. + For more details on all Google APIs and developer tools, see the [Google Developers](https://developers.google.com/products/) site. diff --git a/WORKSPACE b/WORKSPACE index c403fc73f..d4239160d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,73 +1,154 @@ -# nanopb -bind( - name = "nanopb", - actual = "//third_party/nanopb", -) +workspace(name = "com_google_googleapis") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +############################################################################## +# Common +############################################################################## + +load("//:repository_rules.bzl", "switched_rules_by_language") -# Boringssl -bind( - name = "libssl", - actual = "@submodule_boringssl//:ssl", +switched_rules_by_language( + name = "com_google_googleapis_imports", + cc = True, + gapic = True, + go = True, + grpc = True, + java = True, + nodejs = True, + php = True, ) -new_local_repository( - name = "submodule_boringssl", - build_file = "third_party/boringssl-with-bazel/BUILD", - path = "third_party/boringssl-with-bazel", +# 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"], ) -# Zlib -bind( - name = "zlib", - actual = "@submodule_zlib//:z", +############################################################################## +# Java +############################################################################## + +# 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). +# +#load("@com_google_api_codegen//rules_gapic/java:java_gapic_repositories.bzl", "java_gapic_repositories") +# +#java_gapic_repositories() + +http_archive( + name = "com_google_api_gax_java", + strip_prefix = "gax-java-6b170195c18e0d8abc8385ef063d6da9773f87de", + urls = ["https://github.com/googleapis/gax-java/archive/6b170195c18e0d8abc8385ef063d6da9773f87de.zip"], ) -local_repository( - name = "submodule_zlib", - path = "third_party/zlib", +load("@com_google_api_gax_java//:repository_rules.bzl", "com_google_api_gax_java_properties") + +com_google_api_gax_java_properties( + name = "com_google_api_gax_java_properties", + file = "@com_google_api_gax_java//:dependencies.properties", ) -# Protobuf -bind( - name = "protobuf", - actual = "@submodule_protobuf//:protobuf", +load("@com_google_api_gax_java//:repositories.bzl", "com_google_api_gax_java_repositories") + +com_google_api_gax_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") + +com_google_api_codegen_properties( + name = "com_google_api_codegen_properties", + file = "@com_google_api_codegen//:dependencies.properties", ) -bind( - name = "protobuf_clib", - actual = "@submodule_protobuf//:protoc_lib", +load("@com_google_api_codegen//:repositories.bzl", "com_google_api_codegen_repositories") + +com_google_api_codegen_repositories() + +# protoc-java-resource-names-plugin (loaded in com_google_api_codegen_repositories()) +# (required to support resource names feature in gapic generator) +load( + "@com_google_protoc_java_resource_names_plugin//:repositories.bzl", + "com_google_protoc_java_resource_names_plugin_repositories", ) -bind( - name = "protocol_compiler", - actual = "@submodule_protobuf//:protoc", +com_google_protoc_java_resource_names_plugin_repositories(omit_com_google_protobuf = True) + +############################################################################## +# Go +############################################################################## + +# 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", ) -new_local_repository( - name = "submodule_protobuf", - build_file = "third_party/protobuf/BUILD", - path = "third_party/protobuf", +load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains") + +go_rules_dependencies() + +go_register_toolchains() + +# bazel-gazelle (support Golang under bazel) +http_archive( + name = "bazel_gazelle", + strip_prefix = "bazel-gazelle-0.17.0", + urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/0.17.0.zip"], ) -# grpc -bind( - name = "grpc++", - actual = "@submodule_grpc//:grpc++", +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") + +gazelle_dependencies() + +# go_gapic artifacts runtime dependencies (gax-go) +load("@com_google_api_codegen//rules_gapic/go:go_gapic_repositories.bzl", "go_gapic_repositories") + +go_gapic_repositories() + +############################################################################## +# C++ +############################################################################## + +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"], ) -bind( - name = "grpc++_codegen_proto", - actual = "@submodule_grpc//:grpc++_codegen_proto", +load( + "@com_google_gapic_generator_cpp//gax:repositories.bzl", + "com_google_gapic_generator_cpp_gax_repositories", ) -bind( - name = "grpc_cpp_plugin", - actual = "@submodule_grpc//:grpc_cpp_plugin", +com_google_gapic_generator_cpp_gax_repositories() + +load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") + +grpc_deps() + +load( + "@com_google_gapic_generator_cpp//:repositories.bzl", + "com_google_gapic_generator_cpp_repositories", ) -git_repository( - name = "submodule_grpc", - remote = "https://github.com/grpc/grpc", - # TODO(makdharma): replace with version when bazel file fix is released - commit = "eb064ec7b81b60c5e1eb47d6124d0c05056b3097", +com_google_gapic_generator_cpp_repositories() + +############################################################################## +# PHP +############################################################################## + +load("@com_google_api_codegen//rules_gapic/php:php_gapic_repositories.bzl", "php", "php_gapic_repositories") + +php( + name = "php", + version = "7.1.30", ) + +php_gapic_repositories() diff --git a/google/BUILD.bazel b/google/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/google/ads/googleads/README.md b/google/ads/googleads/README.md new file mode 100644 index 000000000..4a1872b85 --- /dev/null +++ b/google/ads/googleads/README.md @@ -0,0 +1,21 @@ +# Google Ads API - proto definitions + +This folder contains the [protocol +buffer](https://developers.google.com/protocol-buffers/) definitions for the +[Google Ads API](https://developers.google.com/google-ads/api/). To use this +API, we encourage you to take a look at our [official client +libraries](https://developers.google.com/google-ads/api/docs/client-libs) for +Java, Ruby, PHP, Python or .NET. Refer to the +[Quickstart](https://developers.google.com/google-ads/api/docs/first-call/overview) +to learn how to make your first API call. + +To develop in a programming language without an official client library, refer +to the [API Concepts +Guide](https://developers.google.com/google-ads/api/docs/concepts/overview) and +consult these protocol buffer definitions as a reference when constructing API +requests. + +Use [the official Google Ads API +forum](https://groups.google.com/d/forum/adwords-api) to request an official +client library in another programming language, report bugs, request new +features in the Google Ads API, or provide feedback. diff --git a/google/ads/googleads/base.yaml b/google/ads/googleads/base.yaml new file mode 100644 index 000000000..a18b0c0df --- /dev/null +++ b/google/ads/googleads/base.yaml @@ -0,0 +1,276 @@ +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 new file mode 100644 index 000000000..0b919064a --- /dev/null +++ b/google/ads/googleads/v1/common/ad_asset.proto @@ -0,0 +1,64 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/served_asset_field_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdAssetProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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/v1/common/ad_type_infos.proto b/google/ads/googleads/v1/common/ad_type_infos.proto new file mode 100644 index 000000000..2bf23d5c3 --- /dev/null +++ b/google/ads/googleads/v1/common/ad_type_infos.proto @@ -0,0 +1,573 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/common/ad_asset.proto"; +import "google/ads/googleads/v1/enums/call_conversion_reporting_state.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdTypeInfosProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.enums.CallConversionReportingStateEnum + .CallConversionReportingState conversion_reporting_state = 10; +} + +// An expanded dynamic search ad. +message ExpandedDynamicSearchAdInfo { + // The description of the ad. + google.protobuf.StringValue description = 1; +} + +// 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.v1.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 {} + +// Representation of video non-skippable in-stream ad format (15 second +// in-stream non-skippable video ad). +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 +// 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; +} + +// 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; + } +} + +// 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.v1.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.v1.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 vidoes 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.v1.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.v1.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/v1/common/asset_types.proto b/google/ads/googleads/v1/common/asset_types.proto new file mode 100644 index 000000000..7127dfbee --- /dev/null +++ b/google/ads/googleads/v1/common/asset_types.proto @@ -0,0 +1,82 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/mime_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AssetTypesProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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/v1/common/bidding.proto b/google/ads/googleads/v1/common/bidding.proto new file mode 100644 index 000000000..d6b9f18f3 --- /dev/null +++ b/google/ads/googleads/v1/common/bidding.proto @@ -0,0 +1,224 @@ +// 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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "BiddingProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 bidding strategy which sets CPC bids to target impressions on +// page one, or page one promoted slots on google.com. +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; + + // 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; + + // Bid multiplier to be applied to the relevant bid estimate (depending on + // the `strategy_goal`) in determining a keyword's new CPC bid. + google.protobuf.DoubleValue bid_modifier = 3; + + // Whether the strategy should always follow bid estimate changes, or only + // increase. + // If false, always sets a keyword's new bid to the current bid estimate. + // If true, only updates a keyword's bid if the current bid estimate is + // greater than the current bid. + google.protobuf.BoolValue only_raise_cpc_bids = 4; + + // Whether the strategy is allowed to raise bids when the throttling + // rate of the budget it is serving out of rises above a threshold. + google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5; + + // Whether the strategy is allowed to raise bids on keywords with + // lower-range quality scores. + google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6; +} + +// 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 Id = 4 +message TargetImpressionShare { + // The targeted location on the search results page. + 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. + 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 sets bids based on the target fraction of +// auctions where the advertiser should outrank a specific competitor. +message TargetOutrankShare { + // The target fraction of auctions where the advertiser should outrank the + // competitor. + // The advertiser outranks the competitor in an auction if either the + // advertiser appears above the competitor in the search results, or appears + // in the search results when the competitor does not. + // Value must be between 1 and 1000000, inclusive. + google.protobuf.Int32Value target_outrank_share_micros = 1; + + // Competitor's visible domain URL. + google.protobuf.StringValue competitor_domain = 2; + + // 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 = 3; + + // Whether the strategy should always follow bid estimate changes, + // or only increase. + // If false, always set a keyword's new bid to the current bid estimate. + // If true, only updates a keyword's bid if the current bid estimate is + // greater than the current bid. + google.protobuf.BoolValue only_raise_cpc_bids = 4; + + // Whether the strategy is allowed to raise bids on keywords with + // lower-range quality scores. + google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5; +} + +// 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/v1/common/click_location.proto b/google/ads/googleads/v1/common/click_location.proto new file mode 100644 index 000000000..39076fd57 --- /dev/null +++ b/google/ads/googleads/v1/common/click_location.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ClickLocationProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/criteria.proto b/google/ads/googleads/v1/common/criteria.proto new file mode 100644 index 000000000..1ae53f31d --- /dev/null +++ b/google/ads/googleads/v1/common/criteria.proto @@ -0,0 +1,606 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/age_range_type.proto"; +import "google/ads/googleads/v1/enums/app_payment_model_type.proto"; +import "google/ads/googleads/v1/enums/content_label_type.proto"; +import "google/ads/googleads/v1/enums/day_of_week.proto"; +import "google/ads/googleads/v1/enums/device.proto"; +import "google/ads/googleads/v1/enums/gender_type.proto"; +import "google/ads/googleads/v1/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v1/enums/income_range_type.proto"; +import "google/ads/googleads/v1/enums/interaction_type.proto"; +import "google/ads/googleads/v1/enums/keyword_match_type.proto"; +import "google/ads/googleads/v1/enums/listing_custom_attribute_index.proto"; +import "google/ads/googleads/v1/enums/listing_group_type.proto"; +import "google/ads/googleads/v1/enums/location_group_radius_units.proto"; +import "google/ads/googleads/v1/enums/minute_of_hour.proto"; +import "google/ads/googleads/v1/enums/parental_status_type.proto"; +import "google/ads/googleads/v1/enums/preferred_content_type.proto"; +import "google/ads/googleads/v1/enums/product_bidding_category_level.proto"; +import "google/ads/googleads/v1/enums/product_channel.proto"; +import "google/ads/googleads/v1/enums/product_channel_exclusivity.proto"; +import "google/ads/googleads/v1/enums/product_condition.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriteriaProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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.v1.enums.DeviceEnum.Device type = 1; +} + +// A preferred content criterion. +message PreferredContentInfo { + // Type of the preferred content. + google.ads.googleads.v1.enums.PreferredContentTypeEnum.PreferredContentType + type = 2; +} + +// A listing group criterion. +message ListingGroupInfo { + // Type of the listing group. + google.ads.googleads.v1.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 { + // Brand of the listing. + ListingBrandInfo listing_brand = 1; + + // 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; + + // Listing custom attribute. + ListingCustomAttributeInfo listing_custom_attribute = 7; + + // Bidding category of a product offer. + ProductBiddingCategoryInfo product_bidding_category = 13; + + // 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; + + // 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; + } +} + +// Brand of the listing. +message ListingBrandInfo { + // String value of the listing brand. + google.protobuf.StringValue value = 1; +} + +// 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; +} + +// Listing custom attribute. +message ListingCustomAttributeInfo { + // String value of the listing custom attribute. + google.protobuf.StringValue value = 1; + + // Indicates the index of the custom attribute. + google.ads.googleads.v1.enums.ListingCustomAttributeIndexEnum + .ListingCustomAttributeIndex index = 2; +} + +// 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.v1.enums.ProductBiddingCategoryLevelEnum + .ProductBiddingCategoryLevel level = 3; +} + +// Locality of a product offer. +message ProductChannelInfo { + // Value of the locality. + google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel channel = 1; +} + +// Availability of a product offer. +message ProductChannelExclusivityInfo { + // Value of the availability. + 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; +} + +// 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.v1.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.v1.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.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1; +} + +// Criterion for Interaction Type. +message InteractionTypeInfo { + // The interaction type. + google.ads.googleads.v1.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.v1.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.v1.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.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; +} + +// An age range criterion. +message AgeRangeInfo { + // Type of the age range. + google.ads.googleads.v1.enums.AgeRangeTypeEnum.AgeRangeType type = 1; +} + +// A gender criterion. +message GenderInfo { + // Type of the gender. + google.ads.googleads.v1.enums.GenderTypeEnum.GenderType type = 1; +} + +// An income range criterion. +message IncomeRangeInfo { + // Type of the income range. + google.ads.googleads.v1.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1; +} + +// A parental status criterion. +message ParentalStatusInfo { + // Type of the parental status. + google.ads.googleads.v1.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.v1.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.v1.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.v1.enums.WebpageConditionOperandEnum + .WebpageConditionOperand operand = 1; + + // Operator of webpage targeting condition. + google.ads.googleads.v1.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.v1.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.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 new file mode 100644 index 000000000..1b87d016b --- /dev/null +++ b/google/ads/googleads/v1/common/criterion_category_availability.proto @@ -0,0 +1,88 @@ +// 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.v1.common; + +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryAvailabilityProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.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; + + // Channel subtypes under the channel type the category is available to. + 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 + // 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.v1.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/v1/common/custom_parameter.proto b/google/ads/googleads/v1/common/custom_parameter.proto new file mode 100644 index 000000000..4fc8d0e6c --- /dev/null +++ b/google/ads/googleads/v1/common/custom_parameter.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CustomParameterProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/dates.proto b/google/ads/googleads/v1/common/dates.proto new file mode 100644 index 000000000..ecc33db4e --- /dev/null +++ b/google/ads/googleads/v1/common/dates.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "DatesProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::Common"; + +// Proto file describing date range message. + +// A date range. +message DateRange { + // The start date, in yyyy-mm-dd format. + google.protobuf.StringValue start_date = 1; + + // The end date, in yyyy-mm-dd format. + 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 new file mode 100644 index 000000000..a8fcd1bf4 --- /dev/null +++ b/google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto @@ -0,0 +1,40 @@ +// 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.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExplorerAutoOptimizerSettingProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::Common"; + +// Proto file describing ExplorerAutoOptimizerSetting + +// Settings for the +// +// Display Campaign Optimizer, initially termed "Explorer". +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 new file mode 100644 index 000000000..becf03434 --- /dev/null +++ b/google/ads/googleads/v1/common/extensions.proto @@ -0,0 +1,353 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/common/feed_common.proto"; +import "google/ads/googleads/v1/enums/app_store.proto"; +import "google/ads/googleads/v1/enums/call_conversion_reporting_state.proto"; +import "google/ads/googleads/v1/enums/price_extension_price_qualifier.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionsProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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.v1.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.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; + + // 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.v1.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.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; + + // 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.v1.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; +} diff --git a/google/ads/googleads/v1/common/feed_common.proto b/google/ads/googleads/v1/common/feed_common.proto new file mode 100644 index 000000000..8b67f2b3a --- /dev/null +++ b/google/ads/googleads/v1/common/feed_common.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FeedCommonProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/final_app_url.proto b/google/ads/googleads/v1/common/final_app_url.proto new file mode 100644 index 000000000..9c6375a50 --- /dev/null +++ b/google/ads/googleads/v1/common/final_app_url.proto @@ -0,0 +1,49 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/app_url_operating_system_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FinalAppUrlProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.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 + // {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/v1/common/frequency_cap.proto b/google/ads/googleads/v1/common/frequency_cap.proto new file mode 100644 index 000000000..4d877e9f9 --- /dev/null +++ b/google/ads/googleads/v1/common/frequency_cap.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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.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; + + // Unit of time the cap is defined at (e.g. day, week). + 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 new file mode 100644 index 000000000..15e989995 --- /dev/null +++ b/google/ads/googleads/v1/common/keyword_plan_common.proto @@ -0,0 +1,43 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/keyword_plan_competition_level.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCommonProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::Common"; + +// Proto file describing Keyword Planner messages. + +// Historical metrics. +message KeywordPlanHistoricalMetrics { + // Average monthly searches for the past 12 months. + google.protobuf.Int64Value avg_monthly_searches = 1; + + // The competition level for the query. + 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 new file mode 100644 index 000000000..c79d5e0aa --- /dev/null +++ b/google/ads/googleads/v1/common/matching_function.proto @@ -0,0 +1,131 @@ +// 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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 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 + // + // 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.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. + 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.v1.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/v1/common/metrics.proto b/google/ads/googleads/v1/common/metrics.proto new file mode 100644 index 000000000..139e77a46 --- /dev/null +++ b/google/ads/googleads/v1/common/metrics.proto @@ -0,0 +1,542 @@ +// 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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MetricsProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 times a unique cookie was exposed to your ad + // over a given time period. Imported from Google Analytics. + google.protobuf.DoubleValue average_frequency = 12; + + // Average number of pages viewed per session. + google.protobuf.DoubleValue average_page_views = 99; + + // Your ad's position relative to those of other advertisers. + google.protobuf.DoubleValue average_position = 13; + + // 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 of hotel. + 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; + + // The quality of historical landing page experience. + 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; + + // 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; + + // Number of unique cookies that were exposed to your ad over a given time + // period. + google.protobuf.Int64Value impression_reach = 36; + + // 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.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. + 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; + + // 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 + // this Merchant + // Center article 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/v1/common/policy.proto b/google/ads/googleads/v1/common/policy.proto new file mode 100644 index 000000000..5fbbb2991 --- /dev/null +++ b/google/ads/googleads/v1/common/policy.proto @@ -0,0 +1,220 @@ +// 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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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.v1.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.v1.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; + } + + // Specific evidence information depending on the evidence type. + oneof value { + // HTTP code returned when the final URL was crawled. + google.protobuf.Int32Value http_code = 2; + + // 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/v1/common/real_time_bidding_setting.proto b/google/ads/googleads/v1/common/real_time_bidding_setting.proto new file mode 100644 index 000000000..58118f0c9 --- /dev/null +++ b/google/ads/googleads/v1/common/real_time_bidding_setting.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "RealTimeBiddingSettingProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/segments.proto b/google/ads/googleads/v1/common/segments.proto new file mode 100644 index 000000000..2b07813da --- /dev/null +++ b/google/ads/googleads/v1/common/segments.proto @@ -0,0 +1,319 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/common/criteria.proto"; +import "google/ads/googleads/v1/enums/ad_network_type.proto"; +import "google/ads/googleads/v1/enums/click_type.proto"; +import "google/ads/googleads/v1/enums/conversion_action_category.proto"; +import "google/ads/googleads/v1/enums/conversion_attribution_event_type.proto"; +import "google/ads/googleads/v1/enums/conversion_lag_bucket.proto"; +import "google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto"; +import "google/ads/googleads/v1/enums/day_of_week.proto"; +import "google/ads/googleads/v1/enums/device.proto"; +import "google/ads/googleads/v1/enums/external_conversion_source.proto"; +import "google/ads/googleads/v1/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v1/enums/hotel_rate_type.proto"; +import "google/ads/googleads/v1/enums/month_of_year.proto"; +import "google/ads/googleads/v1/enums/placeholder_type.proto"; +import "google/ads/googleads/v1/enums/product_channel.proto"; +import "google/ads/googleads/v1/enums/product_channel_exclusivity.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SegmentsProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::Common"; + +// Proto file describing segment only fields. + +// Segment only fields. +message Segments { + // Ad network type. + google.ads.googleads.v1.enums.AdNetworkTypeEnum.AdNetworkType + ad_network_type = 3; + + // Click type. + google.ads.googleads.v1.enums.ClickTypeEnum.ClickType click_type = 26; + + // Resource name of the conversion action. + google.protobuf.StringValue conversion_action = 52; + + // Conversion action category. + google.ads.googleads.v1.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.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; + + // 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; + + // 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.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; + + // Device to which metrics apply. + google.ads.googleads.v1.enums.DeviceEnum.Device device = 1; + + // External conversion source. + 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; + + // 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 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.v1.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.v1.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.v1.enums.HotelRateTypeEnum.HotelRateType + hotel_rate_type = 74; + + // 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.v1.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.v1.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.v1.enums.ProductChannelEnum.ProductChannel + product_channel = 30; + + // Channel exclusivity of the product. + 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; + + // 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.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; + + // Position of the ad. + google.ads.googleads.v1.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/v1/common/simulation.proto b/google/ads/googleads/v1/common/simulation.proto new file mode 100644 index 000000000..b56c58633 --- /dev/null +++ b/google/ads/googleads/v1/common/simulation.proto @@ -0,0 +1,160 @@ +// 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.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SimulationProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. + 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. + google.protobuf.Int64Value top_slot_impressions = 7; + + // Projected number of biddable conversions for the parent resource. + google.protobuf.DoubleValue parent_biddable_conversions = 8; + + // Projected total value of biddable conversions for the parent resource. + 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. + google.protobuf.Int64Value parent_top_slot_impressions = 13; +} + +// 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. + // Display network does not support this field at the ad group level. + 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 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. + // Display network does not support this field at the ad group level. + 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 new file mode 100644 index 000000000..4d7912063 --- /dev/null +++ b/google/ads/googleads/v1/common/tag_snippet.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.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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TagSnippetProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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.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. + 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/v1/common/targeting_setting.proto b/google/ads/googleads/v1/common/targeting_setting.proto new file mode 100644 index 000000000..fd794ec57 --- /dev/null +++ b/google/ads/googleads/v1/common/targeting_setting.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.ads.googleads.v1.common; + +import "google/ads/googleads/v1/enums/targeting_dimension.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TargetingSettingProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::Common"; + +// Proto file describing TargetingSetting + +// Settings for the +// +// targeting related features, at Campaign and AdGroup level. +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 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; + + // 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; +} diff --git a/google/ads/googleads/v1/common/text_label.proto b/google/ads/googleads/v1/common/text_label.proto new file mode 100644 index 000000000..f5cd3f7be --- /dev/null +++ b/google/ads/googleads/v1/common/text_label.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.ads.googleads.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TextLabelProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/url_collection.proto b/google/ads/googleads/v1/common/url_collection.proto new file mode 100644 index 000000000..622fdc3b7 --- /dev/null +++ b/google/ads/googleads/v1/common/url_collection.proto @@ -0,0 +1,47 @@ +// 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.v1.common; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UrlCollectionProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/common/user_lists.proto b/google/ads/googleads/v1/common/user_lists.proto new file mode 100644 index 000000000..96e6d70fa --- /dev/null +++ b/google/ads/googleads/v1/common/user_lists.proto @@ -0,0 +1,306 @@ +// 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.v1.common; + +import "google/ads/googleads/v1/enums/customer_match_upload_key_type.proto"; +import "google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto"; +import "google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto"; +import "google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto"; +import "google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UserListsProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.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; +} + +// 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.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. + 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 fragment. +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 fragment. + oneof rule_item { + // An atomic rule fragment composed of a number operation. + UserListNumberRuleItemInfo number_rule_item = 2; + + // An atomic rule fragment composed of a string operation. + UserListStringRuleItemInfo string_rule_item = 3; + + // An atomic rule fragment composed of a date operation. + UserListDateRuleItemInfo date_rule_item = 4; + } +} + +// A rule item composed of 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; + + // 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 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; + + // 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 fragment composed of date 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; + + // 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.v1.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.v1.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.v1.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/v1/common/value.proto b/google/ads/googleads/v1/common/value.proto new file mode 100644 index 000000000..b37dfb15c --- /dev/null +++ b/google/ads/googleads/v1/common/value.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.ads.googleads.v1.common; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ValueProto"; +option java_package = "com.google.ads.googleads.v1.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/access_reason.proto b/google/ads/googleads/v1/enums/access_reason.proto new file mode 100644 index 000000000..08add76c4 --- /dev/null +++ b/google/ads/googleads/v1/enums/access_reason.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccessReasonProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/account_budget_proposal_status.proto b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto new file mode 100644 index 000000000..f2532fe7e --- /dev/null +++ b/google/ads/googleads/v1/enums/account_budget_proposal_status.proto @@ -0,0 +1,62 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/account_budget_proposal_type.proto b/google/ads/googleads/v1/enums/account_budget_proposal_type.proto new file mode 100644 index 000000000..61ff472da --- /dev/null +++ b/google/ads/googleads/v1/enums/account_budget_proposal_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/account_budget_status.proto b/google/ads/googleads/v1/enums/account_budget_status.proto new file mode 100644 index 000000000..391c7ccdb --- /dev/null +++ b/google/ads/googleads/v1/enums/account_budget_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto new file mode 100644 index 000000000..fc8fbae7d --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_customizer_placeholder_field.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdCustomizerPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto new file mode 100644 index 000000000..59763e9c2 --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdRotationModeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_ad_status.proto b/google/ads/googleads/v1/enums/ad_group_ad_status.proto new file mode 100644 index 000000000..cadf1a399 --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_ad_status.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto new file mode 100644 index 000000000..9e79e540d --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_criterion_approval_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_criterion_status.proto b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto new file mode 100644 index 000000000..2d43b8615 --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_criterion_status.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_status.proto b/google/ads/googleads/v1/enums/ad_group_status.proto new file mode 100644 index 000000000..9103e23ba --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_status.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_group_type.proto b/google/ads/googleads/v1/enums/ad_group_type.proto new file mode 100644 index 000000000..3802f1285 --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_group_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/ad_network_type.proto b/google/ads/googleads/v1/enums/ad_network_type.proto new file mode 100644 index 000000000..803104d14 --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_network_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdNetworkTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto new file mode 100644 index 000000000..6e3f50c5e --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_serving_optimization_status.proto @@ -0,0 +1,63 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdServingOptimizationStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_strength.proto b/google/ads/googleads/v1/enums/ad_strength.proto new file mode 100644 index 000000000..fdc944c1c --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_strength.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdStrengthProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/ad_type.proto b/google/ads/googleads/v1/enums/ad_type.proto new file mode 100644 index 000000000..52c1bc30b --- /dev/null +++ b/google/ads/googleads/v1/enums/ad_type.proto @@ -0,0 +1,103 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto new file mode 100644 index 000000000..5ca28b98e --- /dev/null +++ b/google/ads/googleads/v1/enums/advertising_channel_sub_type.proto @@ -0,0 +1,86 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdvertisingChannelSubTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/advertising_channel_type.proto b/google/ads/googleads/v1/enums/advertising_channel_type.proto new file mode 100644 index 000000000..25cf0bf9b --- /dev/null +++ b/google/ads/googleads/v1/enums/advertising_channel_type.proto @@ -0,0 +1,63 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AdvertisingChannelTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto new file mode 100644 index 000000000..06ca33eb9 --- /dev/null +++ b/google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AffiliateLocationFeedRelationshipTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto new file mode 100644 index 000000000..8c2ed679f --- /dev/null +++ b/google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto @@ -0,0 +1,76 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AffiliateLocationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/age_range_type.proto b/google/ads/googleads/v1/enums/age_range_type.proto new file mode 100644 index 000000000..2937e8235 --- /dev/null +++ b/google/ads/googleads/v1/enums/age_range_type.proto @@ -0,0 +1,64 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_campaign_app_store.proto b/google/ads/googleads/v1/enums/app_campaign_app_store.proto new file mode 100644 index 000000000..802ad127c --- /dev/null +++ b/google/ads/googleads/v1/enums/app_campaign_app_store.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppCampaignAppStoreProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto new file mode 100644 index 000000000..b88c58203 --- /dev/null +++ b/google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto @@ -0,0 +1,63 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppCampaignBiddingStrategyGoalTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_payment_model_type.proto b/google/ads/googleads/v1/enums/app_payment_model_type.proto new file mode 100644 index 000000000..cee3fad31 --- /dev/null +++ b/google/ads/googleads/v1/enums/app_payment_model_type.proto @@ -0,0 +1,46 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppPaymentModelTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_placeholder_field.proto b/google/ads/googleads/v1/enums/app_placeholder_field.proto new file mode 100644 index 000000000..e9fa23316 --- /dev/null +++ b/google/ads/googleads/v1/enums/app_placeholder_field.proto @@ -0,0 +1,74 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_store.proto b/google/ads/googleads/v1/enums/app_store.proto new file mode 100644 index 000000000..7b37b6c16 --- /dev/null +++ b/google/ads/googleads/v1/enums/app_store.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppStoreProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/app_url_operating_system_type.proto b/google/ads/googleads/v1/enums/app_url_operating_system_type.proto new file mode 100644 index 000000000..8b047775f --- /dev/null +++ b/google/ads/googleads/v1/enums/app_url_operating_system_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AppUrlOperatingSystemTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/asset_type.proto b/google/ads/googleads/v1/enums/asset_type.proto new file mode 100644 index 000000000..836b5a8ff --- /dev/null +++ b/google/ads/googleads/v1/enums/asset_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AssetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/attribution_model.proto b/google/ads/googleads/v1/enums/attribution_model.proto new file mode 100644 index 000000000..21d8cb43a --- /dev/null +++ b/google/ads/googleads/v1/enums/attribution_model.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "AttributionModelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/bid_modifier_source.proto b/google/ads/googleads/v1/enums/bid_modifier_source.proto new file mode 100644 index 000000000..7c6c1551b --- /dev/null +++ b/google/ads/googleads/v1/enums/bid_modifier_source.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BidModifierSourceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/bidding_source.proto b/google/ads/googleads/v1/enums/bidding_source.proto new file mode 100644 index 000000000..f0bc2719a --- /dev/null +++ b/google/ads/googleads/v1/enums/bidding_source.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingSourceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/bidding_strategy_status.proto b/google/ads/googleads/v1/enums/bidding_strategy_status.proto new file mode 100644 index 000000000..cd7a79112 --- /dev/null +++ b/google/ads/googleads/v1/enums/bidding_strategy_status.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/bidding_strategy_type.proto b/google/ads/googleads/v1/enums/bidding_strategy_type.proto new file mode 100644 index 000000000..b63fa045c --- /dev/null +++ b/google/ads/googleads/v1/enums/bidding_strategy_type.proto @@ -0,0 +1,107 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. + 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. + 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/v1/enums/billing_setup_status.proto b/google/ads/googleads/v1/enums/billing_setup_status.proto new file mode 100644 index 000000000..f7ff5820c --- /dev/null +++ b/google/ads/googleads/v1/enums/billing_setup_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/brand_safety_suitability.proto b/google/ads/googleads/v1/enums/brand_safety_suitability.proto new file mode 100644 index 000000000..e3d4a8ad2 --- /dev/null +++ b/google/ads/googleads/v1/enums/brand_safety_suitability.proto @@ -0,0 +1,72 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BrandSafetySuitabilityProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/budget_delivery_method.proto b/google/ads/googleads/v1/enums/budget_delivery_method.proto new file mode 100644 index 000000000..5a0a869e6 --- /dev/null +++ b/google/ads/googleads/v1/enums/budget_delivery_method.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetDeliveryMethodProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/budget_period.proto b/google/ads/googleads/v1/enums/budget_period.proto new file mode 100644 index 000000000..0182d7419 --- /dev/null +++ b/google/ads/googleads/v1/enums/budget_period.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetPeriodProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // Custom budget. + CUSTOM = 3; + + // 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 new file mode 100644 index 000000000..25f09a1d5 --- /dev/null +++ b/google/ads/googleads/v1/enums/budget_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/budget_type.proto b/google/ads/googleads/v1/enums/budget_type.proto new file mode 100644 index 000000000..93b690212 --- /dev/null +++ b/google/ads/googleads/v1/enums/budget_type.proto @@ -0,0 +1,65 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "BudgetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v1/enums/call_conversion_reporting_state.proto new file mode 100644 index 000000000..8d54ac5e4 --- /dev/null +++ b/google/ads/googleads/v1/enums/call_conversion_reporting_state.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CallConversionReportingStateProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/call_placeholder_field.proto b/google/ads/googleads/v1/enums/call_placeholder_field.proto new file mode 100644 index 000000000..90e211ea4 --- /dev/null +++ b/google/ads/googleads/v1/enums/call_placeholder_field.proto @@ -0,0 +1,65 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CallPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/callout_placeholder_field.proto b/google/ads/googleads/v1/enums/callout_placeholder_field.proto new file mode 100644 index 000000000..5ad14dd18 --- /dev/null +++ b/google/ads/googleads/v1/enums/callout_placeholder_field.proto @@ -0,0 +1,46 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CalloutPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_criterion_status.proto b/google/ads/googleads/v1/enums/campaign_criterion_status.proto new file mode 100644 index 000000000..c3fe9dc22 --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_criterion_status.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_draft_status.proto b/google/ads/googleads/v1/enums/campaign_draft_status.proto new file mode 100644 index 000000000..3602b5b8b --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_draft_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_experiment_status.proto b/google/ads/googleads/v1/enums/campaign_experiment_status.proto new file mode 100644 index 000000000..0dc848323 --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_experiment_status.proto @@ -0,0 +1,78 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_experiment_traffic_split_type.proto b/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto new file mode 100644 index 000000000..7711d0dfb --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_experiment_traffic_split_type.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentTrafficSplitTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_experiment_type.proto b/google/ads/googleads/v1/enums/campaign_experiment_type.proto new file mode 100644 index 000000000..c547a395d --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_experiment_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_serving_status.proto b/google/ads/googleads/v1/enums/campaign_serving_status.proto new file mode 100644 index 000000000..625195bac --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_serving_status.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignServingStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_shared_set_status.proto b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto new file mode 100644 index 000000000..cbb2d4aff --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_shared_set_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/campaign_status.proto b/google/ads/googleads/v1/enums/campaign_status.proto new file mode 100644 index 000000000..cdec3f5ba --- /dev/null +++ b/google/ads/googleads/v1/enums/campaign_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CampaignStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/change_status_operation.proto b/google/ads/googleads/v1/enums/change_status_operation.proto new file mode 100644 index 000000000..b6b045f84 --- /dev/null +++ b/google/ads/googleads/v1/enums/change_status_operation.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusOperationProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/change_status_resource_type.proto b/google/ads/googleads/v1/enums/change_status_resource_type.proto new file mode 100644 index 000000000..1eeee0328 --- /dev/null +++ b/google/ads/googleads/v1/enums/change_status_resource_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusResourceTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/click_type.proto b/google/ads/googleads/v1/enums/click_type.proto new file mode 100644 index 000000000..2722fa36c --- /dev/null +++ b/google/ads/googleads/v1/enums/click_type.proto @@ -0,0 +1,202 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ClickTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/content_label_type.proto b/google/ads/googleads/v1/enums/content_label_type.proto new file mode 100644 index 000000000..df2437060 --- /dev/null +++ b/google/ads/googleads/v1/enums/content_label_type.proto @@ -0,0 +1,88 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ContentLabelTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // Game. + GAME = 5; + + // 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; + } +} diff --git a/google/ads/googleads/v1/enums/conversion_action_category.proto b/google/ads/googleads/v1/enums/conversion_action_category.proto new file mode 100644 index 000000000..b12de553c --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_action_category.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionCategoryProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/conversion_action_counting_type.proto b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto new file mode 100644 index 000000000..ed4b54f27 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_action_counting_type.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionCountingTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_action_status.proto b/google/ads/googleads/v1/enums/conversion_action_status.proto new file mode 100644 index 000000000..576762b72 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_action_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_action_type.proto b/google/ads/googleads/v1/enums/conversion_action_type.proto new file mode 100644 index 000000000..bc59c5c24 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_action_type.proto @@ -0,0 +1,72 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_adjustment_type.proto b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto new file mode 100644 index 000000000..76f6632d1 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_adjustment_type.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto new file mode 100644 index 000000000..d8646edf6 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_attribution_event_type.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAttributionEventTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto new file mode 100644 index 000000000..cd68a9945 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_lag_bucket.proto @@ -0,0 +1,116 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionLagBucketProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto new file mode 100644 index 000000000..fbe31e145 --- /dev/null +++ b/google/ads/googleads/v1/enums/conversion_or_adjustment_lag_bucket.proto @@ -0,0 +1,205 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ConversionOrAdjustmentLagBucketProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.proto new file mode 100644 index 000000000..f03422800 --- /dev/null +++ b/google/ads/googleads/v1/enums/criterion_category_channel_availability_mode.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryChannelAvailabilityModeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.proto new file mode 100644 index 000000000..8016d5127 --- /dev/null +++ b/google/ads/googleads/v1/enums/criterion_category_locale_availability_mode.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryLocaleAvailabilityModeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +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 +// 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/v1/enums/criterion_system_serving_status.proto b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto new file mode 100644 index 000000000..24572d233 --- /dev/null +++ b/google/ads/googleads/v1/enums/criterion_system_serving_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionSystemServingStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/criterion_type.proto b/google/ads/googleads/v1/enums/criterion_type.proto new file mode 100644 index 000000000..b01cb67cf --- /dev/null +++ b/google/ads/googleads/v1/enums/criterion_type.proto @@ -0,0 +1,133 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CriterionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/custom_interest_member_type.proto b/google/ads/googleads/v1/enums/custom_interest_member_type.proto new file mode 100644 index 000000000..dda2be01a --- /dev/null +++ b/google/ads/googleads/v1/enums/custom_interest_member_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestMemberTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/custom_interest_status.proto b/google/ads/googleads/v1/enums/custom_interest_status.proto new file mode 100644 index 000000000..aa3d18db0 --- /dev/null +++ b/google/ads/googleads/v1/enums/custom_interest_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/custom_interest_type.proto b/google/ads/googleads/v1/enums/custom_interest_type.proto new file mode 100644 index 000000000..8f7799599 --- /dev/null +++ b/google/ads/googleads/v1/enums/custom_interest_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/custom_placeholder_field.proto b/google/ads/googleads/v1/enums/custom_placeholder_field.proto new file mode 100644 index 000000000..2316153fd --- /dev/null +++ b/google/ads/googleads/v1/enums/custom_placeholder_field.proto @@ -0,0 +1,128 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v1/enums/customer_match_upload_key_type.proto new file mode 100644 index 000000000..656f144c3 --- /dev/null +++ b/google/ads/googleads/v1/enums/customer_match_upload_key_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomerMatchUploadKeyTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto b/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto new file mode 100644 index 000000000..55062cbd1 --- /dev/null +++ b/google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto @@ -0,0 +1,67 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "CustomerPayPerConversionEligibilityFailureReasonProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/data_driven_model_status.proto b/google/ads/googleads/v1/enums/data_driven_model_status.proto new file mode 100644 index 000000000..dea3f238a --- /dev/null +++ b/google/ads/googleads/v1/enums/data_driven_model_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DataDrivenModelStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/day_of_week.proto b/google/ads/googleads/v1/enums/day_of_week.proto new file mode 100644 index 000000000..6a43f0798 --- /dev/null +++ b/google/ads/googleads/v1/enums/day_of_week.proto @@ -0,0 +1,64 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DayOfWeekProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/device.proto b/google/ads/googleads/v1/enums/device.proto new file mode 100644 index 000000000..21e4d9575 --- /dev/null +++ b/google/ads/googleads/v1/enums/device.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DeviceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/display_ad_format_setting.proto b/google/ads/googleads/v1/enums/display_ad_format_setting.proto new file mode 100644 index 000000000..feb9bde52 --- /dev/null +++ b/google/ads/googleads/v1/enums/display_ad_format_setting.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DisplayAdFormatSettingProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/display_upload_product_type.proto b/google/ads/googleads/v1/enums/display_upload_product_type.proto new file mode 100644 index 000000000..858b1b434 --- /dev/null +++ b/google/ads/googleads/v1/enums/display_upload_product_type.proto @@ -0,0 +1,96 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DisplayUploadProductTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto new file mode 100644 index 000000000..ad8b424e9 --- /dev/null +++ b/google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "DsaPageFeedCriterionFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/education_placeholder_field.proto b/google/ads/googleads/v1/enums/education_placeholder_field.proto new file mode 100644 index 000000000..164ad8beb --- /dev/null +++ b/google/ads/googleads/v1/enums/education_placeholder_field.proto @@ -0,0 +1,110 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "EducationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/extension_setting_device.proto b/google/ads/googleads/v1/enums/extension_setting_device.proto new file mode 100644 index 000000000..e0084aae1 --- /dev/null +++ b/google/ads/googleads/v1/enums/extension_setting_device.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionSettingDeviceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/extension_type.proto b/google/ads/googleads/v1/enums/extension_type.proto new file mode 100644 index 000000000..8a47b2e7c --- /dev/null +++ b/google/ads/googleads/v1/enums/extension_type.proto @@ -0,0 +1,80 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // Review. + REVIEW = 9; + + // Sitelink. + SITELINK = 10; + + // Structured snippet. + STRUCTURED_SNIPPET = 11; + + // Location. + LOCATION = 12; + + // 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 new file mode 100644 index 000000000..dfdbd9286 --- /dev/null +++ b/google/ads/googleads/v1/enums/external_conversion_source.proto @@ -0,0 +1,129 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ExternalConversionSourceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_attribute_type.proto b/google/ads/googleads/v1/enums/feed_attribute_type.proto new file mode 100644 index 000000000..46ef8cc6d --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_attribute_type.proto @@ -0,0 +1,82 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedAttributeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto new file mode 100644 index 000000000..ad547474e --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemQualityApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto new file mode 100644 index 000000000..e9745025c --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto @@ -0,0 +1,98 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemQualityDisapprovalReasonProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_status.proto b/google/ads/googleads/v1/enums/feed_item_status.proto new file mode 100644 index 000000000..9a4c41766 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_target_device.proto b/google/ads/googleads/v1/enums/feed_item_target_device.proto new file mode 100644 index 000000000..8eb86f6eb --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_target_device.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetDeviceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_target_type.proto b/google/ads/googleads/v1/enums/feed_item_target_type.proto new file mode 100644 index 000000000..f68c169c3 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_target_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_item_validation_status.proto b/google/ads/googleads/v1/enums/feed_item_validation_status.proto new file mode 100644 index 000000000..56fc06249 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_item_validation_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemValidationStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_link_status.proto b/google/ads/googleads/v1/enums/feed_link_status.proto new file mode 100644 index 000000000..242f3cf2f --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_link_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedLinkStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto new file mode 100644 index 000000000..949dd8d75 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingCriterionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_mapping_status.proto b/google/ads/googleads/v1/enums/feed_mapping_status.proto new file mode 100644 index 000000000..fe31a4005 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_mapping_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_origin.proto b/google/ads/googleads/v1/enums/feed_origin.proto new file mode 100644 index 000000000..3371b1753 --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_origin.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedOriginProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/feed_status.proto b/google/ads/googleads/v1/enums/feed_status.proto new file mode 100644 index 000000000..25444e88c --- /dev/null +++ b/google/ads/googleads/v1/enums/feed_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FeedStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/flight_placeholder_field.proto b/google/ads/googleads/v1/enums/flight_placeholder_field.proto new file mode 100644 index 000000000..410bd521e --- /dev/null +++ b/google/ads/googleads/v1/enums/flight_placeholder_field.proto @@ -0,0 +1,117 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FlightsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/frequency_cap_event_type.proto b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto new file mode 100644 index 000000000..538e4aed8 --- /dev/null +++ b/google/ads/googleads/v1/enums/frequency_cap_event_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapEventTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/frequency_cap_level.proto b/google/ads/googleads/v1/enums/frequency_cap_level.proto new file mode 100644 index 000000000..48a166b61 --- /dev/null +++ b/google/ads/googleads/v1/enums/frequency_cap_level.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapLevelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v1/enums/frequency_cap_time_unit.proto new file mode 100644 index 000000000..d67532882 --- /dev/null +++ b/google/ads/googleads/v1/enums/frequency_cap_time_unit.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapTimeUnitProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/gender_type.proto b/google/ads/googleads/v1/enums/gender_type.proto new file mode 100644 index 000000000..0782bc10c --- /dev/null +++ b/google/ads/googleads/v1/enums/gender_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GenderTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/geo_target_constant_status.proto b/google/ads/googleads/v1/enums/geo_target_constant_status.proto new file mode 100644 index 000000000..415cff4e4 --- /dev/null +++ b/google/ads/googleads/v1/enums/geo_target_constant_status.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/geo_targeting_restriction.proto b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto new file mode 100644 index 000000000..9407898d3 --- /dev/null +++ b/google/ads/googleads/v1/enums/geo_targeting_restriction.proto @@ -0,0 +1,48 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetingRestrictionProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/geo_targeting_type.proto b/google/ads/googleads/v1/enums/geo_targeting_type.proto new file mode 100644 index 000000000..bfb00f014 --- /dev/null +++ b/google/ads/googleads/v1/enums/geo_targeting_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetingTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/google_ads_field_category.proto b/google/ads/googleads/v1/enums/google_ads_field_category.proto new file mode 100644 index 000000000..b12096dcc --- /dev/null +++ b/google/ads/googleads/v1/enums/google_ads_field_category.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldCategoryProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/google_ads_field_data_type.proto b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto new file mode 100644 index 000000000..d84d34aa7 --- /dev/null +++ b/google/ads/googleads/v1/enums/google_ads_field_data_type.proto @@ -0,0 +1,101 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldDataTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/hotel_date_selection_type.proto b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto new file mode 100644 index 000000000..321668ade --- /dev/null +++ b/google/ads/googleads/v1/enums/hotel_date_selection_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelDateSelectionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/hotel_placeholder_field.proto b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto new file mode 100644 index 000000000..9a9a2f553 --- /dev/null +++ b/google/ads/googleads/v1/enums/hotel_placeholder_field.proto @@ -0,0 +1,123 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/hotel_rate_type.proto b/google/ads/googleads/v1/enums/hotel_rate_type.proto new file mode 100644 index 000000000..6a1525230 --- /dev/null +++ b/google/ads/googleads/v1/enums/hotel_rate_type.proto @@ -0,0 +1,63 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "HotelRateTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. See + // 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. + // all signed-in users, 20% of mobile users, all mobile users in Canada, + // etc. + PRIVATE_RATE = 5; + } + + +} diff --git a/google/ads/googleads/v1/enums/income_range_type.proto b/google/ads/googleads/v1/enums/income_range_type.proto new file mode 100644 index 000000000..8539677ab --- /dev/null +++ b/google/ads/googleads/v1/enums/income_range_type.proto @@ -0,0 +1,64 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "IncomeRangeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/interaction_event_type.proto b/google/ads/googleads/v1/enums/interaction_event_type.proto new file mode 100644 index 000000000..2326c7722 --- /dev/null +++ b/google/ads/googleads/v1/enums/interaction_event_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InteractionEventTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/interaction_type.proto b/google/ads/googleads/v1/enums/interaction_type.proto new file mode 100644 index 000000000..d6a805833 --- /dev/null +++ b/google/ads/googleads/v1/enums/interaction_type.proto @@ -0,0 +1,46 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "InteractionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/job_placeholder_field.proto b/google/ads/googleads/v1/enums/job_placeholder_field.proto new file mode 100644 index 000000000..c619ba958 --- /dev/null +++ b/google/ads/googleads/v1/enums/job_placeholder_field.proto @@ -0,0 +1,114 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "JobsPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/keyword_match_type.proto b/google/ads/googleads/v1/enums/keyword_match_type.proto new file mode 100644 index 000000000..923f465ac --- /dev/null +++ b/google/ads/googleads/v1/enums/keyword_match_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordMatchTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto new file mode 100644 index 000000000..598ec7c18 --- /dev/null +++ b/google/ads/googleads/v1/enums/keyword_plan_competition_level.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCompetitionLevelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. + LOW = 2; + + // Medium competition. + MEDIUM = 3; + + // 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 new file mode 100644 index 000000000..2dcc6bad7 --- /dev/null +++ b/google/ads/googleads/v1/enums/keyword_plan_forecast_interval.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanForecastIntervalProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/keyword_plan_network.proto b/google/ads/googleads/v1/enums/keyword_plan_network.proto new file mode 100644 index 000000000..e43ba8c50 --- /dev/null +++ b/google/ads/googleads/v1/enums/keyword_plan_network.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNetworkProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/label_status.proto b/google/ads/googleads/v1/enums/label_status.proto new file mode 100644 index 000000000..b675846d4 --- /dev/null +++ b/google/ads/googleads/v1/enums/label_status.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LabelStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.proto new file mode 100644 index 000000000..9d7dc2b44 --- /dev/null +++ b/google/ads/googleads/v1/enums/legacy_app_install_ad_app_store.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LegacyAppInstallAdAppStoreProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v1/enums/listing_custom_attribute_index.proto new file mode 100644 index 000000000..9ca9134d5 --- /dev/null +++ b/google/ads/googleads/v1/enums/listing_custom_attribute_index.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ListingCustomAttributeIndexProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/listing_group_type.proto b/google/ads/googleads/v1/enums/listing_group_type.proto new file mode 100644 index 000000000..4ac77989a --- /dev/null +++ b/google/ads/googleads/v1/enums/listing_group_type.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ListingGroupTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/local_placeholder_field.proto b/google/ads/googleads/v1/enums/local_placeholder_field.proto new file mode 100644 index 000000000..8fae98efd --- /dev/null +++ b/google/ads/googleads/v1/enums/local_placeholder_field.proto @@ -0,0 +1,118 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocalPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto new file mode 100644 index 000000000..ed4ccb5c5 --- /dev/null +++ b/google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationExtensionTargetingCriterionFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/location_group_radius_units.proto b/google/ads/googleads/v1/enums/location_group_radius_units.proto new file mode 100644 index 000000000..797e7f2f8 --- /dev/null +++ b/google/ads/googleads/v1/enums/location_group_radius_units.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationGroupRadiusUnitsProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/location_placeholder_field.proto b/google/ads/googleads/v1/enums/location_placeholder_field.proto new file mode 100644 index 000000000..64c5dcae2 --- /dev/null +++ b/google/ads/googleads/v1/enums/location_placeholder_field.proto @@ -0,0 +1,67 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "LocationPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/manager_link_status.proto b/google/ads/googleads/v1/enums/manager_link_status.proto new file mode 100644 index 000000000..b3e317147 --- /dev/null +++ b/google/ads/googleads/v1/enums/manager_link_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ManagerLinkStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/matching_function_context_type.proto b/google/ads/googleads/v1/enums/matching_function_context_type.proto new file mode 100644 index 000000000..4cf2ce4d8 --- /dev/null +++ b/google/ads/googleads/v1/enums/matching_function_context_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionContextTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/matching_function_operator.proto b/google/ads/googleads/v1/enums/matching_function_operator.proto new file mode 100644 index 000000000..d3de57117 --- /dev/null +++ b/google/ads/googleads/v1/enums/matching_function_operator.proto @@ -0,0 +1,64 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/media_type.proto b/google/ads/googleads/v1/enums/media_type.proto new file mode 100644 index 000000000..182a88aef --- /dev/null +++ b/google/ads/googleads/v1/enums/media_type.proto @@ -0,0 +1,63 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MediaTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/merchant_center_link_status.proto b/google/ads/googleads/v1/enums/merchant_center_link_status.proto new file mode 100644 index 000000000..0d8b4b304 --- /dev/null +++ b/google/ads/googleads/v1/enums/merchant_center_link_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/message_placeholder_field.proto b/google/ads/googleads/v1/enums/message_placeholder_field.proto new file mode 100644 index 000000000..0d91c7871 --- /dev/null +++ b/google/ads/googleads/v1/enums/message_placeholder_field.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MessagePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/mime_type.proto b/google/ads/googleads/v1/enums/mime_type.proto new file mode 100644 index 000000000..86b088055 --- /dev/null +++ b/google/ads/googleads/v1/enums/mime_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MimeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/minute_of_hour.proto b/google/ads/googleads/v1/enums/minute_of_hour.proto new file mode 100644 index 000000000..443daadeb --- /dev/null +++ b/google/ads/googleads/v1/enums/minute_of_hour.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MinuteOfHourProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/mobile_device_type.proto b/google/ads/googleads/v1/enums/mobile_device_type.proto new file mode 100644 index 000000000..c4ebc9bfd --- /dev/null +++ b/google/ads/googleads/v1/enums/mobile_device_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/month_of_year.proto b/google/ads/googleads/v1/enums/month_of_year.proto new file mode 100644 index 000000000..35a53068c --- /dev/null +++ b/google/ads/googleads/v1/enums/month_of_year.proto @@ -0,0 +1,79 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MonthOfYearProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/mutate_job_status.proto b/google/ads/googleads/v1/enums/mutate_job_status.proto new file mode 100644 index 000000000..ec3010ae4 --- /dev/null +++ b/google/ads/googleads/v1/enums/mutate_job_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/negative_geo_target_type.proto b/google/ads/googleads/v1/enums/negative_geo_target_type.proto new file mode 100644 index 000000000..92ea054f2 --- /dev/null +++ b/google/ads/googleads/v1/enums/negative_geo_target_type.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "NegativeGeoTargetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. + DONT_CARE = 2; + + // Specifies that a user is excluded from seeing the ad if they + // are in advertiser's excluded locations. + 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 new file mode 100644 index 000000000..2cfa2e83b --- /dev/null +++ b/google/ads/googleads/v1/enums/operating_system_version_operator_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionOperatorTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.proto new file mode 100644 index 000000000..a51fa76a8 --- /dev/null +++ b/google/ads/googleads/v1/enums/page_one_promoted_strategy_goal.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PageOnePromotedStrategyGoalProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::Enums"; + +// Proto file describing bidding schemes. + +// Container for enum describing possible strategy goals: where impressions are +// desired to be shown on search result pages. +message PageOnePromotedStrategyGoalEnum { + // Enum describing possible strategy goals. + enum PageOnePromotedStrategyGoal { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // First page on google.com. + FIRST_PAGE = 2; + + // 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 new file mode 100644 index 000000000..de8998a6e --- /dev/null +++ b/google/ads/googleads/v1/enums/parental_status_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/payment_mode.proto b/google/ads/googleads/v1/enums/payment_mode.proto new file mode 100644 index 000000000..3c7727247 --- /dev/null +++ b/google/ads/googleads/v1/enums/payment_mode.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PaymentModeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/placeholder_type.proto b/google/ads/googleads/v1/enums/placeholder_type.proto new file mode 100644 index 000000000..e848c4219 --- /dev/null +++ b/google/ads/googleads/v1/enums/placeholder_type.proto @@ -0,0 +1,120 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PlaceholderTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/placement_type.proto b/google/ads/googleads/v1/enums/placement_type.proto new file mode 100644 index 000000000..b507b3361 --- /dev/null +++ b/google/ads/googleads/v1/enums/placement_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PlacementTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/policy_approval_status.proto b/google/ads/googleads/v1/enums/policy_approval_status.proto new file mode 100644 index 000000000..1eb7515f5 --- /dev/null +++ b/google/ads/googleads/v1/enums/policy_approval_status.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyApprovalStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/policy_review_status.proto b/google/ads/googleads/v1/enums/policy_review_status.proto new file mode 100644 index 000000000..1fbb5042c --- /dev/null +++ b/google/ads/googleads/v1/enums/policy_review_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyReviewStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/policy_topic_entry_type.proto b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto new file mode 100644 index 000000000..623b8571e --- /dev/null +++ b/google/ads/googleads/v1/enums/policy_topic_entry_type.proto @@ -0,0 +1,65 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEntryTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto new file mode 100644 index 000000000..f6796924e --- /dev/null +++ b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEvidenceDestinationMismatchUrlTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/policy_topic_evidence_destination_not_working_device.proto b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto new file mode 100644 index 000000000..6a2da5fd2 --- /dev/null +++ b/google/ads/googleads/v1/enums/policy_topic_evidence_destination_not_working_device.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTopicEvidenceDestinationNotWorkingDeviceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/positive_geo_target_type.proto b/google/ads/googleads/v1/enums/positive_geo_target_type.proto new file mode 100644 index 000000000..4143674be --- /dev/null +++ b/google/ads/googleads/v1/enums/positive_geo_target_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PositiveGeoTargetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. + DONT_CARE = 2; + + // Specifies that an ad is triggered if the user + // searches for advertiser's targeted locations. + 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 = 4; + } +} diff --git a/google/ads/googleads/v1/enums/preferred_content_type.proto b/google/ads/googleads/v1/enums/preferred_content_type.proto new file mode 100644 index 000000000..8831ea124 --- /dev/null +++ b/google/ads/googleads/v1/enums/preferred_content_type.proto @@ -0,0 +1,46 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PreferredContentTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v1/enums/price_extension_price_qualifier.proto new file mode 100644 index 000000000..9a3e87666 --- /dev/null +++ b/google/ads/googleads/v1/enums/price_extension_price_qualifier.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionPriceQualifierProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/price_extension_price_unit.proto b/google/ads/googleads/v1/enums/price_extension_price_unit.proto new file mode 100644 index 000000000..865b5a4e4 --- /dev/null +++ b/google/ads/googleads/v1/enums/price_extension_price_unit.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionPriceUnitProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/price_extension_type.proto b/google/ads/googleads/v1/enums/price_extension_type.proto new file mode 100644 index 000000000..a3edef132 --- /dev/null +++ b/google/ads/googleads/v1/enums/price_extension_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PriceExtensionTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/price_placeholder_field.proto b/google/ads/googleads/v1/enums/price_placeholder_field.proto new file mode 100644 index 000000000..14e966056 --- /dev/null +++ b/google/ads/googleads/v1/enums/price_placeholder_field.proto @@ -0,0 +1,239 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PricePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_bidding_category_level.proto b/google/ads/googleads/v1/enums/product_bidding_category_level.proto new file mode 100644 index 000000000..4a35b986a --- /dev/null +++ b/google/ads/googleads/v1/enums/product_bidding_category_level.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryLevelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_bidding_category_status.proto b/google/ads/googleads/v1/enums/product_bidding_category_status.proto new file mode 100644 index 000000000..5edc363e8 --- /dev/null +++ b/google/ads/googleads/v1/enums/product_bidding_category_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_channel.proto b/google/ads/googleads/v1/enums/product_channel.proto new file mode 100644 index 000000000..d4436556d --- /dev/null +++ b/google/ads/googleads/v1/enums/product_channel.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductChannelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_channel_exclusivity.proto b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto new file mode 100644 index 000000000..839f3aabd --- /dev/null +++ b/google/ads/googleads/v1/enums/product_channel_exclusivity.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductChannelExclusivityProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_condition.proto b/google/ads/googleads/v1/enums/product_condition.proto new file mode 100644 index 000000000..14cf0560f --- /dev/null +++ b/google/ads/googleads/v1/enums/product_condition.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductConditionProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/product_type_level.proto b/google/ads/googleads/v1/enums/product_type_level.proto new file mode 100644 index 000000000..7857e18aa --- /dev/null +++ b/google/ads/googleads/v1/enums/product_type_level.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProductTypeLevelProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto new file mode 100644 index 000000000..5eaef320c --- /dev/null +++ b/google/ads/googleads/v1/enums/promotion_extension_discount_modifier.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionExtensionDiscountModifierProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/promotion_extension_occasion.proto b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto new file mode 100644 index 000000000..824cabde2 --- /dev/null +++ b/google/ads/googleads/v1/enums/promotion_extension_occasion.proto @@ -0,0 +1,156 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionExtensionOccasionProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/promotion_placeholder_field.proto b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto new file mode 100644 index 000000000..dd9f0d1f3 --- /dev/null +++ b/google/ads/googleads/v1/enums/promotion_placeholder_field.proto @@ -0,0 +1,94 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "PromotionPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/proximity_radius_units.proto b/google/ads/googleads/v1/enums/proximity_radius_units.proto new file mode 100644 index 000000000..cd6433e31 --- /dev/null +++ b/google/ads/googleads/v1/enums/proximity_radius_units.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ProximityRadiusUnitsProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/quality_score_bucket.proto b/google/ads/googleads/v1/enums/quality_score_bucket.proto new file mode 100644 index 000000000..397fd222a --- /dev/null +++ b/google/ads/googleads/v1/enums/quality_score_bucket.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "QualityScoreBucketProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto new file mode 100644 index 000000000..0d157abe1 --- /dev/null +++ b/google/ads/googleads/v1/enums/real_estate_placeholder_field.proto @@ -0,0 +1,114 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "RealEstatePlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/recommendation_type.proto b/google/ads/googleads/v1/enums/recommendation_type.proto new file mode 100644 index 000000000..6c3d2e381 --- /dev/null +++ b/google/ads/googleads/v1/enums/recommendation_type.proto @@ -0,0 +1,91 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/search_engine_results_page_type.proto b/google/ads/googleads/v1/enums/search_engine_results_page_type.proto new file mode 100644 index 000000000..61bc78ddf --- /dev/null +++ b/google/ads/googleads/v1/enums/search_engine_results_page_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchEngineResultsPageTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/search_term_match_type.proto b/google/ads/googleads/v1/enums/search_term_match_type.proto new file mode 100644 index 000000000..ccaff2e6b --- /dev/null +++ b/google/ads/googleads/v1/enums/search_term_match_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermMatchTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/search_term_targeting_status.proto b/google/ads/googleads/v1/enums/search_term_targeting_status.proto new file mode 100644 index 000000000..ac482c3fd --- /dev/null +++ b/google/ads/googleads/v1/enums/search_term_targeting_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermTargetingStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/served_asset_field_type.proto b/google/ads/googleads/v1/enums/served_asset_field_type.proto new file mode 100644 index 000000000..c1d2ee9b8 --- /dev/null +++ b/google/ads/googleads/v1/enums/served_asset_field_type.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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "ServedAssetFieldTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/shared_set_status.proto b/google/ads/googleads/v1/enums/shared_set_status.proto new file mode 100644 index 000000000..42b90ea8f --- /dev/null +++ b/google/ads/googleads/v1/enums/shared_set_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/shared_set_type.proto b/google/ads/googleads/v1/enums/shared_set_type.proto new file mode 100644 index 000000000..61f8aafaa --- /dev/null +++ b/google/ads/googleads/v1/enums/shared_set_type.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/simulation_modification_method.proto b/google/ads/googleads/v1/enums/simulation_modification_method.proto new file mode 100644 index 000000000..308e6b29f --- /dev/null +++ b/google/ads/googleads/v1/enums/simulation_modification_method.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SimulationModificationMethodProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/simulation_type.proto b/google/ads/googleads/v1/enums/simulation_type.proto new file mode 100644 index 000000000..d0d7bcb4d --- /dev/null +++ b/google/ads/googleads/v1/enums/simulation_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SimulationTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto new file mode 100644 index 000000000..644464bb8 --- /dev/null +++ b/google/ads/googleads/v1/enums/sitelink_placeholder_field.proto @@ -0,0 +1,68 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SitelinkPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/slot.proto b/google/ads/googleads/v1/enums/slot.proto new file mode 100644 index 000000000..a2a1fff27 --- /dev/null +++ b/google/ads/googleads/v1/enums/slot.proto @@ -0,0 +1,64 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SlotProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/spending_limit_type.proto b/google/ads/googleads/v1/enums/spending_limit_type.proto new file mode 100644 index 000000000..5d36236a6 --- /dev/null +++ b/google/ads/googleads/v1/enums/spending_limit_type.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SpendingLimitTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.proto new file mode 100644 index 000000000..4ed19963d --- /dev/null +++ b/google/ads/googleads/v1/enums/structured_snippet_placeholder_field.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "StructuredSnippetPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 one of the predefined structured snippets headers exactly. + // See + // 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/v1/enums/system_managed_entity_source.proto b/google/ads/googleads/v1/enums/system_managed_entity_source.proto new file mode 100644 index 000000000..36732a588 --- /dev/null +++ b/google/ads/googleads/v1/enums/system_managed_entity_source.proto @@ -0,0 +1,46 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "SystemManagedEntitySourceProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto new file mode 100644 index 000000000..6c3506a60 --- /dev/null +++ b/google/ads/googleads/v1/enums/target_cpa_opt_in_recommendation_goal.proto @@ -0,0 +1,56 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetCpaOptInRecommendationGoalProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/target_impression_share_location.proto b/google/ads/googleads/v1/enums/target_impression_share_location.proto new file mode 100644 index 000000000..f29cd4394 --- /dev/null +++ b/google/ads/googleads/v1/enums/target_impression_share_location.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetImpressionShareLocationProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/targeting_dimension.proto b/google/ads/googleads/v1/enums/targeting_dimension.proto new file mode 100644 index 000000000..5263e2cef --- /dev/null +++ b/google/ads/googleads/v1/enums/targeting_dimension.proto @@ -0,0 +1,73 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TargetingDimensionProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/time_type.proto b/google/ads/googleads/v1/enums/time_type.proto new file mode 100644 index 000000000..fa462f1f9 --- /dev/null +++ b/google/ads/googleads/v1/enums/time_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TimeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/tracking_code_page_format.proto b/google/ads/googleads/v1/enums/tracking_code_page_format.proto new file mode 100644 index 000000000..8991c7c9f --- /dev/null +++ b/google/ads/googleads/v1/enums/tracking_code_page_format.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TrackingCodePageFormatProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/tracking_code_type.proto b/google/ads/googleads/v1/enums/tracking_code_type.proto new file mode 100644 index 000000000..af214ec10 --- /dev/null +++ b/google/ads/googleads/v1/enums/tracking_code_type.proto @@ -0,0 +1,54 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TrackingCodeTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/enums/travel_placeholder_field.proto b/google/ads/googleads/v1/enums/travel_placeholder_field.proto new file mode 100644 index 000000000..708f063f6 --- /dev/null +++ b/google/ads/googleads/v1/enums/travel_placeholder_field.proto @@ -0,0 +1,127 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "TravelPlaceholderFieldProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.proto new file mode 100644 index 000000000..b66e485fd --- /dev/null +++ b/google/ads/googleads/v1/enums/user_interest_taxonomy_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestTaxonomyTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_access_status.proto b/google/ads/googleads/v1/enums/user_list_access_status.proto new file mode 100644 index 000000000..3ee9c9138 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_access_status.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListAccessStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_closing_reason.proto b/google/ads/googleads/v1/enums/user_list_closing_reason.proto new file mode 100644 index 000000000..9e9293a86 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_closing_reason.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListClosingReasonProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto new file mode 100644 index 000000000..a3699f81f --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_combined_rule_operator.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListCombinedRuleOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.proto new file mode 100644 index 000000000..cdaf25341 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_crm_data_source_type.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListCrmDataSourceTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.proto new file mode 100644 index 000000000..043b55be3 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_date_rule_item_operator.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListDateRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.proto new file mode 100644 index 000000000..c08003d32 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_logical_rule_operator.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListLogicalRuleOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_membership_status.proto b/google/ads/googleads/v1/enums/user_list_membership_status.proto new file mode 100644 index 000000000..6b6001b13 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_membership_status.proto @@ -0,0 +1,51 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListMembershipStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto new file mode 100644 index 000000000..3b91468ac --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_number_rule_item_operator.proto @@ -0,0 +1,59 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListNumberRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v1/enums/user_list_prepopulation_status.proto new file mode 100644 index 000000000..290e6f8a8 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_prepopulation_status.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListPrepopulationStatusProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_rule_type.proto b/google/ads/googleads/v1/enums/user_list_rule_type.proto new file mode 100644 index 000000000..6444d4d97 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_rule_type.proto @@ -0,0 +1,47 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListRuleTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_size_range.proto b/google/ads/googleads/v1/enums/user_list_size_range.proto new file mode 100644 index 000000000..03d663fdb --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_size_range.proto @@ -0,0 +1,91 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListSizeRangeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto new file mode 100644 index 000000000..e6d16c11a --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_string_rule_item_operator.proto @@ -0,0 +1,65 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListStringRuleItemOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/user_list_type.proto b/google/ads/googleads/v1/enums/user_list_type.proto new file mode 100644 index 000000000..ba9f95b00 --- /dev/null +++ b/google/ads/googleads/v1/enums/user_list_type.proto @@ -0,0 +1,62 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "UserListTypeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto new file mode 100644 index 000000000..46d4ec076 --- /dev/null +++ b/google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto @@ -0,0 +1,49 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "VanityPharmaDisplayUrlModeProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/vanity_pharma_text.proto b/google/ads/googleads/v1/enums/vanity_pharma_text.proto new file mode 100644 index 000000000..bcddf820d --- /dev/null +++ b/google/ads/googleads/v1/enums/vanity_pharma_text.proto @@ -0,0 +1,86 @@ +// 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.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "VanityPharmaTextProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/webpage_condition_operand.proto b/google/ads/googleads/v1/enums/webpage_condition_operand.proto new file mode 100644 index 000000000..8910e27e0 --- /dev/null +++ b/google/ads/googleads/v1/enums/webpage_condition_operand.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "WebpageConditionOperandProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/enums/webpage_condition_operator.proto b/google/ads/googleads/v1/enums/webpage_condition_operator.proto new file mode 100644 index 000000000..41a70fb50 --- /dev/null +++ b/google/ads/googleads/v1/enums/webpage_condition_operator.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.ads.googleads.v1.enums; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Enums"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/enums;enums"; +option java_multiple_files = true; +option java_outer_classname = "WebpageConditionOperatorProto"; +option java_package = "com.google.ads.googleads.v1.enums"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Enums"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/account_budget_proposal_error.proto b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto new file mode 100644 index 000000000..9d7ff7b80 --- /dev/null +++ b/google/ads/googleads/v1/errors/account_budget_proposal_error.proto @@ -0,0 +1,113 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/ad_customizer_error.proto b/google/ads/googleads/v1/errors/ad_customizer_error.proto new file mode 100644 index 000000000..6b0bfc910 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_customizer_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdCustomizerErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_error.proto b/google/ads/googleads/v1/errors/ad_error.proto new file mode 100644 index 000000000..3fa72c514 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_error.proto @@ -0,0 +1,453 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/ad_group_ad_error.proto b/google/ads/googleads/v1/errors/ad_group_ad_error.proto new file mode 100644 index 000000000..5e60f6310 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_group_ad_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto new file mode 100644 index 000000000..19a30b48b --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_group_bid_modifier_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_group_criterion_error.proto b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto new file mode 100644 index 000000000..151d3f6f6 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_group_criterion_error.proto @@ -0,0 +1,164 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_group_error.proto b/google/ads/googleads/v1/errors/ad_group_error.proto new file mode 100644 index 000000000..d755ca67f --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_group_error.proto @@ -0,0 +1,82 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/ad_group_feed_error.proto b/google/ads/googleads/v1/errors/ad_group_feed_error.proto new file mode 100644 index 000000000..85781dff8 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_group_feed_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_parameter_error.proto b/google/ads/googleads/v1/errors/ad_parameter_error.proto new file mode 100644 index 000000000..f4eeac966 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_parameter_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/ad_sharing_error.proto b/google/ads/googleads/v1/errors/ad_sharing_error.proto new file mode 100644 index 000000000..8e0c66ac3 --- /dev/null +++ b/google/ads/googleads/v1/errors/ad_sharing_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdSharingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/adx_error.proto b/google/ads/googleads/v1/errors/adx_error.proto new file mode 100644 index 000000000..ee1613044 --- /dev/null +++ b/google/ads/googleads/v1/errors/adx_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdxErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/asset_error.proto b/google/ads/googleads/v1/errors/asset_error.proto new file mode 100644 index 000000000..dcdb4deeb --- /dev/null +++ b/google/ads/googleads/v1/errors/asset_error.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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AssetErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/authentication_error.proto b/google/ads/googleads/v1/errors/authentication_error.proto new file mode 100644 index 000000000..093322abb --- /dev/null +++ b/google/ads/googleads/v1/errors/authentication_error.proto @@ -0,0 +1,102 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AuthenticationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/authorization_error.proto b/google/ads/googleads/v1/errors/authorization_error.proto new file mode 100644 index 000000000..8eecb446a --- /dev/null +++ b/google/ads/googleads/v1/errors/authorization_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AuthorizationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. See + // https://developers.google.com/google-ads/api/docs/concepts/ + // call-structure#login-customer-id + 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; + } +} diff --git a/google/ads/googleads/v1/errors/bidding_error.proto b/google/ads/googleads/v1/errors/bidding_error.proto new file mode 100644 index 000000000..84789fe55 --- /dev/null +++ b/google/ads/googleads/v1/errors/bidding_error.proto @@ -0,0 +1,118 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "BiddingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/bidding_strategy_error.proto b/google/ads/googleads/v1/errors/bidding_strategy_error.proto new file mode 100644 index 000000000..8489fb4fa --- /dev/null +++ b/google/ads/googleads/v1/errors/bidding_strategy_error.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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/billing_setup_error.proto b/google/ads/googleads/v1/errors/billing_setup_error.proto new file mode 100644 index 000000000..4298be4c3 --- /dev/null +++ b/google/ads/googleads/v1/errors/billing_setup_error.proto @@ -0,0 +1,100 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 use 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, ie. a billing known to Payments. + 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; + + // Billing Setup creation failed because Payments could not find the + // requested Payments profile. + PAYMENTS_PROFILE_NOT_FOUND = 13; + + // Billing Setup creation failed because Payments could not find the + // requested Payments account. + PAYMENTS_ACCOUNT_NOT_FOUND = 14; + + // Billing Setup creation failed because Payments considers requested + // Payments profile ineligible. + PAYMENTS_PROFILE_INELIGIBLE = 15; + + // Billing Setup creation failed because Payments considers requested + // Payments account ineligible. + PAYMENTS_ACCOUNT_INELIGIBLE = 16; + } +} diff --git a/google/ads/googleads/v1/errors/campaign_budget_error.proto b/google/ads/googleads/v1/errors/campaign_budget_error.proto new file mode 100644 index 000000000..b4faaf74f --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_budget_error.proto @@ -0,0 +1,93 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/campaign_criterion_error.proto b/google/ads/googleads/v1/errors/campaign_criterion_error.proto new file mode 100644 index 000000000..98a955f2d --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_criterion_error.proto @@ -0,0 +1,80 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/campaign_draft_error.proto b/google/ads/googleads/v1/errors/campaign_draft_error.proto new file mode 100644 index 000000000..0835a9d58 --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_draft_error.proto @@ -0,0 +1,80 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/campaign_error.proto b/google/ads/googleads/v1/errors/campaign_error.proto new file mode 100644 index 000000000..16c759fb6 --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_error.proto @@ -0,0 +1,174 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. An 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; + + // A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a + // UniversalAppCampaignSetting specified. + MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30; + + // 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; + } +} diff --git a/google/ads/googleads/v1/errors/campaign_experiment_error.proto b/google/ads/googleads/v1/errors/campaign_experiment_error.proto new file mode 100644 index 000000000..c2f38cf3e --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_experiment_error.proto @@ -0,0 +1,82 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/campaign_feed_error.proto b/google/ads/googleads/v1/errors/campaign_feed_error.proto new file mode 100644 index 000000000..a918de901 --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_feed_error.proto @@ -0,0 +1,62 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/campaign_shared_set_error.proto b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto new file mode 100644 index 000000000..f6572032a --- /dev/null +++ b/google/ads/googleads/v1/errors/campaign_shared_set_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/change_status_error.proto b/google/ads/googleads/v1/errors/change_status_error.proto new file mode 100644 index 000000000..9c76488f6 --- /dev/null +++ b/google/ads/googleads/v1/errors/change_status_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/collection_size_error.proto b/google/ads/googleads/v1/errors/collection_size_error.proto new file mode 100644 index 000000000..ea8746124 --- /dev/null +++ b/google/ads/googleads/v1/errors/collection_size_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CollectionSizeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/context_error.proto b/google/ads/googleads/v1/errors/context_error.proto new file mode 100644 index 000000000..49a4fccbd --- /dev/null +++ b/google/ads/googleads/v1/errors/context_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ContextErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/conversion_action_error.proto b/google/ads/googleads/v1/errors/conversion_action_error.proto new file mode 100644 index 000000000..f35075317 --- /dev/null +++ b/google/ads/googleads/v1/errors/conversion_action_error.proto @@ -0,0 +1,74 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto new file mode 100644 index 000000000..1de28be1c --- /dev/null +++ b/google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto @@ -0,0 +1,79 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentUploadErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/conversion_upload_error.proto b/google/ads/googleads/v1/errors/conversion_upload_error.proto new file mode 100644 index 000000000..8d8f53382 --- /dev/null +++ b/google/ads/googleads/v1/errors/conversion_upload_error.proto @@ -0,0 +1,131 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionUploadErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 24 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 24 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/v1/errors/country_code_error.proto b/google/ads/googleads/v1/errors/country_code_error.proto new file mode 100644 index 000000000..18122a07c --- /dev/null +++ b/google/ads/googleads/v1/errors/country_code_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CountryCodeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/criterion_error.proto b/google/ads/googleads/v1/errors/criterion_error.proto new file mode 100644 index 000000000..a471293af --- /dev/null +++ b/google/ads/googleads/v1/errors/criterion_error.proto @@ -0,0 +1,368 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CriterionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/custom_interest_error.proto b/google/ads/googleads/v1/errors/custom_interest_error.proto new file mode 100644 index 000000000..61664befc --- /dev/null +++ b/google/ads/googleads/v1/errors/custom_interest_error.proto @@ -0,0 +1,65 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/customer_client_link_error.proto b/google/ads/googleads/v1/errors/customer_client_link_error.proto new file mode 100644 index 000000000..8c360ab56 --- /dev/null +++ b/google/ads/googleads/v1/errors/customer_client_link_error.proto @@ -0,0 +1,64 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/customer_error.proto b/google/ads/googleads/v1/errors/customer_error.proto new file mode 100644 index 000000000..f694c8877 --- /dev/null +++ b/google/ads/googleads/v1/errors/customer_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::Errors"; + +// Container for enum describing possible customer errors. +message CustomerErrorEnum { + // Set of errors that are related to requests dealing with Customer. + // Next id: 26 + 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/v1/errors/customer_feed_error.proto b/google/ads/googleads/v1/errors/customer_feed_error.proto new file mode 100644 index 000000000..aaefc25ea --- /dev/null +++ b/google/ads/googleads/v1/errors/customer_feed_error.proto @@ -0,0 +1,65 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/customer_manager_link_error.proto b/google/ads/googleads/v1/errors/customer_manager_link_error.proto new file mode 100644 index 000000000..bb8487ce2 --- /dev/null +++ b/google/ads/googleads/v1/errors/customer_manager_link_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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/database_error.proto b/google/ads/googleads/v1/errors/database_error.proto new file mode 100644 index 000000000..18438fa9a --- /dev/null +++ b/google/ads/googleads/v1/errors/database_error.proto @@ -0,0 +1,47 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "DatabaseErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/date_error.proto b/google/ads/googleads/v1/errors/date_error.proto new file mode 100644 index 000000000..a7848ffdd --- /dev/null +++ b/google/ads/googleads/v1/errors/date_error.proto @@ -0,0 +1,73 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "DateErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/date_range_error.proto b/google/ads/googleads/v1/errors/date_range_error.proto new file mode 100644 index 000000000..96b91891b --- /dev/null +++ b/google/ads/googleads/v1/errors/date_range_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "DateRangeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/distinct_error.proto b/google/ads/googleads/v1/errors/distinct_error.proto new file mode 100644 index 000000000..d715d500a --- /dev/null +++ b/google/ads/googleads/v1/errors/distinct_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "DistinctErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/enum_error.proto b/google/ads/googleads/v1/errors/enum_error.proto new file mode 100644 index 000000000..650d39811 --- /dev/null +++ b/google/ads/googleads/v1/errors/enum_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "EnumErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/errors.proto b/google/ads/googleads/v1/errors/errors.proto new file mode 100644 index 000000000..34aa4e188 --- /dev/null +++ b/google/ads/googleads/v1/errors/errors.proto @@ -0,0 +1,556 @@ +// 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.v1.errors; + +import "google/ads/googleads/v1/common/policy.proto"; +import "google/ads/googleads/v1/common/value.proto"; +import "google/ads/googleads/v1/errors/account_budget_proposal_error.proto"; +import "google/ads/googleads/v1/errors/ad_customizer_error.proto"; +import "google/ads/googleads/v1/errors/ad_error.proto"; +import "google/ads/googleads/v1/errors/ad_group_ad_error.proto"; +import "google/ads/googleads/v1/errors/ad_group_bid_modifier_error.proto"; +import "google/ads/googleads/v1/errors/ad_group_criterion_error.proto"; +import "google/ads/googleads/v1/errors/ad_group_error.proto"; +import "google/ads/googleads/v1/errors/ad_group_feed_error.proto"; +import "google/ads/googleads/v1/errors/ad_parameter_error.proto"; +import "google/ads/googleads/v1/errors/ad_sharing_error.proto"; +import "google/ads/googleads/v1/errors/adx_error.proto"; +import "google/ads/googleads/v1/errors/asset_error.proto"; +import "google/ads/googleads/v1/errors/authentication_error.proto"; +import "google/ads/googleads/v1/errors/authorization_error.proto"; +import "google/ads/googleads/v1/errors/bidding_error.proto"; +import "google/ads/googleads/v1/errors/bidding_strategy_error.proto"; +import "google/ads/googleads/v1/errors/billing_setup_error.proto"; +import "google/ads/googleads/v1/errors/campaign_budget_error.proto"; +import "google/ads/googleads/v1/errors/campaign_criterion_error.proto"; +import "google/ads/googleads/v1/errors/campaign_draft_error.proto"; +import "google/ads/googleads/v1/errors/campaign_error.proto"; +import "google/ads/googleads/v1/errors/campaign_experiment_error.proto"; +import "google/ads/googleads/v1/errors/campaign_feed_error.proto"; +import "google/ads/googleads/v1/errors/campaign_shared_set_error.proto"; +import "google/ads/googleads/v1/errors/change_status_error.proto"; +import "google/ads/googleads/v1/errors/collection_size_error.proto"; +import "google/ads/googleads/v1/errors/context_error.proto"; +import "google/ads/googleads/v1/errors/conversion_action_error.proto"; +import "google/ads/googleads/v1/errors/conversion_adjustment_upload_error.proto"; +import "google/ads/googleads/v1/errors/conversion_upload_error.proto"; +import "google/ads/googleads/v1/errors/country_code_error.proto"; +import "google/ads/googleads/v1/errors/criterion_error.proto"; +import "google/ads/googleads/v1/errors/custom_interest_error.proto"; +import "google/ads/googleads/v1/errors/customer_client_link_error.proto"; +import "google/ads/googleads/v1/errors/customer_error.proto"; +import "google/ads/googleads/v1/errors/customer_feed_error.proto"; +import "google/ads/googleads/v1/errors/customer_manager_link_error.proto"; +import "google/ads/googleads/v1/errors/database_error.proto"; +import "google/ads/googleads/v1/errors/date_error.proto"; +import "google/ads/googleads/v1/errors/date_range_error.proto"; +import "google/ads/googleads/v1/errors/distinct_error.proto"; +import "google/ads/googleads/v1/errors/enum_error.proto"; +import "google/ads/googleads/v1/errors/extension_feed_item_error.proto"; +import "google/ads/googleads/v1/errors/extension_setting_error.proto"; +import "google/ads/googleads/v1/errors/feed_attribute_reference_error.proto"; +import "google/ads/googleads/v1/errors/feed_error.proto"; +import "google/ads/googleads/v1/errors/feed_item_error.proto"; +import "google/ads/googleads/v1/errors/feed_item_target_error.proto"; +import "google/ads/googleads/v1/errors/feed_item_validation_error.proto"; +import "google/ads/googleads/v1/errors/feed_mapping_error.proto"; +import "google/ads/googleads/v1/errors/field_error.proto"; +import "google/ads/googleads/v1/errors/field_mask_error.proto"; +import "google/ads/googleads/v1/errors/function_error.proto"; +import "google/ads/googleads/v1/errors/function_parsing_error.proto"; +import "google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto"; +import "google/ads/googleads/v1/errors/header_error.proto"; +import "google/ads/googleads/v1/errors/id_error.proto"; +import "google/ads/googleads/v1/errors/image_error.proto"; +import "google/ads/googleads/v1/errors/internal_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_ad_group_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_idea_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto"; +import "google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto"; +import "google/ads/googleads/v1/errors/label_error.proto"; +import "google/ads/googleads/v1/errors/language_code_error.proto"; +import "google/ads/googleads/v1/errors/list_operation_error.proto"; +import "google/ads/googleads/v1/errors/manager_link_error.proto"; +import "google/ads/googleads/v1/errors/media_bundle_error.proto"; +import "google/ads/googleads/v1/errors/media_file_error.proto"; +import "google/ads/googleads/v1/errors/media_upload_error.proto"; +import "google/ads/googleads/v1/errors/multiplier_error.proto"; +import "google/ads/googleads/v1/errors/mutate_error.proto"; +import "google/ads/googleads/v1/errors/mutate_job_error.proto"; +import "google/ads/googleads/v1/errors/new_resource_creation_error.proto"; +import "google/ads/googleads/v1/errors/not_empty_error.proto"; +import "google/ads/googleads/v1/errors/not_whitelisted_error.proto"; +import "google/ads/googleads/v1/errors/null_error.proto"; +import "google/ads/googleads/v1/errors/operation_access_denied_error.proto"; +import "google/ads/googleads/v1/errors/operator_error.proto"; +import "google/ads/googleads/v1/errors/partial_failure_error.proto"; +import "google/ads/googleads/v1/errors/policy_finding_error.proto"; +import "google/ads/googleads/v1/errors/policy_validation_parameter_error.proto"; +import "google/ads/googleads/v1/errors/policy_violation_error.proto"; +import "google/ads/googleads/v1/errors/query_error.proto"; +import "google/ads/googleads/v1/errors/quota_error.proto"; +import "google/ads/googleads/v1/errors/range_error.proto"; +import "google/ads/googleads/v1/errors/recommendation_error.proto"; +import "google/ads/googleads/v1/errors/region_code_error.proto"; +import "google/ads/googleads/v1/errors/request_error.proto"; +import "google/ads/googleads/v1/errors/resource_access_denied_error.proto"; +import "google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto"; +import "google/ads/googleads/v1/errors/setting_error.proto"; +import "google/ads/googleads/v1/errors/shared_criterion_error.proto"; +import "google/ads/googleads/v1/errors/shared_set_error.proto"; +import "google/ads/googleads/v1/errors/size_limit_error.proto"; +import "google/ads/googleads/v1/errors/string_format_error.proto"; +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"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Errors"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/errors;errors"; +option java_multiple_files = true; +option java_outer_classname = "ErrorsProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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.v1.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 not whitelisted error + NotWhitelistedErrorEnum.NotWhitelistedError not_whitelisted_error = 120; + + // The reasons for the manager link error + ManagerLinkErrorEnum.ManagerLinkError manager_link_error = 121; + } +} + +// 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.v1.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.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 new file mode 100644 index 000000000..9ab38917f --- /dev/null +++ b/google/ads/googleads/v1/errors/extension_feed_item_error.proto @@ -0,0 +1,187 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/extension_setting_error.proto b/google/ads/googleads/v1/errors/extension_setting_error.proto new file mode 100644 index 000000000..2883c1a09 --- /dev/null +++ b/google/ads/googleads/v1/errors/extension_setting_error.proto @@ -0,0 +1,256 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionSettingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v1/errors/feed_attribute_reference_error.proto new file mode 100644 index 000000000..e3be51cee --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_attribute_reference_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedAttributeReferenceErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/feed_error.proto b/google/ads/googleads/v1/errors/feed_error.proto new file mode 100644 index 000000000..d58b2e251 --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_error.proto @@ -0,0 +1,104 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/feed_item_error.proto b/google/ads/googleads/v1/errors/feed_item_error.proto new file mode 100644 index 000000000..d2e1d43a2 --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_item_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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/feed_item_target_error.proto b/google/ads/googleads/v1/errors/feed_item_target_error.proto new file mode 100644 index 000000000..ae72ec2a5 --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_item_target_error.proto @@ -0,0 +1,63 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/feed_item_validation_error.proto b/google/ads/googleads/v1/errors/feed_item_validation_error.proto new file mode 100644 index 000000000..c8d2eb965 --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_item_validation_error.proto @@ -0,0 +1,346 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemValidationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/feed_mapping_error.proto b/google/ads/googleads/v1/errors/feed_mapping_error.proto new file mode 100644 index 000000000..7084bd5fd --- /dev/null +++ b/google/ads/googleads/v1/errors/feed_mapping_error.proto @@ -0,0 +1,96 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/field_error.proto b/google/ads/googleads/v1/errors/field_error.proto new file mode 100644 index 000000000..5d60fdfd7 --- /dev/null +++ b/google/ads/googleads/v1/errors/field_error.proto @@ -0,0 +1,64 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FieldErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/field_mask_error.proto b/google/ads/googleads/v1/errors/field_mask_error.proto new file mode 100644 index 000000000..e07334b16 --- /dev/null +++ b/google/ads/googleads/v1/errors/field_mask_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FieldMaskErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/function_error.proto b/google/ads/googleads/v1/errors/function_error.proto new file mode 100644 index 000000000..4d726d5b5 --- /dev/null +++ b/google/ads/googleads/v1/errors/function_error.proto @@ -0,0 +1,92 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FunctionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/function_parsing_error.proto b/google/ads/googleads/v1/errors/function_parsing_error.proto new file mode 100644 index 000000000..ad3e1fc0f --- /dev/null +++ b/google/ads/googleads/v1/errors/function_parsing_error.proto @@ -0,0 +1,76 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "FunctionParsingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.proto new file mode 100644 index 000000000..5af9e7408 --- /dev/null +++ b/google/ads/googleads/v1/errors/geo_target_constant_suggestion_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantSuggestionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/header_error.proto b/google/ads/googleads/v1/errors/header_error.proto new file mode 100644 index 000000000..a3c7e5a7f --- /dev/null +++ b/google/ads/googleads/v1/errors/header_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "HeaderErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/id_error.proto b/google/ads/googleads/v1/errors/id_error.proto new file mode 100644 index 000000000..2a5a4e7f5 --- /dev/null +++ b/google/ads/googleads/v1/errors/id_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "IdErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/image_error.proto b/google/ads/googleads/v1/errors/image_error.proto new file mode 100644 index 000000000..d58e7da83 --- /dev/null +++ b/google/ads/googleads/v1/errors/image_error.proto @@ -0,0 +1,155 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ImageErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/internal_error.proto b/google/ads/googleads/v1/errors/internal_error.proto new file mode 100644 index 000000000..ae89eaf9a --- /dev/null +++ b/google/ads/googleads/v1/errors/internal_error.proto @@ -0,0 +1,54 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "InternalErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 any API version. This will be + // fixed by adding a new error code as soon as possible. + 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 new file mode 100644 index 000000000..1bf241a6f --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_ad_group_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.proto new file mode 100644 index 000000000..a91299d66 --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_campaign_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/keyword_plan_error.proto b/google/ads/googleads/v1/errors/keyword_plan_error.proto new file mode 100644 index 000000000..7031f745d --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_error.proto @@ -0,0 +1,90 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto new file mode 100644 index 000000000..351eae94e --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_idea_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanIdeaErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto new file mode 100644 index 000000000..85afa96e2 --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_keyword_error.proto @@ -0,0 +1,64 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.proto new file mode 100644 index 000000000..840b2d6d4 --- /dev/null +++ b/google/ads/googleads/v1/errors/keyword_plan_negative_keyword_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/label_error.proto b/google/ads/googleads/v1/errors/label_error.proto new file mode 100644 index 000000000..9085f847b --- /dev/null +++ b/google/ads/googleads/v1/errors/label_error.proto @@ -0,0 +1,72 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "LabelErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/language_code_error.proto b/google/ads/googleads/v1/errors/language_code_error.proto new file mode 100644 index 000000000..fb861c621 --- /dev/null +++ b/google/ads/googleads/v1/errors/language_code_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "LanguageCodeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/list_operation_error.proto b/google/ads/googleads/v1/errors/list_operation_error.proto new file mode 100644 index 000000000..3525c7fe8 --- /dev/null +++ b/google/ads/googleads/v1/errors/list_operation_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ListOperationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/manager_link_error.proto b/google/ads/googleads/v1/errors/manager_link_error.proto new file mode 100644 index 000000000..67494823a --- /dev/null +++ b/google/ads/googleads/v1/errors/manager_link_error.proto @@ -0,0 +1,88 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ManagerLinkErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } + + +} diff --git a/google/ads/googleads/v1/errors/media_bundle_error.proto b/google/ads/googleads/v1/errors/media_bundle_error.proto new file mode 100644 index 000000000..e04d3e8a9 --- /dev/null +++ b/google/ads/googleads/v1/errors/media_bundle_error.proto @@ -0,0 +1,109 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MediaBundleErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/media_file_error.proto b/google/ads/googleads/v1/errors/media_file_error.proto new file mode 100644 index 000000000..ed906596c --- /dev/null +++ b/google/ads/googleads/v1/errors/media_file_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/media_upload_error.proto b/google/ads/googleads/v1/errors/media_upload_error.proto new file mode 100644 index 000000000..66edf6197 --- /dev/null +++ b/google/ads/googleads/v1/errors/media_upload_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MediaUploadErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/multiplier_error.proto b/google/ads/googleads/v1/errors/multiplier_error.proto new file mode 100644 index 000000000..845e71c1b --- /dev/null +++ b/google/ads/googleads/v1/errors/multiplier_error.proto @@ -0,0 +1,80 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MultiplierErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/mutate_error.proto b/google/ads/googleads/v1/errors/mutate_error.proto new file mode 100644 index 000000000..42f828faa --- /dev/null +++ b/google/ads/googleads/v1/errors/mutate_error.proto @@ -0,0 +1,62 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MutateErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/mutate_job_error.proto b/google/ads/googleads/v1/errors/mutate_job_error.proto new file mode 100644 index 000000000..14ef13771 --- /dev/null +++ b/google/ads/googleads/v1/errors/mutate_job_error.proto @@ -0,0 +1,59 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/new_resource_creation_error.proto b/google/ads/googleads/v1/errors/new_resource_creation_error.proto new file mode 100644 index 000000000..216c86711 --- /dev/null +++ b/google/ads/googleads/v1/errors/new_resource_creation_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "NewResourceCreationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/not_empty_error.proto b/google/ads/googleads/v1/errors/not_empty_error.proto new file mode 100644 index 000000000..c87622e3c --- /dev/null +++ b/google/ads/googleads/v1/errors/not_empty_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "NotEmptyErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/not_whitelisted_error.proto b/google/ads/googleads/v1/errors/not_whitelisted_error.proto new file mode 100644 index 000000000..256efb2b9 --- /dev/null +++ b/google/ads/googleads/v1/errors/not_whitelisted_error.proto @@ -0,0 +1,48 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "NotWhitelistedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/null_error.proto b/google/ads/googleads/v1/errors/null_error.proto new file mode 100644 index 000000000..2c70a688d --- /dev/null +++ b/google/ads/googleads/v1/errors/null_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "NullErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/operation_access_denied_error.proto b/google/ads/googleads/v1/errors/operation_access_denied_error.proto new file mode 100644 index 000000000..329e87767 --- /dev/null +++ b/google/ads/googleads/v1/errors/operation_access_denied_error.proto @@ -0,0 +1,73 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "OperationAccessDeniedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/operator_error.proto b/google/ads/googleads/v1/errors/operator_error.proto new file mode 100644 index 000000000..2d037a492 --- /dev/null +++ b/google/ads/googleads/v1/errors/operator_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "OperatorErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/partial_failure_error.proto b/google/ads/googleads/v1/errors/partial_failure_error.proto new file mode 100644 index 000000000..ca61292a8 --- /dev/null +++ b/google/ads/googleads/v1/errors/partial_failure_error.proto @@ -0,0 +1,47 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "PartialFailureErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/policy_finding_error.proto b/google/ads/googleads/v1/errors/policy_finding_error.proto new file mode 100644 index 000000000..ea5710d48 --- /dev/null +++ b/google/ads/googleads/v1/errors/policy_finding_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "PolicyFindingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto new file mode 100644 index 000000000..3bb919ee9 --- /dev/null +++ b/google/ads/googleads/v1/errors/policy_validation_parameter_error.proto @@ -0,0 +1,54 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "PolicyValidationParameterErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/policy_violation_error.proto b/google/ads/googleads/v1/errors/policy_violation_error.proto new file mode 100644 index 000000000..2b112ffdb --- /dev/null +++ b/google/ads/googleads/v1/errors/policy_violation_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "PolicyViolationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/query_error.proto b/google/ads/googleads/v1/errors/query_error.proto new file mode 100644 index 000000000..35b080fbd --- /dev/null +++ b/google/ads/googleads/v1/errors/query_error.proto @@ -0,0 +1,213 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "QueryErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // 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/v1/errors/quota_error.proto b/google/ads/googleads/v1/errors/quota_error.proto new file mode 100644 index 000000000..71943834a --- /dev/null +++ b/google/ads/googleads/v1/errors/quota_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "QuotaErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/range_error.proto b/google/ads/googleads/v1/errors/range_error.proto new file mode 100644 index 000000000..affa14d97 --- /dev/null +++ b/google/ads/googleads/v1/errors/range_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "RangeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/recommendation_error.proto b/google/ads/googleads/v1/errors/recommendation_error.proto new file mode 100644 index 000000000..20294dfc9 --- /dev/null +++ b/google/ads/googleads/v1/errors/recommendation_error.proto @@ -0,0 +1,89 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/region_code_error.proto b/google/ads/googleads/v1/errors/region_code_error.proto new file mode 100644 index 000000000..712b66215 --- /dev/null +++ b/google/ads/googleads/v1/errors/region_code_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "RegionCodeErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/request_error.proto b/google/ads/googleads/v1/errors/request_error.proto new file mode 100644 index 000000000..50f103973 --- /dev/null +++ b/google/ads/googleads/v1/errors/request_error.proto @@ -0,0 +1,100 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "RequestErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/resource_access_denied_error.proto b/google/ads/googleads/v1/errors/resource_access_denied_error.proto new file mode 100644 index 000000000..0cf38bdb0 --- /dev/null +++ b/google/ads/googleads/v1/errors/resource_access_denied_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ResourceAccessDeniedErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto new file mode 100644 index 000000000..9a6365699 --- /dev/null +++ b/google/ads/googleads/v1/errors/resource_count_limit_exceeded_error.proto @@ -0,0 +1,87 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ResourceCountLimitExceededErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/errors/setting_error.proto b/google/ads/googleads/v1/errors/setting_error.proto new file mode 100644 index 000000000..23ae8e0c7 --- /dev/null +++ b/google/ads/googleads/v1/errors/setting_error.proto @@ -0,0 +1,106 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "SettingErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // Duplicate description in universal app setting description field. + UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13; + + // Description line width is too long in universal app setting description + // field. + UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14; + + // Universal app setting appId field cannot be modified for COMPLETE + // campaigns. + UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15; + + // YoutubeVideoMediaIds in universal app setting cannot exceed size limit. + TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16; + + // ImageMediaIds in universal app setting cannot exceed size limit. + TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17; + + // Media is incompatible for universal app campaign. + MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18; + + // 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 new file mode 100644 index 000000000..a63ab665e --- /dev/null +++ b/google/ads/googleads/v1/errors/shared_criterion_error.proto @@ -0,0 +1,46 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "SharedCriterionErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/shared_set_error.proto b/google/ads/googleads/v1/errors/shared_set_error.proto new file mode 100644 index 000000000..530753bfd --- /dev/null +++ b/google/ads/googleads/v1/errors/shared_set_error.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.ads.googleads.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/size_limit_error.proto b/google/ads/googleads/v1/errors/size_limit_error.proto new file mode 100644 index 000000000..bf192be97 --- /dev/null +++ b/google/ads/googleads/v1/errors/size_limit_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "SizeLimitErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/string_format_error.proto b/google/ads/googleads/v1/errors/string_format_error.proto new file mode 100644 index 000000000..1e05d7b72 --- /dev/null +++ b/google/ads/googleads/v1/errors/string_format_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "StringFormatErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/string_length_error.proto b/google/ads/googleads/v1/errors/string_length_error.proto new file mode 100644 index 000000000..fba2e6eae --- /dev/null +++ b/google/ads/googleads/v1/errors/string_length_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "StringLengthErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + + // Too short. + TOO_SHORT = 2; + + // 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 new file mode 100644 index 000000000..f1d7203d8 --- /dev/null +++ b/google/ads/googleads/v1/errors/url_field_error.proto @@ -0,0 +1,214 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "UrlFieldErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/user_list_error.proto b/google/ads/googleads/v1/errors/user_list_error.proto new file mode 100644 index 000000000..7b3acb470 --- /dev/null +++ b/google/ads/googleads/v1/errors/user_list_error.proto @@ -0,0 +1,128 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "UserListErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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/v1/errors/youtube_video_registration_error.proto b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto new file mode 100644 index 000000000..1f50b2d9f --- /dev/null +++ b/google/ads/googleads/v1/errors/youtube_video_registration_error.proto @@ -0,0 +1,49 @@ +// 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.v1.errors; + +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"; +option java_multiple_files = true; +option java_outer_classname = "YoutubeVideoRegistrationErrorProto"; +option java_package = "com.google.ads.googleads.v1.errors"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Errors"; +option ruby_package = "Google::Ads::GoogleAds::V1::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; + } +} diff --git a/google/ads/googleads/v1/resources/account_budget.proto b/google/ads/googleads/v1/resources/account_budget.proto new file mode 100644 index 000000000..55125e2d0 --- /dev/null +++ b/google/ads/googleads/v1/resources/account_budget.proto @@ -0,0 +1,241 @@ +// 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.v1.resources; + +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // A pending proposal associated with the enclosing account-level budget, + // if applicable. + message PendingAccountBudgetProposal { + // 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 + // with this proposal. + google.ads.googleads.v1.enums.AccountBudgetProposalTypeEnum + .AccountBudgetProposalType proposal_type = 2; + + // The name to assign to the account-level budget. + google.protobuf.StringValue name = 3; + + // The start time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue start_date_time = 4; + + // A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 9; + + // Notes associated with this budget. + google.protobuf.StringValue notes = 10; + + // 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; + + // 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; + + // The end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 6; + } + + // The spending limit. + oneof spending_limit { + // The spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value spending_limit_micros = 7; + + // The spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType + spending_limit_type = 8; + } + } + + // 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; + + // The ID of the account-level budget. + google.protobuf.Int64Value id = 2; + + // 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; + + // The status of this account-level budget. + google.ads.googleads.v1.enums.AccountBudgetStatusEnum.AccountBudgetStatus + status = 4; + + // The name of the account-level budget. + google.protobuf.StringValue name = 5; + + // 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; + + // 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; + + // The total adjustments amount. + // + // An example of an adjustment is courtesy credits. + google.protobuf.Int64Value total_adjustments_micros = 18; + + // 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; + + // A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 20; + + // Notes associated with the budget. + google.protobuf.StringValue notes = 21; + + // The pending proposal to modify this budget, if applicable. + PendingAccountBudgetProposal pending_proposal = 22; + + // 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; + + // The proposed end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType proposed_end_time_type = + 9; + } + + // 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 { + // The approved end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 10; + + // The approved end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType approved_end_time_type = + 11; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 12; + + // The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType + proposed_spending_limit_type = 13; + } + + // 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 { + // 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; + + // 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; + } + + // 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 { + // 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; + + // 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; + } +} diff --git a/google/ads/googleads/v1/resources/account_budget_proposal.proto b/google/ads/googleads/v1/resources/account_budget_proposal.proto new file mode 100644 index 000000000..00a9f4265 --- /dev/null +++ b/google/ads/googleads/v1/resources/account_budget_proposal.proto @@ -0,0 +1,148 @@ +// 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.v1.resources; + +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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 + // proposal. + google.protobuf.StringValue account_budget = 3; + + // 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; + + // 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; + + // The name to assign to the account-level budget. + google.protobuf.StringValue proposed_name = 5; + + // The approved start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_start_date_time = 20; + + // 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; + + // Notes associated with this budget. + google.protobuf.StringValue proposed_notes = 13; + + // 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; + + // The date time when this account-level budget was approved, if applicable. + google.protobuf.StringValue approval_date_time = 17; + + // 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; + + // 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; + } + + // 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; + + // 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; + } + + // 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; + + // 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; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 10; + + // The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType + proposed_spending_limit_type = 11; + } + + // The approved spending limit. + oneof approved_spending_limit { + // The approved spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value approved_spending_limit_micros = 23; + + // The approved spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v1.enums.SpendingLimitTypeEnum.SpendingLimitType + approved_spending_limit_type = 24; + } +} diff --git a/google/ads/googleads/v1/resources/ad.proto b/google/ads/googleads/v1/resources/ad.proto new file mode 100644 index 000000000..d89cd11e8 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/common/ad_type_infos.proto"; +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/common/final_app_url.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad type. + +// An ad. +message Ad { + // The ID of the ad. + google.protobuf.Int64Value id = 1; + + // 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.v1.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 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; + + // 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; + + // 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; + + // 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.v1.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.v1.common.UrlCollection url_collections = 26; + + // 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; + + // 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; + + // Details pertinent to the ad type. Exactly one value must be set. + oneof ad_data { + // Details pertaining to a text ad. + google.ads.googleads.v1.common.TextAdInfo text_ad = 6; + + // Details pertaining to an expanded text ad. + google.ads.googleads.v1.common.ExpandedTextAdInfo expanded_text_ad = 7; + + // Details pertaining to a call-only ad. + google.ads.googleads.v1.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.v1.common.ExpandedDynamicSearchAdInfo + expanded_dynamic_search_ad = 14; + + // Details pertaining to a hotel ad. + google.ads.googleads.v1.common.HotelAdInfo hotel_ad = 15; + + // Details pertaining to a Smart Shopping 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; + + // Details pertaining to a Gmail ad. + google.ads.googleads.v1.common.GmailAdInfo gmail_ad = 21; + + // Details pertaining to an Image ad. + google.ads.googleads.v1.common.ImageAdInfo image_ad = 22; + + // Details pertaining to a Video 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; + + // Details pertaining to a legacy responsive display ad. + 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; + + // Details pertaining to a responsive display ad. + 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; + + // Details pertaining to an app engagement 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; + } +} diff --git a/google/ads/googleads/v1/resources/ad_group.proto b/google/ads/googleads/v1/resources/ad_group.proto new file mode 100644 index 000000000..c4ad34b33 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group.proto @@ -0,0 +1,154 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/common/explorer_auto_optimizer_setting.proto"; +import "google/ads/googleads/v1/common/targeting_setting.proto"; +import "google/ads/googleads/v1/enums/ad_group_ad_rotation_mode.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group resource. + +// An ad group. +message AdGroup { + // 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; + + // The ID of the ad group. + google.protobuf.Int64Value id = 3; + + // 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.v1.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + + // The type of the ad group. + google.ads.googleads.v1.enums.AdGroupTypeEnum.AdGroupType type = 12; + + // The ad rotation mode of the ad group. + 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 + // 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; + + // 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; + + // The campaign to which the ad group belongs. + google.protobuf.StringValue campaign = 10; + + // 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; + + // The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 17; + + // 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.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; + + // URL template for appending params to Final URL. + google.protobuf.StringValue final_url_suffix = 24; + + // Setting for targeting related features. + google.ads.googleads.v1.common.TargetingSetting targeting_setting = 25; + + // The effective target CPA (cost-per-acquisition). + // This field is read-only. + google.protobuf.Int64Value effective_target_cpa_micros = 28; + + // Source of the effective target CPA. + // This field is read-only. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_target_cpa_source = 29; + + // The effective target ROAS (return-on-ad-spend). + // This field is read-only. + google.protobuf.DoubleValue effective_target_roas = 31; + + // Source of the effective target ROAS. + // This field is read-only. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_target_roas_source = 32; +} diff --git a/google/ads/googleads/v1/resources/ad_group_ad.proto b/google/ads/googleads/v1/resources/ad_group_ad.proto new file mode 100644 index 000000000..67b7886f6 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_ad.proto @@ -0,0 +1,78 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/policy.proto"; +import "google/ads/googleads/v1/enums/ad_group_ad_status.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group ad resource. + +// An ad group ad. +message AdGroupAd { + // 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; + + // 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; + + // The ad. + Ad ad = 5; + + // Policy information for the ad. + AdGroupAdPolicySummary policy_summary = 6; + + // Overall ad strength for this ad group ad. + google.ads.googleads.v1.enums.AdStrengthEnum.AdStrength ad_strength = 7; +} + +// 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; + + // Where in the review process this ad is. + google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus + review_status = 2; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/ad_group_ad_label.proto b/google/ads/googleads/v1/resources/ad_group_ad_label.proto new file mode 100644 index 000000000..aaecc193f --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_ad_label.proto @@ -0,0 +1,46 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdLabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group ad label resource. + +// A relationship between an ad group ad and a label. +message AdGroupAdLabel { + // 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; + + // The ad group ad to which the label is attached. + google.protobuf.StringValue ad_group_ad = 2; + + // The label assigned to the ad group ad. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v1/resources/ad_group_audience_view.proto b/google/ads/googleads/v1/resources/ad_group_audience_view.proto new file mode 100644 index 000000000..6a7e7af98 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_audience_view.proto @@ -0,0 +1,43 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAudienceViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; +} diff --git a/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto new file mode 100644 index 000000000..152c3dfa0 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_bid_modifier.proto @@ -0,0 +1,91 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group bid modifier resource. + +// Represents an ad group bid modifier. +message AdGroupBidModifier { + // 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. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3; + + // 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 + // 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; + + // Bid modifier source. + google.ads.googleads.v1.enums.BidModifierSourceEnum.BidModifierSource + bid_modifier_source = 10; + + // 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; + + // 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; + + // Criterion for length of hotel stay in nights. + google.ads.googleads.v1.common.HotelLengthOfStayInfo hotel_length_of_stay = + 7; + + // Criterion for day of the week the booking is for. + google.ads.googleads.v1.common.HotelCheckInDayInfo hotel_check_in_day = 8; + + // A device criterion. + google.ads.googleads.v1.common.DeviceInfo device = 11; + + // A preferred content criterion. + google.ads.googleads.v1.common.PreferredContentInfo preferred_content = 12; + } +} diff --git a/google/ads/googleads/v1/resources/ad_group_criterion.proto b/google/ads/googleads/v1/resources/ad_group_criterion.proto new file mode 100644 index 000000000..10ef22aba --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_criterion.proto @@ -0,0 +1,253 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/criteria.proto"; +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/enums/ad_group_criterion_approval_status.proto"; +import "google/ads/googleads/v1/enums/ad_group_criterion_status.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group criterion resource. + +// An ad group criterion. +message AdGroupCriterion { + // A container for ad group criterion quality information. + message QualityInfo { + // 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; + + // The performance of the ad compared to other advertisers. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket + creative_quality_score = 2; + + // The quality score of the landing page. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket + post_click_quality_score = 3; + + // The click-through rate compared to that of other advertisers. + google.ads.googleads.v1.enums.QualityScoreBucketEnum.QualityScoreBucket + search_predicted_ctr = 4; + } + + // Estimates for criterion bids at various positions. + message PositionEstimates { + // 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; + + // 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; + + // 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; + + // 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; + + // 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; + } + + // 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. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 26; + + // The status of the criterion. + google.ads.googleads.v1.enums.AdGroupCriterionStatusEnum + .AdGroupCriterionStatus status = 3; + + // Information regarding the quality of the criterion. + QualityInfo quality_info = 4; + + // The ad group to which the criterion belongs. + google.protobuf.StringValue ad_group = 5; + + // The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 25; + + // 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; + + // Serving status of the criterion. + google.ads.googleads.v1.enums.CriterionSystemServingStatusEnum + .CriterionSystemServingStatus system_serving_status = 52; + + // Approval status of the criterion. + google.ads.googleads.v1.enums.AdGroupCriterionApprovalStatusEnum + .AdGroupCriterionApprovalStatus approval_status = 53; + + // 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; + + // The effective CPC (cost-per-click) bid. + google.protobuf.Int64Value effective_cpc_bid_micros = 18; + + // The effective CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value effective_cpm_bid_micros = 19; + + // The effective CPV (cost-per-view) bid. + google.protobuf.Int64Value effective_cpv_bid_micros = 20; + + // The effective Percent CPC bid amount. + google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34; + + // Source of the effective CPC bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_cpc_bid_source = 21; + + // Source of the effective CPM bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_cpm_bid_source = 22; + + // Source of the effective CPV bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_cpv_bid_source = 23; + + // Source of the effective Percent CPC bid. + google.ads.googleads.v1.enums.BiddingSourceEnum.BiddingSource + effective_percent_cpc_bid_source = 35; + + // Estimates for criterion bids at various positions. + PositionEstimates position_estimates = 10; + + // 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.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; + + // Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 28; + + // Mobile app category. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = + 29; + + // Mobile application. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = + 30; + + // Listing group. + google.ads.googleads.v1.common.ListingGroupInfo listing_group = 32; + + // Age range. + google.ads.googleads.v1.common.AgeRangeInfo age_range = 36; + + // Gender. + google.ads.googleads.v1.common.GenderInfo gender = 37; + + // Income range. + google.ads.googleads.v1.common.IncomeRangeInfo income_range = 38; + + // Parental status. + google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 39; + + // User List. + google.ads.googleads.v1.common.UserListInfo user_list = 42; + + // YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 40; + + // YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 41; + + // Topic. + google.ads.googleads.v1.common.TopicInfo topic = 43; + + // User Interest. + google.ads.googleads.v1.common.UserInterestInfo user_interest = 45; + + // Webpage + google.ads.googleads.v1.common.WebpageInfo webpage = 46; + + // App Payment Model. + google.ads.googleads.v1.common.AppPaymentModelInfo app_payment_model = 47; + + // Custom Affinity. + google.ads.googleads.v1.common.CustomAffinityInfo custom_affinity = 48; + + // Custom Intent. + google.ads.googleads.v1.common.CustomIntentInfo custom_intent = 49; + } +} diff --git a/google/ads/googleads/v1/resources/ad_group_criterion_label.proto b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto new file mode 100644 index 000000000..121f6772d --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_criterion_label.proto @@ -0,0 +1,47 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionLabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group criterion label resource. + +// A relationship between an ad group criterion and a label. +message AdGroupCriterionLabel { + // 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; + + // The ad group criterion to which the label is attached. + google.protobuf.StringValue ad_group_criterion = 2; + + // The label assigned to the ad group criterion. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto b/google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto new file mode 100644 index 000000000..e846e635a --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_criterion_simulation.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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionSimulationProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. +// +// SEARCH KEYWORD CPC_BID UNIFORM +message AdGroupCriterionSimulation { + // 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; + + // AdGroup ID of the simulation. + google.protobuf.Int64Value ad_group_id = 2; + + // Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3; + + // The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4; + + // How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum + .SimulationModificationMethod modification_method = 5; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6; + + // Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7; + + // 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; + } +} diff --git a/google/ads/googleads/v1/resources/ad_group_extension_setting.proto b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto new file mode 100644 index 000000000..fef67a91c --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_extension_setting.proto @@ -0,0 +1,65 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the AdGroupExtensionSetting resource. + +// An ad group extension setting. +message AdGroupExtensionSetting { + // 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; + + // The extension type of the ad group extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = + 2; + + // 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; + + // 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; + + // The device for which the extensions will serve. Optional. + 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 new file mode 100644 index 000000000..e1f1601fd --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_feed.proto @@ -0,0 +1,64 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the AdGroupFeed resource. + +// An ad group feed. +message AdGroupFeed { + // 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; + + // The feed being linked to the ad group. + google.protobuf.StringValue feed = 2; + + // The ad group being linked to the feed. + google.protobuf.StringValue ad_group = 3; + + // 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; + + // 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. + // This field is read-only. + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; +} diff --git a/google/ads/googleads/v1/resources/ad_group_label.proto b/google/ads/googleads/v1/resources/ad_group_label.proto new file mode 100644 index 000000000..db9f20d4e --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_label.proto @@ -0,0 +1,46 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupLabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad group label resource. + +// A relationship between an ad group and a label. +message AdGroupLabel { + // 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; + + // The ad group to which the label is attached. + google.protobuf.StringValue ad_group = 2; + + // The label assigned to the ad group. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v1/resources/ad_group_simulation.proto b/google/ads/googleads/v1/resources/ad_group_simulation.proto new file mode 100644 index 000000000..303b30e37 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_group_simulation.proto @@ -0,0 +1,87 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupSimulationProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. +// +// 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 +message AdGroupSimulation { + // 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; + + // Ad group id of the simulation. + google.protobuf.Int64Value ad_group_id = 2; + + // The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 3; + + // How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum + .SimulationModificationMethod modification_method = 4; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 5; + + // Last day on which the simulation is based, in YYYY-MM-DD format + google.protobuf.StringValue end_date = 6; + + // 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; + + // Simulation points if the simulation type is CPV_BID. + google.ads.googleads.v1.common.CpvBidSimulationPointList + cpv_bid_point_list = 10; + + // Simulation points if the simulation type is TARGET_CPA. + google.ads.googleads.v1.common.TargetCpaSimulationPointList + target_cpa_point_list = 9; + } +} diff --git a/google/ads/googleads/v1/resources/ad_parameter.proto b/google/ads/googleads/v1/resources/ad_parameter.proto new file mode 100644 index 000000000..6c53fe38a --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_parameter.proto @@ -0,0 +1,68 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The ad group criterion that this ad parameter belongs to. + google.protobuf.StringValue ad_group_criterion = 2; + + // The unique index of this ad parameter. Must be either 1 or 2. + google.protobuf.Int64Value parameter_index = 3; + + // 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/v1/resources/ad_schedule_view.proto b/google/ads/googleads/v1/resources/ad_schedule_view.proto new file mode 100644 index 000000000..80fbeda47 --- /dev/null +++ b/google/ads/googleads/v1/resources/ad_schedule_view.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.ads.googleads.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AdScheduleViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ad schedule view resource. + +// An ad schedule view summarizes the performance of campaigns by +// AdSchedule criteria. +message AdScheduleView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/age_range_view.proto b/google/ads/googleads/v1/resources/age_range_view.proto new file mode 100644 index 000000000..da1e80850 --- /dev/null +++ b/google/ads/googleads/v1/resources/age_range_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the age range view resource. + +// An age range view. +message AgeRangeView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/asset.proto b/google/ads/googleads/v1/resources/asset.proto new file mode 100644 index 000000000..d30514a65 --- /dev/null +++ b/google/ads/googleads/v1/resources/asset.proto @@ -0,0 +1,68 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // The resource name of the asset. + // Asset resource names have the form: + // + // `customers/{customer_id}/assets/{asset_id}` + string resource_name = 1; + + // The ID of the asset. + google.protobuf.Int64Value id = 2; + + // Optional name of the asset. + google.protobuf.StringValue name = 3; + + // Type of the asset. + google.ads.googleads.v1.enums.AssetTypeEnum.AssetType type = 4; + + // The specific type of the asset. + oneof asset_data { + // A YouTube video asset. + google.ads.googleads.v1.common.YoutubeVideoAsset youtube_video_asset = 5; + + // A media bundle asset. + google.ads.googleads.v1.common.MediaBundleAsset media_bundle_asset = 6; + + // An image asset. + google.ads.googleads.v1.common.ImageAsset image_asset = 7; + + // A text asset. + google.ads.googleads.v1.common.TextAsset text_asset = 8; + } +} diff --git a/google/ads/googleads/v1/resources/bidding_strategy.proto b/google/ads/googleads/v1/resources/bidding_strategy.proto new file mode 100644 index 000000000..774a6a6e3 --- /dev/null +++ b/google/ads/googleads/v1/resources/bidding_strategy.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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the BiddingStrategy resource + +// A bidding strategy. +message BiddingStrategy { + // 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; + + // The ID of the bidding strategy. + google.protobuf.Int64Value id = 3; + + // 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; + + // The status of the bidding strategy. + // + // This field is read-only. + google.ads.googleads.v1.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus + status = 15; + + // 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; + + // The number of campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value campaign_count = 13; + + // The number of non-removed campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value non_removed_campaign_count = 14; + + // 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.v1.common.EnhancedCpc enhanced_cpc = 7; + + // A bidding strategy that sets max CPC bids to target impressions on + // page one or page one promoted slots on google.com. + google.ads.googleads.v1.common.PageOnePromoted page_one_promoted = 8; + + // 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.v1.common.TargetCpa target_cpa = 9; + + // A bidding strategy that automatically optimizes towards a desired + // percentage of impressions. + 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. + google.ads.googleads.v1.common.TargetOutrankShare target_outrank_share = 10; + + // A bidding strategy that helps you maximize revenue while averaging a + // specific target Return On Ad Spend (ROAS). + google.ads.googleads.v1.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.v1.common.TargetSpend target_spend = 12; + } +} diff --git a/google/ads/googleads/v1/resources/billing_setup.proto b/google/ads/googleads/v1/resources/billing_setup.proto new file mode 100644 index 000000000..143ee2892 --- /dev/null +++ b/google/ads/googleads/v1/resources/billing_setup.proto @@ -0,0 +1,125 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +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. +message BillingSetup { + // Container of Payments account information for this billing. + message PaymentsAccountInfo { + // 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; + + // 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; + + // 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; + + // The name of the Payments profile associated with the billing setup. + google.protobuf.StringValue payments_profile_name = 4; + + // 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; + } + + // The resource name of the billing setup. + // BillingSetup resource names have the form: + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + string resource_name = 1; + + // The ID of the billing setup. + google.protobuf.Int64Value id = 2; + + // The status of the billing setup. + google.ads.googleads.v1.enums.BillingSetupStatusEnum.BillingSetupStatus + status = 3; + + // 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; + + // 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; + + // 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 { + // 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; + + // The start time as a type. Only NOW is allowed. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType start_time_type = 10; + } + + // 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; + + // The end time as a type. The only possible value is FOREVER. + google.ads.googleads.v1.enums.TimeTypeEnum.TimeType end_time_type = 14; + } +} diff --git a/google/ads/googleads/v1/resources/campaign.proto b/google/ads/googleads/v1/resources/campaign.proto new file mode 100644 index 000000000..4eeb48747 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign.proto @@ -0,0 +1,360 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/bidding.proto"; +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/common/frequency_cap.proto"; +import "google/ads/googleads/v1/common/real_time_bidding_setting.proto"; +import "google/ads/googleads/v1/common/targeting_setting.proto"; +import "google/ads/googleads/v1/enums/ad_serving_optimization_status.proto"; +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/app_campaign_app_store.proto"; +import "google/ads/googleads/v1/enums/app_campaign_bidding_strategy_goal_type.proto"; +import "google/ads/googleads/v1/enums/bidding_strategy_type.proto"; +import "google/ads/googleads/v1/enums/brand_safety_suitability.proto"; +import "google/ads/googleads/v1/enums/campaign_experiment_type.proto"; +import "google/ads/googleads/v1/enums/campaign_serving_status.proto"; +import "google/ads/googleads/v1/enums/campaign_status.proto"; +import "google/ads/googleads/v1/enums/negative_geo_target_type.proto"; +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/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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Campaign resource. + +// A campaign. +message 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 { + // The linked Hotel Center account. + google.protobuf.Int64Value hotel_center_id = 1; + } + + // 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 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; + + // The list of page feeds associated with the campaign. + repeated google.protobuf.StringValue feeds = 5; + } + + // 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. + // This field is required for create operations. This field is immutable for + // Shopping campaigns. + google.protobuf.Int64Value merchant_id = 1; + + // 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; + + // 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; + } + + // 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; + } + + // Represents a collection of settings related to ads geotargeting. + message GeoTargetTypeSetting { + // The setting used for positive geotargeting in this particular campaign. + google.ads.googleads.v1.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType positive_geo_target_type = 1; + + // The setting used for negative geotargeting in this particular campaign. + google.ads.googleads.v1.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType negative_geo_target_type = 2; + } + + // The resource name of the campaign. + // Campaign resource names have the form: + // + // `customers/{customer_id}/campaigns/{campaign_id}` + string resource_name = 1; + + // The ID of the campaign. + google.protobuf.Int64Value id = 3; + + // 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.v1.enums.CampaignStatusEnum.CampaignStatus status = 5; + + // The ad serving status of the campaign. + google.ads.googleads.v1.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + + // 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. + // 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.v1.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + + // 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; + + // 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.v1.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.v1.common.RealTimeBiddingSetting real_time_bidding_setting = 39; + + // The network settings for the campaign. + NetworkSettings network_settings = 14; + + // The hotel setting for the campaign. + HotelSettingInfo hotel_setting = 32; + + // 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.v1.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; + + // The resource names of labels attached to this campaign. + repeated google.protobuf.StringValue labels = 53; + + // The type of campaign: normal, draft, or experiment. + google.ads.googleads.v1.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17; + + // 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; + + // The budget of the campaign. + google.protobuf.StringValue campaign_budget = 6; + + // 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; + + // 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.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; + + // 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; + + // Campaign level settings for tracking information. + TrackingSetting tracking_setting = 46; + + // Payment mode for the campaign. + google.ads.googleads.v1.enums.PaymentModeEnum.PaymentMode payment_mode = 52; + + // 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; + + // Commission is an automatic bidding strategy in which the advertiser pays + // a certain portion of the conversion value. + google.ads.googleads.v1.common.Commission commission = 49; + + // Standard Manual CPC bidding strategy. + // Manual click-based bidding where user pays per click. + google.ads.googleads.v1.common.ManualCpc manual_cpc = 24; + + // Standard Manual CPM bidding strategy. + // Manual impression-based bidding where user pays per thousand + // 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; + + // Standard Maximize Conversions bidding strategy that automatically + // maximizes number of conversions given a daily budget. + google.ads.googleads.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.common.PercentCpc percent_cpc = 34; + + // A bidding strategy that automatically optimizes cost per thousand + // impressions. + google.ads.googleads.v1.common.TargetCpm target_cpm = 41; + } +} diff --git a/google/ads/googleads/v1/resources/campaign_audience_view.proto b/google/ads/googleads/v1/resources/campaign_audience_view.proto new file mode 100644 index 000000000..431db796f --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_audience_view.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.ads.googleads.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignAudienceViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; +} diff --git a/google/ads/googleads/v1/resources/campaign_bid_modifier.proto b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto new file mode 100644 index 000000000..6dfbb9eca --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_bid_modifier.proto @@ -0,0 +1,59 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/criteria.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBidModifierProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Campaign Bid Modifier resource. + +// Represents a bid-modifiable only criterion at the campaign level. +message CampaignBidModifier { + // 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; + + // The campaign to which this criterion belongs. + google.protobuf.StringValue campaign = 2; + + // The ID of the criterion to bid modify. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3; + + // 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; + } +} diff --git a/google/ads/googleads/v1/resources/campaign_budget.proto b/google/ads/googleads/v1/resources/campaign_budget.proto new file mode 100644 index 000000000..48555f962 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_budget.proto @@ -0,0 +1,151 @@ +// 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.v1.resources; + +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Budget resource. + +// A campaign budget. +message CampaignBudget { + // The resource name of the campaign budget. + // Campaign budget resource names have the form: + // + // `customers/{customer_id}/campaignBudgets/{budget_id}` + string resource_name = 1; + + // 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; + + // 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; + + // The status of this campaign budget. This field is read-only. + google.ads.googleads.v1.enums.BudgetStatusEnum.BudgetStatus status = 6; + + // 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; + + // 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; + + // The number of campaigns actively using the budget. + // + // This field is read-only. + google.protobuf.Int64Value reference_count = 9; + + // Indicates whether there is a recommended budget for this campaign budget. + // + // This field is read-only. + google.protobuf.BoolValue has_recommended_budget = 11; + + // 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; + + // Period over which to spend the budget. Defaults to DAILY if not specified. + google.ads.googleads.v1.enums.BudgetPeriodEnum.BudgetPeriod period = 13; + + // 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; + + // 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; + + // 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; + + // 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; + + // The type of the campaign budget. + google.ads.googleads.v1.enums.BudgetTypeEnum.BudgetType type = 18; +} diff --git a/google/ads/googleads/v1/resources/campaign_criterion.proto b/google/ads/googleads/v1/resources/campaign_criterion.proto new file mode 100644 index 000000000..8c959400f --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_criterion.proto @@ -0,0 +1,153 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Campaign Criterion resource. + +// A campaign criterion. +message CampaignCriterion { + // 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. + // + // This field is ignored during mutate. + google.protobuf.Int64Value criterion_id = 5; + + // 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; + + // The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 6; + + // The status of the criterion. + 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; + + // Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 9; + + // Mobile app category. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = + 10; + + // Mobile application. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = + 11; + + // Location. + google.ads.googleads.v1.common.LocationInfo location = 12; + + // Device. + google.ads.googleads.v1.common.DeviceInfo device = 13; + + // Ad Schedule. + google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 15; + + // Age range. + google.ads.googleads.v1.common.AgeRangeInfo age_range = 16; + + // Gender. + google.ads.googleads.v1.common.GenderInfo gender = 17; + + // Income range. + google.ads.googleads.v1.common.IncomeRangeInfo income_range = 18; + + // Parental status. + google.ads.googleads.v1.common.ParentalStatusInfo parental_status = 19; + + // User List. + google.ads.googleads.v1.common.UserListInfo user_list = 22; + + // YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 20; + + // YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 21; + + // Proximity. + google.ads.googleads.v1.common.ProximityInfo proximity = 23; + + // Topic. + google.ads.googleads.v1.common.TopicInfo topic = 24; + + // Listing scope. + google.ads.googleads.v1.common.ListingScopeInfo listing_scope = 25; + + // Language. + google.ads.googleads.v1.common.LanguageInfo language = 26; + + // IpBlock. + google.ads.googleads.v1.common.IpBlockInfo ip_block = 27; + + // ContentLabel. + google.ads.googleads.v1.common.ContentLabelInfo content_label = 28; + + // Carrier. + google.ads.googleads.v1.common.CarrierInfo carrier = 29; + + // User Interest. + google.ads.googleads.v1.common.UserInterestInfo user_interest = 30; + + // Webpage. + google.ads.googleads.v1.common.WebpageInfo webpage = 31; + + // Operating system version. + google.ads.googleads.v1.common.OperatingSystemVersionInfo + operating_system_version = 32; + + // Mobile Device. + google.ads.googleads.v1.common.MobileDeviceInfo mobile_device = 33; + + // Location Group + google.ads.googleads.v1.common.LocationGroupInfo location_group = 34; + } +} diff --git a/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto b/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto new file mode 100644 index 000000000..d85140b0f --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_criterion_simulation.proto @@ -0,0 +1,76 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionSimulationProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. +// +// SEARCH 30000,30001,30002 BID_MODIFIER UNIFORM +// DISPLAY 30001 BID_MODIFIER UNIFORM +message CampaignCriterionSimulation { + // 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; + + // Campaign ID of the simulation. + google.protobuf.Int64Value campaign_id = 2; + + // Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3; + + // The field that the simulation modifies. + google.ads.googleads.v1.enums.SimulationTypeEnum.SimulationType type = 4; + + // How the simulation modifies the field. + google.ads.googleads.v1.enums.SimulationModificationMethodEnum + .SimulationModificationMethod modification_method = 5; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6; + + // Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7; + + // 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; + } +} diff --git a/google/ads/googleads/v1/resources/campaign_draft.proto b/google/ads/googleads/v1/resources/campaign_draft.proto new file mode 100644 index 000000000..3ad444338 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_draft.proto @@ -0,0 +1,78 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/campaign_draft_status.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Campaign Draft resource. + +// A campaign draft. +message CampaignDraft { + // 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; + + // The ID of the draft. + // + // This field is read-only. + google.protobuf.Int64Value draft_id = 2; + + // The base campaign to which the draft belongs. + google.protobuf.StringValue base_campaign = 3; + + // 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; + + // 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; + + // 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; + + // Whether there is an experiment based on this draft currently serving. + google.protobuf.BoolValue has_experiment_running = 7; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/campaign_experiment.proto b/google/ads/googleads/v1/resources/campaign_experiment.proto new file mode 100644 index 000000000..336999b31 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_experiment.proto @@ -0,0 +1,101 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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. + // + // This field is read-only. + google.protobuf.Int64Value id = 2; + + // The campaign draft with staged changes to the base campaign. + google.protobuf.StringValue campaign_draft = 3; + + // 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; + + // 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; + + // Determines the behavior of the traffic split. + google.ads.googleads.v1.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7; + + // The experiment campaign, as opposed to the base campaign. + google.protobuf.StringValue experiment_campaign = 8; + + // The status of the campaign experiment. This field is read-only. + google.ads.googleads.v1.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9; + + // 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; + + // 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/v1/resources/campaign_extension_setting.proto b/google/ads/googleads/v1/resources/campaign_extension_setting.proto new file mode 100644 index 000000000..e225959cf --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_extension_setting.proto @@ -0,0 +1,65 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CampaignExtensionSetting resource. + +// A campaign extension setting. +message CampaignExtensionSetting { + // 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; + + // The extension type of the customer extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = + 2; + + // 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; + + // 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; + + // The device for which the extensions will serve. Optional. + 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 new file mode 100644 index 000000000..234beb3ff --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_feed.proto @@ -0,0 +1,64 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CampaignFeed resource. + +// A campaign feed. +message CampaignFeed { + // 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; + + // The feed to which the CampaignFeed belongs. + google.protobuf.StringValue feed = 2; + + // The campaign to which the CampaignFeed belongs. + google.protobuf.StringValue campaign = 3; + + // Indicates which placeholder types the feed may populate under the connected + // campaign. Required. + 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. + // This field is read-only. + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; +} diff --git a/google/ads/googleads/v1/resources/campaign_label.proto b/google/ads/googleads/v1/resources/campaign_label.proto new file mode 100644 index 000000000..00aa7dba2 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_label.proto @@ -0,0 +1,46 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignLabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the campaign label resource. + +// Represents a relationship between a campaign and a label. +message CampaignLabel { + // Name of the resource. + // Campaign label resource names have the form: + // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + string resource_name = 1; + + // The campaign to which the label is attached. + google.protobuf.StringValue campaign = 2; + + // The label assigned to the campaign. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v1/resources/campaign_shared_set.proto b/google/ads/googleads/v1/resources/campaign_shared_set.proto new file mode 100644 index 000000000..80b829912 --- /dev/null +++ b/google/ads/googleads/v1/resources/campaign_shared_set.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/campaign_shared_set_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CampaignSharedSet resource. + +// CampaignSharedSets are used for managing the shared sets associated with a +// campaign. +message CampaignSharedSet { + // 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; + + // The campaign to which the campaign shared set belongs. + google.protobuf.StringValue campaign = 3; + + // 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; + + // The status of this campaign shared set. Read only. + google.ads.googleads.v1.enums.CampaignSharedSetStatusEnum + .CampaignSharedSetStatus status = 2; +} diff --git a/google/ads/googleads/v1/resources/carrier_constant.proto b/google/ads/googleads/v1/resources/carrier_constant.proto new file mode 100644 index 000000000..944a60bb3 --- /dev/null +++ b/google/ads/googleads/v1/resources/carrier_constant.proto @@ -0,0 +1,51 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CarrierConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Carrier constant resource. + +// A carrier criterion that can be used in campaign targeting. +message CarrierConstant { + // The resource name of the carrier criterion. + // Carrier criterion resource names have the form: + // + // `carrierConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the carrier criterion. + google.protobuf.Int64Value id = 2; + + // The full name of the carrier in English. + google.protobuf.StringValue name = 3; + + // The country code of the country where the carrier is located, e.g., "AR", + // "FR", etc. + google.protobuf.StringValue country_code = 4; +} diff --git a/google/ads/googleads/v1/resources/change_status.proto b/google/ads/googleads/v1/resources/change_status.proto new file mode 100644 index 000000000..22b759d1c --- /dev/null +++ b/google/ads/googleads/v1/resources/change_status.proto @@ -0,0 +1,86 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Change Status resource. + +// Describes the status of returned resource. +message ChangeStatus { + // 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; + + // Time at which the most recent change has occurred on this resource. + google.protobuf.StringValue last_change_date_time = 3; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/click_view.proto b/google/ads/googleads/v1/resources/click_view.proto new file mode 100644 index 000000000..f7e5912bb --- /dev/null +++ b/google/ads/googleads/v1/resources/click_view.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/common/click_location.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ClickViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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. +message ClickView { + // 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; + + // The Google Click ID. + google.protobuf.StringValue gclid = 2; + + // The location criteria matching the area of interest associated with the + // impression. + google.ads.googleads.v1.common.ClickLocation area_of_interest = 3; + + // The location criteria matching the location of presence associated with the + // impression. + google.ads.googleads.v1.common.ClickLocation location_of_presence = 4; + + // Page number in search results where the ad was shown. + google.protobuf.Int64Value page_number = 5; +} diff --git a/google/ads/googleads/v1/resources/conversion_action.proto b/google/ads/googleads/v1/resources/conversion_action.proto new file mode 100644 index 000000000..0918eefb0 --- /dev/null +++ b/google/ads/googleads/v1/resources/conversion_action.proto @@ -0,0 +1,139 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/tag_snippet.proto"; +import "google/ads/googleads/v1/enums/attribution_model.proto"; +import "google/ads/googleads/v1/enums/conversion_action_category.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Conversion Action resource. + +// A conversion action. +message ConversionAction { + // 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; + + // The status of the data-driven attribution model for the conversion + // action. + google.ads.googleads.v1.enums.DataDrivenModelStatusEnum + .DataDrivenModelStatus data_driven_model_status = 2; + } + + // 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; + } + + // 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; + + // The ID of the conversion action. + google.protobuf.Int64Value id = 2; + + // 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.v1.enums.ConversionActionStatusEnum + .ConversionActionStatus status = 4; + + // The type of this conversion action. + google.ads.googleads.v1.enums.ConversionActionTypeEnum.ConversionActionType + type = 5; + + // The category of conversions reported for this conversion action. + google.ads.googleads.v1.enums.ConversionActionCategoryEnum + .ConversionActionCategory category = 6; + + // 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; + + // 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.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; + + // 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/v1/resources/custom_interest.proto b/google/ads/googleads/v1/resources/custom_interest.proto new file mode 100644 index 000000000..933513df4 --- /dev/null +++ b/google/ads/googleads/v1/resources/custom_interest.proto @@ -0,0 +1,82 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Custom Interest resource. + +// A custom interest. This is a list of users by interest. +message CustomInterest { + // 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; + + // Id of the custom interest. + google.protobuf.Int64Value id = 2; + + // Status of this custom interest. Indicates whether the custom interest is + // enabled or removed. + google.ads.googleads.v1.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.v1.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.v1.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/v1/resources/customer.proto b/google/ads/googleads/v1/resources/customer.proto new file mode 100644 index 000000000..e03a0d9f9 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer.proto @@ -0,0 +1,128 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/customer_pay_per_conversion_eligibility_failure_reason.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Customer resource. + +// A customer. +message Customer { + // The resource name of the customer. + // Customer resource names have the form: + // + // `customers/{customer_id}` + string resource_name = 1; + + // The ID of the customer. + google.protobuf.Int64Value id = 3; + + // Optional, non-unique descriptive name of the customer. + google.protobuf.StringValue descriptive_name = 4; + + // 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; + + // The local timezone ID of the customer. + google.protobuf.StringValue time_zone = 6; + + // 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; + + // 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; + + // Whether the customer is a manager. + google.protobuf.BoolValue manager = 12; + + // Whether the customer is a test account. + google.protobuf.BoolValue test_account = 13; + + // Call reporting setting for a customer. + CallReportingSetting call_reporting_setting = 10; + + // Conversion tracking setting for a customer. + ConversionTrackingSetting conversion_tracking_setting = 14; + + // Remarketing setting for a customer. + RemarketingSetting remarketing_setting = 15; + + // 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; +} + +// 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; +} + +// 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 + // 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; + + // 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; +} + +// Remarketing setting for a customer. +message RemarketingSetting { + // The Google global site tag. + google.protobuf.StringValue google_global_site_tag = 1; +} diff --git a/google/ads/googleads/v1/resources/customer_client.proto b/google/ads/googleads/v1/resources/customer_client.proto new file mode 100644 index 000000000..fd47f7848 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_client.proto @@ -0,0 +1,56 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // The resource name of the customer client. + // CustomerClient resource names have the form: + // `customers/{customer_id}/customerClients/{client_customer_id}` + string resource_name = 1; + + // The resource name of the client-customer which is linked to + // the given customer. Read only. + google.protobuf.StringValue client_customer = 3; + + // Specifies whether this is a hidden account. Learn more about hidden + // accounts here. Read + // only. + google.protobuf.BoolValue hidden = 4; + + // Distance between given customer and client. For self link, the level value + // will be 0. Read only. + google.protobuf.Int64Value level = 5; +} diff --git a/google/ads/googleads/v1/resources/customer_client_link.proto b/google/ads/googleads/v1/resources/customer_client_link.proto new file mode 100644 index 000000000..e6c188a07 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_client_link.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/manager_link_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CustomerClientLink resource. + +// Represents customer client link relationship. +message CustomerClientLink { + // Name of the resource. + // CustomerClientLink resource names have the form: + // + // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` + string resource_name = 1; + + // The client customer linked to this customer. + google.protobuf.StringValue client_customer = 3; + + // This is uniquely identifies a customer client link. Read only. + google.protobuf.Int64Value manager_link_id = 4; + + // This is the status of the link between client and manager. + 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. + // Default value is false + google.protobuf.BoolValue hidden = 6; +} diff --git a/google/ads/googleads/v1/resources/customer_extension_setting.proto b/google/ads/googleads/v1/resources/customer_extension_setting.proto new file mode 100644 index 000000000..4ef620bc1 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_extension_setting.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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerExtensionSettingProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CustomerExtensionSetting resource. + +// A customer extension setting. +message CustomerExtensionSetting { + // The resource name of the customer extension setting. + // CustomerExtensionSetting resource names have the form: + // + // `customers/{customer_id}/customerExtensionSettings/{extension_type}` + string resource_name = 1; + + // The extension type of the customer extension setting. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = + 2; + + // 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; + + // The device for which the extensions will serve. Optional. + 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 new file mode 100644 index 000000000..a81cfa479 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_feed.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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CustomerFeed resource. + +// A customer feed. +message CustomerFeed { + // The resource name of the customer feed. + // Customer feed resource names have the form: + // + // `customers/{customer_id}/customerFeeds/{feed_id}` + string resource_name = 1; + + // The feed being linked to the customer. + google.protobuf.StringValue feed = 2; + + // Indicates which placeholder types the feed may populate under the connected + // customer. Required. + 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. + // This field is read-only. + google.ads.googleads.v1.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5; +} diff --git a/google/ads/googleads/v1/resources/customer_label.proto b/google/ads/googleads/v1/resources/customer_label.proto new file mode 100644 index 000000000..28c994e1c --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_label.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.ads.googleads.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerLabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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. + // Read only. + google.protobuf.StringValue customer = 2; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/customer_manager_link.proto b/google/ads/googleads/v1/resources/customer_manager_link.proto new file mode 100644 index 000000000..d6f406c78 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_manager_link.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/manager_link_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the CustomerManagerLink resource. + +// Represents customer-manager link relationship. +message CustomerManagerLink { + // 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; + + // Status of the link between the customer and the manager. + 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 new file mode 100644 index 000000000..20af93ed1 --- /dev/null +++ b/google/ads/googleads/v1/resources/customer_negative_criterion.proto @@ -0,0 +1,73 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "CustomerNegativeCriterionProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Customer Negative Criterion resource. + +// A negative criterion for exclusions at the customer level. +message CustomerNegativeCriterion { + // 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; + + // The ID of the criterion. + google.protobuf.Int64Value id = 2; + + // The type of the criterion. + google.ads.googleads.v1.enums.CriterionTypeEnum.CriterionType type = 3; + + // The customer negative criterion. + // + // Exactly one must be set. + oneof criterion { + // ContentLabel. + google.ads.googleads.v1.common.ContentLabelInfo content_label = 4; + + // MobileApplication. + google.ads.googleads.v1.common.MobileApplicationInfo mobile_application = 5; + + // MobileAppCategory. + google.ads.googleads.v1.common.MobileAppCategoryInfo mobile_app_category = + 6; + + // Placement. + google.ads.googleads.v1.common.PlacementInfo placement = 7; + + // YouTube Video. + google.ads.googleads.v1.common.YouTubeVideoInfo youtube_video = 8; + + // YouTube Channel. + google.ads.googleads.v1.common.YouTubeChannelInfo youtube_channel = 9; + } +} diff --git a/google/ads/googleads/v1/resources/detail_placement_view.proto b/google/ads/googleads/v1/resources/detail_placement_view.proto new file mode 100644 index 000000000..1007504c3 --- /dev/null +++ b/google/ads/googleads/v1/resources/detail_placement_view.proto @@ -0,0 +1,63 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/placement_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DetailPlacementViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the detail placement view resource. + +// A view with metrics aggregated by ad group and URL or YouTube video. +message DetailPlacementView { + // 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; + + // The automatic placement string at detail level, e. g. website URL, mobile + // application ID, or a YouTube video ID. + google.protobuf.StringValue placement = 2; + + // 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; + + // 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; + + // 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; + + // Type of the placement, e.g. Website, YouTube Video, and Mobile Application. + google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = + 6; +} diff --git a/google/ads/googleads/v1/resources/display_keyword_view.proto b/google/ads/googleads/v1/resources/display_keyword_view.proto new file mode 100644 index 000000000..98c6c6f57 --- /dev/null +++ b/google/ads/googleads/v1/resources/display_keyword_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "DisplayKeywordViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the display keyword view resource. + +// A display keyword view. +message DisplayKeywordView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/domain_category.proto b/google/ads/googleads/v1/resources/domain_category.proto new file mode 100644 index 000000000..0cd40addc --- /dev/null +++ b/google/ads/googleads/v1/resources/domain_category.proto @@ -0,0 +1,76 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DomainCategoryProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The campaign this category is recommended for. + google.protobuf.StringValue campaign = 2; + + // 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; + + // 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; + + // The domain for the website. The domain can be specified in the + // DynamicSearchAdsSetting required for dynamic search ads. + google.protobuf.StringValue domain = 5; + + // Fraction of pages on your site that this category matches. + google.protobuf.DoubleValue coverage_fraction = 6; + + // 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; + + // Indicates whether this category has sub-categories. + google.protobuf.BoolValue has_children = 8; + + // The recommended cost per click for the category. + google.protobuf.Int64Value recommended_cpc_bid_micros = 9; +} 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 new file mode 100644 index 000000000..3332eb188 --- /dev/null +++ b/google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto @@ -0,0 +1,62 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "DynamicSearchAdsSearchTermViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Dynamic Search Ads Search Term View resource. + +// A dynamic search ads search term view. +message DynamicSearchAdsSearchTermView { + // 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; + + // Search term + // + // This field is read-only. + google.protobuf.StringValue search_term = 2; + + // The dynamically generated headline of the Dynamic Search Ad. + // + // This field is read-only. + google.protobuf.StringValue headline = 3; + + // The dynamically selected landing page URL of the impression. + // + // This field is read-only. + google.protobuf.StringValue landing_page = 4; + + // The URL of page feed item served for the impression. + // + // This field is read-only. + google.protobuf.StringValue page_url = 5; +} diff --git a/google/ads/googleads/v1/resources/expanded_landing_page_view.proto b/google/ads/googleads/v1/resources/expanded_landing_page_view.proto new file mode 100644 index 000000000..72115b4f8 --- /dev/null +++ b/google/ads/googleads/v1/resources/expanded_landing_page_view.proto @@ -0,0 +1,46 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ExpandedLandingPageViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The final URL that clicks are directed to. + google.protobuf.StringValue expanded_final_url = 2; +} diff --git a/google/ads/googleads/v1/resources/extension_feed_item.proto b/google/ads/googleads/v1/resources/extension_feed_item.proto new file mode 100644 index 000000000..6dd6e2dca --- /dev/null +++ b/google/ads/googleads/v1/resources/extension_feed_item.proto @@ -0,0 +1,127 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/criteria.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the ExtensionFeedItem resource. + +// An extension feed item. +message ExtensionFeedItem { + // 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. + // This field is read-only. + google.ads.googleads.v1.enums.ExtensionTypeEnum.ExtensionType extension_type = + 13; + + // Start time in which this feed item is effective and can begin serving. + // 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 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.v1.common.AdScheduleInfo ad_schedules = 16; + + // The targeted device. + google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice + device = 17; + + // The targeted geo target constant. + google.protobuf.StringValue targeted_geo_target_constant = 20; + + // Status of the feed item. + // This field is read-only. + google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 4; + + // Extension type. + oneof extension { + // Sitelink extension. + google.ads.googleads.v1.common.SitelinkFeedItem sitelink_feed_item = 2; + + // Structured snippet extension. + google.ads.googleads.v1.common.StructuredSnippetFeedItem + structured_snippet_feed_item = 3; + + // App extension. + google.ads.googleads.v1.common.AppFeedItem app_feed_item = 7; + + // Call extension. + google.ads.googleads.v1.common.CallFeedItem call_feed_item = 8; + + // Callout extension. + google.ads.googleads.v1.common.CalloutFeedItem callout_feed_item = 9; + + // Text message extension. + google.ads.googleads.v1.common.TextMessageFeedItem text_message_feed_item = + 10; + + // Price extension. + google.ads.googleads.v1.common.PriceFeedItem price_feed_item = 11; + + // Promotion extension. + google.ads.googleads.v1.common.PromotionFeedItem promotion_feed_item = 12; + + // 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; + + // 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; + } + + // 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; + + // The targeted ad group. + google.protobuf.StringValue targeted_ad_group = 19; + } +} diff --git a/google/ads/googleads/v1/resources/feed.proto b/google/ads/googleads/v1/resources/feed.proto new file mode 100644 index 000000000..2df4a00d5 --- /dev/null +++ b/google/ads/googleads/v1/resources/feed.proto @@ -0,0 +1,182 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Feed resource. + +// A feed. +message 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; + } + + // 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; + + // 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.v1.enums.AffiliateLocationFeedRelationshipTypeEnum + .AffiliateLocationFeedRelationshipType relationship_type = 2; + } + + // The resource name of the feed. + // Feed resource names have the form: + // + // `customers/{customer_id}/feeds/{feed_id}` + string resource_name = 1; + + // The ID of the feed. + // This field is read-only. + google.protobuf.Int64Value id = 2; + + // Name of the feed. Required. + google.protobuf.StringValue name = 3; + + // The Feed's attributes. Required on CREATE. + // 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; + + // Specifies who manages the FeedAttributes for the Feed. + google.ads.googleads.v1.enums.FeedOriginEnum.FeedOrigin origin = 5; + + // Status of the feed. + // This field is read-only. + google.ads.googleads.v1.enums.FeedStatusEnum.FeedStatus status = 8; + + // 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.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 + // 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; + } + + // Type of list operation to perform. + Operator operator = 1; + + // The feed attribute being added to the list. + FeedAttribute value = 2; +} diff --git a/google/ads/googleads/v1/resources/feed_item.proto b/google/ads/googleads/v1/resources/feed_item.proto new file mode 100644 index 000000000..d0885daca --- /dev/null +++ b/google/ads/googleads/v1/resources/feed_item.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/common/custom_parameter.proto"; +import "google/ads/googleads/v1/common/feed_common.proto"; +import "google/ads/googleads/v1/common/policy.proto"; +import "google/ads/googleads/v1/enums/feed_item_quality_approval_status.proto"; +import "google/ads/googleads/v1/enums/feed_item_quality_disapproval_reason.proto"; +import "google/ads/googleads/v1/enums/feed_item_status.proto"; +import "google/ads/googleads/v1/enums/feed_item_validation_status.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the FeedItem resource. + +// A feed item. +message FeedItem { + // 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. + // 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 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.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; + + // Status of the feed item. + // This field is read-only. + google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus status = 9; + + // 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; +} + +// 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 format of the string must + // be the same as start and end time for the feed item. + 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.v1.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 { + // The placeholder type. + google.protobuf.Int32Value placeholder_type = 1; + + // The FeedMapping that contains the placeholder type. + google.protobuf.StringValue feed_mapping_resource_name = 2; + + // Where the placeholder type is in the review process. + google.ads.googleads.v1.enums.PolicyReviewStatusEnum.PolicyReviewStatus + review_status = 3; + + // 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; + + // The list of policy findings for the placeholder type. + repeated google.ads.googleads.v1.common.PolicyTopicEntry + policy_topic_entries = 5; + + // The validation status of the palceholder type. + google.ads.googleads.v1.enums.FeedItemValidationStatusEnum + .FeedItemValidationStatus validation_status = 6; + + // List of placeholder type validation errors. + repeated FeedItemValidationError validation_errors = 7; + + // Placeholder type quality evaluation approval status. + google.ads.googleads.v1.enums.FeedItemQualityApprovalStatusEnum + .FeedItemQualityApprovalStatus quality_approval_status = 8; + + // List of placeholder type quality evaluation disapproval reasons. + repeated google.ads.googleads.v1.enums.FeedItemQualityDisapprovalReasonEnum + .FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9; +} + +// 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 + // of the error can be found in the 'description' field. + google.ads.googleads.v1.errors.FeedItemValidationErrorEnum + .FeedItemValidationError validation_error = 1; + + // The description of the validation error. + google.protobuf.StringValue description = 2; + + // 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; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/feed_item_target.proto b/google/ads/googleads/v1/resources/feed_item_target.proto new file mode 100644 index 000000000..cbff9f828 --- /dev/null +++ b/google/ads/googleads/v1/resources/feed_item_target.proto @@ -0,0 +1,76 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the FeedItemTarget resource. + +// A feed item target. +message FeedItemTarget { + // 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; + + // The feed item to which this feed item target belongs. + google.protobuf.StringValue feed_item = 2; + + // 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; + + // The ID of the targeted resource. This field is read-only. + google.protobuf.Int64Value feed_item_target_id = 6; + + // The targeted resource. + oneof target { + // The targeted campaign. + google.protobuf.StringValue campaign = 4; + + // The targeted ad group. + google.protobuf.StringValue ad_group = 5; + + // The targeted keyword. + google.ads.googleads.v1.common.KeywordInfo keyword = 7; + + // The targeted geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 8; + + // The targeted device. + google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice + device = 9; + + // The targeted schedule. + google.ads.googleads.v1.common.AdScheduleInfo ad_schedule = 10; + } +} diff --git a/google/ads/googleads/v1/resources/feed_mapping.proto b/google/ads/googleads/v1/resources/feed_mapping.proto new file mode 100644 index 000000000..57292cf96 --- /dev/null +++ b/google/ads/googleads/v1/resources/feed_mapping.proto @@ -0,0 +1,195 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/ad_customizer_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/affiliate_location_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/app_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/call_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/callout_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/custom_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/dsa_page_feed_criterion_field.proto"; +import "google/ads/googleads/v1/enums/education_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/feed_mapping_criterion_type.proto"; +import "google/ads/googleads/v1/enums/feed_mapping_status.proto"; +import "google/ads/googleads/v1/enums/flight_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/hotel_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/job_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/local_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/location_extension_targeting_criterion_field.proto"; +import "google/ads/googleads/v1/enums/location_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/message_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/placeholder_type.proto"; +import "google/ads/googleads/v1/enums/price_placeholder_field.proto"; +import "google/ads/googleads/v1/enums/promotion_placeholder_field.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the FeedMapping resource. + +// A feed mapping. +message FeedMapping { + // 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 + // 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; + + // Status of the feed mapping. + // This field is read-only. + google.ads.googleads.v1.enums.FeedMappingStatusEnum.FeedMappingStatus status = + 6; + + // 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 + // attributes to placeholder fields). + google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType + placeholder_type = 3; + + // 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; + } +} + +// 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; + + // 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; + + // 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; + } +} diff --git a/google/ads/googleads/v1/resources/feed_placeholder_view.proto b/google/ads/googleads/v1/resources/feed_placeholder_view.proto new file mode 100644 index 000000000..0b03a8834 --- /dev/null +++ b/google/ads/googleads/v1/resources/feed_placeholder_view.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/placeholder_type.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"; +option java_multiple_files = true; +option java_outer_classname = "FeedPlaceholderViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the FeedPlaceholderView resource. + +// A feed placeholder view. +message FeedPlaceholderView { + // 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; + + // The placeholder type of the feed placeholder view. + google.ads.googleads.v1.enums.PlaceholderTypeEnum.PlaceholderType + placeholder_type = 2; +} diff --git a/google/ads/googleads/v1/resources/gender_view.proto b/google/ads/googleads/v1/resources/gender_view.proto new file mode 100644 index 000000000..dac1df670 --- /dev/null +++ b/google/ads/googleads/v1/resources/gender_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "GenderViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the gender view resource. + +// A gender view. +message GenderView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/geo_target_constant.proto b/google/ads/googleads/v1/resources/geo_target_constant.proto new file mode 100644 index 000000000..e89d7e99f --- /dev/null +++ b/google/ads/googleads/v1/resources/geo_target_constant.proto @@ -0,0 +1,62 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/geo_target_constant_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the geo target constant resource. + +// A geo target constant. +message GeoTargetConstant { + // 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; + + // The ID of the geo target constant. + google.protobuf.Int64Value id = 3; + + // Geo target constant English name. + google.protobuf.StringValue name = 4; + + // The ISO-3166-1 alpha-2 country code that is associated with the target. + google.protobuf.StringValue country_code = 5; + + // Geo target constant target type. + google.protobuf.StringValue target_type = 6; + + // Geo target constant status. + google.ads.googleads.v1.enums.GeoTargetConstantStatusEnum + .GeoTargetConstantStatus status = 7; + + // The fully qualified English name, consisting of the target's name and that + // of its parent and country. + google.protobuf.StringValue canonical_name = 8; +} diff --git a/google/ads/googleads/v1/resources/geographic_view.proto b/google/ads/googleads/v1/resources/geographic_view.proto new file mode 100644 index 000000000..9514db058 --- /dev/null +++ b/google/ads/googleads/v1/resources/geographic_view.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/geo_targeting_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GeographicViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // CriterionId for the geo target for a country. + google.protobuf.StringValue country_geo_target_constant = 2; + + // Type of the geo targeting of the campaign. + google.ads.googleads.v1.enums.GeoTargetingTypeEnum.GeoTargetingType + location_type = 3; +} diff --git a/google/ads/googleads/v1/resources/google_ads_field.proto b/google/ads/googleads/v1/resources/google_ads_field.proto new file mode 100644 index 000000000..bb7fe280e --- /dev/null +++ b/google/ads/googleads/v1/resources/google_ads_field.proto @@ -0,0 +1,109 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Google Ads Field resource. + +// A field or resource (artifact) used by GoogleAdsService. +message GoogleAdsField { + // The resource name of the artifact. + // Artifact resource names have the form: + // + // `googleAdsFields/{name}` + string resource_name = 1; + + // The name of the artifact. + google.protobuf.StringValue name = 2; + + // The category of the artifact. + google.ads.googleads.v1.enums.GoogleAdsFieldCategoryEnum + .GoogleAdsFieldCategory category = 3; + + // Whether the artifact can be used in a SELECT clause in search + // queries. + google.protobuf.BoolValue selectable = 4; + + // Whether the artifact can be used in a WHERE clause in search + // queries. + google.protobuf.BoolValue filterable = 5; + + // Whether the artifact can be used in a ORDER BY clause in search + // queries. + google.protobuf.BoolValue sortable = 6; + + // The names of all resources, segments, and metrics that are selectable with + // the described artifact. + repeated google.protobuf.StringValue selectable_with = 7; + + // 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; + + // 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; + + // 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; + + // 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; + + // 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; + + // The URL of proto describing the artifact's data type. + google.protobuf.StringValue type_url = 13; + + // Whether the field artifact is repeated. + google.protobuf.BoolValue is_repeated = 14; +} diff --git a/google/ads/googleads/v1/resources/group_placement_view.proto b/google/ads/googleads/v1/resources/group_placement_view.proto new file mode 100644 index 000000000..1eb44e618 --- /dev/null +++ b/google/ads/googleads/v1/resources/group_placement_view.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/placement_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "GroupPlacementViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the group placement view resource. + +// A group placement view. +message GroupPlacementView { + // 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; + + // The automatic placement string at group level, e. g. web domain, mobile + // app ID, or a YouTube channel ID. + google.protobuf.StringValue placement = 2; + + // Domain name for websites and YouTube channel name for YouTube channels. + google.protobuf.StringValue display_name = 3; + + // 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; + + // Type of the placement, e.g. Website, YouTube Channel, Mobile Application. + google.ads.googleads.v1.enums.PlacementTypeEnum.PlacementType placement_type = + 5; +} diff --git a/google/ads/googleads/v1/resources/hotel_group_view.proto b/google/ads/googleads/v1/resources/hotel_group_view.proto new file mode 100644 index 000000000..5384add73 --- /dev/null +++ b/google/ads/googleads/v1/resources/hotel_group_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "HotelGroupViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the hotel group view resource. + +// A hotel group view. +message HotelGroupView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/hotel_performance_view.proto b/google/ads/googleads/v1/resources/hotel_performance_view.proto new file mode 100644 index 000000000..3a815fd92 --- /dev/null +++ b/google/ads/googleads/v1/resources/hotel_performance_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "HotelPerformanceViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the hotel performance view resource. + +// A hotel performance view. +message HotelPerformanceView { + // The resource name of the hotel performance view. + // Hotel performance view resource names have the form: + // + // `customers/{customer_id}/hotelPerformanceView` + string resource_name = 1; +} diff --git a/google/ads/googleads/v1/resources/keyword_plan.proto b/google/ads/googleads/v1/resources/keyword_plan.proto new file mode 100644 index 000000000..fd2d38f9f --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_plan.proto @@ -0,0 +1,72 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The ID of the keyword plan. + google.protobuf.Int64Value id = 2; + + // 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.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. + 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 new file mode 100644 index 000000000..c3d31c8b3 --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_plan_ad_group.proto @@ -0,0 +1,59 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The keyword plan campaign to which this ad group belongs. + google.protobuf.StringValue keyword_plan_campaign = 2; + + // The ID of the keyword plan ad group. + google.protobuf.Int64Value id = 3; + + // 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/v1/resources/keyword_plan_campaign.proto b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto new file mode 100644 index 000000000..8e26b57cf --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_plan_campaign.proto @@ -0,0 +1,84 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/keyword_plan_network.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The keyword plan this campaign belongs to. + google.protobuf.StringValue keyword_plan = 2; + + // The ID of the Keyword Plan campaign. + google.protobuf.Int64Value id = 3; + + // 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; + + // 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; + + // 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. +// Next ID: 3 +message KeywordPlanGeoTarget { + // Required. The resource name of the geo target. + google.protobuf.StringValue geo_target_constant = 1; +} diff --git a/google/ads/googleads/v1/resources/keyword_plan_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_keyword.proto new file mode 100644 index 000000000..6e969a7b6 --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_plan_keyword.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.v1.resources; + +import "google/ads/googleads/v1/enums/keyword_match_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The Keyword Plan ad group to which this keyword belongs. + google.protobuf.StringValue keyword_plan_ad_group = 2; + + // The ID of the Keyword Plan keyword. + google.protobuf.Int64Value id = 3; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + 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. + google.protobuf.Int64Value cpc_bid_micros = 6; +} diff --git a/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto new file mode 100644 index 000000000..546dd4546 --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_plan_negative_keyword.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/keyword_match_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The Keyword Plan campaign to which this negative keyword belongs. + google.protobuf.StringValue keyword_plan_campaign = 2; + + // The ID of the Keyword Plan negative keyword. + google.protobuf.Int64Value id = 3; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + 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 new file mode 100644 index 000000000..90fba7058 --- /dev/null +++ b/google/ads/googleads/v1/resources/keyword_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the keyword view resource. + +// A keyword view. +message KeywordView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/label.proto b/google/ads/googleads/v1/resources/label.proto new file mode 100644 index 000000000..aa30abe0a --- /dev/null +++ b/google/ads/googleads/v1/resources/label.proto @@ -0,0 +1,56 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LabelProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// A label. +message Label { + // Name of the resource. + // Label resource names have the form: + // `customers/{customer_id}/labels/{label_id}` + string resource_name = 1; + + // Id of the label. Read only. + google.protobuf.Int64Value id = 2; + + // 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; + + // Status of the label. Read only. + google.ads.googleads.v1.enums.LabelStatusEnum.LabelStatus status = 4; + + // 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 new file mode 100644 index 000000000..f2aa756c0 --- /dev/null +++ b/google/ads/googleads/v1/resources/landing_page_view.proto @@ -0,0 +1,46 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LandingPageViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the landing page view resource. + +// A landing page view with metrics aggregated at the unexpanded final URL +// level. +message LandingPageView { + // 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; + + // The advertiser-specified final URL. + google.protobuf.StringValue unexpanded_final_url = 2; +} diff --git a/google/ads/googleads/v1/resources/language_constant.proto b/google/ads/googleads/v1/resources/language_constant.proto new file mode 100644 index 000000000..77c7a2db3 --- /dev/null +++ b/google/ads/googleads/v1/resources/language_constant.proto @@ -0,0 +1,54 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "LanguageConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the language constant resource. + +// A language. +message LanguageConstant { + // The resource name of the language constant. + // Language constant resource names have the form: + // + // `languageConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the language constant. + google.protobuf.Int64Value id = 2; + + // The language code, e.g. "en_US", "en_AU", "es", "fr", etc. + google.protobuf.StringValue code = 3; + + // The full name of the language in English, e.g., "English (US)", "Spanish", + // etc. + google.protobuf.StringValue name = 4; + + // Whether the language is targetable. + google.protobuf.BoolValue targetable = 5; +} diff --git a/google/ads/googleads/v1/resources/location_view.proto b/google/ads/googleads/v1/resources/location_view.proto new file mode 100644 index 000000000..68d43e6de --- /dev/null +++ b/google/ads/googleads/v1/resources/location_view.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.ads.googleads.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "LocationViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the location view resource. + +// A location view summarizes the performance of campaigns by +// Location criteria. +message LocationView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/managed_placement_view.proto b/google/ads/googleads/v1/resources/managed_placement_view.proto new file mode 100644 index 000000000..4e6b4ab4a --- /dev/null +++ b/google/ads/googleads/v1/resources/managed_placement_view.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.ads.googleads.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "ManagedPlacementViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Managed Placement view resource. + +// A managed placement view. +message ManagedPlacementView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/media_file.proto b/google/ads/googleads/v1/resources/media_file.proto new file mode 100644 index 000000000..5002b006c --- /dev/null +++ b/google/ads/googleads/v1/resources/media_file.proto @@ -0,0 +1,114 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the media file resource. + +// A media file. +message MediaFile { + // 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; + + // The ID of the media file. + google.protobuf.Int64Value id = 2; + + // Type of the media file. + google.ads.googleads.v1.enums.MediaTypeEnum.MediaType type = 5; + + // The mime type of the media file. + google.ads.googleads.v1.enums.MimeTypeEnum.MimeType mime_type = 6; + + // The URL of where the original media file was downloaded from (or a file + // name). + google.protobuf.StringValue source_url = 7; + + // The name of the media file. The name can be used by clients to help + // identify previously uploaded media. + google.protobuf.StringValue name = 8; + + // The size of the media file in bytes. + google.protobuf.Int64Value file_size = 9; + + // The specific type of the media file. + oneof mediatype { + // Encapsulates an Image. + MediaImage image = 3; + + // A ZIP archive media the content of which contains HTML5 assets. + MediaBundle media_bundle = 4; + + // Encapsulates an Audio. + MediaAudio audio = 10; + + // Encapsulates a Video. + MediaVideo video = 11; + } +} + +// Encapsulates an Image. +message MediaImage { + // Raw image data. + google.protobuf.BytesValue data = 1; +} + +// Represents a ZIP archive media the content of which contains HTML5 assets. +message MediaBundle { + // Raw zipped data. + google.protobuf.BytesValue data = 1; +} + +// Encapsulates an Audio. +message MediaAudio { + // The duration of the Audio in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1; +} + +// Encapsulates a Video. +message MediaVideo { + // The duration of the Video in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1; + + // The YouTube video ID (as seen in YouTube URLs). + google.protobuf.StringValue youtube_video_id = 2; + + // 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; + + // The Industry Standard Commercial Identifier code for this video, used + // mainly for television commercials. + google.protobuf.StringValue isci_code = 4; +} diff --git a/google/ads/googleads/v1/resources/merchant_center_link.proto b/google/ads/googleads/v1/resources/merchant_center_link.proto new file mode 100644 index 000000000..55100b262 --- /dev/null +++ b/google/ads/googleads/v1/resources/merchant_center_link.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/merchant_center_link_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::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 { + // 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; + + // The ID of the Merchant Center account. + // This field is readonly. + google.protobuf.Int64Value id = 3; + + // The name of the Merchant Center account. + // This field is readonly. + google.protobuf.StringValue merchant_center_account_name = 4; + + // The status of the link. + 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 new file mode 100644 index 000000000..f859dc04f --- /dev/null +++ b/google/ads/googleads/v1/resources/mobile_app_category_constant.proto @@ -0,0 +1,47 @@ +// 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.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MobileAppCategoryConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the Mobile App Category Constant resource. + +// A mobile application category constant. +message MobileAppCategoryConstant { + // 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; +} diff --git a/google/ads/googleads/v1/resources/mobile_device_constant.proto b/google/ads/googleads/v1/resources/mobile_device_constant.proto new file mode 100644 index 000000000..b68852cef --- /dev/null +++ b/google/ads/googleads/v1/resources/mobile_device_constant.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.ads.googleads.v1.resources; + +import "google/ads/googleads/v1/enums/mobile_device_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the mobile device constant resource. + +// A mobile device constant. +message MobileDeviceConstant { + // The resource name of the mobile device constant. + // Mobile device constant resource names have the form: + // + // `mobileDeviceConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the mobile device constant. + google.protobuf.Int64Value id = 2; + + // The name of the mobile device. + google.protobuf.StringValue name = 3; + + // The manufacturer of the mobile device. + google.protobuf.StringValue manufacturer_name = 4; + + // The operating system of the mobile device. + google.protobuf.StringValue operating_system_name = 5; + + // The type of mobile device. + google.ads.googleads.v1.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6; +} diff --git a/google/ads/googleads/v1/resources/mutate_job.proto b/google/ads/googleads/v1/resources/mutate_job.proto new file mode 100644 index 000000000..038ca8ba7 --- /dev/null +++ b/google/ads/googleads/v1/resources/mutate_job.proto @@ -0,0 +1,84 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/mutate_job_status.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +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 +// job can only be read using MutateJobService.ListMutateJobResults. +message MutateJob { + // 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. + // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00" + google.protobuf.StringValue creation_date_time = 1; + + // 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; + + // 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; + + // The number of mutate operations in the mutate job. + google.protobuf.Int64Value operation_count = 4; + + // 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; + } + + // 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; + + // ID of this mutate job. + google.protobuf.Int64Value id = 2; + + // 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; + + // Contains additional information about this mutate job. + MutateJobMetadata metadata = 4; + + // Status of this mutate job. + google.ads.googleads.v1.enums.MutateJobStatusEnum.MutateJobStatus status = 5; + + // 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; +} diff --git a/google/ads/googleads/v1/resources/operating_system_version_constant.proto b/google/ads/googleads/v1/resources/operating_system_version_constant.proto new file mode 100644 index 000000000..29c61b1e0 --- /dev/null +++ b/google/ads/googleads/v1/resources/operating_system_version_constant.proto @@ -0,0 +1,64 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/enums/operating_system_version_operator_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionConstantProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +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; +} diff --git a/google/ads/googleads/v1/resources/topic_view.proto b/google/ads/googleads/v1/resources/topic_view.proto new file mode 100644 index 000000000..4a0a016a3 --- /dev/null +++ b/google/ads/googleads/v1/resources/topic_view.proto @@ -0,0 +1,40 @@ +// 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.v1.resources; + +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"; +option java_multiple_files = true; +option java_outer_classname = "TopicViewProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the topic view resource. + +// A topic view. +message TopicView { + // 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; +} diff --git a/google/ads/googleads/v1/resources/user_interest.proto b/google/ads/googleads/v1/resources/user_interest.proto new file mode 100644 index 000000000..61f8847f0 --- /dev/null +++ b/google/ads/googleads/v1/resources/user_interest.proto @@ -0,0 +1,63 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the User Interest resource. + +// A user interest: a particular interest-based vertical to be targeted. +message UserInterest { + // 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; + + // Taxonomy type of the user interest. + google.ads.googleads.v1.enums.UserInterestTaxonomyTypeEnum + .UserInterestTaxonomyType taxonomy_type = 2; + + // The ID of the user interest. + google.protobuf.Int64Value user_interest_id = 3; + + // The name of the user interest. + google.protobuf.StringValue name = 4; + + // The parent of the user interest. + google.protobuf.StringValue user_interest_parent = 5; + + // True if the user interest is launched to all channels and locales. + google.protobuf.BoolValue launched_to_all = 6; + + // Availability information of the user interest. + repeated google.ads.googleads.v1.common.CriterionCategoryAvailability + availabilities = 7; +} diff --git a/google/ads/googleads/v1/resources/user_list.proto b/google/ads/googleads/v1/resources/user_list.proto new file mode 100644 index 000000000..6fa7ce782 --- /dev/null +++ b/google/ads/googleads/v1/resources/user_list.proto @@ -0,0 +1,165 @@ +// 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.v1.resources; + +import "google/ads/googleads/v1/common/user_lists.proto"; +import "google/ads/googleads/v1/enums/access_reason.proto"; +import "google/ads/googleads/v1/enums/user_list_access_status.proto"; +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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "UserListProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the User List resource. + +// A user list. This is a list of users a customer may target. +message UserList { + // 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; + + // Id of the user list. + google.protobuf.Int64Value id = 2; + + // 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; + + // 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.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. + 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; + + // 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; + + // 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; + + // 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; + + // 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; + + // Type of this list. + // + // This field is read-only. + google.ads.googleads.v1.enums.UserListTypeEnum.UserListType type = 13; + + // 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; + + // 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; + + // 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; + + // 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. + // + // This field is read-only. + google.protobuf.BoolValue eligible_for_display = 18; + + // 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; + + // 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; + + // User list generated by a rule. + 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; + + // User list targeting as a collection of conversion or remarketing actions. + google.ads.googleads.v1.common.BasicUserListInfo basic_user_list = 23; + } +} diff --git a/google/ads/googleads/v1/resources/video.proto b/google/ads/googleads/v1/resources/video.proto new file mode 100644 index 000000000..1a75018d6 --- /dev/null +++ b/google/ads/googleads/v1/resources/video.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.ads.googleads.v1.resources; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources"; +option java_multiple_files = true; +option java_outer_classname = "VideoProto"; +option java_package = "com.google.ads.googleads.v1.resources"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources"; +option ruby_package = "Google::Ads::GoogleAds::V1::Resources"; + +// Proto file describing the video resource. + +// A video. +message Video { + // The resource name of the video. + // Video resource names have the form: + // + // `customers/{customer_id}/videos/{video_id}` + string resource_name = 1; + + // The ID of the video. + google.protobuf.StringValue id = 2; + + // The owner channel id of the video. + google.protobuf.StringValue channel_id = 3; + + // The duration of the video in milliseconds. + google.protobuf.Int64Value duration_millis = 4; + + // The title of the video. + google.protobuf.StringValue title = 5; +} diff --git a/google/ads/googleads/v1/services/account_budget_proposal_service.proto b/google/ads/googleads/v1/services/account_budget_proposal_service.proto new file mode 100644 index 000000000..288cb317b --- /dev/null +++ b/google/ads/googleads/v1/services/account_budget_proposal_service.proto @@ -0,0 +1,128 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/account_budget_proposal.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetProposalServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 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. Please use BudgetOrderService until then: +// 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 { + // Returns an account-level budget proposal in full detail. + rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) + returns (google.ads.googleads.v1.resources.AccountBudgetProposal) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/accountBudgetProposals/*}" + }; + } + + // Creates, updates, or removes account budget proposals. Operation statuses + // are returned. + rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) + returns (MutateAccountBudgetProposalResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/accountBudgetProposals:mutate" + body: "*" + }; + } +} + +// 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; +} + +// Request message for +// [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.MutateAccountBudgetProposal]. +message MutateAccountBudgetProposalRequest { + // The ID of the customer. + string customer_id = 1; + + // The operation to perform on an individual account-level budget proposal. + AccountBudgetProposalOperation operation = 2; + + // 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.v1.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/v1/services/account_budget_service.proto b/google/ads/googleads/v1/services/account_budget_service.proto new file mode 100644 index 000000000..b8c3adb55 --- /dev/null +++ b/google/ads/googleads/v1/services/account_budget_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/account_budget.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AccountBudget service. + +// A service for fetching an account-level budget. +// +// Account-level budgets are mutated by creating proposal resources. +service AccountBudgetService { + // Returns an account-level budget in full detail. + rpc GetAccountBudget(GetAccountBudgetRequest) + returns (google.ads.googleads.v1.resources.AccountBudget) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/accountBudgets/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..1d2458203 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_ad_label_service.proto @@ -0,0 +1,117 @@ +// 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.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/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdLabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Ad Label service. + +// Service to manage labels on ad group ads. +service AdGroupAdLabelService { + // Returns the requested ad group ad label in full detail. + rpc GetAdGroupAdLabel(GetAdGroupAdLabelRequest) + returns (google.ads.googleads.v1.resources.AdGroupAdLabel) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupAdLabels/*}" + }; + } + + // Creates and removes ad group ad labels. + // Operation statuses are returned. + rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) + returns (MutateAdGroupAdLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupAdLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group ad labels. + repeated AdGroupAdLabelOperation operations = 2; + + // 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.v1.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/v1/services/ad_group_ad_service.proto b/google/ads/googleads/v1/services/ad_group_ad_service.proto new file mode 100644 index 000000000..93c441133 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_ad_service.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.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/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Ad service. + +// Service to manage ads in an ad group. +service AdGroupAdService { + // Returns the requested ad in full detail. + rpc GetAdGroupAd(GetAdGroupAdRequest) + returns (google.ads.googleads.v1.resources.AdGroupAd) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupAds/*}" + }; + } + + // Creates, updates, or removes ads. Operation statuses are returned. + rpc MutateAdGroupAds(MutateAdGroupAdsRequest) + returns (MutateAdGroupAdsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupAds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ads. + repeated AdGroupAdOperation operations = 2; + + // 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.v1.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.v1.resources.AdGroupAd create = 1; + + // Update operation: The ad is expected to have a valid resource name. + google.ads.googleads.v1.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/v1/services/ad_group_audience_view_service.proto b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto new file mode 100644 index 000000000..213e6374b --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_audience_view_service.proto @@ -0,0 +1,49 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_audience_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAudienceViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdGroup Audience View service. + +// Service to manage ad group audience views. +service AdGroupAudienceViewService { + // Returns the requested ad group audience view in full detail. + rpc GetAdGroupAudienceView(GetAdGroupAudienceViewRequest) + returns (google.ads.googleads.v1.resources.AdGroupAudienceView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupAudienceViews/*}" + }; + } +} + +// Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][]. +message GetAdGroupAudienceViewRequest { + // The resource name of the ad group audience view to fetch. + string resource_name = 1; +} 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 new file mode 100644 index 000000000..db02be227 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto @@ -0,0 +1,125 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_bid_modifier.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Bid Modifier service. + +// Service to manage ad group bid modifiers. +service AdGroupBidModifierService { + // Returns the requested ad group bid modifier in full detail. + rpc GetAdGroupBidModifier(GetAdGroupBidModifierRequest) + returns (google.ads.googleads.v1.resources.AdGroupBidModifier) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupBidModifiers/*}" + }; + } + + // Creates, updates, or removes ad group bid modifiers. + // Operation statuses are returned. + rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) + returns (MutateAdGroupBidModifiersResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupBidModifiers:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad group bid modifiers. + repeated AdGroupBidModifierOperation operations = 2; + + // 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.v1.resources.AdGroupBidModifier create = 1; + + // Update operation: The ad group bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto new file mode 100644 index 000000000..e3ba75b10 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_criterion_label_service.proto @@ -0,0 +1,117 @@ +// 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.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/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionLabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Criterion Label service. + +// Service to manage labels on ad group criteria. +service AdGroupCriterionLabelService { + // Returns the requested ad group criterion label in full detail. + rpc GetAdGroupCriterionLabel(GetAdGroupCriterionLabelRequest) + returns (google.ads.googleads.v1.resources.AdGroupCriterionLabel) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupCriterionLabels/*}" + }; + } + + // Creates and removes ad group criterion labels. + // Operation statuses are returned. + rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) + returns (MutateAdGroupCriterionLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupCriterionLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group criterion labels. + repeated AdGroupCriterionLabelOperation operations = 2; + + // 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.v1.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/v1/services/ad_group_criterion_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_service.proto new file mode 100644 index 000000000..3a3a2ff4c --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_criterion_service.proto @@ -0,0 +1,135 @@ +// 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.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/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Criterion service. + +// Service to manage ad group criteria. +service AdGroupCriterionService { + // Returns the requested criterion in full detail. + rpc GetAdGroupCriterion(GetAdGroupCriterionRequest) + returns (google.ads.googleads.v1.resources.AdGroupCriterion) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupCriteria/*}" + }; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) + returns (MutateAdGroupCriteriaResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated AdGroupCriterionOperation operations = 2; + + // 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.v1.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.v1.resources.AdGroupCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/ad_group_criterion_simulation_service.proto b/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.proto new file mode 100644 index 000000000..e51aeb1d4 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_criterion_simulation_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdGroupCriterionSimulation service. + +// Service to fetch ad group criterion simulations. +service AdGroupCriterionSimulationService { + // Returns the requested ad group criterion simulation in full detail. + rpc GetAdGroupCriterionSimulation(GetAdGroupCriterionSimulationRequest) + returns (google.ads.googleads.v1.resources.AdGroupCriterionSimulation) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupCriterionSimulations/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..b7496dd8b --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_extension_setting_service.proto @@ -0,0 +1,127 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_extension_setting.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdGroupExtensionSetting service. + +// Service to manage ad group extension settings. +service AdGroupExtensionSettingService { + // Returns the requested ad group extension setting in full detail. + rpc GetAdGroupExtensionSetting(GetAdGroupExtensionSettingRequest) + returns (google.ads.googleads.v1.resources.AdGroupExtensionSetting) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupExtensionSettings/*}" + }; + } + + // Creates, updates, or removes ad group extension settings. Operation + // statuses are returned. + rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) + returns (MutateAdGroupExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual ad group extension + // settings. + repeated AdGroupExtensionSettingOperation operations = 2; + + // 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.v1.resources.AdGroupExtensionSetting create = 1; + + // Update operation: The ad group extension setting is expected to have a + // valid resource name. + google.ads.googleads.v1.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/v1/services/ad_group_feed_service.proto b/google/ads/googleads/v1/services/ad_group_feed_service.proto new file mode 100644 index 000000000..5780852bd --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_feed_service.proto @@ -0,0 +1,123 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_feed.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdGroupFeed service. + +// Service to manage ad group feeds. +service AdGroupFeedService { + // Returns the requested ad group feed in full detail. + rpc GetAdGroupFeed(GetAdGroupFeedRequest) + returns (google.ads.googleads.v1.resources.AdGroupFeed) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupFeeds/*}" + }; + } + + // Creates, updates, or removes ad group feeds. Operation statuses are + // returned. + rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) + returns (MutateAdGroupFeedsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad group feeds. + repeated AdGroupFeedOperation operations = 2; + + // 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.v1.resources.AdGroupFeed create = 1; + + // Update operation: The ad group feed is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/ad_group_label_service.proto b/google/ads/googleads/v1/services/ad_group_label_service.proto new file mode 100644 index 000000000..c6c71ef62 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_label_service.proto @@ -0,0 +1,116 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_label.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupLabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group Label service. + +// Service to manage labels on ad groups. +service AdGroupLabelService { + // Returns the requested ad group label in full detail. + rpc GetAdGroupLabel(GetAdGroupLabelRequest) + returns (google.ads.googleads.v1.resources.AdGroupLabel) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupLabels/*}" + }; + } + + // Creates and removes ad group labels. + // Operation statuses are returned. + rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) + returns (MutateAdGroupLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroupLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group labels. + repeated AdGroupLabelOperation operations = 2; + + // 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.v1.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/v1/services/ad_group_service.proto b/google/ads/googleads/v1/services/ad_group_service.proto new file mode 100644 index 000000000..4ec9aaa0f --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_service.proto @@ -0,0 +1,120 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_group.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Group service. + +// Service to manage ad groups. +service AdGroupService { + // Returns the requested ad group in full detail. + rpc GetAdGroup(GetAdGroupRequest) + returns (google.ads.googleads.v1.resources.AdGroup) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroups/*}" + }; + } + + // Creates, updates, or removes ad groups. Operation statuses are returned. + rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adGroups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad groups. + repeated AdGroupOperation operations = 2; + + // 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.v1.resources.AdGroup create = 1; + + // Update operation: The ad group is expected to have a valid resource name. + google.ads.googleads.v1.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/v1/services/ad_group_simulation_service.proto b/google/ads/googleads/v1/services/ad_group_simulation_service.proto new file mode 100644 index 000000000..b178f2e70 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_group_simulation_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/ad_group_simulation.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdGroupSimulation service. + +// Service to fetch ad group simulations. +service AdGroupSimulationService { + // Returns the requested ad group simulation in full detail. + rpc GetAdGroupSimulation(GetAdGroupSimulationRequest) + returns (google.ads.googleads.v1.resources.AdGroupSimulation) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adGroupSimulations/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/ad_parameter_service.proto b/google/ads/googleads/v1/services/ad_parameter_service.proto new file mode 100644 index 000000000..34055da79 --- /dev/null +++ b/google/ads/googleads/v1/services/ad_parameter_service.proto @@ -0,0 +1,124 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/ad_parameter.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Ad Parameter service. + +// Service to manage ad parameters. +service AdParameterService { + // Returns the requested ad parameter in full detail. + rpc GetAdParameter(GetAdParameterRequest) + returns (google.ads.googleads.v1.resources.AdParameter) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adParameters/*}" + }; + } + + // Creates, updates, or removes ad parameters. Operation statuses are + // returned. + rpc MutateAdParameters(MutateAdParametersRequest) + returns (MutateAdParametersResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/adParameters:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad parameters. + repeated AdParameterOperation operations = 2; + + // 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.v1.resources.AdParameter create = 1; + + // Update operation: The ad parameter is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/ad_schedule_view_service.proto b/google/ads/googleads/v1/services/ad_schedule_view_service.proto new file mode 100644 index 000000000..68ad7a99f --- /dev/null +++ b/google/ads/googleads/v1/services/ad_schedule_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/ad_schedule_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AdScheduleViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 AdSchedule View service. + +// Service to fetch ad schedule views. +service AdScheduleViewService { + // Returns the requested ad schedule view in full detail. + rpc GetAdScheduleView(GetAdScheduleViewRequest) + returns (google.ads.googleads.v1.resources.AdScheduleView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/adScheduleViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/age_range_view_service.proto b/google/ads/googleads/v1/services/age_range_view_service.proto new file mode 100644 index 000000000..3b895b801 --- /dev/null +++ b/google/ads/googleads/v1/services/age_range_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/age_range_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Age Range View service. + +// Service to manage age range views. +service AgeRangeViewService { + // Returns the requested age range view in full detail. + rpc GetAgeRangeView(GetAgeRangeViewRequest) + returns (google.ads.googleads.v1.resources.AgeRangeView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/ageRangeViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/asset_service.proto b/google/ads/googleads/v1/services/asset_service.proto new file mode 100644 index 000000000..92c0017b9 --- /dev/null +++ b/google/ads/googleads/v1/services/asset_service.proto @@ -0,0 +1,93 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/asset.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 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 { + // Returns the requested asset in full detail. + rpc GetAsset(GetAssetRequest) + returns (google.ads.googleads.v1.resources.Asset) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/assets/*}" + }; + } + + // Creates assets. Operation statuses are returned. + rpc MutateAssets(MutateAssetsRequest) returns (MutateAssetsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/assets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual assets. + repeated AssetOperation operations = 2; +} + +// A single operation to create an asset. Supported asset types are +// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. 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.v1.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/v1/services/bidding_strategy_service.proto b/google/ads/googleads/v1/services/bidding_strategy_service.proto new file mode 100644 index 000000000..196a19f47 --- /dev/null +++ b/google/ads/googleads/v1/services/bidding_strategy_service.proto @@ -0,0 +1,124 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/bidding_strategy.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Bidding Strategy service. + +// Service to manage bidding strategies. +service BiddingStrategyService { + // Returns the requested bidding strategy in full detail. + rpc GetBiddingStrategy(GetBiddingStrategyRequest) + returns (google.ads.googleads.v1.resources.BiddingStrategy) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/biddingStrategies/*}" + }; + } + + // Creates, updates, or removes bidding strategies. Operation statuses are + // returned. + rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) + returns (MutateBiddingStrategiesResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/biddingStrategies:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual bidding strategies. + repeated BiddingStrategyOperation operations = 2; + + // 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.v1.resources.BiddingStrategy create = 1; + + // Update operation: The bidding strategy is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/billing_setup_service.proto b/google/ads/googleads/v1/services/billing_setup_service.proto new file mode 100644 index 000000000..46653674a --- /dev/null +++ b/google/ads/googleads/v1/services/billing_setup_service.proto @@ -0,0 +1,106 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/billing_setup.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 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 { + // Returns a billing setup. + rpc GetBillingSetup(GetBillingSetupRequest) + returns (google.ads.googleads.v1.resources.BillingSetup) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/billingSetups/*}" + }; + } + + // Creates a billing setup, or cancels an existing billing setup. + rpc MutateBillingSetup(MutateBillingSetupRequest) + returns (MutateBillingSetupResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/billingSetups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform. + BillingSetupOperation operation = 2; +} + +// 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.v1.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/v1/services/campaign_audience_view_service.proto b/google/ads/googleads/v1/services/campaign_audience_view_service.proto new file mode 100644 index 000000000..fc59212a7 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_audience_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/campaign_audience_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignAudienceViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Audience View service. + +// Service to manage campaign audience views. +service CampaignAudienceViewService { + // Returns the requested campaign audience view in full detail. + rpc GetCampaignAudienceView(GetCampaignAudienceViewRequest) + returns (google.ads.googleads.v1.resources.CampaignAudienceView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignAudienceViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto new file mode 100644 index 000000000..c5c374d9a --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_bid_modifier_service.proto @@ -0,0 +1,124 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_bid_modifier.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBidModifierServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Bid Modifier service. + +// Service to manage campaign bid modifiers. +service CampaignBidModifierService { + // Returns the requested campaign bid modifier in full detail. + rpc GetCampaignBidModifier(GetCampaignBidModifierRequest) + returns (google.ads.googleads.v1.resources.CampaignBidModifier) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignBidModifiers/*}" + }; + } + + // Creates, updates, or removes campaign bid modifiers. + // Operation statuses are returned. + rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) + returns (MutateCampaignBidModifiersResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignBidModifiers:mutate" + body: "*" + }; + } +} + +// 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; +} + +// Request message for [CampaignBidModifierService.MutateCampaignBidModifier][]. +message MutateCampaignBidModifiersRequest { + // ID of the customer whose campaign bid modifiers are being modified. + string customer_id = 1; + + // The list of operations to perform on individual campaign bid modifiers. + repeated CampaignBidModifierOperation operations = 2; + + // 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.v1.resources.CampaignBidModifier create = 1; + + // Update operation: The campaign bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/campaign_budget_service.proto b/google/ads/googleads/v1/services/campaign_budget_service.proto new file mode 100644 index 000000000..720e1d533 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_budget_service.proto @@ -0,0 +1,123 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_budget.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Budget service. + +// Service to manage campaign budgets. +service CampaignBudgetService { + // Returns the requested Campaign Budget in full detail. + rpc GetCampaignBudget(GetCampaignBudgetRequest) + returns (google.ads.googleads.v1.resources.CampaignBudget) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignBudgets/*}" + }; + } + + // Creates, updates, or removes campaign budgets. Operation statuses are + // returned. + rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) + returns (MutateCampaignBudgetsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignBudgets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign budgets. + repeated CampaignBudgetOperation operations = 2; + + // 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.v1.resources.CampaignBudget create = 1; + + // Update operation: The campaign budget is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/campaign_criterion_service.proto b/google/ads/googleads/v1/services/campaign_criterion_service.proto new file mode 100644 index 000000000..5e2edec7b --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_criterion_service.proto @@ -0,0 +1,122 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_criterion.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Criterion service. + +// Service to manage campaign criteria. +service CampaignCriterionService { + // Returns the requested criterion in full detail. + rpc GetCampaignCriterion(GetCampaignCriterionRequest) + returns (google.ads.googleads.v1.resources.CampaignCriterion) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignCriteria/*}" + }; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) + returns (MutateCampaignCriteriaResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated CampaignCriterionOperation operations = 2; + + // 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.v1.resources.CampaignCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/campaign_criterion_simulation_service.proto b/google/ads/googleads/v1/services/campaign_criterion_simulation_service.proto new file mode 100644 index 000000000..55f39bf94 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_criterion_simulation_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/campaign_criterion_simulation.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionSimulationServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 CampaignCriterionSimulation service. + +// Service to fetch campaign criterion simulations. +service CampaignCriterionSimulationService { + // Returns the requested campaign criterion simulation in full detail. + rpc GetCampaignCriterionSimulation(GetCampaignCriterionSimulationRequest) + returns (google.ads.googleads.v1.resources.CampaignCriterionSimulation) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignCriterionSimulations/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/campaign_draft_service.proto b/google/ads/googleads/v1/services/campaign_draft_service.proto new file mode 100644 index 000000000..f075b42bd --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_draft_service.proto @@ -0,0 +1,181 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_draft.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Draft service. + +// Service to manage campaign drafts. +service CampaignDraftService { + // 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/*}" + }; + } + + // Creates, updates, or removes campaign drafts. Operation statuses are + // returned. + rpc MutateCampaignDrafts(MutateCampaignDraftsRequest) returns (MutateCampaignDraftsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignDrafts:mutate" + body: "*" + }; + } + + // 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.v1.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of + // error reasons. + rpc PromoteCampaignDraft(PromoteCampaignDraftRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{campaign_draft=customers/*/campaignDrafts/*}:promote" + body: "*" + }; + } + + // 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: "/v1/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign drafts. + repeated CampaignDraftOperation operations = 2; + + // 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.v1.services.CampaignDraftService.PromoteCampaignDraft]. +message PromoteCampaignDraftRequest { + // The resource name of the campaign draft to promote. + string campaign_draft = 1; +} + +// 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.v1.resources.CampaignDraft create = 1; + + // Update operation: The campaign draft is expected to have a valid + // resource name. + google.ads.googleads.v1.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.v1.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. +message ListCampaignDraftAsyncErrorsRequest { + // The name of the campaign draft from which to retrieve the async errors. + string resource_name = 1; + + // 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.v1.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/v1/services/campaign_experiment_service.proto b/google/ads/googleads/v1/services/campaign_experiment_service.proto new file mode 100644 index 000000000..2d0e5c1d3 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_experiment_service.proto @@ -0,0 +1,265 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_experiment.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 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 { + // 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/*}" + }; + } + + // 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: "/v1/customers/{customer_id=*}/campaignExperiments:create" + body: "*" + }; + } + + // Updates campaign experiments. Operation statuses are returned. + rpc MutateCampaignExperiments(MutateCampaignExperimentsRequest) returns (MutateCampaignExperimentsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignExperiments:mutate" + body: "*" + }; + } + + // 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: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:graduate" + body: "*" + }; + } + + // 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: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:promote" + body: "*" + }; + } + + // 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: "/v1/{campaign_experiment=customers/*/campaignExperiments/*}:end" + body: "*" + }; + } + + // 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: "/v1/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign experiments. + repeated CampaignExperimentOperation operations = 2; + + // 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.v1.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.v1.services.CampaignExperimentService.CreateCampaignExperiment]. +message CreateCampaignExperimentRequest { + // The ID of the customer whose campaign experiment is being created. + string customer_id = 1; + + // The campaign experiment to be created. + google.ads.googleads.v1.resources.CampaignExperiment campaign_experiment = 2; + + // 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.v1.services.CampaignExperimentService.GraduateCampaignExperiment]. +message GraduateCampaignExperimentRequest { + // The resource name of the campaign experiment to graduate. + string campaign_experiment = 1; + + // Resource name of the budget to attach to the campaign graduated from the + // experiment. + string campaign_budget = 2; +} + +// 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.v1.services.CampaignExperimentService.PromoteCampaignExperiment]. +message PromoteCampaignExperimentRequest { + // The resource name of the campaign experiment to promote. + string campaign_experiment = 1; +} + +// 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; +} + +// 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 + // errors. + string resource_name = 1; + + // 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.v1.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/v1/services/campaign_extension_setting_service.proto b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto new file mode 100644 index 000000000..db4ff15c7 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_extension_setting_service.proto @@ -0,0 +1,127 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_extension_setting.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 CampaignExtensionSetting service. + +// Service to manage campaign extension settings. +service CampaignExtensionSettingService { + // Returns the requested campaign extension setting in full detail. + rpc GetCampaignExtensionSetting(GetCampaignExtensionSettingRequest) + returns (google.ads.googleads.v1.resources.CampaignExtensionSetting) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignExtensionSettings/*}" + }; + } + + // Creates, updates, or removes campaign extension settings. Operation + // statuses are returned. + rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) + returns (MutateCampaignExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual campaign extension + // settings. + repeated CampaignExtensionSettingOperation operations = 2; + + // 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.v1.resources.CampaignExtensionSetting create = 1; + + // Update operation: The campaign extension setting is expected to have a + // valid resource name. + google.ads.googleads.v1.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/v1/services/campaign_feed_service.proto b/google/ads/googleads/v1/services/campaign_feed_service.proto new file mode 100644 index 000000000..26c55adc2 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_feed_service.proto @@ -0,0 +1,123 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_feed.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 CampaignFeed service. + +// Service to manage campaign feeds. +service CampaignFeedService { + // Returns the requested campaign feed in full detail. + rpc GetCampaignFeed(GetCampaignFeedRequest) + returns (google.ads.googleads.v1.resources.CampaignFeed) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignFeeds/*}" + }; + } + + // Creates, updates, or removes campaign feeds. Operation statuses are + // returned. + rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) + returns (MutateCampaignFeedsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign feeds. + repeated CampaignFeedOperation operations = 2; + + // 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.v1.resources.CampaignFeed create = 1; + + // Update operation: The campaign feed is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/campaign_label_service.proto b/google/ads/googleads/v1/services/campaign_label_service.proto new file mode 100644 index 000000000..56df99167 --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_label_service.proto @@ -0,0 +1,116 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_label.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignLabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Label service. + +// Service to manage labels on campaigns. +service CampaignLabelService { + // Returns the requested campaign-label relationship in full detail. + rpc GetCampaignLabel(GetCampaignLabelRequest) + returns (google.ads.googleads.v1.resources.CampaignLabel) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignLabels/*}" + }; + } + + // Creates and removes campaign-label relationships. + // Operation statuses are returned. + rpc MutateCampaignLabels(MutateCampaignLabelsRequest) + returns (MutateCampaignLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on campaign-label relationships. + repeated CampaignLabelOperation operations = 2; + + // 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.v1.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/v1/services/campaign_service.proto b/google/ads/googleads/v1/services/campaign_service.proto new file mode 100644 index 000000000..542c0bc7b --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_service.proto @@ -0,0 +1,122 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign service. + +// Service to manage campaigns. +service CampaignService { + // Returns the requested campaign in full detail. + rpc GetCampaign(GetCampaignRequest) + returns (google.ads.googleads.v1.resources.Campaign) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaigns/*}" + }; + } + + // Creates, updates, or removes campaigns. Operation statuses are returned. + rpc MutateCampaigns(MutateCampaignsRequest) + returns (MutateCampaignsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaigns:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaigns. + repeated CampaignOperation operations = 2; + + // 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.v1.resources.Campaign create = 1; + + // Update operation: The campaign is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/campaign_shared_set_service.proto b/google/ads/googleads/v1/services/campaign_shared_set_service.proto new file mode 100644 index 000000000..acc9a9afe --- /dev/null +++ b/google/ads/googleads/v1/services/campaign_shared_set_service.proto @@ -0,0 +1,116 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/campaign_shared_set.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CampaignSharedSetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Campaign Shared Set service. + +// Service to manage campaign shared sets. +service CampaignSharedSetService { + // Returns the requested campaign shared set in full detail. + rpc GetCampaignSharedSet(GetCampaignSharedSetRequest) + returns (google.ads.googleads.v1.resources.CampaignSharedSet) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/campaignSharedSets/*}" + }; + } + + // Creates or removes campaign shared sets. Operation statuses are returned. + rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) + returns (MutateCampaignSharedSetsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/campaignSharedSets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign shared sets. + repeated CampaignSharedSetOperation operations = 2; + + // 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.v1.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/v1/services/carrier_constant_service.proto b/google/ads/googleads/v1/services/carrier_constant_service.proto new file mode 100644 index 000000000..10aa6ad86 --- /dev/null +++ b/google/ads/googleads/v1/services/carrier_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/carrier_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CarrierConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 carrier constant service. + +// Service to fetch carrier constants. +service CarrierConstantService { + // Returns the requested carrier constant in full detail. + rpc GetCarrierConstant(GetCarrierConstantRequest) + returns (google.ads.googleads.v1.resources.CarrierConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=carrierConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/change_status_service.proto b/google/ads/googleads/v1/services/change_status_service.proto new file mode 100644 index 000000000..42534f27d --- /dev/null +++ b/google/ads/googleads/v1/services/change_status_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/change_status.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Change Status service. + +// Service to fetch change statuses. +service ChangeStatusService { + // Returns the requested change status in full detail. + rpc GetChangeStatus(GetChangeStatusRequest) + returns (google.ads.googleads.v1.resources.ChangeStatus) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/changeStatus/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/click_view_service.proto b/google/ads/googleads/v1/services/click_view_service.proto new file mode 100644 index 000000000..4ba02a293 --- /dev/null +++ b/google/ads/googleads/v1/services/click_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/click_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ClickViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 ClickView service. + +// Service to fetch click views. +service ClickViewService { + // Returns the requested click view in full detail. + rpc GetClickView(GetClickViewRequest) + returns (google.ads.googleads.v1.resources.ClickView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/clickViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/conversion_action_service.proto b/google/ads/googleads/v1/services/conversion_action_service.proto new file mode 100644 index 000000000..a7ac01ff0 --- /dev/null +++ b/google/ads/googleads/v1/services/conversion_action_service.proto @@ -0,0 +1,125 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/conversion_action.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Conversion Action service. + +// Service to manage conversion actions. +service ConversionActionService { + // Returns the requested conversion action. + rpc GetConversionAction(GetConversionActionRequest) + returns (google.ads.googleads.v1.resources.ConversionAction) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/conversionActions/*}" + }; + } + + // Creates, updates or removes conversion actions. Operation statuses are + // returned. + rpc MutateConversionActions(MutateConversionActionsRequest) + returns (MutateConversionActionsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/conversionActions:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual conversion actions. + repeated ConversionActionOperation operations = 2; + + // 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.v1.resources.ConversionAction create = 1; + + // Update operation: The conversion action is expected to have a valid + // resource name. + google.ads.googleads.v1.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.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 + // 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/v1/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.proto new file mode 100644 index 000000000..70b0a2d7c --- /dev/null +++ b/google/ads/googleads/v1/services/conversion_adjustment_upload_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/enums/conversion_adjustment_type.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentUploadServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to upload conversion adjustments. +service ConversionAdjustmentUploadService { + // Processes the given conversion adjustments. + rpc UploadConversionAdjustments(UploadConversionAdjustmentsRequest) + returns (UploadConversionAdjustmentsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:uploadConversionAdjustments" + body: "*" + }; + } +} + +// 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; + + // The conversion adjustments that are being uploaded. + repeated ConversionAdjustment conversion_adjustments = 2; + + // 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; + + // 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.v1.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.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 + // 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.v1.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/v1/services/conversion_upload_service.proto b/google/ads/googleads/v1/services/conversion_upload_service.proto new file mode 100644 index 000000000..f3d316379 --- /dev/null +++ b/google/ads/googleads/v1/services/conversion_upload_service.proto @@ -0,0 +1,224 @@ +// 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.v1.services; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ConversionUploadServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to upload conversions. +service ConversionUploadService { + // Processes the given click conversions. + rpc UploadClickConversions(UploadClickConversionsRequest) + returns (UploadClickConversionsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:uploadClickConversions" + body: "*" + }; + } + + // Processes the given call conversions. + rpc UploadCallConversions(UploadCallConversionsRequest) + returns (UploadCallConversionsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:uploadCallConversions" + body: "*" + }; + } +} + +// 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; + + // The conversions that are being uploaded. + repeated ClickConversion conversions = 2; + + // 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; + + // 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.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 + // 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.v1.services.ConversionUploadService.UploadCallConversions]. +message UploadCallConversionsRequest { + // The ID of the customer performing the upload. + string customer_id = 1; + + // The conversions that are being uploaded. + repeated CallConversion conversions = 2; + + // 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; + + // 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.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 + // 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/v1/services/custom_interest_service.proto b/google/ads/googleads/v1/services/custom_interest_service.proto new file mode 100644 index 000000000..4dfc1638a --- /dev/null +++ b/google/ads/googleads/v1/services/custom_interest_service.proto @@ -0,0 +1,104 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/custom_interest.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomInterestServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Custom Interest service. + +// Service to manage custom interests. +service CustomInterestService { + // Returns the requested custom interest in full detail. + rpc GetCustomInterest(GetCustomInterestRequest) + returns (google.ads.googleads.v1.resources.CustomInterest) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customInterests/*}" + }; + } + + // Creates or updates custom interests. Operation statuses are returned. + rpc MutateCustomInterests(MutateCustomInterestsRequest) + returns (MutateCustomInterestsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customInterests:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual custom interests. + repeated CustomInterestOperation operations = 2; + + // 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.v1.resources.CustomInterest create = 1; + + // Update operation: The custom interest is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/customer_client_link_service.proto b/google/ads/googleads/v1/services/customer_client_link_service.proto new file mode 100644 index 000000000..c98e43914 --- /dev/null +++ b/google/ads/googleads/v1/services/customer_client_link_service.proto @@ -0,0 +1,96 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/customer_client_link.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientLinkServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to manage customer client links. +service CustomerClientLinkService { + // Returns the requested CustomerClientLink in full detail. + rpc GetCustomerClientLink(GetCustomerClientLinkRequest) + returns (google.ads.googleads.v1.resources.CustomerClientLink) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerClientLinks/*}" + }; + } + + // Creates or updates a customer client link. Operation statuses are returned. + rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) + returns (MutateCustomerClientLinkResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerClientLinks:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform on the individual CustomerClientLink. + CustomerClientLinkOperation operation = 2; +} + +// 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.v1.resources.CustomerClientLink create = 1; + + // Update operation: The link is expected to have a valid resource name. + google.ads.googleads.v1.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/v1/services/customer_client_service.proto b/google/ads/googleads/v1/services/customer_client_service.proto new file mode 100644 index 000000000..1dd809305 --- /dev/null +++ b/google/ads/googleads/v1/services/customer_client_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/customer_client.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Customer Client service. + +// Service to get clients in a customer's hierarchy. +service CustomerClientService { + // Returns the requested client in full detail. + rpc GetCustomerClient(GetCustomerClientRequest) + returns (google.ads.googleads.v1.resources.CustomerClient) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerClients/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/customer_extension_setting_service.proto b/google/ads/googleads/v1/services/customer_extension_setting_service.proto new file mode 100644 index 000000000..9ec4974cd --- /dev/null +++ b/google/ads/googleads/v1/services/customer_extension_setting_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/customer_extension_setting.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerExtensionSettingServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 CustomerExtensionSetting service. + +// Service to manage customer extension settings. +service CustomerExtensionSettingService { + // Returns the requested customer extension setting in full detail. + rpc GetCustomerExtensionSetting(GetCustomerExtensionSettingRequest) + returns (google.ads.googleads.v1.resources.CustomerExtensionSetting) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerExtensionSettings/*}" + }; + } + + // Creates, updates, or removes customer extension settings. Operation + // statuses are returned. + rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) + returns (MutateCustomerExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual customer extension + // settings. + repeated CustomerExtensionSettingOperation operations = 2; + + // 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.v1.resources.CustomerExtensionSetting create = 1; + + // Update operation: The customer extension setting is expected to have a + // valid resource name. + google.ads.googleads.v1.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/v1/services/customer_feed_service.proto b/google/ads/googleads/v1/services/customer_feed_service.proto new file mode 100644 index 000000000..2fecf58e7 --- /dev/null +++ b/google/ads/googleads/v1/services/customer_feed_service.proto @@ -0,0 +1,123 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/customer_feed.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 CustomerFeed service. + +// Service to manage customer feeds. +service CustomerFeedService { + // Returns the requested customer feed in full detail. + rpc GetCustomerFeed(GetCustomerFeedRequest) + returns (google.ads.googleads.v1.resources.CustomerFeed) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerFeeds/*}" + }; + } + + // Creates, updates, or removes customer feeds. Operation statuses are + // returned. + rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) + returns (MutateCustomerFeedsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual customer feeds. + repeated CustomerFeedOperation operations = 2; + + // 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.v1.resources.CustomerFeed create = 1; + + // Update operation: The customer feed is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/customer_label_service.proto b/google/ads/googleads/v1/services/customer_label_service.proto new file mode 100644 index 000000000..e9780aee4 --- /dev/null +++ b/google/ads/googleads/v1/services/customer_label_service.proto @@ -0,0 +1,116 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/customer_label.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerLabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Customer Label service. + +// Service to manage labels on customers. +service CustomerLabelService { + // Returns the requested customer-label relationship in full detail. + rpc GetCustomerLabel(GetCustomerLabelRequest) + returns (google.ads.googleads.v1.resources.CustomerLabel) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerLabels/*}" + }; + } + + // Creates and removes customer-label relationships. + // Operation statuses are returned. + rpc MutateCustomerLabels(MutateCustomerLabelsRequest) + returns (MutateCustomerLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on customer-label relationships. + repeated CustomerLabelOperation operations = 2; + + // 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.v1.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/v1/services/customer_manager_link_service.proto b/google/ads/googleads/v1/services/customer_manager_link_service.proto new file mode 100644 index 000000000..0992880fd --- /dev/null +++ b/google/ads/googleads/v1/services/customer_manager_link_service.proto @@ -0,0 +1,96 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/customer_manager_link.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerManagerLinkServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to manage customer-manager links. +service CustomerManagerLinkService { + // Returns the requested CustomerManagerLink in full detail. + rpc GetCustomerManagerLink(GetCustomerManagerLinkRequest) + returns (google.ads.googleads.v1.resources.CustomerManagerLink) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerManagerLinks/*}" + }; + } + + // Creates or updates customer manager links. Operation statuses are returned. + rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) + returns (MutateCustomerManagerLinkResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerManagerLinks:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual customer manager links. + repeated CustomerManagerLinkOperation operations = 2; +} + +// 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.v1.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; +} + +// The result for the customer manager link mutate. +message MutateCustomerManagerLinkResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v1/services/customer_negative_criterion_service.proto b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto new file mode 100644 index 000000000..bdcdc044c --- /dev/null +++ b/google/ads/googleads/v1/services/customer_negative_criterion_service.proto @@ -0,0 +1,114 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/customer_negative_criterion.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "CustomerNegativeCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Customer Negative Criterion service. + +// Service to manage customer negative criteria. +service CustomerNegativeCriterionService { + // Returns the requested criterion in full detail. + rpc GetCustomerNegativeCriterion(GetCustomerNegativeCriterionRequest) + returns (google.ads.googleads.v1.resources.CustomerNegativeCriterion) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/customerNegativeCriteria/*}" + }; + } + + // Creates or removes criteria. Operation statuses are returned. + rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) + returns (MutateCustomerNegativeCriteriaResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/customerNegativeCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated CustomerNegativeCriterionOperation operations = 2; + + // 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.v1.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/v1/services/customer_service.proto b/google/ads/googleads/v1/services/customer_service.proto new file mode 100644 index 000000000..1fcfea14f --- /dev/null +++ b/google/ads/googleads/v1/services/customer_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/customer.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Customer service. + +// Service to manage customers. +service CustomerService { + // Returns the requested customer in full detail. + rpc GetCustomer(GetCustomerRequest) + returns (google.ads.googleads.v1.resources.Customer) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*}" + }; + } + + // Updates a customer. Operation statuses are returned. + rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:mutate" + body: "*" + }; + } + + // Returns resource names of customers directly accessible by the + // user authenticating the call. + 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) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:createCustomerClient" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform on the customer + CustomerOperation operation = 4; + + // 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]. +message CreateCustomerClientRequest { + // The ID of the Manager under whom client customer is being created. + string customer_id = 1; + + // The new client customer to create. The resource name on this customer + // will be ignored. + google.ads.googleads.v1.resources.Customer customer_client = 2; +} + +// A single update on a customer. +message CustomerOperation { + // Mutate operation. Only updates are supported for customer. + google.ads.googleads.v1.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.v1.services.CustomerService.ListAccessibleCustomers]. +message ListAccessibleCustomersRequest {} + +// 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. + repeated string resource_names = 1; +} diff --git a/google/ads/googleads/v1/services/detail_placement_view_service.proto b/google/ads/googleads/v1/services/detail_placement_view_service.proto new file mode 100644 index 000000000..6c1d44ea8 --- /dev/null +++ b/google/ads/googleads/v1/services/detail_placement_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/detail_placement_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DetailPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Detail Placement View service. + +// Service to fetch Detail Placement views. +service DetailPlacementViewService { + // Returns the requested Detail Placement view in full detail. + rpc GetDetailPlacementView(GetDetailPlacementViewRequest) + returns (google.ads.googleads.v1.resources.DetailPlacementView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/detailPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/display_keyword_view_service.proto b/google/ads/googleads/v1/services/display_keyword_view_service.proto new file mode 100644 index 000000000..7052cec34 --- /dev/null +++ b/google/ads/googleads/v1/services/display_keyword_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/display_keyword_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DisplayKeywordViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Display Keyword View service. + +// Service to manage display keyword views. +service DisplayKeywordViewService { + // Returns the requested display keyword view in full detail. + rpc GetDisplayKeywordView(GetDisplayKeywordViewRequest) + returns (google.ads.googleads.v1.resources.DisplayKeywordView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/displayKeywordViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/domain_category_service.proto b/google/ads/googleads/v1/services/domain_category_service.proto new file mode 100644 index 000000000..046117896 --- /dev/null +++ b/google/ads/googleads/v1/services/domain_category_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/domain_category.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DomainCategoryServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 DomainCategory Service. + +// Service to fetch domain categories. +service DomainCategoryService { + // Returns the requested domain category. + rpc GetDomainCategory(GetDomainCategoryRequest) + returns (google.ads.googleads.v1.resources.DomainCategory) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/domainCategories/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..2a1642a98 --- /dev/null +++ b/google/ads/googleads/v1/services/dynamic_search_ads_search_term_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "DynamicSearchAdsSearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Dynamic Search Ads Search Term View service. + +// Service to fetch dynamic search ads views. +service DynamicSearchAdsSearchTermViewService { + // Returns the requested dynamic search ads search term view in full detail. + rpc GetDynamicSearchAdsSearchTermView( + GetDynamicSearchAdsSearchTermViewRequest) + returns ( + google.ads.googleads.v1.resources.DynamicSearchAdsSearchTermView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..d3950d83c --- /dev/null +++ b/google/ads/googleads/v1/services/expanded_landing_page_view_service.proto @@ -0,0 +1,51 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/expanded_landing_page_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ExpandedLandingPageViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 expanded landing page view service. + +// Service to fetch expanded landing page views. +service ExpandedLandingPageViewService { + // Returns the requested expanded landing page view in full detail. + rpc GetExpandedLandingPageView(GetExpandedLandingPageViewRequest) + returns (google.ads.googleads.v1.resources.ExpandedLandingPageView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/expandedLandingPageViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/extension_feed_item_service.proto b/google/ads/googleads/v1/services/extension_feed_item_service.proto new file mode 100644 index 000000000..6dc3b2ed1 --- /dev/null +++ b/google/ads/googleads/v1/services/extension_feed_item_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/extension_feed_item.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 ExtensionFeedItem service. + +// Service to manage extension feed items. +service ExtensionFeedItemService { + // Returns the requested extension feed item in full detail. + rpc GetExtensionFeedItem(GetExtensionFeedItemRequest) + returns (google.ads.googleads.v1.resources.ExtensionFeedItem) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/extensionFeedItems/*}" + }; + } + + // Creates, updates, or removes extension feed items. Operation + // statuses are returned. + rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) + returns (MutateExtensionFeedItemsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/extensionFeedItems:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual extension feed items. + repeated ExtensionFeedItemOperation operations = 2; + + // 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.v1.resources.ExtensionFeedItem create = 1; + + // Update operation: The extension feed item is expected to have a + // valid resource name. + google.ads.googleads.v1.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 { + // 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/v1/services/feed_item_service.proto b/google/ads/googleads/v1/services/feed_item_service.proto new file mode 100644 index 000000000..e293f8ded --- /dev/null +++ b/google/ads/googleads/v1/services/feed_item_service.proto @@ -0,0 +1,123 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/feed_item.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 FeedItem service. + +// Service to manage feed items. +service FeedItemService { + // Returns the requested feed item in full detail. + rpc GetFeedItem(GetFeedItemRequest) + returns (google.ads.googleads.v1.resources.FeedItem) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/feedItems/*}" + }; + } + + // Creates, updates, or removes feed items. Operation statuses are + // returned. + rpc MutateFeedItems(MutateFeedItemsRequest) + returns (MutateFeedItemsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/feedItems:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed items. + repeated FeedItemOperation operations = 2; + + // 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.v1.resources.FeedItem create = 1; + + // Update operation: The feed item is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/feed_item_target_service.proto b/google/ads/googleads/v1/services/feed_item_target_service.proto new file mode 100644 index 000000000..f710b0109 --- /dev/null +++ b/google/ads/googleads/v1/services/feed_item_target_service.proto @@ -0,0 +1,98 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/feed_item_target.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 FeedItemTarget service. + +// Service to manage feed item targets. +service FeedItemTargetService { + // Returns the requested feed item targets in full detail. + rpc GetFeedItemTarget(GetFeedItemTargetRequest) + returns (google.ads.googleads.v1.resources.FeedItemTarget) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/feedItemTargets/*}" + }; + } + + // Creates or removes feed item targets. Operation statuses are returned. + rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) + returns (MutateFeedItemTargetsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/feedItemTargets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed item targets. + repeated FeedItemTargetOperation operations = 2; +} + +// 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.v1.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/v1/services/feed_mapping_service.proto b/google/ads/googleads/v1/services/feed_mapping_service.proto new file mode 100644 index 000000000..2e85a6005 --- /dev/null +++ b/google/ads/googleads/v1/services/feed_mapping_service.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.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/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedMappingServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 FeedMapping service. + +// Service to manage feed mappings. +service FeedMappingService { + // Returns the requested feed mapping in full detail. + rpc GetFeedMapping(GetFeedMappingRequest) + returns (google.ads.googleads.v1.resources.FeedMapping) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/feedMappings/*}" + }; + } + + // Creates or removes feed mappings. Operation statuses are + // returned. + rpc MutateFeedMappings(MutateFeedMappingsRequest) + returns (MutateFeedMappingsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/feedMappings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed mappings. + repeated FeedMappingOperation operations = 2; + + // 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.v1.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/v1/services/feed_placeholder_view_service.proto b/google/ads/googleads/v1/services/feed_placeholder_view_service.proto new file mode 100644 index 000000000..6430fd9ee --- /dev/null +++ b/google/ads/googleads/v1/services/feed_placeholder_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/feed_placeholder_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedPlaceholderViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 FeedPlaceholderView service. + +// Service to fetch feed placeholder views. +service FeedPlaceholderViewService { + // Returns the requested feed placeholder view in full detail. + rpc GetFeedPlaceholderView(GetFeedPlaceholderViewRequest) + returns (google.ads.googleads.v1.resources.FeedPlaceholderView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/feedPlaceholderViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/feed_service.proto b/google/ads/googleads/v1/services/feed_service.proto new file mode 100644 index 000000000..a3964a64f --- /dev/null +++ b/google/ads/googleads/v1/services/feed_service.proto @@ -0,0 +1,121 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/feed.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "FeedServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Feed service. + +// Service to manage feeds. +service FeedService { + // 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/*}" + }; + } + + // Creates, updates, or removes feeds. Operation statuses are + // returned. + rpc MutateFeeds(MutateFeedsRequest) returns (MutateFeedsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/feeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feeds. + repeated FeedOperation operations = 2; + + // 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.v1.resources.Feed create = 1; + + // Update operation: The feed is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/gender_view_service.proto b/google/ads/googleads/v1/services/gender_view_service.proto new file mode 100644 index 000000000..51c08635a --- /dev/null +++ b/google/ads/googleads/v1/services/gender_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/gender_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GenderViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Gender View service. + +// Service to manage gender views. +service GenderViewService { + // Returns the requested gender view in full detail. + rpc GetGenderView(GetGenderViewRequest) + returns (google.ads.googleads.v1.resources.GenderView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/genderViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/geo_target_constant_service.proto b/google/ads/googleads/v1/services/geo_target_constant_service.proto new file mode 100644 index 000000000..ce79e7ad1 --- /dev/null +++ b/google/ads/googleads/v1/services/geo_target_constant_service.proto @@ -0,0 +1,124 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/geo_target_constant.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "GeoTargetConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Geo target constant service. + +// Service to fetch geo target constants. +service GeoTargetConstantService { + // Returns the requested geo target constant in full detail. + rpc GetGeoTargetConstant(GetGeoTargetConstantRequest) + returns (google.ads.googleads.v1.resources.GeoTargetConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=geoTargetConstants/*}" + }; + } + + // Returns GeoTargetConstant suggestions by location name or by resource name. + rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) + returns (SuggestGeoTargetConstantsResponse) { + option (google.api.http) = { + post: "/v1/geoTargetConstants:suggest" + body: "*" + }; + } +} + +// 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; +} + +// 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.v1.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.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; +} diff --git a/google/ads/googleads/v1/services/geographic_view_service.proto b/google/ads/googleads/v1/services/geographic_view_service.proto new file mode 100644 index 000000000..f30ab4287 --- /dev/null +++ b/google/ads/googleads/v1/services/geographic_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/geographic_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GeographicViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 GeographicViewService. + +// Service to manage geographic views. +service GeographicViewService { + // Returns the requested geographic view in full detail. + rpc GetGeographicView(GetGeographicViewRequest) + returns (google.ads.googleads.v1.resources.GeographicView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/geographicViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/google_ads_field_service.proto b/google/ads/googleads/v1/services/google_ads_field_service.proto new file mode 100644 index 000000000..1bf9a6159 --- /dev/null +++ b/google/ads/googleads/v1/services/google_ads_field_service.proto @@ -0,0 +1,91 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/google_ads_field.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 GoogleAdsFieldService + +// Service to fetch Google Ads API fields. +service GoogleAdsFieldService { + // Returns just the requested field. + rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) + returns (google.ads.googleads.v1.resources.GoogleAdsField) { + option (google.api.http) = { + get: "/v1/{resource_name=googleAdsFields/*}" + }; + } + + // Returns all fields that match the search query. + rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) + returns (SearchGoogleAdsFieldsResponse) { + option (google.api.http) = { + post: "/v1/googleAdsFields:search" + body: "*" + }; + } +} + +// 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; +} + +// Request message for +// [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsRequest { + // The query string. + string query = 1; + + // 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.v1.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsResponse { + // The list of fields that matched the query. + repeated google.ads.googleads.v1.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/v1/services/google_ads_service.proto b/google/ads/googleads/v1/services/google_ads_service.proto new file mode 100644 index 000000000..92cc352e8 --- /dev/null +++ b/google/ads/googleads/v1/services/google_ads_service.proto @@ -0,0 +1,880 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/common/metrics.proto"; +import "google/ads/googleads/v1/common/segments.proto"; +import "google/ads/googleads/v1/resources/account_budget.proto"; +import "google/ads/googleads/v1/resources/account_budget_proposal.proto"; +import "google/ads/googleads/v1/resources/ad_group.proto"; +import "google/ads/googleads/v1/resources/ad_group_ad.proto"; +import "google/ads/googleads/v1/resources/ad_group_ad_label.proto"; +import "google/ads/googleads/v1/resources/ad_group_audience_view.proto"; +import "google/ads/googleads/v1/resources/ad_group_bid_modifier.proto"; +import "google/ads/googleads/v1/resources/ad_group_criterion.proto"; +import "google/ads/googleads/v1/resources/ad_group_criterion_label.proto"; +import "google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto"; +import "google/ads/googleads/v1/resources/ad_group_extension_setting.proto"; +import "google/ads/googleads/v1/resources/ad_group_feed.proto"; +import "google/ads/googleads/v1/resources/ad_group_label.proto"; +import "google/ads/googleads/v1/resources/ad_group_simulation.proto"; +import "google/ads/googleads/v1/resources/ad_parameter.proto"; +import "google/ads/googleads/v1/resources/ad_schedule_view.proto"; +import "google/ads/googleads/v1/resources/age_range_view.proto"; +import "google/ads/googleads/v1/resources/asset.proto"; +import "google/ads/googleads/v1/resources/bidding_strategy.proto"; +import "google/ads/googleads/v1/resources/billing_setup.proto"; +import "google/ads/googleads/v1/resources/campaign.proto"; +import "google/ads/googleads/v1/resources/campaign_audience_view.proto"; +import "google/ads/googleads/v1/resources/campaign_bid_modifier.proto"; +import "google/ads/googleads/v1/resources/campaign_budget.proto"; +import "google/ads/googleads/v1/resources/campaign_criterion.proto"; +import "google/ads/googleads/v1/resources/campaign_criterion_simulation.proto"; +import "google/ads/googleads/v1/resources/campaign_draft.proto"; +import "google/ads/googleads/v1/resources/campaign_experiment.proto"; +import "google/ads/googleads/v1/resources/campaign_extension_setting.proto"; +import "google/ads/googleads/v1/resources/campaign_feed.proto"; +import "google/ads/googleads/v1/resources/campaign_label.proto"; +import "google/ads/googleads/v1/resources/campaign_shared_set.proto"; +import "google/ads/googleads/v1/resources/carrier_constant.proto"; +import "google/ads/googleads/v1/resources/change_status.proto"; +import "google/ads/googleads/v1/resources/click_view.proto"; +import "google/ads/googleads/v1/resources/conversion_action.proto"; +import "google/ads/googleads/v1/resources/custom_interest.proto"; +import "google/ads/googleads/v1/resources/customer.proto"; +import "google/ads/googleads/v1/resources/customer_client.proto"; +import "google/ads/googleads/v1/resources/customer_client_link.proto"; +import "google/ads/googleads/v1/resources/customer_extension_setting.proto"; +import "google/ads/googleads/v1/resources/customer_feed.proto"; +import "google/ads/googleads/v1/resources/customer_label.proto"; +import "google/ads/googleads/v1/resources/customer_manager_link.proto"; +import "google/ads/googleads/v1/resources/customer_negative_criterion.proto"; +import "google/ads/googleads/v1/resources/detail_placement_view.proto"; +import "google/ads/googleads/v1/resources/display_keyword_view.proto"; +import "google/ads/googleads/v1/resources/domain_category.proto"; +import "google/ads/googleads/v1/resources/dynamic_search_ads_search_term_view.proto"; +import "google/ads/googleads/v1/resources/expanded_landing_page_view.proto"; +import "google/ads/googleads/v1/resources/extension_feed_item.proto"; +import "google/ads/googleads/v1/resources/feed.proto"; +import "google/ads/googleads/v1/resources/feed_item.proto"; +import "google/ads/googleads/v1/resources/feed_item_target.proto"; +import "google/ads/googleads/v1/resources/feed_mapping.proto"; +import "google/ads/googleads/v1/resources/feed_placeholder_view.proto"; +import "google/ads/googleads/v1/resources/gender_view.proto"; +import "google/ads/googleads/v1/resources/geo_target_constant.proto"; +import "google/ads/googleads/v1/resources/geographic_view.proto"; +import "google/ads/googleads/v1/resources/group_placement_view.proto"; +import "google/ads/googleads/v1/resources/hotel_group_view.proto"; +import "google/ads/googleads/v1/resources/hotel_performance_view.proto"; +import "google/ads/googleads/v1/resources/keyword_plan.proto"; +import "google/ads/googleads/v1/resources/keyword_plan_ad_group.proto"; +import "google/ads/googleads/v1/resources/keyword_plan_campaign.proto"; +import "google/ads/googleads/v1/resources/keyword_plan_keyword.proto"; +import "google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto"; +import "google/ads/googleads/v1/resources/keyword_view.proto"; +import "google/ads/googleads/v1/resources/label.proto"; +import "google/ads/googleads/v1/resources/landing_page_view.proto"; +import "google/ads/googleads/v1/resources/language_constant.proto"; +import "google/ads/googleads/v1/resources/location_view.proto"; +import "google/ads/googleads/v1/resources/managed_placement_view.proto"; +import "google/ads/googleads/v1/resources/media_file.proto"; +import "google/ads/googleads/v1/resources/mobile_app_category_constant.proto"; +import "google/ads/googleads/v1/resources/mobile_device_constant.proto"; +import "google/ads/googleads/v1/resources/mutate_job.proto"; +import "google/ads/googleads/v1/resources/operating_system_version_constant.proto"; +import "google/ads/googleads/v1/resources/paid_organic_search_term_view.proto"; +import "google/ads/googleads/v1/resources/parental_status_view.proto"; +import "google/ads/googleads/v1/resources/product_bidding_category_constant.proto"; +import "google/ads/googleads/v1/resources/product_group_view.proto"; +import "google/ads/googleads/v1/resources/recommendation.proto"; +import "google/ads/googleads/v1/resources/remarketing_action.proto"; +import "google/ads/googleads/v1/resources/search_term_view.proto"; +import "google/ads/googleads/v1/resources/shared_criterion.proto"; +import "google/ads/googleads/v1/resources/shared_set.proto"; +import "google/ads/googleads/v1/resources/shopping_performance_view.proto"; +import "google/ads/googleads/v1/resources/topic_constant.proto"; +import "google/ads/googleads/v1/resources/topic_view.proto"; +import "google/ads/googleads/v1/resources/user_interest.proto"; +import "google/ads/googleads/v1/resources/user_list.proto"; +import "google/ads/googleads/v1/resources/video.proto"; +import "google/ads/googleads/v1/services/ad_group_ad_label_service.proto"; +import "google/ads/googleads/v1/services/ad_group_ad_service.proto"; +import "google/ads/googleads/v1/services/ad_group_bid_modifier_service.proto"; +import "google/ads/googleads/v1/services/ad_group_criterion_label_service.proto"; +import "google/ads/googleads/v1/services/ad_group_criterion_service.proto"; +import "google/ads/googleads/v1/services/ad_group_extension_setting_service.proto"; +import "google/ads/googleads/v1/services/ad_group_feed_service.proto"; +import "google/ads/googleads/v1/services/ad_group_label_service.proto"; +import "google/ads/googleads/v1/services/ad_group_service.proto"; +import "google/ads/googleads/v1/services/ad_parameter_service.proto"; +import "google/ads/googleads/v1/services/asset_service.proto"; +import "google/ads/googleads/v1/services/bidding_strategy_service.proto"; +import "google/ads/googleads/v1/services/campaign_bid_modifier_service.proto"; +import "google/ads/googleads/v1/services/campaign_budget_service.proto"; +import "google/ads/googleads/v1/services/campaign_criterion_service.proto"; +import "google/ads/googleads/v1/services/campaign_draft_service.proto"; +import "google/ads/googleads/v1/services/campaign_experiment_service.proto"; +import "google/ads/googleads/v1/services/campaign_extension_setting_service.proto"; +import "google/ads/googleads/v1/services/campaign_feed_service.proto"; +import "google/ads/googleads/v1/services/campaign_label_service.proto"; +import "google/ads/googleads/v1/services/campaign_service.proto"; +import "google/ads/googleads/v1/services/campaign_shared_set_service.proto"; +import "google/ads/googleads/v1/services/conversion_action_service.proto"; +import "google/ads/googleads/v1/services/customer_extension_setting_service.proto"; +import "google/ads/googleads/v1/services/customer_feed_service.proto"; +import "google/ads/googleads/v1/services/customer_label_service.proto"; +import "google/ads/googleads/v1/services/customer_negative_criterion_service.proto"; +import "google/ads/googleads/v1/services/customer_service.proto"; +import "google/ads/googleads/v1/services/extension_feed_item_service.proto"; +import "google/ads/googleads/v1/services/feed_item_service.proto"; +import "google/ads/googleads/v1/services/feed_item_target_service.proto"; +import "google/ads/googleads/v1/services/feed_mapping_service.proto"; +import "google/ads/googleads/v1/services/feed_service.proto"; +import "google/ads/googleads/v1/services/label_service.proto"; +import "google/ads/googleads/v1/services/media_file_service.proto"; +import "google/ads/googleads/v1/services/remarketing_action_service.proto"; +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/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 GoogleAdsService. + +// Service to fetch data and metrics across resources. +service GoogleAdsService { + // 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: "*" + }; + } + + // 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: "/v1/customers/{customer_id=*}/googleAds:mutate" + body: "*" + }; + } +} + +// 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; + + // The query string. + string query = 2; + + // 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; +} + +// 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; + + // 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; +} + +// A returned row from the query. +message GoogleAdsRow { + // The account budget in the query. + 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; + + // The ad group referenced in the query. + google.ads.googleads.v1.resources.AdGroup ad_group = 3; + + // The ad referenced in the query. + google.ads.googleads.v1.resources.AdGroupAd ad_group_ad = 16; + + // The ad group ad label referenced in the query. + 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; + + // The bid modifier referenced in the query. + 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; + + // The ad group criterion simulation referenced in the query. + 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; + + // The ad group feed referenced in the query. + google.ads.googleads.v1.resources.AdGroupFeed ad_group_feed = 67; + + // The ad group label referenced in the query. + google.ads.googleads.v1.resources.AdGroupLabel ad_group_label = 115; + + // The ad group simulation referenced in the query. + google.ads.googleads.v1.resources.AdGroupSimulation ad_group_simulation = 107; + + // The ad parameter referenced in the query. + google.ads.googleads.v1.resources.AdParameter ad_parameter = 130; + + // The age range view referenced in the query. + google.ads.googleads.v1.resources.AgeRangeView age_range_view = 48; + + // The ad schedule view referenced in the query. + google.ads.googleads.v1.resources.AdScheduleView ad_schedule_view = 89; + + // The domain category referenced in the query. + google.ads.googleads.v1.resources.DomainCategory domain_category = 91; + + // The asset referenced in the query. + google.ads.googleads.v1.resources.Asset asset = 105; + + // The bidding strategy referenced in the query. + google.ads.googleads.v1.resources.BiddingStrategy bidding_strategy = 18; + + // The billing setup referenced in the query. + google.ads.googleads.v1.resources.BillingSetup billing_setup = 41; + + // The campaign budget referenced in the query. + google.ads.googleads.v1.resources.CampaignBudget campaign_budget = 19; + + // The campaign referenced in the query. + 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; + + // The campaign bid modifier referenced in the query. + 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; + + // The campaign draft referenced in the query. + google.ads.googleads.v1.resources.CampaignDraft campaign_draft = 49; + + // The campaign experiment referenced in the query. + 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; + + // The campaign feed referenced in the query. + google.ads.googleads.v1.resources.CampaignFeed campaign_feed = 63; + + // The campaign label referenced in the query. + google.ads.googleads.v1.resources.CampaignLabel campaign_label = 108; + + // Campaign Shared Set referenced in AWQL query. + google.ads.googleads.v1.resources.CampaignSharedSet campaign_shared_set = 30; + + // The carrier constant referenced in the query. + google.ads.googleads.v1.resources.CarrierConstant carrier_constant = 66; + + // The ChangeStatus referenced in the query. + google.ads.googleads.v1.resources.ChangeStatus change_status = 37; + + // The conversion action referenced in the query. + google.ads.googleads.v1.resources.ConversionAction conversion_action = 103; + + // The ClickView referenced in the query. + google.ads.googleads.v1.resources.ClickView click_view = 122; + + // The CustomInterest referenced in the query. + google.ads.googleads.v1.resources.CustomInterest custom_interest = 104; + + // The customer referenced in the query. + google.ads.googleads.v1.resources.Customer customer = 1; + + // The CustomerManagerLink referenced in the query. + 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; + + // 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; + + // The customer feed referenced in the query. + google.ads.googleads.v1.resources.CustomerFeed customer_feed = 64; + + // The customer label referenced in the query. + 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; + + // The detail placement view referenced in the query. + 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; + + // The dynamic search ads search term view referenced in the query. + 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; + + // The extension feed item referenced in the query. + google.ads.googleads.v1.resources.ExtensionFeedItem extension_feed_item = 85; + + // The feed referenced in the query. + google.ads.googleads.v1.resources.Feed feed = 46; + + // The feed item referenced in the query. + google.ads.googleads.v1.resources.FeedItem feed_item = 50; + + // The feed item target referenced in the query. + google.ads.googleads.v1.resources.FeedItemTarget feed_item_target = 116; + + // The feed mapping referenced in the query. + 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; + + // The gender view referenced in the query. + google.ads.googleads.v1.resources.GenderView gender_view = 40; + + // The geo target constant referenced in the query. + google.ads.googleads.v1.resources.GeoTargetConstant geo_target_constant = 23; + + // The geographic view referenced in the query. + 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; + + // 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; + + // The keyword view referenced in the query. + google.ads.googleads.v1.resources.KeywordView keyword_view = 21; + + // The keyword plan referenced in the query. + 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; + + // The keyword plan negative keyword referenced in the query. + 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; + + // The keyword plan keyword referenced in the query. + google.ads.googleads.v1.resources.KeywordPlanKeyword keyword_plan_keyword = + 36; + + // The label referenced in the query. + google.ads.googleads.v1.resources.Label label = 52; + + // The landing page view referenced in the query. + google.ads.googleads.v1.resources.LandingPageView landing_page_view = 126; + + // The language constant referenced in the query. + google.ads.googleads.v1.resources.LanguageConstant language_constant = 55; + + // The location view referenced in the query. + 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; + + // 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; + + // The mobile device constant referenced in the query. + 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; + + // The paid organic search term view referenced in the query. + 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; + + // The Product Bidding Category referenced in the query. + 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; + + // The recommendation referenced in the query. + google.ads.googleads.v1.resources.Recommendation recommendation = 22; + + // The search term view referenced in the query. + google.ads.googleads.v1.resources.SearchTermView search_term_view = 68; + + // The shared set referenced in the query. + google.ads.googleads.v1.resources.SharedCriterion shared_criterion = 29; + + // The shared set referenced in the query. + 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; + + // The topic view referenced in the query. + google.ads.googleads.v1.resources.TopicView topic_view = 44; + + // The user interest referenced in the query. + google.ads.googleads.v1.resources.UserInterest user_interest = 59; + + // The user list referenced in the query. + google.ads.googleads.v1.resources.UserList user_list = 38; + + // The remarketing action referenced in the query. + google.ads.googleads.v1.resources.RemarketingAction remarketing_action = 60; + + // The topic constant referenced in the query. + google.ads.googleads.v1.resources.TopicConstant topic_constant = 31; + + // The video referenced in the query. + google.ads.googleads.v1.resources.Video video = 39; + + // The metrics. + google.ads.googleads.v1.common.Metrics metrics = 4; + + // The segments. + google.ads.googleads.v1.common.Segments segments = 102; +} + +// 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; + + // The list of operations to perform on individual resources. + repeated MutateOperation mutate_operations = 2; + + // 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.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), + // 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 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 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/v1/services/group_placement_view_service.proto b/google/ads/googleads/v1/services/group_placement_view_service.proto new file mode 100644 index 000000000..f6071e887 --- /dev/null +++ b/google/ads/googleads/v1/services/group_placement_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/group_placement_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "GroupPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Group Placement View service. + +// Service to fetch Group Placement views. +service GroupPlacementViewService { + // Returns the requested Group Placement view in full detail. + rpc GetGroupPlacementView(GetGroupPlacementViewRequest) + returns (google.ads.googleads.v1.resources.GroupPlacementView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/groupPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/hotel_group_view_service.proto b/google/ads/googleads/v1/services/hotel_group_view_service.proto new file mode 100644 index 000000000..745035c36 --- /dev/null +++ b/google/ads/googleads/v1/services/hotel_group_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/hotel_group_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "HotelGroupViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Hotel Group View Service. + +// Service to manage Hotel Group Views. +service HotelGroupViewService { + // Returns the requested Hotel Group View in full detail. + rpc GetHotelGroupView(GetHotelGroupViewRequest) + returns (google.ads.googleads.v1.resources.HotelGroupView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/hotelGroupViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/hotel_performance_view_service.proto b/google/ads/googleads/v1/services/hotel_performance_view_service.proto new file mode 100644 index 000000000..08344d7ec --- /dev/null +++ b/google/ads/googleads/v1/services/hotel_performance_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/hotel_performance_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "HotelPerformanceViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Hotel Performance View Service. + +// Service to manage Hotel Performance Views. +service HotelPerformanceViewService { + // Returns the requested Hotel Performance View in full detail. + rpc GetHotelPerformanceView(GetHotelPerformanceViewRequest) + returns (google.ads.googleads.v1.resources.HotelPerformanceView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/hotelPerformanceView}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..b40a603b6 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_ad_group_service.proto @@ -0,0 +1,125 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/keyword_plan_ad_group.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan ad group service. + +// Service to manage Keyword Plan ad groups. +service KeywordPlanAdGroupService { + // Returns the requested Keyword Plan ad group in full detail. + rpc GetKeywordPlanAdGroup(GetKeywordPlanAdGroupRequest) + returns (google.ads.googleads.v1.resources.KeywordPlanAdGroup) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordPlanAdGroups/*}" + }; + } + + // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are + // returned. + rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) + returns (MutateKeywordPlanAdGroupsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/keywordPlanAdGroups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan ad groups. + repeated KeywordPlanAdGroupOperation operations = 2; + + // 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.v1.resources.KeywordPlanAdGroup create = 1; + + // Update operation: The Keyword Plan ad group is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto new file mode 100644 index 000000000..bb1e301ab --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_campaign_service.proto @@ -0,0 +1,125 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/keyword_plan_campaign.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan campaign service. + +// Service to manage Keyword Plan campaigns. +service KeywordPlanCampaignService { + // Returns the requested Keyword Plan campaign in full detail. + rpc GetKeywordPlanCampaign(GetKeywordPlanCampaignRequest) + returns (google.ads.googleads.v1.resources.KeywordPlanCampaign) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordPlanCampaigns/*}" + }; + } + + // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are + // returned. + rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) + returns (MutateKeywordPlanCampaignsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/keywordPlanCampaigns:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan campaigns. + repeated KeywordPlanCampaignOperation operations = 2; + + // 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.v1.resources.KeywordPlanCampaign create = 1; + + // Update operation: The Keyword Plan campaign is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/keyword_plan_idea_service.proto b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto new file mode 100644 index 000000000..f009288c1 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_idea_service.proto @@ -0,0 +1,117 @@ +// 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.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/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanIdeaServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan idea service. + +// Service to generate keyword ideas. +service KeywordPlanIdeaService { + // Returns a list of keyword ideas. + rpc GenerateKeywordIdeas(GenerateKeywordIdeasRequest) + returns (GenerateKeywordIdeaResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}:generateKeywordIdeas" + body: "*" + }; + } +} + +// Request message for [KeywordIdeaService.GenerateKeywordIdeas][]. +message GenerateKeywordIdeasRequest { + // The ID of the customer with the recommendation. + string customer_id = 1; + + // The resource name of the language to target. + // Required + google.protobuf.StringValue language = 7; + + // 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; + + // 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.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 new file mode 100644 index 000000000..63b0ced19 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_keyword_service.proto @@ -0,0 +1,125 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/keyword_plan_keyword.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan keyword service. + +// Service to manage Keyword Plan ad group keywords. +service KeywordPlanKeywordService { + // Returns the requested Keyword Plan keyword in full detail. + rpc GetKeywordPlanKeyword(GetKeywordPlanKeywordRequest) + returns (google.ads.googleads.v1.resources.KeywordPlanKeyword) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordPlanKeywords/*}" + }; + } + + // Creates, updates, or removes Keyword Plan keywords. Operation statuses are + // returned. + rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) + returns (MutateKeywordPlanKeywordsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/keywordPlanKeywords:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan keywords. + repeated KeywordPlanKeywordOperation operations = 2; + + // 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.v1.resources.KeywordPlanKeyword create = 1; + + // Update operation: The Keyword Plan keyword is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto new file mode 100644 index 000000000..baa1fe248 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_negative_keyword_service.proto @@ -0,0 +1,129 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/keyword_plan_negative_keyword.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan negative keyword service. + +// Service to manage Keyword Plan negative keywords. +service KeywordPlanNegativeKeywordService { + // Returns the requested plan in full detail. + rpc GetKeywordPlanNegativeKeyword(GetKeywordPlanNegativeKeywordRequest) + returns (google.ads.googleads.v1.resources.KeywordPlanNegativeKeyword) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordPlanNegativeKeywords/*}" + }; + } + + // Creates, updates, or removes Keyword Plan negative keywords. Operation + // statuses are returned. + rpc MutateKeywordPlanNegativeKeywords( + MutateKeywordPlanNegativeKeywordsRequest) + returns (MutateKeywordPlanNegativeKeywordsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan negative + // keywords. + repeated KeywordPlanNegativeKeywordOperation operations = 2; + + // 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.v1.resources.KeywordPlanNegativeKeyword create = 1; + + // Update operation: The Keyword Plan negative keyword expected to have a + // valid resource name. + google.ads.googleads.v1.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/v1/services/keyword_plan_service.proto b/google/ads/googleads/v1/services/keyword_plan_service.proto new file mode 100644 index 000000000..eb5b31619 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_plan_service.proto @@ -0,0 +1,248 @@ +// 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.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/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 keyword plan service. + +// Service to manage keyword plans. +service KeywordPlanService { + // Returns the requested plan in full detail. + rpc GetKeywordPlan(GetKeywordPlanRequest) + returns (google.ads.googleads.v1.resources.KeywordPlan) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordPlans/*}" + }; + } + + // Creates, updates, or removes keyword plans. Operation statuses are + // returned. + rpc MutateKeywordPlans(MutateKeywordPlansRequest) + returns (MutateKeywordPlansResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/keywordPlans:mutate" + body: "*" + }; + } + + // Returns the requested Keyword Plan forecasts. + rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) + returns (GenerateForecastMetricsResponse) { + option (google.api.http) = { + post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics" + body: "*" + }; + } + + // Returns the requested Keyword Plan historical metrics. + rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) + returns (GenerateHistoricalMetricsResponse) { + option (google.api.http) = { + post: "/v1/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual keyword plans. + repeated KeywordPlanOperation operations = 2; + + // 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.v1.resources.KeywordPlan create = 1; + + // Update operation: The keyword plan is expected to have a valid resource + // name. + google.ads.googleads.v1.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.v1.services.KeywordPlanService.GenerateForecastMetrics]. +message GenerateForecastMetricsRequest { + // The resource name of the keyword plan to be forecasted. + string keyword_plan = 1; +} + +// Response message for +// [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v1.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.v1.services.KeywordPlanService.GenerateHistoricalMetrics]. +message GenerateHistoricalMetricsRequest { + // The resource name of the keyword plan of which historical metrics are + // requested. + string keyword_plan = 1; +} + +// Response message for +// [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v1.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.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 new file mode 100644 index 000000000..820341126 --- /dev/null +++ b/google/ads/googleads/v1/services/keyword_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/keyword_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "KeywordViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Keyword View service. + +// Service to manage keyword views. +service KeywordViewService { + // Returns the requested keyword view in full detail. + rpc GetKeywordView(GetKeywordViewRequest) + returns (google.ads.googleads.v1.resources.KeywordView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/keywordViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/label_service.proto b/google/ads/googleads/v1/services/label_service.proto new file mode 100644 index 000000000..f5f6f8782 --- /dev/null +++ b/google/ads/googleads/v1/services/label_service.proto @@ -0,0 +1,118 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/label.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LabelServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to manage labels. +service LabelService { + // Returns the requested label in full detail. + rpc GetLabel(GetLabelRequest) + returns (google.ads.googleads.v1.resources.Label) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/labels/*}" + }; + } + + // Creates, updates, or removes labels. Operation statuses are returned. + rpc MutateLabels(MutateLabelsRequest) returns (MutateLabelsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/labels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on labels. + repeated LabelOperation operations = 2; + + // 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.v1.resources.Label create = 1; + + // Update operation: The label is expected to have a valid resource name. + google.ads.googleads.v1.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/v1/services/landing_page_view_service.proto b/google/ads/googleads/v1/services/landing_page_view_service.proto new file mode 100644 index 000000000..0d703e826 --- /dev/null +++ b/google/ads/googleads/v1/services/landing_page_view_service.proto @@ -0,0 +1,51 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/landing_page_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "LandingPageViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 landing page view service. + +// Service to fetch landing page views. +service LandingPageViewService { + // Returns the requested landing page view in full detail. + rpc GetLandingPageView(GetLandingPageViewRequest) + returns (google.ads.googleads.v1.resources.LandingPageView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/landingPageViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/language_constant_service.proto b/google/ads/googleads/v1/services/language_constant_service.proto new file mode 100644 index 000000000..cdd76ea75 --- /dev/null +++ b/google/ads/googleads/v1/services/language_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/language_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LanguageConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 language constant service. + +// Service to fetch language constants. +service LanguageConstantService { + // Returns the requested language constant. + rpc GetLanguageConstant(GetLanguageConstantRequest) + returns (google.ads.googleads.v1.resources.LanguageConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=languageConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/location_view_service.proto b/google/ads/googleads/v1/services/location_view_service.proto new file mode 100644 index 000000000..a7eae73bc --- /dev/null +++ b/google/ads/googleads/v1/services/location_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/location_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "LocationViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Location View service. + +// Service to fetch location views. +service LocationViewService { + // Returns the requested location view in full detail. + rpc GetLocationView(GetLocationViewRequest) + returns (google.ads.googleads.v1.resources.LocationView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/locationViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/managed_placement_view_service.proto b/google/ads/googleads/v1/services/managed_placement_view_service.proto new file mode 100644 index 000000000..49aef4d50 --- /dev/null +++ b/google/ads/googleads/v1/services/managed_placement_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/managed_placement_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ManagedPlacementViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Managed Placement View service. + +// Service to manage Managed Placement views. +service ManagedPlacementViewService { + // Returns the requested Managed Placement view in full detail. + rpc GetManagedPlacementView(GetManagedPlacementViewRequest) + returns (google.ads.googleads.v1.resources.ManagedPlacementView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/managedPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/media_file_service.proto b/google/ads/googleads/v1/services/media_file_service.proto new file mode 100644 index 000000000..a34073fa2 --- /dev/null +++ b/google/ads/googleads/v1/services/media_file_service.proto @@ -0,0 +1,108 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/media_file.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MediaFileServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Media File service. + +// Service to manage media files. +service MediaFileService { + // Returns the requested media file in full detail. + rpc GetMediaFile(GetMediaFileRequest) + returns (google.ads.googleads.v1.resources.MediaFile) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/mediaFiles/*}" + }; + } + + // Creates media files. Operation statuses are returned. + rpc MutateMediaFiles(MutateMediaFilesRequest) + returns (MutateMediaFilesResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/mediaFiles:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual media file. + repeated MediaFileOperation operations = 2; + + // 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.v1.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/v1/services/merchant_center_link_service.proto b/google/ads/googleads/v1/services/merchant_center_link_service.proto new file mode 100644 index 000000000..10ea4dbd9 --- /dev/null +++ b/google/ads/googleads/v1/services/merchant_center_link_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/merchant_center_link.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MerchantCenterLinkServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 MerchantCenterLink service. + +// 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.http) = { + get: "/v1/customers/{customer_id=*}/merchantCenterLinks" + }; + } + + // Returns the Merchant Center link in full detail. + rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) + returns (google.ads.googleads.v1.resources.MerchantCenterLink) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/merchantCenterLinks/*}" + }; + } + + // Updates status or removes a Merchant Center link. + rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) + returns (MutateMerchantCenterLinkResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/merchantCenterLinks:mutate" + body: "*" + }; + } +} + +// 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 + // operation. + string customer_id = 1; +} + +// 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; +} + +// 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; +} + +// 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; + + // The operation to perform on the link + MerchantCenterLinkOperation operation = 2; +} + +// 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.v1.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/v1/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto new file mode 100644 index 000000000..3cfae7aec --- /dev/null +++ b/google/ads/googleads/v1/services/mobile_app_category_constant_service.proto @@ -0,0 +1,48 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/mobile_app_category_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MobileAppCategoryConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services"; +option ruby_package = "Google::Ads::GoogleAds::V1::Services"; + +// Service to fetch mobile app category constants. +service MobileAppCategoryConstantService { + // Returns the requested mobile app category constant. + rpc GetMobileAppCategoryConstant(GetMobileAppCategoryConstantRequest) + returns (google.ads.googleads.v1.resources.MobileAppCategoryConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=mobileAppCategoryConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/mobile_device_constant_service.proto b/google/ads/googleads/v1/services/mobile_device_constant_service.proto new file mode 100644 index 000000000..e269b404c --- /dev/null +++ b/google/ads/googleads/v1/services/mobile_device_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/mobile_device_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 mobile device constant service. + +// Service to fetch mobile device constants. +service MobileDeviceConstantService { + // Returns the requested mobile device constant in full detail. + rpc GetMobileDeviceConstant(GetMobileDeviceConstantRequest) + returns (google.ads.googleads.v1.resources.MobileDeviceConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=mobileDeviceConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/mutate_job_service.proto b/google/ads/googleads/v1/services/mutate_job_service.proto new file mode 100644 index 000000000..06dd654e7 --- /dev/null +++ b/google/ads/googleads/v1/services/mutate_job_service.proto @@ -0,0 +1,193 @@ +// 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.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/longrunning/operations.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 MutateJobService. + +// Service to manage mutate jobs. +service MutateJobService { + // Creates a mutate job. + rpc CreateMutateJob(CreateMutateJobRequest) + returns (CreateMutateJobResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/mutateJobs:create" + body: "*" + }; + } + + // Returns the mutate job. + rpc GetMutateJob(GetMutateJobRequest) + returns (google.ads.googleads.v1.resources.MutateJob) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/mutateJobs/*}" + }; + } + + // 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: "/v1/{resource_name=customers/*/mutateJobs/*}:listResults" + }; + } + + // 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: "/v1/{resource_name=customers/*/mutateJobs/*}:run" + body: "*" + }; + } + + // Add operations to the mutate job. + rpc AddMutateJobOperations(AddMutateJobOperationsRequest) + returns (AddMutateJobOperationsResponse) { + option (google.api.http) = { + post: "/v1/{resource_name=customers/*/mutateJobs/*}:addOperations" + body: "*" + }; + } +} + +// Request message for [MutateJobService.CreateMutateJobRequest][] +message CreateMutateJobRequest { + // The ID of the customer for which to create a mutate job. + string customer_id = 1; +} + +// 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.v1.services.MutateJobService.GetMutateJob] +message GetMutateJobRequest { + // The resource name of the MutateJob to get. + string resource_name = 1; +} + +// 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; +} + +// Request message for +// [MutateJobService.AddMutateJobOperations][google.ads.googleads.v1.services.MutateJobService.AddMutateJobOperations] +message AddMutateJobOperationsRequest { + // The resource name of the MutateJob. + string resource_name = 1; + + // 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; + + // 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; +} + +// 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; + + // 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.v1.services.MutateJobService.ListMutateJobResults]. +message ListMutateJobResultsRequest { + // The resource name of the MutateJob whose results are being listed. + string resource_name = 1; + + // 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.v1.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/v1/services/operating_system_version_constant_service.proto b/google/ads/googleads/v1/services/operating_system_version_constant_service.proto new file mode 100644 index 000000000..66c447fab --- /dev/null +++ b/google/ads/googleads/v1/services/operating_system_version_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/operating_system_version_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "OperatingSystemVersionConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 OS version constant service + +// Service to fetch Operating System Version constants. +service OperatingSystemVersionConstantService { + // Returns the requested OS version constant in full detail. + rpc GetOperatingSystemVersionConstant( + GetOperatingSystemVersionConstantRequest) + returns ( + google.ads.googleads.v1.resources.OperatingSystemVersionConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=operatingSystemVersionConstants/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..420cc8309 --- /dev/null +++ b/google/ads/googleads/v1/services/paid_organic_search_term_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/paid_organic_search_term_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "PaidOrganicSearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Paid Organic Search Term View service. + +// Service to fetch paid organic search term views. +service PaidOrganicSearchTermViewService { + // Returns the requested paid organic search term view in full detail. + rpc GetPaidOrganicSearchTermView(GetPaidOrganicSearchTermViewRequest) + returns (google.ads.googleads.v1.resources.PaidOrganicSearchTermView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/paidOrganicSearchTermViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/parental_status_view_service.proto b/google/ads/googleads/v1/services/parental_status_view_service.proto new file mode 100644 index 000000000..0e4e97ea5 --- /dev/null +++ b/google/ads/googleads/v1/services/parental_status_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/parental_status_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Parental Status View service. + +// Service to manage parental status views. +service ParentalStatusViewService { + // Returns the requested parental status view in full detail. + rpc GetParentalStatusView(GetParentalStatusViewRequest) + returns (google.ads.googleads.v1.resources.ParentalStatusView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/parentalStatusViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/payments_account_service.proto b/google/ads/googleads/v1/services/payments_account_service.proto new file mode 100644 index 000000000..6633099a8 --- /dev/null +++ b/google/ads/googleads/v1/services/payments_account_service.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.v1.services; + +import "google/ads/googleads/v1/resources/payments_account.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "PaymentsAccountServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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. + +// Service to provide Payments accounts that can be used to set up consolidated +// billing. +service PaymentsAccountService { + // 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: "/v1/customers/{customer_id=*}/paymentsAccounts" + }; + } +} + +// 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; +} + +// 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; +} 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 new file mode 100644 index 000000000..f51258df1 --- /dev/null +++ b/google/ads/googleads/v1/services/product_bidding_category_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/product_bidding_category_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ProductBiddingCategoryConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Product Bidding Category constant service + +// Service to fetch Product Bidding Categories. +service ProductBiddingCategoryConstantService { + // Returns the requested Product Bidding Category in full detail. + rpc GetProductBiddingCategoryConstant( + GetProductBiddingCategoryConstantRequest) + returns ( + google.ads.googleads.v1.resources.ProductBiddingCategoryConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=productBiddingCategoryConstants/*}" + }; + } +} + +// Request message for +// [ProductBiddingCategoryService.GetProductBiddingCategory][]. +message GetProductBiddingCategoryConstantRequest { + // Resource name of the Product Bidding Category to fetch. + string resource_name = 1; +} diff --git a/google/ads/googleads/v1/services/product_group_view_service.proto b/google/ads/googleads/v1/services/product_group_view_service.proto new file mode 100644 index 000000000..041afda91 --- /dev/null +++ b/google/ads/googleads/v1/services/product_group_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/product_group_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ProductGroupViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 ProductGroup View service. + +// Service to manage product group views. +service ProductGroupViewService { + // Returns the requested product group view in full detail. + rpc GetProductGroupView(GetProductGroupViewRequest) + returns (google.ads.googleads.v1.resources.ProductGroupView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/productGroupViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/recommendation_service.proto b/google/ads/googleads/v1/services/recommendation_service.proto new file mode 100644 index 000000000..b94934cab --- /dev/null +++ b/google/ads/googleads/v1/services/recommendation_service.proto @@ -0,0 +1,254 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/common/extensions.proto"; +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/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Recommendation service. + +// Service to manage recommendations. +service RecommendationService { + // Returns the requested recommendation in full detail. + rpc GetRecommendation(GetRecommendationRequest) + returns (google.ads.googleads.v1.resources.Recommendation) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/recommendations/*}" + }; + } + + // Applies given recommendations with corresponding apply parameters. + rpc ApplyRecommendation(ApplyRecommendationRequest) + returns (ApplyRecommendationResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/recommendations:apply" + body: "*" + }; + } + + // Dismisses given recommendations. + rpc DismissRecommendation(DismissRecommendationRequest) + returns (DismissRecommendationResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/recommendations:dismiss" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // 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; + + // 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.v1.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.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. + 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.v1.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.v1.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.v1.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.v1.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.v1.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; + } + + // The ID of the customer with the recommendation. + string customer_id = 1; + + // 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; + + // 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.v1.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/v1/services/remarketing_action_service.proto b/google/ads/googleads/v1/services/remarketing_action_service.proto new file mode 100644 index 000000000..fcd4119d1 --- /dev/null +++ b/google/ads/googleads/v1/services/remarketing_action_service.proto @@ -0,0 +1,117 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/remarketing_action.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "RemarketingActionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Remarketing Action service. + +// Service to manage remarketing actions. +service RemarketingActionService { + // Returns the requested remarketing action in full detail. + rpc GetRemarketingAction(GetRemarketingActionRequest) + returns (google.ads.googleads.v1.resources.RemarketingAction) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/remarketingActions/*}" + }; + } + + // Creates or updates remarketing actions. Operation statuses are returned. + rpc MutateRemarketingActions(MutateRemarketingActionsRequest) + returns (MutateRemarketingActionsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/remarketingActions:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual remarketing actions. + repeated RemarketingActionOperation operations = 2; + + // 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.v1.resources.RemarketingAction create = 1; + + // Update operation: The remarketing action is expected to have a valid + // resource name. + google.ads.googleads.v1.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/v1/services/search_term_view_service.proto b/google/ads/googleads/v1/services/search_term_view_service.proto new file mode 100644 index 000000000..947faab8b --- /dev/null +++ b/google/ads/googleads/v1/services/search_term_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/search_term_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Search Term View service. + +// Service to manage search term views. +service SearchTermViewService { + // Returns the attributes of the requested search term view. + rpc GetSearchTermView(GetSearchTermViewRequest) + returns (google.ads.googleads.v1.resources.SearchTermView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/searchTermViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/shared_criterion_service.proto b/google/ads/googleads/v1/services/shared_criterion_service.proto new file mode 100644 index 000000000..2ef8b122f --- /dev/null +++ b/google/ads/googleads/v1/services/shared_criterion_service.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.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/rpc/status.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SharedCriterionServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Shared Criterion service. + +// Service to manage shared criteria. +service SharedCriterionService { + // Returns the requested shared criterion in full detail. + rpc GetSharedCriterion(GetSharedCriterionRequest) + returns (google.ads.googleads.v1.resources.SharedCriterion) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/sharedCriteria/*}" + }; + } + + // Creates or removes shared criteria. Operation statuses are returned. + rpc MutateSharedCriteria(MutateSharedCriteriaRequest) + returns (MutateSharedCriteriaResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/sharedCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual shared criteria. + repeated SharedCriterionOperation operations = 2; + + // 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.v1.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/v1/services/shared_set_service.proto b/google/ads/googleads/v1/services/shared_set_service.proto new file mode 100644 index 000000000..54d9bda7b --- /dev/null +++ b/google/ads/googleads/v1/services/shared_set_service.proto @@ -0,0 +1,122 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/shared_set.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Shared Set service. + +// Service to manage shared sets. +service SharedSetService { + // Returns the requested shared set in full detail. + rpc GetSharedSet(GetSharedSetRequest) + returns (google.ads.googleads.v1.resources.SharedSet) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/sharedSets/*}" + }; + } + + // Creates, updates, or removes shared sets. Operation statuses are returned. + rpc MutateSharedSets(MutateSharedSetsRequest) + returns (MutateSharedSetsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/sharedSets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual shared sets. + repeated SharedSetOperation operations = 2; + + // 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.v1.resources.SharedSet create = 1; + + // Update operation: The shared set is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/shopping_performance_view_service.proto b/google/ads/googleads/v1/services/shopping_performance_view_service.proto new file mode 100644 index 000000000..22b4633f2 --- /dev/null +++ b/google/ads/googleads/v1/services/shopping_performance_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/shopping_performance_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "ShoppingPerformanceViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 ShoppingPerformanceView service. + +// Service to fetch Shopping performance views. +service ShoppingPerformanceViewService { + // Returns the requested Shopping performance view in full detail. + rpc GetShoppingPerformanceView(GetShoppingPerformanceViewRequest) + returns (google.ads.googleads.v1.resources.ShoppingPerformanceView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/shoppingPerformanceView}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/topic_constant_service.proto b/google/ads/googleads/v1/services/topic_constant_service.proto new file mode 100644 index 000000000..3211fcfd9 --- /dev/null +++ b/google/ads/googleads/v1/services/topic_constant_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/topic_constant.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "TopicConstantServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Topic constant service + +// Service to fetch topic constants. +service TopicConstantService { + // Returns the requested topic constant in full detail. + rpc GetTopicConstant(GetTopicConstantRequest) + returns (google.ads.googleads.v1.resources.TopicConstant) { + option (google.api.http) = { + get: "/v1/{resource_name=topicConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/topic_view_service.proto b/google/ads/googleads/v1/services/topic_view_service.proto new file mode 100644 index 000000000..dad38e45b --- /dev/null +++ b/google/ads/googleads/v1/services/topic_view_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/topic_view.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "TopicViewServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Topic View service. + +// Service to manage topic views. +service TopicViewService { + // Returns the requested topic view in full detail. + rpc GetTopicView(GetTopicViewRequest) + returns (google.ads.googleads.v1.resources.TopicView) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/topicViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/user_interest_service.proto b/google/ads/googleads/v1/services/user_interest_service.proto new file mode 100644 index 000000000..56dba8c7d --- /dev/null +++ b/google/ads/googleads/v1/services/user_interest_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/user_interest.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 user interest service + +// Service to fetch Google Ads User Interest. +service UserInterestService { + // Returns the requested user interest in full detail + rpc GetUserInterest(GetUserInterestRequest) + returns (google.ads.googleads.v1.resources.UserInterest) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/userInterests/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v1/services/user_list_service.proto b/google/ads/googleads/v1/services/user_list_service.proto new file mode 100644 index 000000000..2af44cdad --- /dev/null +++ b/google/ads/googleads/v1/services/user_list_service.proto @@ -0,0 +1,122 @@ +// 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.v1.services; + +import "google/ads/googleads/v1/resources/user_list.proto"; +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "UserListServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 User List service. + +// Service to manage user lists. +service UserListService { + // Returns the requested user list. + rpc GetUserList(GetUserListRequest) + returns (google.ads.googleads.v1.resources.UserList) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/userLists/*}" + }; + } + + // Creates or updates user lists. Operation statuses are returned. + rpc MutateUserLists(MutateUserListsRequest) + returns (MutateUserListsResponse) { + option (google.api.http) = { + post: "/v1/customers/{customer_id=*}/userLists:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual user lists. + repeated UserListOperation operations = 2; + + // 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.v1.resources.UserList create = 1; + + // Update operation: The user list is expected to have a valid resource + // name. + google.ads.googleads.v1.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/v1/services/video_service.proto b/google/ads/googleads/v1/services/video_service.proto new file mode 100644 index 000000000..5c03a6a47 --- /dev/null +++ b/google/ads/googleads/v1/services/video_service.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.ads.googleads.v1.services; + +import "google/ads/googleads/v1/resources/video.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V1.Services"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services"; +option java_multiple_files = true; +option java_outer_classname = "VideoServiceProto"; +option java_package = "com.google.ads.googleads.v1.services"; +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 Video service. + +// Service to manage videos. +service VideoService { + // Returns the requested video in full detail. + rpc GetVideo(GetVideoRequest) + returns (google.ads.googleads.v1.resources.Video) { + option (google.api.http) = { + get: "/v1/{resource_name=customers/*/videos/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/common/ad_asset.proto b/google/ads/googleads/v2/common/ad_asset.proto new file mode 100644 index 000000000..0ca6d0ace --- /dev/null +++ b/google/ads/googleads/v2/common/ad_asset.proto @@ -0,0 +1,63 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/served_asset_field_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdAssetProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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/v2/common/ad_type_infos.proto b/google/ads/googleads/v2/common/ad_type_infos.proto new file mode 100644 index 000000000..e9953a80e --- /dev/null +++ b/google/ads/googleads/v2/common/ad_type_infos.proto @@ -0,0 +1,580 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/common/ad_asset.proto"; +import "google/ads/googleads/v2/enums/call_conversion_reporting_state.proto"; +import "google/ads/googleads/v2/enums/display_ad_format_setting.proto"; +import "google/ads/googleads/v2/enums/display_upload_product_type.proto"; +import "google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto"; +import "google/ads/googleads/v2/enums/mime_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AdTypeInfosProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.enums.CallConversionReportingStateEnum.CallConversionReportingState conversion_reporting_state = 10; +} + +// An expanded dynamic search ad. +message ExpandedDynamicSearchAdInfo { + // The description of the ad. + google.protobuf.StringValue description = 1; +} + +// 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.v2.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; +} + +// 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; + } +} + +// 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.v2.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.v2.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 vidoes 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.v2.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.v2.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/v2/common/asset_types.proto b/google/ads/googleads/v2/common/asset_types.proto new file mode 100644 index 000000000..09060d766 --- /dev/null +++ b/google/ads/googleads/v2/common/asset_types.proto @@ -0,0 +1,82 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/mime_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "AssetTypesProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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/v2/common/bidding.proto b/google/ads/googleads/v2/common/bidding.proto new file mode 100644 index 000000000..016e3f3c7 --- /dev/null +++ b/google/ads/googleads/v2/common/bidding.proto @@ -0,0 +1,234 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto"; +import "google/ads/googleads/v2/enums/target_impression_share_location.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "BiddingProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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 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.v2.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. + google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + + // Bid multiplier to be applied to the relevant bid estimate (depending on + // the `strategy_goal`) in determining a keyword's new CPC bid. + google.protobuf.DoubleValue bid_modifier = 3; + + // Whether the strategy should always follow bid estimate changes, or only + // increase. + // If false, always sets a keyword's new bid to the current bid estimate. + // If true, only updates a keyword's bid if the current bid estimate is + // greater than the current bid. + google.protobuf.BoolValue only_raise_cpc_bids = 4; + + // Whether the strategy is allowed to raise bids when the throttling + // rate of the budget it is serving out of rises above a threshold. + google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5; + + // Whether the strategy is allowed to raise bids on keywords with + // lower-range quality scores. + google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6; +} + +// 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 Id = 4 +message TargetImpressionShare { + // The targeted location on the search results page. + google.ads.googleads.v2.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 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. + // The advertiser outranks the competitor in an auction if either the + // advertiser appears above the competitor in the search results, or appears + // in the search results when the competitor does not. + // Value must be between 1 and 1000000, inclusive. + google.protobuf.Int32Value target_outrank_share_micros = 1; + + // Competitor's visible domain URL. + google.protobuf.StringValue competitor_domain = 2; + + // 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 = 3; + + // Whether the strategy should always follow bid estimate changes, + // or only increase. + // If false, always set a keyword's new bid to the current bid estimate. + // If true, only updates a keyword's bid if the current bid estimate is + // greater than the current bid. + google.protobuf.BoolValue only_raise_cpc_bids = 4; + + // Whether the strategy is allowed to raise bids on keywords with + // lower-range quality scores. + google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5; +} + +// 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/v2/common/click_location.proto b/google/ads/googleads/v2/common/click_location.proto new file mode 100644 index 000000000..79888b52c --- /dev/null +++ b/google/ads/googleads/v2/common/click_location.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ClickLocationProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/criteria.proto b/google/ads/googleads/v2/common/criteria.proto new file mode 100644 index 000000000..b7ac1cca3 --- /dev/null +++ b/google/ads/googleads/v2/common/criteria.proto @@ -0,0 +1,594 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/age_range_type.proto"; +import "google/ads/googleads/v2/enums/app_payment_model_type.proto"; +import "google/ads/googleads/v2/enums/content_label_type.proto"; +import "google/ads/googleads/v2/enums/day_of_week.proto"; +import "google/ads/googleads/v2/enums/device.proto"; +import "google/ads/googleads/v2/enums/gender_type.proto"; +import "google/ads/googleads/v2/enums/hotel_date_selection_type.proto"; +import "google/ads/googleads/v2/enums/income_range_type.proto"; +import "google/ads/googleads/v2/enums/interaction_type.proto"; +import "google/ads/googleads/v2/enums/keyword_match_type.proto"; +import "google/ads/googleads/v2/enums/listing_custom_attribute_index.proto"; +import "google/ads/googleads/v2/enums/listing_group_type.proto"; +import "google/ads/googleads/v2/enums/location_group_radius_units.proto"; +import "google/ads/googleads/v2/enums/minute_of_hour.proto"; +import "google/ads/googleads/v2/enums/parental_status_type.proto"; +import "google/ads/googleads/v2/enums/preferred_content_type.proto"; +import "google/ads/googleads/v2/enums/product_bidding_category_level.proto"; +import "google/ads/googleads/v2/enums/product_channel.proto"; +import "google/ads/googleads/v2/enums/product_channel_exclusivity.proto"; +import "google/ads/googleads/v2/enums/product_condition.proto"; +import "google/ads/googleads/v2/enums/product_type_level.proto"; +import "google/ads/googleads/v2/enums/proximity_radius_units.proto"; +import "google/ads/googleads/v2/enums/webpage_condition_operand.proto"; +import "google/ads/googleads/v2/enums/webpage_condition_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriteriaProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.enums.DeviceEnum.Device type = 1; +} + +// A preferred content criterion. +message PreferredContentInfo { + // Type of the preferred content. + google.ads.googleads.v2.enums.PreferredContentTypeEnum.PreferredContentType type = 2; +} + +// A listing group criterion. +message ListingGroupInfo { + // Type of the listing group. + google.ads.googleads.v2.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 { + // Brand of the listing. + ListingBrandInfo listing_brand = 1; + + // 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; + + // Listing custom attribute. + ListingCustomAttributeInfo listing_custom_attribute = 7; + + // Bidding category of a product offer. + ProductBiddingCategoryInfo product_bidding_category = 13; + + // 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; + + // 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; + } +} + +// Brand of the listing. +message ListingBrandInfo { + // String value of the listing brand. + google.protobuf.StringValue value = 1; +} + +// 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; +} + +// Listing custom attribute. +message ListingCustomAttributeInfo { + // String value of the listing custom attribute. + google.protobuf.StringValue value = 1; + + // Indicates the index of the custom attribute. + google.ads.googleads.v2.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2; +} + +// 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.v2.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 3; +} + +// Locality of a product offer. +message ProductChannelInfo { + // Value of the locality. + google.ads.googleads.v2.enums.ProductChannelEnum.ProductChannel channel = 1; +} + +// Availability of a product offer. +message ProductChannelExclusivityInfo { + // Value of the availability. + google.ads.googleads.v2.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity channel_exclusivity = 1; +} + +// Condition of a product offer. +message ProductConditionInfo { + // Value of the condition. + google.ads.googleads.v2.enums.ProductConditionEnum.ProductCondition condition = 1; +} + +// 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.v2.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.v2.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.v2.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1; +} + +// Criterion for Interaction Type. +message InteractionTypeInfo { + // The interaction type. + google.ads.googleads.v2.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.v2.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.v2.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.v2.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; +} + +// An age range criterion. +message AgeRangeInfo { + // Type of the age range. + google.ads.googleads.v2.enums.AgeRangeTypeEnum.AgeRangeType type = 1; +} + +// A gender criterion. +message GenderInfo { + // Type of the gender. + google.ads.googleads.v2.enums.GenderTypeEnum.GenderType type = 1; +} + +// An income range criterion. +message IncomeRangeInfo { + // Type of the income range. + google.ads.googleads.v2.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1; +} + +// A parental status criterion. +message ParentalStatusInfo { + // Type of the parental status. + google.ads.googleads.v2.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.v2.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.v2.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.v2.enums.WebpageConditionOperandEnum.WebpageConditionOperand operand = 1; + + // Operator of webpage targeting condition. + google.ads.googleads.v2.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.v2.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.v2.enums.LocationGroupRadiusUnitsEnum.LocationGroupRadiusUnits radius_units = 4; +} diff --git a/google/ads/googleads/v2/common/criterion_category_availability.proto b/google/ads/googleads/v2/common/criterion_category_availability.proto new file mode 100644 index 000000000..f067d48c6 --- /dev/null +++ b/google/ads/googleads/v2/common/criterion_category_availability.proto @@ -0,0 +1,84 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/advertising_channel_sub_type.proto"; +import "google/ads/googleads/v2/enums/advertising_channel_type.proto"; +import "google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto"; +import "google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CriterionCategoryAvailabilityProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode availability_mode = 1; + + // Channel type the category is available to. + google.ads.googleads.v2.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 2; + + // Channel subtypes under the channel type the category is available to. + repeated google.ads.googleads.v2.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.v2.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/v2/common/custom_parameter.proto b/google/ads/googleads/v2/common/custom_parameter.proto new file mode 100644 index 000000000..9634fe593 --- /dev/null +++ b/google/ads/googleads/v2/common/custom_parameter.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "CustomParameterProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/dates.proto b/google/ads/googleads/v2/common/dates.proto new file mode 100644 index 000000000..6ead41507 --- /dev/null +++ b/google/ads/googleads/v2/common/dates.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "DatesProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/explorer_auto_optimizer_setting.proto b/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto new file mode 100644 index 000000000..c106ea66f --- /dev/null +++ b/google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto @@ -0,0 +1,40 @@ +// 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.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExplorerAutoOptimizerSettingProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/extensions.proto b/google/ads/googleads/v2/common/extensions.proto new file mode 100644 index 000000000..9576eda73 --- /dev/null +++ b/google/ads/googleads/v2/common/extensions.proto @@ -0,0 +1,347 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/common/feed_common.proto"; +import "google/ads/googleads/v2/enums/app_store.proto"; +import "google/ads/googleads/v2/enums/call_conversion_reporting_state.proto"; +import "google/ads/googleads/v2/enums/price_extension_price_qualifier.proto"; +import "google/ads/googleads/v2/enums/price_extension_price_unit.proto"; +import "google/ads/googleads/v2/enums/price_extension_type.proto"; +import "google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto"; +import "google/ads/googleads/v2/enums/promotion_extension_occasion.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionsProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.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.v2.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1; + + // Price qualifier for all offers of this price extension. + google.ads.googleads.v2.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.v2.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.v2.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.v2.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; +} diff --git a/google/ads/googleads/v2/common/feed_common.proto b/google/ads/googleads/v2/common/feed_common.proto new file mode 100644 index 000000000..39590d92d --- /dev/null +++ b/google/ads/googleads/v2/common/feed_common.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FeedCommonProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/final_app_url.proto b/google/ads/googleads/v2/common/final_app_url.proto new file mode 100644 index 000000000..236570085 --- /dev/null +++ b/google/ads/googleads/v2/common/final_app_url.proto @@ -0,0 +1,48 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/app_url_operating_system_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FinalAppUrlProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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/v2/common/frequency_cap.proto b/google/ads/googleads/v2/common/frequency_cap.proto new file mode 100644 index 000000000..9d0f575ae --- /dev/null +++ b/google/ads/googleads/v2/common/frequency_cap.proto @@ -0,0 +1,63 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/frequency_cap_event_type.proto"; +import "google/ads/googleads/v2/enums/frequency_cap_level.proto"; +import "google/ads/googleads/v2/enums/frequency_cap_time_unit.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.enums.FrequencyCapLevelEnum.FrequencyCapLevel level = 1; + + // The type of event that the cap applies to (e.g. impression). + google.ads.googleads.v2.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType event_type = 3; + + // Unit of time the cap is defined at (e.g. day, week). + google.ads.googleads.v2.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/v2/common/keyword_plan_common.proto b/google/ads/googleads/v2/common/keyword_plan_common.proto new file mode 100644 index 000000000..9543c582c --- /dev/null +++ b/google/ads/googleads/v2/common/keyword_plan_common.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.ads.googleads.v2.common; + +import "google/ads/googleads/v2/enums/keyword_plan_competition_level.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCommonProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::Common"; + +// Proto file describing Keyword Planner messages. + +// Historical metrics. +message KeywordPlanHistoricalMetrics { + // Average monthly searches for the past 12 months. + google.protobuf.Int64Value avg_monthly_searches = 1; + + // The competition level for the query. + google.ads.googleads.v2.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2; +} diff --git a/google/ads/googleads/v2/common/matching_function.proto b/google/ads/googleads/v2/common/matching_function.proto new file mode 100644 index 000000000..1596c7f38 --- /dev/null +++ b/google/ads/googleads/v2/common/matching_function.proto @@ -0,0 +1,128 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/matching_function_context_type.proto"; +import "google/ads/googleads/v2/enums/matching_function_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MatchingFunctionProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.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/v2/common/metrics.proto b/google/ads/googleads/v2/common/metrics.proto new file mode 100644 index 000000000..55a8a5cd1 --- /dev/null +++ b/google/ads/googleads/v2/common/metrics.proto @@ -0,0 +1,530 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/interaction_event_type.proto"; +import "google/ads/googleads/v2/enums/quality_score_bucket.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "MetricsProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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 of hotel. + google.protobuf.DoubleValue hotel_average_lead_value_micros = 75; + + // The creative historical quality score. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket historical_creative_quality_score = 80; + + // The quality of historical landing page experience. + google.ads.googleads.v2.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.v2.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.v2.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 + // [this article](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/v2/common/policy.proto b/google/ads/googleads/v2/common/policy.proto new file mode 100644 index 000000000..d96446823 --- /dev/null +++ b/google/ads/googleads/v2/common/policy.proto @@ -0,0 +1,224 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/policy_topic_entry_type.proto"; +import "google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto"; +import "google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto"; +import "google/ads/googleads/v2/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.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "PolicyProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.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.v2.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.v2.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/v2/common/real_time_bidding_setting.proto b/google/ads/googleads/v2/common/real_time_bidding_setting.proto new file mode 100644 index 000000000..2869d1eb6 --- /dev/null +++ b/google/ads/googleads/v2/common/real_time_bidding_setting.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "RealTimeBiddingSettingProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/segments.proto b/google/ads/googleads/v2/common/segments.proto new file mode 100644 index 000000000..8f3761a88 --- /dev/null +++ b/google/ads/googleads/v2/common/segments.proto @@ -0,0 +1,310 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/enums/ad_network_type.proto"; +import "google/ads/googleads/v2/enums/click_type.proto"; +import "google/ads/googleads/v2/enums/conversion_action_category.proto"; +import "google/ads/googleads/v2/enums/conversion_attribution_event_type.proto"; +import "google/ads/googleads/v2/enums/conversion_lag_bucket.proto"; +import "google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto"; +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_rate_type.proto"; +import "google/ads/googleads/v2/enums/month_of_year.proto"; +import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/ads/googleads/v2/enums/product_channel.proto"; +import "google/ads/googleads/v2/enums/product_channel_exclusivity.proto"; +import "google/ads/googleads/v2/enums/product_condition.proto"; +import "google/ads/googleads/v2/enums/search_engine_results_page_type.proto"; +import "google/ads/googleads/v2/enums/search_term_match_type.proto"; +import "google/ads/googleads/v2/enums/slot.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SegmentsProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::Common"; + +// Proto file describing segment only fields. + +// Segment only fields. +message Segments { + // Ad network type. + google.ads.googleads.v2.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 3; + + // Click type. + google.ads.googleads.v2.enums.ClickTypeEnum.ClickType click_type = 26; + + // Resource name of the conversion action. + google.protobuf.StringValue conversion_action = 52; + + // Conversion action category. + google.ads.googleads.v2.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.v2.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.v2.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.v2.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.v2.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; + + // Device to which metrics apply. + google.ads.googleads.v2.enums.DeviceEnum.Device device = 1; + + // External conversion source. + google.ads.googleads.v2.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.v2.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.v2.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.v2.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type = 74; + + // 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.v2.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.v2.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.v2.enums.ProductChannelEnum.ProductChannel product_channel = 30; + + // Channel exclusivity of the product. + google.ads.googleads.v2.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity = 31; + + // Condition of the product. + google.ads.googleads.v2.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.v2.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType search_engine_results_page_type = 70; + + // Match type of the keyword that triggered the ad, including variants. + google.ads.googleads.v2.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type = 22; + + // Position of the ad. + google.ads.googleads.v2.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/v2/common/simulation.proto b/google/ads/googleads/v2/common/simulation.proto new file mode 100644 index 000000000..69a140104 --- /dev/null +++ b/google/ads/googleads/v2/common/simulation.proto @@ -0,0 +1,173 @@ +// 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.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "SimulationProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/tag_snippet.proto b/google/ads/googleads/v2/common/tag_snippet.proto new file mode 100644 index 000000000..7631d762d --- /dev/null +++ b/google/ads/googleads/v2/common/tag_snippet.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.ads.googleads.v2.common; + +import "google/ads/googleads/v2/enums/tracking_code_page_format.proto"; +import "google/ads/googleads/v2/enums/tracking_code_type.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TagSnippetProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.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/v2/common/targeting_setting.proto b/google/ads/googleads/v2/common/targeting_setting.proto new file mode 100644 index 000000000..a6a55d821 --- /dev/null +++ b/google/ads/googleads/v2/common/targeting_setting.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.ads.googleads.v2.common; + +import "google/ads/googleads/v2/enums/targeting_dimension.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TargetingSettingProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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 per-targeting-dimension targeting settings. +message TargetRestriction { + // The targeting dimension that these settings apply to. + google.ads.googleads.v2.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; +} diff --git a/google/ads/googleads/v2/common/text_label.proto b/google/ads/googleads/v2/common/text_label.proto new file mode 100644 index 000000000..6c091fd5d --- /dev/null +++ b/google/ads/googleads/v2/common/text_label.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.ads.googleads.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "TextLabelProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/url_collection.proto b/google/ads/googleads/v2/common/url_collection.proto new file mode 100644 index 000000000..c7bc7a314 --- /dev/null +++ b/google/ads/googleads/v2/common/url_collection.proto @@ -0,0 +1,47 @@ +// 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.v2.common; + +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UrlCollectionProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/common/user_lists.proto b/google/ads/googleads/v2/common/user_lists.proto new file mode 100644 index 000000000..6e204016b --- /dev/null +++ b/google/ads/googleads/v2/common/user_lists.proto @@ -0,0 +1,293 @@ +// 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.v2.common; + +import "google/ads/googleads/v2/enums/customer_match_upload_key_type.proto"; +import "google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto"; +import "google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto"; +import "google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto"; +import "google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto"; +import "google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto"; +import "google/ads/googleads/v2/enums/user_list_prepopulation_status.proto"; +import "google/ads/googleads/v2/enums/user_list_rule_type.proto"; +import "google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "UserListsProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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.v2.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.v2.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.v2.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 fragment. +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 fragment. + oneof rule_item { + // An atomic rule fragment composed of a number operation. + UserListNumberRuleItemInfo number_rule_item = 2; + + // An atomic rule fragment composed of a string operation. + UserListStringRuleItemInfo string_rule_item = 3; + + // An atomic rule fragment composed of a date operation. + UserListDateRuleItemInfo date_rule_item = 4; + } +} + +// A rule item composed of date operation. +message UserListDateRuleItemInfo { + // Date comparison operator. + // This field is required and must be populated when creating new date + // rule item. + google.ads.googleads.v2.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 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.v2.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 fragment composed of date operation. +message UserListStringRuleItemInfo { + // String comparison operator. + // This field is required and must be populated when creating a new string + // rule item. + google.ads.googleads.v2.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.v2.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.v2.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.v2.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/v2/common/value.proto b/google/ads/googleads/v2/common/value.proto new file mode 100644 index 000000000..d899fd675 --- /dev/null +++ b/google/ads/googleads/v2/common/value.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.ads.googleads.v2.common; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Ads.GoogleAds.V2.Common"; +option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v2/common;common"; +option java_multiple_files = true; +option java_outer_classname = "ValueProto"; +option java_package = "com.google.ads.googleads.v2.common"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\GoogleAds\\V2\\Common"; +option ruby_package = "Google::Ads::GoogleAds::V2::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/v2/enums/access_reason.proto b/google/ads/googleads/v2/enums/access_reason.proto new file mode 100644 index 000000000..01f7773b1 --- /dev/null +++ b/google/ads/googleads/v2/enums/access_reason.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.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 = "AccessReasonProto"; +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"; + +// 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/v2/enums/access_role.proto b/google/ads/googleads/v2/enums/access_role.proto new file mode 100644 index 000000000..f0c0b19fe --- /dev/null +++ b/google/ads/googleads/v2/enums/access_role.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.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 = "AccessRoleProto"; +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"; + +// 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/v2/enums/account_budget_proposal_status.proto b/google/ads/googleads/v2/enums/account_budget_proposal_status.proto new file mode 100644 index 000000000..de2077435 --- /dev/null +++ b/google/ads/googleads/v2/enums/account_budget_proposal_status.proto @@ -0,0 +1,64 @@ +// 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.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 = "AccountBudgetProposalStatusProto"; +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 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/v2/enums/account_budget_proposal_type.proto b/google/ads/googleads/v2/enums/account_budget_proposal_type.proto new file mode 100644 index 000000000..91df41fa2 --- /dev/null +++ b/google/ads/googleads/v2/enums/account_budget_proposal_type.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.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 = "AccountBudgetProposalTypeProto"; +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 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/v2/enums/account_budget_status.proto b/google/ads/googleads/v2/enums/account_budget_status.proto new file mode 100644 index 000000000..d39190f48 --- /dev/null +++ b/google/ads/googleads/v2/enums/account_budget_status.proto @@ -0,0 +1,54 @@ +// 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.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 = "AccountBudgetStatusProto"; +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 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/v2/enums/ad_customizer_placeholder_field.proto b/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto new file mode 100644 index 000000000..10ed0355c --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_customizer_placeholder_field.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.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 = "AdCustomizerPlaceholderFieldProto"; +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 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/v2/enums/ad_group_ad_rotation_mode.proto b/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto new file mode 100644 index 000000000..e3ee2a9a3 --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto @@ -0,0 +1,54 @@ +// 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.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 = "AdGroupAdRotationModeProto"; +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 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/v2/enums/ad_group_ad_status.proto b/google/ads/googleads/v2/enums/ad_group_ad_status.proto new file mode 100644 index 000000000..906e6bbbb --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_ad_status.proto @@ -0,0 +1,56 @@ +// 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.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 = "AdGroupAdStatusProto"; +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 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/v2/enums/ad_group_criterion_approval_status.proto b/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto new file mode 100644 index 000000000..7add7c98e --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_criterion_approval_status.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.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 = "AdGroupCriterionApprovalStatusProto"; +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 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/v2/enums/ad_group_criterion_status.proto b/google/ads/googleads/v2/enums/ad_group_criterion_status.proto new file mode 100644 index 000000000..cac580ae7 --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_criterion_status.proto @@ -0,0 +1,56 @@ +// 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.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 = "AdGroupCriterionStatusProto"; +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 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/v2/enums/ad_group_status.proto b/google/ads/googleads/v2/enums/ad_group_status.proto new file mode 100644 index 000000000..ca2191a20 --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_status.proto @@ -0,0 +1,56 @@ +// 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.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 = "AdGroupStatusProto"; +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 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/v2/enums/ad_group_type.proto b/google/ads/googleads/v2/enums/ad_group_type.proto new file mode 100644 index 000000000..1bc24973a --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_group_type.proto @@ -0,0 +1,85 @@ +// 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.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 = "AdGroupTypeProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/ad_network_type.proto b/google/ads/googleads/v2/enums/ad_network_type.proto new file mode 100644 index 000000000..4bdb41318 --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_network_type.proto @@ -0,0 +1,63 @@ +// 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.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 = "AdNetworkTypeProto"; +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 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/v2/enums/ad_serving_optimization_status.proto b/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto new file mode 100644 index 000000000..a63903844 --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_serving_optimization_status.proto @@ -0,0 +1,65 @@ +// 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.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 = "AdServingOptimizationStatusProto"; +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 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/v2/enums/ad_strength.proto b/google/ads/googleads/v2/enums/ad_strength.proto new file mode 100644 index 000000000..1bb8b2a5b --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_strength.proto @@ -0,0 +1,63 @@ +// 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.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 = "AdStrengthProto"; +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 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/v2/enums/ad_type.proto b/google/ads/googleads/v2/enums/ad_type.proto new file mode 100644 index 000000000..4ab10599d --- /dev/null +++ b/google/ads/googleads/v2/enums/ad_type.proto @@ -0,0 +1,105 @@ +// 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.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 = "AdTypeProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto b/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto new file mode 100644 index 000000000..8f9f3cf4c --- /dev/null +++ b/google/ads/googleads/v2/enums/advertising_channel_sub_type.proto @@ -0,0 +1,88 @@ +// 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.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 = "AdvertisingChannelSubTypeProto"; +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 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/v2/enums/advertising_channel_type.proto b/google/ads/googleads/v2/enums/advertising_channel_type.proto new file mode 100644 index 000000000..027cdbcca --- /dev/null +++ b/google/ads/googleads/v2/enums/advertising_channel_type.proto @@ -0,0 +1,65 @@ +// 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.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 = "AdvertisingChannelTypeProto"; +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 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/v2/enums/affiliate_location_feed_relationship_type.proto b/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto new file mode 100644 index 000000000..8289101fb --- /dev/null +++ b/google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto @@ -0,0 +1,49 @@ +// 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.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 = "AffiliateLocationFeedRelationshipTypeProto"; +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 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/v2/enums/affiliate_location_placeholder_field.proto b/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto new file mode 100644 index 000000000..f2adb8dbe --- /dev/null +++ b/google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto @@ -0,0 +1,78 @@ +// 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.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 = "AffiliateLocationPlaceholderFieldProto"; +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 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/v2/enums/age_range_type.proto b/google/ads/googleads/v2/enums/age_range_type.proto new file mode 100644 index 000000000..8d15a5c6b --- /dev/null +++ b/google/ads/googleads/v2/enums/age_range_type.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.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 = "AgeRangeTypeProto"; +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 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/v2/enums/app_campaign_app_store.proto b/google/ads/googleads/v2/enums/app_campaign_app_store.proto new file mode 100644 index 000000000..49f4a88aa --- /dev/null +++ b/google/ads/googleads/v2/enums/app_campaign_app_store.proto @@ -0,0 +1,51 @@ +// 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.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 = "AppCampaignAppStoreProto"; +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 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/v2/enums/app_campaign_bidding_strategy_goal_type.proto b/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto new file mode 100644 index 000000000..d6dc7dcd7 --- /dev/null +++ b/google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto @@ -0,0 +1,65 @@ +// 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.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 = "AppCampaignBiddingStrategyGoalTypeProto"; +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 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/v2/enums/app_payment_model_type.proto b/google/ads/googleads/v2/enums/app_payment_model_type.proto new file mode 100644 index 000000000..f85fedd64 --- /dev/null +++ b/google/ads/googleads/v2/enums/app_payment_model_type.proto @@ -0,0 +1,48 @@ +// 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.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 = "AppPaymentModelTypeProto"; +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 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/v2/enums/app_placeholder_field.proto b/google/ads/googleads/v2/enums/app_placeholder_field.proto new file mode 100644 index 000000000..3fc34b803 --- /dev/null +++ b/google/ads/googleads/v2/enums/app_placeholder_field.proto @@ -0,0 +1,76 @@ +// 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.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 = "AppPlaceholderFieldProto"; +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 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/v2/enums/app_store.proto b/google/ads/googleads/v2/enums/app_store.proto new file mode 100644 index 000000000..a12b57b00 --- /dev/null +++ b/google/ads/googleads/v2/enums/app_store.proto @@ -0,0 +1,51 @@ +// 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.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 = "AppStoreProto"; +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 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/v2/enums/app_url_operating_system_type.proto b/google/ads/googleads/v2/enums/app_url_operating_system_type.proto new file mode 100644 index 000000000..f56691efa --- /dev/null +++ b/google/ads/googleads/v2/enums/app_url_operating_system_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "AppUrlOperatingSystemTypeProto"; +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 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/v2/enums/asset_field_type.proto b/google/ads/googleads/v2/enums/asset_field_type.proto new file mode 100644 index 000000000..fa2664717 --- /dev/null +++ b/google/ads/googleads/v2/enums/asset_field_type.proto @@ -0,0 +1,63 @@ +// 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.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 = "AssetFieldTypeProto"; +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 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/v2/enums/asset_performance_label.proto b/google/ads/googleads/v2/enums/asset_performance_label.proto new file mode 100644 index 000000000..205a30b94 --- /dev/null +++ b/google/ads/googleads/v2/enums/asset_performance_label.proto @@ -0,0 +1,63 @@ +// 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.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 = "AssetPerformanceLabelProto"; +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 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/v2/enums/asset_type.proto b/google/ads/googleads/v2/enums/asset_type.proto new file mode 100644 index 000000000..808516839 --- /dev/null +++ b/google/ads/googleads/v2/enums/asset_type.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.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 = "AssetTypeProto"; +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 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/v2/enums/attribution_model.proto b/google/ads/googleads/v2/enums/attribution_model.proto new file mode 100644 index 000000000..0f0b0ae46 --- /dev/null +++ b/google/ads/googleads/v2/enums/attribution_model.proto @@ -0,0 +1,73 @@ +// 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.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 = "AttributionModelProto"; +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"; + +// 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/v2/enums/bid_modifier_source.proto b/google/ads/googleads/v2/enums/bid_modifier_source.proto new file mode 100644 index 000000000..494df692a --- /dev/null +++ b/google/ads/googleads/v2/enums/bid_modifier_source.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.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 = "BidModifierSourceProto"; +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 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/v2/enums/bidding_source.proto b/google/ads/googleads/v2/enums/bidding_source.proto new file mode 100644 index 000000000..6f6cd5d60 --- /dev/null +++ b/google/ads/googleads/v2/enums/bidding_source.proto @@ -0,0 +1,56 @@ +// 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.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 = "BiddingSourceProto"; +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 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/v2/enums/bidding_strategy_status.proto b/google/ads/googleads/v2/enums/bidding_strategy_status.proto new file mode 100644 index 000000000..ae543a854 --- /dev/null +++ b/google/ads/googleads/v2/enums/bidding_strategy_status.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.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 = "BiddingStrategyStatusProto"; +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 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/v2/enums/bidding_strategy_type.proto b/google/ads/googleads/v2/enums/bidding_strategy_type.proto new file mode 100644 index 000000000..42474f55c --- /dev/null +++ b/google/ads/googleads/v2/enums/bidding_strategy_type.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.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 = "BiddingStrategyTypeProto"; +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 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/v2/enums/billing_setup_status.proto b/google/ads/googleads/v2/enums/billing_setup_status.proto new file mode 100644 index 000000000..23c2a7a25 --- /dev/null +++ b/google/ads/googleads/v2/enums/billing_setup_status.proto @@ -0,0 +1,59 @@ +// 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.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 = "BillingSetupStatusProto"; +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 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/v2/enums/brand_safety_suitability.proto b/google/ads/googleads/v2/enums/brand_safety_suitability.proto new file mode 100644 index 000000000..d59c93203 --- /dev/null +++ b/google/ads/googleads/v2/enums/brand_safety_suitability.proto @@ -0,0 +1,74 @@ +// 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.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 = "BrandSafetySuitabilityProto"; +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 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/v2/enums/budget_delivery_method.proto b/google/ads/googleads/v2/enums/budget_delivery_method.proto new file mode 100644 index 000000000..1d8bc02bb --- /dev/null +++ b/google/ads/googleads/v2/enums/budget_delivery_method.proto @@ -0,0 +1,54 @@ +// 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.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 = "BudgetDeliveryMethodProto"; +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 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/v2/enums/budget_period.proto b/google/ads/googleads/v2/enums/budget_period.proto new file mode 100644 index 000000000..aef6ce526 --- /dev/null +++ b/google/ads/googleads/v2/enums/budget_period.proto @@ -0,0 +1,54 @@ +// 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.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 = "BudgetPeriodProto"; +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 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; + + // Custom budget. + CUSTOM = 3; + + // Fixed daily budget. + FIXED_DAILY = 4; + } + + +} diff --git a/google/ads/googleads/v2/enums/budget_status.proto b/google/ads/googleads/v2/enums/budget_status.proto new file mode 100644 index 000000000..e2e3b8a5c --- /dev/null +++ b/google/ads/googleads/v2/enums/budget_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "BudgetStatusProto"; +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 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/v2/enums/budget_type.proto b/google/ads/googleads/v2/enums/budget_type.proto new file mode 100644 index 000000000..6e9fc133a --- /dev/null +++ b/google/ads/googleads/v2/enums/budget_type.proto @@ -0,0 +1,67 @@ +// 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.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 = "BudgetTypeProto"; +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 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/v2/enums/call_conversion_reporting_state.proto b/google/ads/googleads/v2/enums/call_conversion_reporting_state.proto new file mode 100644 index 000000000..d4175bb68 --- /dev/null +++ b/google/ads/googleads/v2/enums/call_conversion_reporting_state.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.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 = "CallConversionReportingStateProto"; +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 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/v2/enums/call_placeholder_field.proto b/google/ads/googleads/v2/enums/call_placeholder_field.proto new file mode 100644 index 000000000..7f7ed94dc --- /dev/null +++ b/google/ads/googleads/v2/enums/call_placeholder_field.proto @@ -0,0 +1,67 @@ +// 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.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 = "CallPlaceholderFieldProto"; +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 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/v2/enums/callout_placeholder_field.proto b/google/ads/googleads/v2/enums/callout_placeholder_field.proto new file mode 100644 index 000000000..2e6c3613e --- /dev/null +++ b/google/ads/googleads/v2/enums/callout_placeholder_field.proto @@ -0,0 +1,48 @@ +// 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.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 = "CalloutPlaceholderFieldProto"; +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 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/v2/enums/campaign_criterion_status.proto b/google/ads/googleads/v2/enums/campaign_criterion_status.proto new file mode 100644 index 000000000..2c42aa3db --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_criterion_status.proto @@ -0,0 +1,56 @@ +// 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.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 = "CampaignCriterionStatusProto"; +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 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/v2/enums/campaign_draft_status.proto b/google/ads/googleads/v2/enums/campaign_draft_status.proto new file mode 100644 index 000000000..18877e356 --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_draft_status.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.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 = "CampaignDraftStatusProto"; +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 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/v2/enums/campaign_experiment_status.proto b/google/ads/googleads/v2/enums/campaign_experiment_status.proto new file mode 100644 index 000000000..4a73946a6 --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_experiment_status.proto @@ -0,0 +1,78 @@ +// 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.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 = "CampaignExperimentStatusProto"; +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 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/v2/enums/campaign_experiment_traffic_split_type.proto b/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto new file mode 100644 index 000000000..fcb1de0be --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_experiment_traffic_split_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "CampaignExperimentTrafficSplitTypeProto"; +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 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/v2/enums/campaign_experiment_type.proto b/google/ads/googleads/v2/enums/campaign_experiment_type.proto new file mode 100644 index 000000000..01a6f7168 --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_experiment_type.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.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 = "CampaignExperimentTypeProto"; +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 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/v2/enums/campaign_serving_status.proto b/google/ads/googleads/v2/enums/campaign_serving_status.proto new file mode 100644 index 000000000..ee998e3c2 --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_serving_status.proto @@ -0,0 +1,62 @@ +// 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.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 = "CampaignServingStatusProto"; +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 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/v2/enums/campaign_shared_set_status.proto b/google/ads/googleads/v2/enums/campaign_shared_set_status.proto new file mode 100644 index 000000000..f35ec7200 --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_shared_set_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "CampaignSharedSetStatusProto"; +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 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/v2/enums/campaign_status.proto b/google/ads/googleads/v2/enums/campaign_status.proto new file mode 100644 index 000000000..21ffd9d2d --- /dev/null +++ b/google/ads/googleads/v2/enums/campaign_status.proto @@ -0,0 +1,54 @@ +// 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.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 = "CampaignStatusProto"; +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 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/v2/enums/change_status_operation.proto b/google/ads/googleads/v2/enums/change_status_operation.proto new file mode 100644 index 000000000..8361cc339 --- /dev/null +++ b/google/ads/googleads/v2/enums/change_status_operation.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.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 = "ChangeStatusOperationProto"; +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 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/v2/enums/change_status_resource_type.proto b/google/ads/googleads/v2/enums/change_status_resource_type.proto new file mode 100644 index 000000000..983aa47e7 --- /dev/null +++ b/google/ads/googleads/v2/enums/change_status_resource_type.proto @@ -0,0 +1,77 @@ +// 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.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 = "ChangeStatusResourceTypeProto"; +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 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/v2/enums/click_type.proto b/google/ads/googleads/v2/enums/click_type.proto new file mode 100644 index 000000000..6318147f1 --- /dev/null +++ b/google/ads/googleads/v2/enums/click_type.proto @@ -0,0 +1,204 @@ +// 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.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 = "ClickTypeProto"; +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 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/v2/enums/content_label_type.proto b/google/ads/googleads/v2/enums/content_label_type.proto new file mode 100644 index 000000000..17b4fb3e5 --- /dev/null +++ b/google/ads/googleads/v2/enums/content_label_type.proto @@ -0,0 +1,93 @@ +// 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.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 = "ContentLabelTypeProto"; +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 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; + + // Game. + GAME = 5; + + // 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/v2/enums/conversion_action_category.proto b/google/ads/googleads/v2/enums/conversion_action_category.proto new file mode 100644 index 000000000..6000b0618 --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_action_category.proto @@ -0,0 +1,62 @@ +// 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.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 = "ConversionActionCategoryProto"; +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"; + +// 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/conversion_action_counting_type.proto b/google/ads/googleads/v2/enums/conversion_action_counting_type.proto new file mode 100644 index 000000000..354c33ba3 --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_action_counting_type.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.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 = "ConversionActionCountingTypeProto"; +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 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/v2/enums/conversion_action_status.proto b/google/ads/googleads/v2/enums/conversion_action_status.proto new file mode 100644 index 000000000..623d89edc --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_action_status.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.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 = "ConversionActionStatusProto"; +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 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/v2/enums/conversion_action_type.proto b/google/ads/googleads/v2/enums/conversion_action_type.proto new file mode 100644 index 000000000..c610e1906 --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_action_type.proto @@ -0,0 +1,74 @@ +// 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.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 = "ConversionActionTypeProto"; +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 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/v2/enums/conversion_adjustment_type.proto b/google/ads/googleads/v2/enums/conversion_adjustment_type.proto new file mode 100644 index 000000000..be3d9468c --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_adjustment_type.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.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 = "ConversionAdjustmentTypeProto"; +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 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/v2/enums/conversion_attribution_event_type.proto b/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto new file mode 100644 index 000000000..6bdf939be --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_attribution_event_type.proto @@ -0,0 +1,49 @@ +// 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.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 = "ConversionAttributionEventTypeProto"; +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"; + +// 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/v2/enums/conversion_lag_bucket.proto b/google/ads/googleads/v2/enums/conversion_lag_bucket.proto new file mode 100644 index 000000000..94a099bf3 --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_lag_bucket.proto @@ -0,0 +1,118 @@ +// 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.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 = "ConversionLagBucketProto"; +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"; + +// 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/v2/enums/conversion_or_adjustment_lag_bucket.proto b/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto new file mode 100644 index 000000000..b5caee44a --- /dev/null +++ b/google/ads/googleads/v2/enums/conversion_or_adjustment_lag_bucket.proto @@ -0,0 +1,207 @@ +// 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.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 = "ConversionOrAdjustmentLagBucketProto"; +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"; + +// 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/v2/enums/criterion_category_channel_availability_mode.proto b/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto new file mode 100644 index 000000000..1d7e15c19 --- /dev/null +++ b/google/ads/googleads/v2/enums/criterion_category_channel_availability_mode.proto @@ -0,0 +1,59 @@ +// 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.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 = "CriterionCategoryChannelAvailabilityModeProto"; +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 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/v2/enums/criterion_category_locale_availability_mode.proto b/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto new file mode 100644 index 000000000..16b68bbc4 --- /dev/null +++ b/google/ads/googleads/v2/enums/criterion_category_locale_availability_mode.proto @@ -0,0 +1,62 @@ +// 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.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 = "CriterionCategoryLocaleAvailabilityModeProto"; +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 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/v2/enums/criterion_system_serving_status.proto b/google/ads/googleads/v2/enums/criterion_system_serving_status.proto new file mode 100644 index 000000000..857ccbfc7 --- /dev/null +++ b/google/ads/googleads/v2/enums/criterion_system_serving_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "CriterionSystemServingStatusProto"; +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 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/v2/enums/criterion_type.proto b/google/ads/googleads/v2/enums/criterion_type.proto new file mode 100644 index 000000000..7f9a76ccb --- /dev/null +++ b/google/ads/googleads/v2/enums/criterion_type.proto @@ -0,0 +1,135 @@ +// 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.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 = "CriterionTypeProto"; +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 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/v2/enums/custom_interest_member_type.proto b/google/ads/googleads/v2/enums/custom_interest_member_type.proto new file mode 100644 index 000000000..a0b9dabe3 --- /dev/null +++ b/google/ads/googleads/v2/enums/custom_interest_member_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "CustomInterestMemberTypeProto"; +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 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/v2/enums/custom_interest_status.proto b/google/ads/googleads/v2/enums/custom_interest_status.proto new file mode 100644 index 000000000..9f9ab6f14 --- /dev/null +++ b/google/ads/googleads/v2/enums/custom_interest_status.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.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 = "CustomInterestStatusProto"; +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 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/v2/enums/custom_interest_type.proto b/google/ads/googleads/v2/enums/custom_interest_type.proto new file mode 100644 index 000000000..2751f2eac --- /dev/null +++ b/google/ads/googleads/v2/enums/custom_interest_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "CustomInterestTypeProto"; +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 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/v2/enums/custom_placeholder_field.proto b/google/ads/googleads/v2/enums/custom_placeholder_field.proto new file mode 100644 index 000000000..c614c2304 --- /dev/null +++ b/google/ads/googleads/v2/enums/custom_placeholder_field.proto @@ -0,0 +1,130 @@ +// 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.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 = "CustomPlaceholderFieldProto"; +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 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/v2/enums/customer_match_upload_key_type.proto b/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto new file mode 100644 index 000000000..16fdfc046 --- /dev/null +++ b/google/ads/googleads/v2/enums/customer_match_upload_key_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "CustomerMatchUploadKeyTypeProto"; +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"; + +// 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/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto b/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.proto new file mode 100644 index 000000000..f016e30c0 --- /dev/null +++ b/google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.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.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 = "CustomerPayPerConversionEligibilityFailureReasonProto"; +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 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/v2/enums/data_driven_model_status.proto b/google/ads/googleads/v2/enums/data_driven_model_status.proto new file mode 100644 index 000000000..fe72a5486 --- /dev/null +++ b/google/ads/googleads/v2/enums/data_driven_model_status.proto @@ -0,0 +1,63 @@ +// 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.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 = "DataDrivenModelStatusProto"; +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 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/v2/enums/day_of_week.proto b/google/ads/googleads/v2/enums/day_of_week.proto new file mode 100644 index 000000000..423b490eb --- /dev/null +++ b/google/ads/googleads/v2/enums/day_of_week.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.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 = "DayOfWeekProto"; +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 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/v2/enums/device.proto b/google/ads/googleads/v2/enums/device.proto new file mode 100644 index 000000000..67bd0073f --- /dev/null +++ b/google/ads/googleads/v2/enums/device.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.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 = "DeviceProto"; +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 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/v2/enums/display_ad_format_setting.proto b/google/ads/googleads/v2/enums/display_ad_format_setting.proto new file mode 100644 index 000000000..c65af3993 --- /dev/null +++ b/google/ads/googleads/v2/enums/display_ad_format_setting.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.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 = "DisplayAdFormatSettingProto"; +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 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/v2/enums/display_upload_product_type.proto b/google/ads/googleads/v2/enums/display_upload_product_type.proto new file mode 100644 index 000000000..0dc6b7b63 --- /dev/null +++ b/google/ads/googleads/v2/enums/display_upload_product_type.proto @@ -0,0 +1,98 @@ +// 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.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 = "DisplayUploadProductTypeProto"; +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 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/v2/enums/distance_bucket.proto b/google/ads/googleads/v2/enums/distance_bucket.proto new file mode 100644 index 000000000..6aa1e810d --- /dev/null +++ b/google/ads/googleads/v2/enums/distance_bucket.proto @@ -0,0 +1,128 @@ +// 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.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 = "DistanceBucketProto"; +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 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/v2/enums/dsa_page_feed_criterion_field.proto b/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto new file mode 100644 index 000000000..2192313d8 --- /dev/null +++ b/google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.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.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 = "DsaPageFeedCriterionFieldProto"; +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 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/v2/enums/education_placeholder_field.proto b/google/ads/googleads/v2/enums/education_placeholder_field.proto new file mode 100644 index 000000000..63e860ae7 --- /dev/null +++ b/google/ads/googleads/v2/enums/education_placeholder_field.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.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 = "EducationPlaceholderFieldProto"; +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 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/v2/enums/extension_setting_device.proto b/google/ads/googleads/v2/enums/extension_setting_device.proto new file mode 100644 index 000000000..dec6416d4 --- /dev/null +++ b/google/ads/googleads/v2/enums/extension_setting_device.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.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 = "ExtensionSettingDeviceProto"; +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 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/v2/enums/extension_type.proto b/google/ads/googleads/v2/enums/extension_type.proto new file mode 100644 index 000000000..446421749 --- /dev/null +++ b/google/ads/googleads/v2/enums/extension_type.proto @@ -0,0 +1,79 @@ +// 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.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 = "ExtensionTypeProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/external_conversion_source.proto b/google/ads/googleads/v2/enums/external_conversion_source.proto new file mode 100644 index 000000000..ad2389354 --- /dev/null +++ b/google/ads/googleads/v2/enums/external_conversion_source.proto @@ -0,0 +1,131 @@ +// 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.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 = "ExternalConversionSourceProto"; +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"; + +// 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/v2/enums/feed_attribute_type.proto b/google/ads/googleads/v2/enums/feed_attribute_type.proto new file mode 100644 index 000000000..83205a14e --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_attribute_type.proto @@ -0,0 +1,84 @@ +// 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.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 = "FeedAttributeTypeProto"; +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 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/v2/enums/feed_item_quality_approval_status.proto b/google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto new file mode 100644 index 000000000..fdba5dbc9 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_quality_approval_status.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.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 = "FeedItemQualityApprovalStatusProto"; +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 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/v2/enums/feed_item_quality_disapproval_reason.proto b/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto new file mode 100644 index 000000000..11273709c --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto @@ -0,0 +1,100 @@ +// 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.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 = "FeedItemQualityDisapprovalReasonProto"; +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 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/v2/enums/feed_item_status.proto b/google/ads/googleads/v2/enums/feed_item_status.proto new file mode 100644 index 000000000..2a4336f72 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "FeedItemStatusProto"; +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 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/v2/enums/feed_item_target_device.proto b/google/ads/googleads/v2/enums/feed_item_target_device.proto new file mode 100644 index 000000000..65208edaa --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_target_device.proto @@ -0,0 +1,49 @@ +// 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.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 = "FeedItemTargetDeviceProto"; +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 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/v2/enums/feed_item_target_type.proto b/google/ads/googleads/v2/enums/feed_item_target_type.proto new file mode 100644 index 000000000..33b3b5603 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_target_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "FeedItemTargetTypeProto"; +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 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/v2/enums/feed_item_validation_status.proto b/google/ads/googleads/v2/enums/feed_item_validation_status.proto new file mode 100644 index 000000000..8fb22b4cd --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_item_validation_status.proto @@ -0,0 +1,54 @@ +// 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.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 = "FeedItemValidationStatusProto"; +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 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/v2/enums/feed_link_status.proto b/google/ads/googleads/v2/enums/feed_link_status.proto new file mode 100644 index 000000000..e4d82c6d2 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_link_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "FeedLinkStatusProto"; +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 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/v2/enums/feed_mapping_criterion_type.proto b/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto new file mode 100644 index 000000000..2f7bb5d57 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "FeedMappingCriterionTypeProto"; +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 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/v2/enums/feed_mapping_status.proto b/google/ads/googleads/v2/enums/feed_mapping_status.proto new file mode 100644 index 000000000..65771e68f --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_mapping_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "FeedMappingStatusProto"; +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 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/v2/enums/feed_origin.proto b/google/ads/googleads/v2/enums/feed_origin.proto new file mode 100644 index 000000000..093a5b55d --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_origin.proto @@ -0,0 +1,54 @@ +// 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.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 = "FeedOriginProto"; +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 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/v2/enums/feed_status.proto b/google/ads/googleads/v2/enums/feed_status.proto new file mode 100644 index 000000000..339a43c16 --- /dev/null +++ b/google/ads/googleads/v2/enums/feed_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "FeedStatusProto"; +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 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/v2/enums/flight_placeholder_field.proto b/google/ads/googleads/v2/enums/flight_placeholder_field.proto new file mode 100644 index 000000000..98f5131bf --- /dev/null +++ b/google/ads/googleads/v2/enums/flight_placeholder_field.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.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 = "FlightsPlaceholderFieldProto"; +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 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/v2/enums/frequency_cap_event_type.proto b/google/ads/googleads/v2/enums/frequency_cap_event_type.proto new file mode 100644 index 000000000..780367315 --- /dev/null +++ b/google/ads/googleads/v2/enums/frequency_cap_event_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "FrequencyCapEventTypeProto"; +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 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/v2/enums/frequency_cap_level.proto b/google/ads/googleads/v2/enums/frequency_cap_level.proto new file mode 100644 index 000000000..a3e55fcff --- /dev/null +++ b/google/ads/googleads/v2/enums/frequency_cap_level.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.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 = "FrequencyCapLevelProto"; +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 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/v2/enums/frequency_cap_time_unit.proto b/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto new file mode 100644 index 000000000..b5da86cf3 --- /dev/null +++ b/google/ads/googleads/v2/enums/frequency_cap_time_unit.proto @@ -0,0 +1,54 @@ +// 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.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 = "FrequencyCapTimeUnitProto"; +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 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/v2/enums/gender_type.proto b/google/ads/googleads/v2/enums/gender_type.proto new file mode 100644 index 000000000..f81e4fa0a --- /dev/null +++ b/google/ads/googleads/v2/enums/gender_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "GenderTypeProto"; +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 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/v2/enums/geo_target_constant_status.proto b/google/ads/googleads/v2/enums/geo_target_constant_status.proto new file mode 100644 index 000000000..a52f86f9a --- /dev/null +++ b/google/ads/googleads/v2/enums/geo_target_constant_status.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.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 = "GeoTargetConstantStatusProto"; +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 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/v2/enums/geo_targeting_restriction.proto b/google/ads/googleads/v2/enums/geo_targeting_restriction.proto new file mode 100644 index 000000000..1d2e66fd0 --- /dev/null +++ b/google/ads/googleads/v2/enums/geo_targeting_restriction.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.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 = "GeoTargetingRestrictionProto"; +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 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/v2/enums/geo_targeting_type.proto b/google/ads/googleads/v2/enums/geo_targeting_type.proto new file mode 100644 index 000000000..968c9e2c3 --- /dev/null +++ b/google/ads/googleads/v2/enums/geo_targeting_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "GeoTargetingTypeProto"; +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 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/v2/enums/google_ads_field_category.proto b/google/ads/googleads/v2/enums/google_ads_field_category.proto new file mode 100644 index 000000000..e4aab7ff3 --- /dev/null +++ b/google/ads/googleads/v2/enums/google_ads_field_category.proto @@ -0,0 +1,62 @@ +// 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.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 = "GoogleAdsFieldCategoryProto"; +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 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/v2/enums/google_ads_field_data_type.proto b/google/ads/googleads/v2/enums/google_ads_field_data_type.proto new file mode 100644 index 000000000..ff39c44e1 --- /dev/null +++ b/google/ads/googleads/v2/enums/google_ads_field_data_type.proto @@ -0,0 +1,103 @@ +// 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.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 = "GoogleAdsFieldDataTypeProto"; +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 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/v2/enums/hotel_date_selection_type.proto b/google/ads/googleads/v2/enums/hotel_date_selection_type.proto new file mode 100644 index 000000000..25a12f2b9 --- /dev/null +++ b/google/ads/googleads/v2/enums/hotel_date_selection_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "HotelDateSelectionTypeProto"; +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 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/v2/enums/hotel_placeholder_field.proto b/google/ads/googleads/v2/enums/hotel_placeholder_field.proto new file mode 100644 index 000000000..6117772c2 --- /dev/null +++ b/google/ads/googleads/v2/enums/hotel_placeholder_field.proto @@ -0,0 +1,125 @@ +// 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.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 = "HotelsPlaceholderFieldProto"; +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 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/v2/enums/hotel_rate_type.proto b/google/ads/googleads/v2/enums/hotel_rate_type.proto new file mode 100644 index 000000000..9a184225a --- /dev/null +++ b/google/ads/googleads/v2/enums/hotel_rate_type.proto @@ -0,0 +1,63 @@ +// 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.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 = "HotelRateTypeProto"; +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 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/v2/enums/income_range_type.proto b/google/ads/googleads/v2/enums/income_range_type.proto new file mode 100644 index 000000000..4e0aaef24 --- /dev/null +++ b/google/ads/googleads/v2/enums/income_range_type.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.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 = "IncomeRangeTypeProto"; +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 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/v2/enums/interaction_event_type.proto b/google/ads/googleads/v2/enums/interaction_event_type.proto new file mode 100644 index 000000000..6fb7ddd6d --- /dev/null +++ b/google/ads/googleads/v2/enums/interaction_event_type.proto @@ -0,0 +1,63 @@ +// 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.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 = "InteractionEventTypeProto"; +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 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/v2/enums/interaction_type.proto b/google/ads/googleads/v2/enums/interaction_type.proto new file mode 100644 index 000000000..be3a9b649 --- /dev/null +++ b/google/ads/googleads/v2/enums/interaction_type.proto @@ -0,0 +1,48 @@ +// 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.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 = "InteractionTypeProto"; +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 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/v2/enums/job_placeholder_field.proto b/google/ads/googleads/v2/enums/job_placeholder_field.proto new file mode 100644 index 000000000..2326fbfcc --- /dev/null +++ b/google/ads/googleads/v2/enums/job_placeholder_field.proto @@ -0,0 +1,116 @@ +// 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.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 = "JobsPlaceholderFieldProto"; +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 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/v2/enums/keyword_match_type.proto b/google/ads/googleads/v2/enums/keyword_match_type.proto new file mode 100644 index 000000000..2e6dcfea4 --- /dev/null +++ b/google/ads/googleads/v2/enums/keyword_match_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "KeywordMatchTypeProto"; +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 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/v2/enums/keyword_plan_competition_level.proto b/google/ads/googleads/v2/enums/keyword_plan_competition_level.proto new file mode 100644 index 000000000..490f42169 --- /dev/null +++ b/google/ads/googleads/v2/enums/keyword_plan_competition_level.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.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 = "KeywordPlanCompetitionLevelProto"; +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 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. + LOW = 2; + + // Medium competition. + MEDIUM = 3; + + // High competition. + HIGH = 4; + } + + +} diff --git a/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto b/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.proto new file mode 100644 index 000000000..df74e1193 --- /dev/null +++ b/google/ads/googleads/v2/enums/keyword_plan_forecast_interval.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.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 = "KeywordPlanForecastIntervalProto"; +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 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/v2/enums/keyword_plan_network.proto b/google/ads/googleads/v2/enums/keyword_plan_network.proto new file mode 100644 index 000000000..210a1a5db --- /dev/null +++ b/google/ads/googleads/v2/enums/keyword_plan_network.proto @@ -0,0 +1,51 @@ +// 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.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 = "KeywordPlanNetworkProto"; +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 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/v2/enums/label_status.proto b/google/ads/googleads/v2/enums/label_status.proto new file mode 100644 index 000000000..de559d875 --- /dev/null +++ b/google/ads/googleads/v2/enums/label_status.proto @@ -0,0 +1,49 @@ +// 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.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 = "LabelStatusProto"; +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"; + +// 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/v2/enums/legacy_app_install_ad_app_store.proto b/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.proto new file mode 100644 index 000000000..95a3dd7a7 --- /dev/null +++ b/google/ads/googleads/v2/enums/legacy_app_install_ad_app_store.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.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 = "LegacyAppInstallAdAppStoreProto"; +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 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/v2/enums/listing_custom_attribute_index.proto b/google/ads/googleads/v2/enums/listing_custom_attribute_index.proto new file mode 100644 index 000000000..7bfa77989 --- /dev/null +++ b/google/ads/googleads/v2/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.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 = "ListingCustomAttributeIndexProto"; +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 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/v2/enums/listing_group_type.proto b/google/ads/googleads/v2/enums/listing_group_type.proto new file mode 100644 index 000000000..de2d03457 --- /dev/null +++ b/google/ads/googleads/v2/enums/listing_group_type.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.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 = "ListingGroupTypeProto"; +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 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/v2/enums/local_placeholder_field.proto b/google/ads/googleads/v2/enums/local_placeholder_field.proto new file mode 100644 index 000000000..df2b246dc --- /dev/null +++ b/google/ads/googleads/v2/enums/local_placeholder_field.proto @@ -0,0 +1,120 @@ +// 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.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 = "LocalPlaceholderFieldProto"; +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 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/v2/enums/location_extension_targeting_criterion_field.proto b/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto new file mode 100644 index 000000000..f1fda3fe9 --- /dev/null +++ b/google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto @@ -0,0 +1,63 @@ +// 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.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 = "LocationExtensionTargetingCriterionFieldProto"; +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 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/v2/enums/location_group_radius_units.proto b/google/ads/googleads/v2/enums/location_group_radius_units.proto new file mode 100644 index 000000000..5b3f94c2a --- /dev/null +++ b/google/ads/googleads/v2/enums/location_group_radius_units.proto @@ -0,0 +1,51 @@ +// 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.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 = "LocationGroupRadiusUnitsProto"; +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 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/v2/enums/location_placeholder_field.proto b/google/ads/googleads/v2/enums/location_placeholder_field.proto new file mode 100644 index 000000000..438cb8941 --- /dev/null +++ b/google/ads/googleads/v2/enums/location_placeholder_field.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.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 = "LocationPlaceholderFieldProto"; +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 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/v2/enums/manager_link_status.proto b/google/ads/googleads/v2/enums/manager_link_status.proto new file mode 100644 index 000000000..5336a7a99 --- /dev/null +++ b/google/ads/googleads/v2/enums/manager_link_status.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.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 = "ManagerLinkStatusProto"; +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"; + +// 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/v2/enums/matching_function_context_type.proto b/google/ads/googleads/v2/enums/matching_function_context_type.proto new file mode 100644 index 000000000..581d094b5 --- /dev/null +++ b/google/ads/googleads/v2/enums/matching_function_context_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "MatchingFunctionContextTypeProto"; +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 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/v2/enums/matching_function_operator.proto b/google/ads/googleads/v2/enums/matching_function_operator.proto new file mode 100644 index 000000000..2932d75a9 --- /dev/null +++ b/google/ads/googleads/v2/enums/matching_function_operator.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.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 = "MatchingFunctionOperatorProto"; +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 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/v2/enums/media_type.proto b/google/ads/googleads/v2/enums/media_type.proto new file mode 100644 index 000000000..781100457 --- /dev/null +++ b/google/ads/googleads/v2/enums/media_type.proto @@ -0,0 +1,65 @@ +// 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.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 = "MediaTypeProto"; +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 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/v2/enums/merchant_center_link_status.proto b/google/ads/googleads/v2/enums/merchant_center_link_status.proto new file mode 100644 index 000000000..617f65858 --- /dev/null +++ b/google/ads/googleads/v2/enums/merchant_center_link_status.proto @@ -0,0 +1,54 @@ +// 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.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 = "MerchantCenterLinkStatusProto"; +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 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/v2/enums/message_placeholder_field.proto b/google/ads/googleads/v2/enums/message_placeholder_field.proto new file mode 100644 index 000000000..61246afa8 --- /dev/null +++ b/google/ads/googleads/v2/enums/message_placeholder_field.proto @@ -0,0 +1,62 @@ +// 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.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 = "MessagePlaceholderFieldProto"; +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 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/v2/enums/mime_type.proto b/google/ads/googleads/v2/enums/mime_type.proto new file mode 100644 index 000000000..a6b1e6653 --- /dev/null +++ b/google/ads/googleads/v2/enums/mime_type.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.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 = "MimeTypeProto"; +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 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/v2/enums/minute_of_hour.proto b/google/ads/googleads/v2/enums/minute_of_hour.proto new file mode 100644 index 000000000..34cb46454 --- /dev/null +++ b/google/ads/googleads/v2/enums/minute_of_hour.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.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 = "MinuteOfHourProto"; +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 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/v2/enums/mobile_device_type.proto b/google/ads/googleads/v2/enums/mobile_device_type.proto new file mode 100644 index 000000000..e6e0d2a08 --- /dev/null +++ b/google/ads/googleads/v2/enums/mobile_device_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "MobileDeviceTypeProto"; +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 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/v2/enums/month_of_year.proto b/google/ads/googleads/v2/enums/month_of_year.proto new file mode 100644 index 000000000..5cc318649 --- /dev/null +++ b/google/ads/googleads/v2/enums/month_of_year.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.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 = "MonthOfYearProto"; +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 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/v2/enums/mutate_job_status.proto b/google/ads/googleads/v2/enums/mutate_job_status.proto new file mode 100644 index 000000000..8c88eab95 --- /dev/null +++ b/google/ads/googleads/v2/enums/mutate_job_status.proto @@ -0,0 +1,54 @@ +// 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.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 = "MutateJobStatusProto"; +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 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/v2/enums/negative_geo_target_type.proto b/google/ads/googleads/v2/enums/negative_geo_target_type.proto new file mode 100644 index 000000000..c1165ac8f --- /dev/null +++ b/google/ads/googleads/v2/enums/negative_geo_target_type.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.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 = "NegativeGeoTargetTypeProto"; +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 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/v2/enums/operating_system_version_operator_type.proto b/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto new file mode 100644 index 000000000..1a46ed04c --- /dev/null +++ b/google/ads/googleads/v2/enums/operating_system_version_operator_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "OperatingSystemVersionOperatorTypeProto"; +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 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/v2/enums/page_one_promoted_strategy_goal.proto b/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.proto new file mode 100644 index 000000000..7c9adbbf0 --- /dev/null +++ b/google/ads/googleads/v2/enums/page_one_promoted_strategy_goal.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.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 = "PageOnePromotedStrategyGoalProto"; +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 bidding schemes. + +// Container for enum describing possible strategy goals: where impressions are +// desired to be shown on search result pages. +message PageOnePromotedStrategyGoalEnum { + // Enum describing possible strategy goals. + enum PageOnePromotedStrategyGoal { + // Not specified. + UNSPECIFIED = 0; + + // Used for return value only. Represents value unknown in this version. + UNKNOWN = 1; + + // First page on google.com. + FIRST_PAGE = 2; + + // Top slots of the first page on google.com. + FIRST_PAGE_PROMOTED = 3; + } + + +} diff --git a/google/ads/googleads/v2/enums/parental_status_type.proto b/google/ads/googleads/v2/enums/parental_status_type.proto new file mode 100644 index 000000000..772c5c55b --- /dev/null +++ b/google/ads/googleads/v2/enums/parental_status_type.proto @@ -0,0 +1,54 @@ +// 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.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 = "ParentalStatusTypeProto"; +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 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/v2/enums/payment_mode.proto b/google/ads/googleads/v2/enums/payment_mode.proto new file mode 100644 index 000000000..815ede508 --- /dev/null +++ b/google/ads/googleads/v2/enums/payment_mode.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.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 = "PaymentModeProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/placeholder_type.proto b/google/ads/googleads/v2/enums/placeholder_type.proto new file mode 100644 index 000000000..4d83356e5 --- /dev/null +++ b/google/ads/googleads/v2/enums/placeholder_type.proto @@ -0,0 +1,122 @@ +// 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.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 = "PlaceholderTypeProto"; +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 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/v2/enums/placement_type.proto b/google/ads/googleads/v2/enums/placement_type.proto new file mode 100644 index 000000000..a2fadcbc5 --- /dev/null +++ b/google/ads/googleads/v2/enums/placement_type.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.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 = "PlacementTypeProto"; +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 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/v2/enums/policy_approval_status.proto b/google/ads/googleads/v2/enums/policy_approval_status.proto new file mode 100644 index 000000000..de6f2d7d5 --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_approval_status.proto @@ -0,0 +1,62 @@ +// 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.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 = "PolicyApprovalStatusProto"; +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 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/v2/enums/policy_review_status.proto b/google/ads/googleads/v2/enums/policy_review_status.proto new file mode 100644 index 000000000..268e9c61c --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_review_status.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.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 = "PolicyReviewStatusProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/enums/policy_topic_entry_type.proto b/google/ads/googleads/v2/enums/policy_topic_entry_type.proto new file mode 100644 index 000000000..9bbd1ac7e --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_topic_entry_type.proto @@ -0,0 +1,67 @@ +// 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.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 = "PolicyTopicEntryTypeProto"; +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 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/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto new file mode 100644 index 000000000..539b9eeaf --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_mismatch_url_type.proto @@ -0,0 +1,63 @@ +// 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.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 = "PolicyTopicEvidenceDestinationMismatchUrlTypeProto"; +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 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/v2/enums/policy_topic_evidence_destination_not_working_device.proto b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.proto new file mode 100644 index 000000000..222525e28 --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_device.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.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 = "PolicyTopicEvidenceDestinationNotWorkingDeviceProto"; +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 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/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 new file mode 100644 index 000000000..fcf16dd11 --- /dev/null +++ b/google/ads/googleads/v2/enums/policy_topic_evidence_destination_not_working_dns_error_type.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.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 = "PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeProto"; +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 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/v2/enums/positive_geo_target_type.proto b/google/ads/googleads/v2/enums/positive_geo_target_type.proto new file mode 100644 index 000000000..f094d3ca8 --- /dev/null +++ b/google/ads/googleads/v2/enums/positive_geo_target_type.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.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 = "PositiveGeoTargetTypeProto"; +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 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/v2/enums/preferred_content_type.proto b/google/ads/googleads/v2/enums/preferred_content_type.proto new file mode 100644 index 000000000..fe276bfb9 --- /dev/null +++ b/google/ads/googleads/v2/enums/preferred_content_type.proto @@ -0,0 +1,48 @@ +// 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.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 = "PreferredContentTypeProto"; +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 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/v2/enums/price_extension_price_qualifier.proto b/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto new file mode 100644 index 000000000..a0fa76ddc --- /dev/null +++ b/google/ads/googleads/v2/enums/price_extension_price_qualifier.proto @@ -0,0 +1,54 @@ +// 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.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 = "PriceExtensionPriceQualifierProto"; +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 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/v2/enums/price_extension_price_unit.proto b/google/ads/googleads/v2/enums/price_extension_price_unit.proto new file mode 100644 index 000000000..412f35118 --- /dev/null +++ b/google/ads/googleads/v2/enums/price_extension_price_unit.proto @@ -0,0 +1,63 @@ +// 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.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 = "PriceExtensionPriceUnitProto"; +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 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/v2/enums/price_extension_type.proto b/google/ads/googleads/v2/enums/price_extension_type.proto new file mode 100644 index 000000000..495de62a9 --- /dev/null +++ b/google/ads/googleads/v2/enums/price_extension_type.proto @@ -0,0 +1,72 @@ +// 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.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 = "PriceExtensionTypeProto"; +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 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/v2/enums/price_placeholder_field.proto b/google/ads/googleads/v2/enums/price_placeholder_field.proto new file mode 100644 index 000000000..c4aba0bc4 --- /dev/null +++ b/google/ads/googleads/v2/enums/price_placeholder_field.proto @@ -0,0 +1,241 @@ +// 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.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 = "PricePlaceholderFieldProto"; +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 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/v2/enums/product_bidding_category_level.proto b/google/ads/googleads/v2/enums/product_bidding_category_level.proto new file mode 100644 index 000000000..8033b2c8a --- /dev/null +++ b/google/ads/googleads/v2/enums/product_bidding_category_level.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.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 = "ProductBiddingCategoryLevelProto"; +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"; + +// 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/v2/enums/product_bidding_category_status.proto b/google/ads/googleads/v2/enums/product_bidding_category_status.proto new file mode 100644 index 000000000..300d2e8d6 --- /dev/null +++ b/google/ads/googleads/v2/enums/product_bidding_category_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "ProductBiddingCategoryStatusProto"; +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 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/v2/enums/product_channel.proto b/google/ads/googleads/v2/enums/product_channel.proto new file mode 100644 index 000000000..ddb6fe9e0 --- /dev/null +++ b/google/ads/googleads/v2/enums/product_channel.proto @@ -0,0 +1,51 @@ +// 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.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 = "ProductChannelProto"; +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 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/v2/enums/product_channel_exclusivity.proto b/google/ads/googleads/v2/enums/product_channel_exclusivity.proto new file mode 100644 index 000000000..d1676a32b --- /dev/null +++ b/google/ads/googleads/v2/enums/product_channel_exclusivity.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.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 = "ProductChannelExclusivityProto"; +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 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/v2/enums/product_condition.proto b/google/ads/googleads/v2/enums/product_condition.proto new file mode 100644 index 000000000..2a2f41f04 --- /dev/null +++ b/google/ads/googleads/v2/enums/product_condition.proto @@ -0,0 +1,54 @@ +// 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.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 = "ProductConditionProto"; +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 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/v2/enums/product_type_level.proto b/google/ads/googleads/v2/enums/product_type_level.proto new file mode 100644 index 000000000..81ab5b460 --- /dev/null +++ b/google/ads/googleads/v2/enums/product_type_level.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.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 = "ProductTypeLevelProto"; +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 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/v2/enums/promotion_extension_discount_modifier.proto b/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto new file mode 100644 index 000000000..6e01ba9d3 --- /dev/null +++ b/google/ads/googleads/v2/enums/promotion_extension_discount_modifier.proto @@ -0,0 +1,49 @@ +// 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.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 = "PromotionExtensionDiscountModifierProto"; +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 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/v2/enums/promotion_extension_occasion.proto b/google/ads/googleads/v2/enums/promotion_extension_occasion.proto new file mode 100644 index 000000000..2aea2f815 --- /dev/null +++ b/google/ads/googleads/v2/enums/promotion_extension_occasion.proto @@ -0,0 +1,158 @@ +// 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.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 = "PromotionExtensionOccasionProto"; +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 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/v2/enums/promotion_placeholder_field.proto b/google/ads/googleads/v2/enums/promotion_placeholder_field.proto new file mode 100644 index 000000000..d1e47e2c4 --- /dev/null +++ b/google/ads/googleads/v2/enums/promotion_placeholder_field.proto @@ -0,0 +1,96 @@ +// 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.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 = "PromotionPlaceholderFieldProto"; +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 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/v2/enums/proximity_radius_units.proto b/google/ads/googleads/v2/enums/proximity_radius_units.proto new file mode 100644 index 000000000..6b1c1e9ef --- /dev/null +++ b/google/ads/googleads/v2/enums/proximity_radius_units.proto @@ -0,0 +1,51 @@ +// 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.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 = "ProximityRadiusUnitsProto"; +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 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/v2/enums/quality_score_bucket.proto b/google/ads/googleads/v2/enums/quality_score_bucket.proto new file mode 100644 index 000000000..b1a1d079d --- /dev/null +++ b/google/ads/googleads/v2/enums/quality_score_bucket.proto @@ -0,0 +1,54 @@ +// 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.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 = "QualityScoreBucketProto"; +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 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/v2/enums/real_estate_placeholder_field.proto b/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto new file mode 100644 index 000000000..666a4c202 --- /dev/null +++ b/google/ads/googleads/v2/enums/real_estate_placeholder_field.proto @@ -0,0 +1,116 @@ +// 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.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 = "RealEstatePlaceholderFieldProto"; +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 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/v2/enums/recommendation_type.proto b/google/ads/googleads/v2/enums/recommendation_type.proto new file mode 100644 index 000000000..03b35e9e2 --- /dev/null +++ b/google/ads/googleads/v2/enums/recommendation_type.proto @@ -0,0 +1,93 @@ +// 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.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 = "RecommendationTypeProto"; +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 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/v2/enums/search_engine_results_page_type.proto b/google/ads/googleads/v2/enums/search_engine_results_page_type.proto new file mode 100644 index 000000000..f0d62f1e2 --- /dev/null +++ b/google/ads/googleads/v2/enums/search_engine_results_page_type.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.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 = "SearchEngineResultsPageTypeProto"; +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 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/v2/enums/search_term_match_type.proto b/google/ads/googleads/v2/enums/search_term_match_type.proto new file mode 100644 index 000000000..930501d87 --- /dev/null +++ b/google/ads/googleads/v2/enums/search_term_match_type.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.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 = "SearchTermMatchTypeProto"; +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 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/v2/enums/search_term_targeting_status.proto b/google/ads/googleads/v2/enums/search_term_targeting_status.proto new file mode 100644 index 000000000..0a9dd7740 --- /dev/null +++ b/google/ads/googleads/v2/enums/search_term_targeting_status.proto @@ -0,0 +1,59 @@ +// 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.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 = "SearchTermTargetingStatusProto"; +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 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/v2/enums/served_asset_field_type.proto b/google/ads/googleads/v2/enums/served_asset_field_type.proto new file mode 100644 index 000000000..9aab79c7b --- /dev/null +++ b/google/ads/googleads/v2/enums/served_asset_field_type.proto @@ -0,0 +1,62 @@ +// 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.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 = "ServedAssetFieldTypeProto"; +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 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/v2/enums/shared_set_status.proto b/google/ads/googleads/v2/enums/shared_set_status.proto new file mode 100644 index 000000000..f51fe626d --- /dev/null +++ b/google/ads/googleads/v2/enums/shared_set_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "SharedSetStatusProto"; +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 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/v2/enums/shared_set_type.proto b/google/ads/googleads/v2/enums/shared_set_type.proto new file mode 100644 index 000000000..f24b30b4a --- /dev/null +++ b/google/ads/googleads/v2/enums/shared_set_type.proto @@ -0,0 +1,51 @@ +// 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.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 = "SharedSetTypeProto"; +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 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/v2/enums/simulation_modification_method.proto b/google/ads/googleads/v2/enums/simulation_modification_method.proto new file mode 100644 index 000000000..830ac8cae --- /dev/null +++ b/google/ads/googleads/v2/enums/simulation_modification_method.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.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 = "SimulationModificationMethodProto"; +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 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/v2/enums/simulation_type.proto b/google/ads/googleads/v2/enums/simulation_type.proto new file mode 100644 index 000000000..b7b51f771 --- /dev/null +++ b/google/ads/googleads/v2/enums/simulation_type.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.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 = "SimulationTypeProto"; +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 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/v2/enums/sitelink_placeholder_field.proto b/google/ads/googleads/v2/enums/sitelink_placeholder_field.proto new file mode 100644 index 000000000..c5886e3e3 --- /dev/null +++ b/google/ads/googleads/v2/enums/sitelink_placeholder_field.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.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 = "SitelinkPlaceholderFieldProto"; +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 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/v2/enums/slot.proto b/google/ads/googleads/v2/enums/slot.proto new file mode 100644 index 000000000..c7bba3fee --- /dev/null +++ b/google/ads/googleads/v2/enums/slot.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.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 = "SlotProto"; +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 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/v2/enums/spending_limit_type.proto b/google/ads/googleads/v2/enums/spending_limit_type.proto new file mode 100644 index 000000000..1870c94b4 --- /dev/null +++ b/google/ads/googleads/v2/enums/spending_limit_type.proto @@ -0,0 +1,49 @@ +// 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.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 = "SpendingLimitTypeProto"; +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 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/v2/enums/structured_snippet_placeholder_field.proto b/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto new file mode 100644 index 000000000..6ccf3f933 --- /dev/null +++ b/google/ads/googleads/v2/enums/structured_snippet_placeholder_field.proto @@ -0,0 +1,56 @@ +// 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.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 = "StructuredSnippetPlaceholderFieldProto"; +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 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/v2/enums/system_managed_entity_source.proto b/google/ads/googleads/v2/enums/system_managed_entity_source.proto new file mode 100644 index 000000000..9317f1c71 --- /dev/null +++ b/google/ads/googleads/v2/enums/system_managed_entity_source.proto @@ -0,0 +1,48 @@ +// 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.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 = "SystemManagedEntitySourceProto"; +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 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/v2/enums/target_cpa_opt_in_recommendation_goal.proto b/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.proto new file mode 100644 index 000000000..c22dafebf --- /dev/null +++ b/google/ads/googleads/v2/enums/target_cpa_opt_in_recommendation_goal.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.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 = "TargetCpaOptInRecommendationGoalProto"; +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 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/v2/enums/target_impression_share_location.proto b/google/ads/googleads/v2/enums/target_impression_share_location.proto new file mode 100644 index 000000000..d1a94132c --- /dev/null +++ b/google/ads/googleads/v2/enums/target_impression_share_location.proto @@ -0,0 +1,56 @@ +// 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.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 = "TargetImpressionShareLocationProto"; +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 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/v2/enums/targeting_dimension.proto b/google/ads/googleads/v2/enums/targeting_dimension.proto new file mode 100644 index 000000000..0fed13821 --- /dev/null +++ b/google/ads/googleads/v2/enums/targeting_dimension.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.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 = "TargetingDimensionProto"; +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 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/v2/enums/time_type.proto b/google/ads/googleads/v2/enums/time_type.proto new file mode 100644 index 000000000..a4dee47a7 --- /dev/null +++ b/google/ads/googleads/v2/enums/time_type.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.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 = "TimeTypeProto"; +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 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/v2/enums/tracking_code_page_format.proto b/google/ads/googleads/v2/enums/tracking_code_page_format.proto new file mode 100644 index 000000000..827d2d3b5 --- /dev/null +++ b/google/ads/googleads/v2/enums/tracking_code_page_format.proto @@ -0,0 +1,51 @@ +// 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.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 = "TrackingCodePageFormatProto"; +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"; + +// 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/v2/enums/tracking_code_type.proto b/google/ads/googleads/v2/enums/tracking_code_type.proto new file mode 100644 index 000000000..ab244490e --- /dev/null +++ b/google/ads/googleads/v2/enums/tracking_code_type.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.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 = "TrackingCodeTypeProto"; +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"; + +// 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/v2/enums/travel_placeholder_field.proto b/google/ads/googleads/v2/enums/travel_placeholder_field.proto new file mode 100644 index 000000000..199f7e053 --- /dev/null +++ b/google/ads/googleads/v2/enums/travel_placeholder_field.proto @@ -0,0 +1,129 @@ +// 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.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 = "TravelPlaceholderFieldProto"; +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 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/v2/enums/user_interest_taxonomy_type.proto b/google/ads/googleads/v2/enums/user_interest_taxonomy_type.proto new file mode 100644 index 000000000..5e39b760e --- /dev/null +++ b/google/ads/googleads/v2/enums/user_interest_taxonomy_type.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.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 = "UserInterestTaxonomyTypeProto"; +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 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/v2/enums/user_list_access_status.proto b/google/ads/googleads/v2/enums/user_list_access_status.proto new file mode 100644 index 000000000..e85e2be6c --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_access_status.proto @@ -0,0 +1,51 @@ +// 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.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 = "UserListAccessStatusProto"; +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 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/v2/enums/user_list_closing_reason.proto b/google/ads/googleads/v2/enums/user_list_closing_reason.proto new file mode 100644 index 000000000..f8286e4ed --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_closing_reason.proto @@ -0,0 +1,49 @@ +// 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.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 = "UserListClosingReasonProto"; +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 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/v2/enums/user_list_combined_rule_operator.proto b/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto new file mode 100644 index 000000000..8a19ee684 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_combined_rule_operator.proto @@ -0,0 +1,49 @@ +// 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.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 = "UserListCombinedRuleOperatorProto"; +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"; + +// 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/v2/enums/user_list_crm_data_source_type.proto b/google/ads/googleads/v2/enums/user_list_crm_data_source_type.proto new file mode 100644 index 000000000..b70f190c5 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_crm_data_source_type.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.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 = "UserListCrmDataSourceTypeProto"; +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"; + +// 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/v2/enums/user_list_date_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.proto new file mode 100644 index 000000000..526c6d8a7 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_date_rule_item_operator.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.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 = "UserListDateRuleItemOperatorProto"; +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"; + +// 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/v2/enums/user_list_logical_rule_operator.proto b/google/ads/googleads/v2/enums/user_list_logical_rule_operator.proto new file mode 100644 index 000000000..485af7f5e --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_logical_rule_operator.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.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 = "UserListLogicalRuleOperatorProto"; +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"; + +// 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/v2/enums/user_list_membership_status.proto b/google/ads/googleads/v2/enums/user_list_membership_status.proto new file mode 100644 index 000000000..af55c67e1 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_membership_status.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.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 = "UserListMembershipStatusProto"; +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 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/v2/enums/user_list_number_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.proto new file mode 100644 index 000000000..489b5b154 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_number_rule_item_operator.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.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 = "UserListNumberRuleItemOperatorProto"; +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"; + +// 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/v2/enums/user_list_prepopulation_status.proto b/google/ads/googleads/v2/enums/user_list_prepopulation_status.proto new file mode 100644 index 000000000..2c97a7195 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_prepopulation_status.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.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 = "UserListPrepopulationStatusProto"; +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"; + +// 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/v2/enums/user_list_rule_type.proto b/google/ads/googleads/v2/enums/user_list_rule_type.proto new file mode 100644 index 000000000..0598d55d6 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_rule_type.proto @@ -0,0 +1,49 @@ +// 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.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 = "UserListRuleTypeProto"; +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"; + +// 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/v2/enums/user_list_size_range.proto b/google/ads/googleads/v2/enums/user_list_size_range.proto new file mode 100644 index 000000000..b4d062cab --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_size_range.proto @@ -0,0 +1,93 @@ +// 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.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 = "UserListSizeRangeProto"; +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 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/v2/enums/user_list_string_rule_item_operator.proto b/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto new file mode 100644 index 000000000..fdb660c3a --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_string_rule_item_operator.proto @@ -0,0 +1,67 @@ +// 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.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 = "UserListStringRuleItemOperatorProto"; +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"; + +// 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/v2/enums/user_list_type.proto b/google/ads/googleads/v2/enums/user_list_type.proto new file mode 100644 index 000000000..ce9207f23 --- /dev/null +++ b/google/ads/googleads/v2/enums/user_list_type.proto @@ -0,0 +1,64 @@ +// 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.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 = "UserListTypeProto"; +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 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/v2/enums/vanity_pharma_display_url_mode.proto b/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto new file mode 100644 index 000000000..9bae73bac --- /dev/null +++ b/google/ads/googleads/v2/enums/vanity_pharma_display_url_mode.proto @@ -0,0 +1,51 @@ +// 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.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 = "VanityPharmaDisplayUrlModeProto"; +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 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/v2/enums/vanity_pharma_text.proto b/google/ads/googleads/v2/enums/vanity_pharma_text.proto new file mode 100644 index 000000000..5c89fe440 --- /dev/null +++ b/google/ads/googleads/v2/enums/vanity_pharma_text.proto @@ -0,0 +1,88 @@ +// 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.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 = "VanityPharmaTextProto"; +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 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/v2/enums/webpage_condition_operand.proto b/google/ads/googleads/v2/enums/webpage_condition_operand.proto new file mode 100644 index 000000000..8f961a2ff --- /dev/null +++ b/google/ads/googleads/v2/enums/webpage_condition_operand.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.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 = "WebpageConditionOperandProto"; +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 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/v2/enums/webpage_condition_operator.proto b/google/ads/googleads/v2/enums/webpage_condition_operator.proto new file mode 100644 index 000000000..3f1e547f6 --- /dev/null +++ b/google/ads/googleads/v2/enums/webpage_condition_operator.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.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 = "WebpageConditionOperatorProto"; +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 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/v2/errors/access_invitation_error.proto b/google/ads/googleads/v2/errors/access_invitation_error.proto new file mode 100644 index 000000000..94981d996 --- /dev/null +++ b/google/ads/googleads/v2/errors/access_invitation_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "AccessInvitationErrorProto"; +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 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/v2/errors/account_budget_proposal_error.proto b/google/ads/googleads/v2/errors/account_budget_proposal_error.proto new file mode 100644 index 000000000..e4faa70a9 --- /dev/null +++ b/google/ads/googleads/v2/errors/account_budget_proposal_error.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.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 = "AccountBudgetProposalErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/ad_customizer_error.proto b/google/ads/googleads/v2/errors/ad_customizer_error.proto new file mode 100644 index 000000000..0ac20307c --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_customizer_error.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.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 = "AdCustomizerErrorProto"; +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 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/v2/errors/ad_error.proto b/google/ads/googleads/v2/errors/ad_error.proto new file mode 100644 index 000000000..2c59fada8 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_error.proto @@ -0,0 +1,455 @@ +// 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.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 = "AdErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/ad_group_ad_error.proto b/google/ads/googleads/v2/errors/ad_group_ad_error.proto new file mode 100644 index 000000000..55d90fb06 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_group_ad_error.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.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 = "AdGroupAdErrorProto"; +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 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/v2/errors/ad_group_bid_modifier_error.proto b/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto new file mode 100644 index 000000000..65834bb69 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_group_bid_modifier_error.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.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 = "AdGroupBidModifierErrorProto"; +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 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/v2/errors/ad_group_criterion_error.proto b/google/ads/googleads/v2/errors/ad_group_criterion_error.proto new file mode 100644 index 000000000..ea96df9dd --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_group_criterion_error.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.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 = "AdGroupCriterionErrorProto"; +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 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/v2/errors/ad_group_error.proto b/google/ads/googleads/v2/errors/ad_group_error.proto new file mode 100644 index 000000000..1b197c9c8 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_group_error.proto @@ -0,0 +1,84 @@ +// 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.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 = "AdGroupErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/ad_group_feed_error.proto b/google/ads/googleads/v2/errors/ad_group_feed_error.proto new file mode 100644 index 000000000..cfdc268bf --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_group_feed_error.proto @@ -0,0 +1,68 @@ +// 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.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 = "AdGroupFeedErrorProto"; +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 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/v2/errors/ad_parameter_error.proto b/google/ads/googleads/v2/errors/ad_parameter_error.proto new file mode 100644 index 000000000..561765b35 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_parameter_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "AdParameterErrorProto"; +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 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/v2/errors/ad_sharing_error.proto b/google/ads/googleads/v2/errors/ad_sharing_error.proto new file mode 100644 index 000000000..1296d56a1 --- /dev/null +++ b/google/ads/googleads/v2/errors/ad_sharing_error.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.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 = "AdSharingErrorProto"; +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 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/v2/errors/adx_error.proto b/google/ads/googleads/v2/errors/adx_error.proto new file mode 100644 index 000000000..47646546e --- /dev/null +++ b/google/ads/googleads/v2/errors/adx_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "AdxErrorProto"; +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 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/v2/errors/asset_error.proto b/google/ads/googleads/v2/errors/asset_error.proto new file mode 100644 index 000000000..9b69fea80 --- /dev/null +++ b/google/ads/googleads/v2/errors/asset_error.proto @@ -0,0 +1,62 @@ +// 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.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 = "AssetErrorProto"; +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 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/v2/errors/authentication_error.proto b/google/ads/googleads/v2/errors/authentication_error.proto new file mode 100644 index 000000000..1a639d9b5 --- /dev/null +++ b/google/ads/googleads/v2/errors/authentication_error.proto @@ -0,0 +1,104 @@ +// 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.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 = "AuthenticationErrorProto"; +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 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/v2/errors/authorization_error.proto b/google/ads/googleads/v2/errors/authorization_error.proto new file mode 100644 index 000000000..b01f6594e --- /dev/null +++ b/google/ads/googleads/v2/errors/authorization_error.proto @@ -0,0 +1,82 @@ +// 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.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 = "AuthorizationErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/bidding_error.proto b/google/ads/googleads/v2/errors/bidding_error.proto new file mode 100644 index 000000000..5c84b226e --- /dev/null +++ b/google/ads/googleads/v2/errors/bidding_error.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.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 = "BiddingErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/bidding_strategy_error.proto b/google/ads/googleads/v2/errors/bidding_strategy_error.proto new file mode 100644 index 000000000..f7ecea26d --- /dev/null +++ b/google/ads/googleads/v2/errors/bidding_strategy_error.proto @@ -0,0 +1,62 @@ +// 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.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 = "BiddingStrategyErrorProto"; +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 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/v2/errors/billing_setup_error.proto b/google/ads/googleads/v2/errors/billing_setup_error.proto new file mode 100644 index 000000000..7965b69b4 --- /dev/null +++ b/google/ads/googleads/v2/errors/billing_setup_error.proto @@ -0,0 +1,102 @@ +// 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.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 = "BillingSetupErrorProto"; +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 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 use 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, ie. a billing known to Payments. + 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; + + // Billing Setup creation failed because Payments could not find the + // requested Payments profile. + PAYMENTS_PROFILE_NOT_FOUND = 13; + + // Billing Setup creation failed because Payments could not find the + // requested Payments account. + PAYMENTS_ACCOUNT_NOT_FOUND = 14; + + // Billing Setup creation failed because Payments considers requested + // Payments profile ineligible. + PAYMENTS_PROFILE_INELIGIBLE = 15; + + // Billing Setup creation failed because Payments considers requested + // Payments account ineligible. + PAYMENTS_ACCOUNT_INELIGIBLE = 16; + } + + +} diff --git a/google/ads/googleads/v2/errors/campaign_budget_error.proto b/google/ads/googleads/v2/errors/campaign_budget_error.proto new file mode 100644 index 000000000..7ab1b149f --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_budget_error.proto @@ -0,0 +1,95 @@ +// 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.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 = "CampaignBudgetErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/campaign_criterion_error.proto b/google/ads/googleads/v2/errors/campaign_criterion_error.proto new file mode 100644 index 000000000..ba0a017c8 --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_criterion_error.proto @@ -0,0 +1,82 @@ +// 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.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 = "CampaignCriterionErrorProto"; +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 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/v2/errors/campaign_draft_error.proto b/google/ads/googleads/v2/errors/campaign_draft_error.proto new file mode 100644 index 000000000..257ccb137 --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_draft_error.proto @@ -0,0 +1,80 @@ +// 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.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 = "CampaignDraftErrorProto"; +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 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/v2/errors/campaign_error.proto b/google/ads/googleads/v2/errors/campaign_error.proto new file mode 100644 index 000000000..c35bebe43 --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_error.proto @@ -0,0 +1,180 @@ +// 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.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 = "CampaignErrorProto"; +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 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. An 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; + + // A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a + // UniversalAppCampaignSetting specified. + MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30; + + // 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/campaign_experiment_error.proto b/google/ads/googleads/v2/errors/campaign_experiment_error.proto new file mode 100644 index 000000000..25db480ce --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_experiment_error.proto @@ -0,0 +1,82 @@ +// 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.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 = "CampaignExperimentErrorProto"; +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 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/v2/errors/campaign_feed_error.proto b/google/ads/googleads/v2/errors/campaign_feed_error.proto new file mode 100644 index 000000000..37fd105dd --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_feed_error.proto @@ -0,0 +1,64 @@ +// 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.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 = "CampaignFeedErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/campaign_shared_set_error.proto b/google/ads/googleads/v2/errors/campaign_shared_set_error.proto new file mode 100644 index 000000000..0623b73a3 --- /dev/null +++ b/google/ads/googleads/v2/errors/campaign_shared_set_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "CampaignSharedSetErrorProto"; +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 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/v2/errors/change_status_error.proto b/google/ads/googleads/v2/errors/change_status_error.proto new file mode 100644 index 000000000..957f2f685 --- /dev/null +++ b/google/ads/googleads/v2/errors/change_status_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "ChangeStatusErrorProto"; +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 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/v2/errors/collection_size_error.proto b/google/ads/googleads/v2/errors/collection_size_error.proto new file mode 100644 index 000000000..32dee5f9c --- /dev/null +++ b/google/ads/googleads/v2/errors/collection_size_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "CollectionSizeErrorProto"; +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 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/v2/errors/context_error.proto b/google/ads/googleads/v2/errors/context_error.proto new file mode 100644 index 000000000..90ac6cbba --- /dev/null +++ b/google/ads/googleads/v2/errors/context_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "ContextErrorProto"; +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 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/v2/errors/conversion_action_error.proto b/google/ads/googleads/v2/errors/conversion_action_error.proto new file mode 100644 index 000000000..083641e2a --- /dev/null +++ b/google/ads/googleads/v2/errors/conversion_action_error.proto @@ -0,0 +1,76 @@ +// 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.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 = "ConversionActionErrorProto"; +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 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/v2/errors/conversion_adjustment_upload_error.proto b/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto new file mode 100644 index 000000000..d2eb1e904 --- /dev/null +++ b/google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto @@ -0,0 +1,80 @@ +// 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.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 = "ConversionAdjustmentUploadErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/conversion_upload_error.proto b/google/ads/googleads/v2/errors/conversion_upload_error.proto new file mode 100644 index 000000000..af55a4724 --- /dev/null +++ b/google/ads/googleads/v2/errors/conversion_upload_error.proto @@ -0,0 +1,131 @@ +// 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.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 = "ConversionUploadErrorProto"; +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 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 24 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 24 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/v2/errors/country_code_error.proto b/google/ads/googleads/v2/errors/country_code_error.proto new file mode 100644 index 000000000..c1a8ea55e --- /dev/null +++ b/google/ads/googleads/v2/errors/country_code_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "CountryCodeErrorProto"; +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 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/v2/errors/criterion_error.proto b/google/ads/googleads/v2/errors/criterion_error.proto new file mode 100644 index 000000000..8a39c6d09 --- /dev/null +++ b/google/ads/googleads/v2/errors/criterion_error.proto @@ -0,0 +1,370 @@ +// 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.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 = "CriterionErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/currency_code_error.proto b/google/ads/googleads/v2/errors/currency_code_error.proto new file mode 100644 index 000000000..3889e9b64 --- /dev/null +++ b/google/ads/googleads/v2/errors/currency_code_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "CurrencyCodeErrorProto"; +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 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/v2/errors/custom_interest_error.proto b/google/ads/googleads/v2/errors/custom_interest_error.proto new file mode 100644 index 000000000..d457d84b2 --- /dev/null +++ b/google/ads/googleads/v2/errors/custom_interest_error.proto @@ -0,0 +1,67 @@ +// 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.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 = "CustomInterestErrorProto"; +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 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/v2/errors/customer_client_link_error.proto b/google/ads/googleads/v2/errors/customer_client_link_error.proto new file mode 100644 index 000000000..4543aef14 --- /dev/null +++ b/google/ads/googleads/v2/errors/customer_client_link_error.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.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 = "CustomerClientLinkErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/customer_error.proto b/google/ads/googleads/v2/errors/customer_error.proto new file mode 100644 index 000000000..1bab8b7d0 --- /dev/null +++ b/google/ads/googleads/v2/errors/customer_error.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.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 = "CustomerErrorProto"; +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"; + +// Container for enum describing possible customer errors. +message CustomerErrorEnum { + // Set of errors that are related to requests dealing with Customer. + // Next id: 26 + 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/v2/errors/customer_feed_error.proto b/google/ads/googleads/v2/errors/customer_feed_error.proto new file mode 100644 index 000000000..6c8290bcf --- /dev/null +++ b/google/ads/googleads/v2/errors/customer_feed_error.proto @@ -0,0 +1,67 @@ +// 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.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 = "CustomerFeedErrorProto"; +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 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/v2/errors/customer_manager_link_error.proto b/google/ads/googleads/v2/errors/customer_manager_link_error.proto new file mode 100644 index 000000000..48d2ad85e --- /dev/null +++ b/google/ads/googleads/v2/errors/customer_manager_link_error.proto @@ -0,0 +1,72 @@ +// 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.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 = "CustomerManagerLinkErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/database_error.proto b/google/ads/googleads/v2/errors/database_error.proto new file mode 100644 index 000000000..5018e03ec --- /dev/null +++ b/google/ads/googleads/v2/errors/database_error.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.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 = "DatabaseErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/date_error.proto b/google/ads/googleads/v2/errors/date_error.proto new file mode 100644 index 000000000..803069a6a --- /dev/null +++ b/google/ads/googleads/v2/errors/date_error.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.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 = "DateErrorProto"; +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 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/v2/errors/date_range_error.proto b/google/ads/googleads/v2/errors/date_range_error.proto new file mode 100644 index 000000000..a748d7fad --- /dev/null +++ b/google/ads/googleads/v2/errors/date_range_error.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.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 = "DateRangeErrorProto"; +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 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/v2/errors/distinct_error.proto b/google/ads/googleads/v2/errors/distinct_error.proto new file mode 100644 index 000000000..cc80a645b --- /dev/null +++ b/google/ads/googleads/v2/errors/distinct_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "DistinctErrorProto"; +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 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/v2/errors/enum_error.proto b/google/ads/googleads/v2/errors/enum_error.proto new file mode 100644 index 000000000..c03ca0d66 --- /dev/null +++ b/google/ads/googleads/v2/errors/enum_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "EnumErrorProto"; +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 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/v2/errors/errors.proto b/google/ads/googleads/v2/errors/errors.proto new file mode 100644 index 000000000..e0714b8bc --- /dev/null +++ b/google/ads/googleads/v2/errors/errors.proto @@ -0,0 +1,538 @@ +// 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.v2.errors; + +import "google/ads/googleads/v2/common/policy.proto"; +import "google/ads/googleads/v2/common/value.proto"; +import "google/ads/googleads/v2/errors/access_invitation_error.proto"; +import "google/ads/googleads/v2/errors/account_budget_proposal_error.proto"; +import "google/ads/googleads/v2/errors/ad_customizer_error.proto"; +import "google/ads/googleads/v2/errors/ad_error.proto"; +import "google/ads/googleads/v2/errors/ad_group_ad_error.proto"; +import "google/ads/googleads/v2/errors/ad_group_bid_modifier_error.proto"; +import "google/ads/googleads/v2/errors/ad_group_criterion_error.proto"; +import "google/ads/googleads/v2/errors/ad_group_error.proto"; +import "google/ads/googleads/v2/errors/ad_group_feed_error.proto"; +import "google/ads/googleads/v2/errors/ad_parameter_error.proto"; +import "google/ads/googleads/v2/errors/ad_sharing_error.proto"; +import "google/ads/googleads/v2/errors/adx_error.proto"; +import "google/ads/googleads/v2/errors/asset_error.proto"; +import "google/ads/googleads/v2/errors/authentication_error.proto"; +import "google/ads/googleads/v2/errors/authorization_error.proto"; +import "google/ads/googleads/v2/errors/bidding_error.proto"; +import "google/ads/googleads/v2/errors/bidding_strategy_error.proto"; +import "google/ads/googleads/v2/errors/billing_setup_error.proto"; +import "google/ads/googleads/v2/errors/campaign_budget_error.proto"; +import "google/ads/googleads/v2/errors/campaign_criterion_error.proto"; +import "google/ads/googleads/v2/errors/campaign_draft_error.proto"; +import "google/ads/googleads/v2/errors/campaign_error.proto"; +import "google/ads/googleads/v2/errors/campaign_experiment_error.proto"; +import "google/ads/googleads/v2/errors/campaign_feed_error.proto"; +import "google/ads/googleads/v2/errors/campaign_shared_set_error.proto"; +import "google/ads/googleads/v2/errors/change_status_error.proto"; +import "google/ads/googleads/v2/errors/collection_size_error.proto"; +import "google/ads/googleads/v2/errors/context_error.proto"; +import "google/ads/googleads/v2/errors/conversion_action_error.proto"; +import "google/ads/googleads/v2/errors/conversion_adjustment_upload_error.proto"; +import "google/ads/googleads/v2/errors/conversion_upload_error.proto"; +import "google/ads/googleads/v2/errors/country_code_error.proto"; +import "google/ads/googleads/v2/errors/criterion_error.proto"; +import "google/ads/googleads/v2/errors/currency_code_error.proto"; +import "google/ads/googleads/v2/errors/custom_interest_error.proto"; +import "google/ads/googleads/v2/errors/customer_client_link_error.proto"; +import "google/ads/googleads/v2/errors/customer_error.proto"; +import "google/ads/googleads/v2/errors/customer_feed_error.proto"; +import "google/ads/googleads/v2/errors/customer_manager_link_error.proto"; +import "google/ads/googleads/v2/errors/database_error.proto"; +import "google/ads/googleads/v2/errors/date_error.proto"; +import "google/ads/googleads/v2/errors/date_range_error.proto"; +import "google/ads/googleads/v2/errors/distinct_error.proto"; +import "google/ads/googleads/v2/errors/enum_error.proto"; +import "google/ads/googleads/v2/errors/extension_feed_item_error.proto"; +import "google/ads/googleads/v2/errors/extension_setting_error.proto"; +import "google/ads/googleads/v2/errors/feed_attribute_reference_error.proto"; +import "google/ads/googleads/v2/errors/feed_error.proto"; +import "google/ads/googleads/v2/errors/feed_item_error.proto"; +import "google/ads/googleads/v2/errors/feed_item_target_error.proto"; +import "google/ads/googleads/v2/errors/feed_item_validation_error.proto"; +import "google/ads/googleads/v2/errors/feed_mapping_error.proto"; +import "google/ads/googleads/v2/errors/field_error.proto"; +import "google/ads/googleads/v2/errors/field_mask_error.proto"; +import "google/ads/googleads/v2/errors/function_error.proto"; +import "google/ads/googleads/v2/errors/function_parsing_error.proto"; +import "google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto"; +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/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"; +import "google/ads/googleads/v2/errors/keyword_plan_idea_error.proto"; +import "google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto"; +import "google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto"; +import "google/ads/googleads/v2/errors/label_error.proto"; +import "google/ads/googleads/v2/errors/language_code_error.proto"; +import "google/ads/googleads/v2/errors/list_operation_error.proto"; +import "google/ads/googleads/v2/errors/manager_link_error.proto"; +import "google/ads/googleads/v2/errors/media_bundle_error.proto"; +import "google/ads/googleads/v2/errors/media_file_error.proto"; +import "google/ads/googleads/v2/errors/media_upload_error.proto"; +import "google/ads/googleads/v2/errors/multiplier_error.proto"; +import "google/ads/googleads/v2/errors/mutate_error.proto"; +import "google/ads/googleads/v2/errors/mutate_job_error.proto"; +import "google/ads/googleads/v2/errors/new_resource_creation_error.proto"; +import "google/ads/googleads/v2/errors/not_empty_error.proto"; +import "google/ads/googleads/v2/errors/not_whitelisted_error.proto"; +import "google/ads/googleads/v2/errors/null_error.proto"; +import "google/ads/googleads/v2/errors/operation_access_denied_error.proto"; +import "google/ads/googleads/v2/errors/operator_error.proto"; +import "google/ads/googleads/v2/errors/partial_failure_error.proto"; +import "google/ads/googleads/v2/errors/policy_finding_error.proto"; +import "google/ads/googleads/v2/errors/policy_validation_parameter_error.proto"; +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/recommendation_error.proto"; +import "google/ads/googleads/v2/errors/region_code_error.proto"; +import "google/ads/googleads/v2/errors/request_error.proto"; +import "google/ads/googleads/v2/errors/resource_access_denied_error.proto"; +import "google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto"; +import "google/ads/googleads/v2/errors/setting_error.proto"; +import "google/ads/googleads/v2/errors/shared_criterion_error.proto"; +import "google/ads/googleads/v2/errors/shared_set_error.proto"; +import "google/ads/googleads/v2/errors/size_limit_error.proto"; +import "google/ads/googleads/v2/errors/string_format_error.proto"; +import "google/ads/googleads/v2/errors/string_length_error.proto"; +import "google/ads/googleads/v2/errors/url_field_error.proto"; +import "google/ads/googleads/v2/errors/user_list_error.proto"; +import "google/ads/googleads/v2/errors/youtube_video_registration_error.proto"; +import "google/protobuf/wrappers.proto"; +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 = "ErrorsProto"; +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 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.v2.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 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; + } +} + +// 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.v2.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.v2.common.PolicyTopicEntry policy_topic_entries = 1; +} diff --git a/google/ads/googleads/v2/errors/extension_feed_item_error.proto b/google/ads/googleads/v2/errors/extension_feed_item_error.proto new file mode 100644 index 000000000..ba98509f3 --- /dev/null +++ b/google/ads/googleads/v2/errors/extension_feed_item_error.proto @@ -0,0 +1,189 @@ +// 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.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 = "ExtensionFeedItemErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/extension_setting_error.proto b/google/ads/googleads/v2/errors/extension_setting_error.proto new file mode 100644 index 000000000..85a646400 --- /dev/null +++ b/google/ads/googleads/v2/errors/extension_setting_error.proto @@ -0,0 +1,258 @@ +// 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.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 = "ExtensionSettingErrorProto"; +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 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/v2/errors/feed_attribute_reference_error.proto b/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto new file mode 100644 index 000000000..cbd82ea95 --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_attribute_reference_error.proto @@ -0,0 +1,54 @@ +// 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.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 = "FeedAttributeReferenceErrorProto"; +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 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/v2/errors/feed_error.proto b/google/ads/googleads/v2/errors/feed_error.proto new file mode 100644 index 000000000..43461f666 --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_error.proto @@ -0,0 +1,106 @@ +// 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.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 = "FeedErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/feed_item_error.proto b/google/ads/googleads/v2/errors/feed_item_error.proto new file mode 100644 index 000000000..a26c2efc9 --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_item_error.proto @@ -0,0 +1,72 @@ +// 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.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 = "FeedItemErrorProto"; +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 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/v2/errors/feed_item_target_error.proto b/google/ads/googleads/v2/errors/feed_item_target_error.proto new file mode 100644 index 000000000..b54277f71 --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_item_target_error.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.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 = "FeedItemTargetErrorProto"; +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 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/v2/errors/feed_item_validation_error.proto b/google/ads/googleads/v2/errors/feed_item_validation_error.proto new file mode 100644 index 000000000..f4fe8425b --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_item_validation_error.proto @@ -0,0 +1,348 @@ +// 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.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 = "FeedItemValidationErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/feed_mapping_error.proto b/google/ads/googleads/v2/errors/feed_mapping_error.proto new file mode 100644 index 000000000..72c62c30e --- /dev/null +++ b/google/ads/googleads/v2/errors/feed_mapping_error.proto @@ -0,0 +1,98 @@ +// 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.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 = "FeedMappingErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/field_error.proto b/google/ads/googleads/v2/errors/field_error.proto new file mode 100644 index 000000000..06932760b --- /dev/null +++ b/google/ads/googleads/v2/errors/field_error.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.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 = "FieldErrorProto"; +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 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/v2/errors/field_mask_error.proto b/google/ads/googleads/v2/errors/field_mask_error.proto new file mode 100644 index 000000000..89ef40671 --- /dev/null +++ b/google/ads/googleads/v2/errors/field_mask_error.proto @@ -0,0 +1,59 @@ +// 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.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 = "FieldMaskErrorProto"; +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 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/v2/errors/function_error.proto b/google/ads/googleads/v2/errors/function_error.proto new file mode 100644 index 000000000..bdf31bc01 --- /dev/null +++ b/google/ads/googleads/v2/errors/function_error.proto @@ -0,0 +1,94 @@ +// 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.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 = "FunctionErrorProto"; +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 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/v2/errors/function_parsing_error.proto b/google/ads/googleads/v2/errors/function_parsing_error.proto new file mode 100644 index 000000000..b93804c4d --- /dev/null +++ b/google/ads/googleads/v2/errors/function_parsing_error.proto @@ -0,0 +1,78 @@ +// 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.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 = "FunctionParsingErrorProto"; +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 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/v2/errors/geo_target_constant_suggestion_error.proto b/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.proto new file mode 100644 index 000000000..4a4904464 --- /dev/null +++ b/google/ads/googleads/v2/errors/geo_target_constant_suggestion_error.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.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 = "GeoTargetConstantSuggestionErrorProto"; +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"; + +// 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/v2/errors/header_error.proto b/google/ads/googleads/v2/errors/header_error.proto new file mode 100644 index 000000000..bd3276d88 --- /dev/null +++ b/google/ads/googleads/v2/errors/header_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "HeaderErrorProto"; +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 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/v2/errors/id_error.proto b/google/ads/googleads/v2/errors/id_error.proto new file mode 100644 index 000000000..4324e8f9b --- /dev/null +++ b/google/ads/googleads/v2/errors/id_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "IdErrorProto"; +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 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/v2/errors/image_error.proto b/google/ads/googleads/v2/errors/image_error.proto new file mode 100644 index 000000000..2d76b5391 --- /dev/null +++ b/google/ads/googleads/v2/errors/image_error.proto @@ -0,0 +1,157 @@ +// 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.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 = "ImageErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/internal_error.proto b/google/ads/googleads/v2/errors/internal_error.proto new file mode 100644 index 000000000..f0f6d7a02 --- /dev/null +++ b/google/ads/googleads/v2/errors/internal_error.proto @@ -0,0 +1,56 @@ +// 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.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 = "InternalErrorProto"; +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 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 any API version. This will be + // fixed by adding a new error code as soon as possible. + 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/v2/errors/keyword_plan_ad_group_error.proto b/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto new file mode 100644 index 000000000..15cd514e7 --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_ad_group_error.proto @@ -0,0 +1,54 @@ +// 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.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 = "KeywordPlanAdGroupErrorProto"; +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 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/v2/errors/keyword_plan_campaign_error.proto b/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto new file mode 100644 index 000000000..50b7b2eb4 --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_campaign_error.proto @@ -0,0 +1,63 @@ +// 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.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 = "KeywordPlanCampaignErrorProto"; +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 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/v2/errors/keyword_plan_error.proto b/google/ads/googleads/v2/errors/keyword_plan_error.proto new file mode 100644 index 000000000..f2b71eb0e --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_error.proto @@ -0,0 +1,92 @@ +// 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.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 = "KeywordPlanErrorProto"; +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 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/v2/errors/keyword_plan_idea_error.proto b/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto new file mode 100644 index 000000000..c5c1fff69 --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_idea_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "KeywordPlanIdeaErrorProto"; +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 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/v2/errors/keyword_plan_keyword_error.proto b/google/ads/googleads/v2/errors/keyword_plan_keyword_error.proto new file mode 100644 index 000000000..12a19d431 --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_keyword_error.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.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 = "KeywordPlanKeywordErrorProto"; +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 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/v2/errors/keyword_plan_negative_keyword_error.proto b/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto new file mode 100644 index 000000000..b835f81d9 --- /dev/null +++ b/google/ads/googleads/v2/errors/keyword_plan_negative_keyword_error.proto @@ -0,0 +1,47 @@ +// 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.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 = "KeywordPlanNegativeKeywordErrorProto"; +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 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/v2/errors/label_error.proto b/google/ads/googleads/v2/errors/label_error.proto new file mode 100644 index 000000000..1698d3d8e --- /dev/null +++ b/google/ads/googleads/v2/errors/label_error.proto @@ -0,0 +1,74 @@ +// 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.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 = "LabelErrorProto"; +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 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/v2/errors/language_code_error.proto b/google/ads/googleads/v2/errors/language_code_error.proto new file mode 100644 index 000000000..6fe688ac9 --- /dev/null +++ b/google/ads/googleads/v2/errors/language_code_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "LanguageCodeErrorProto"; +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 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/v2/errors/list_operation_error.proto b/google/ads/googleads/v2/errors/list_operation_error.proto new file mode 100644 index 000000000..535b8f3db --- /dev/null +++ b/google/ads/googleads/v2/errors/list_operation_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "ListOperationErrorProto"; +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 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/v2/errors/manager_link_error.proto b/google/ads/googleads/v2/errors/manager_link_error.proto new file mode 100644 index 000000000..13a567de7 --- /dev/null +++ b/google/ads/googleads/v2/errors/manager_link_error.proto @@ -0,0 +1,88 @@ +// 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.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 = "ManagerLinkErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/media_bundle_error.proto b/google/ads/googleads/v2/errors/media_bundle_error.proto new file mode 100644 index 000000000..54976519c --- /dev/null +++ b/google/ads/googleads/v2/errors/media_bundle_error.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.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 = "MediaBundleErrorProto"; +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 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/v2/errors/media_file_error.proto b/google/ads/googleads/v2/errors/media_file_error.proto new file mode 100644 index 000000000..9e8505e1d --- /dev/null +++ b/google/ads/googleads/v2/errors/media_file_error.proto @@ -0,0 +1,114 @@ +// 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.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 = "MediaFileErrorProto"; +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 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/v2/errors/media_upload_error.proto b/google/ads/googleads/v2/errors/media_upload_error.proto new file mode 100644 index 000000000..f14383534 --- /dev/null +++ b/google/ads/googleads/v2/errors/media_upload_error.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.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 = "MediaUploadErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/multiplier_error.proto b/google/ads/googleads/v2/errors/multiplier_error.proto new file mode 100644 index 000000000..bf3ffbdb8 --- /dev/null +++ b/google/ads/googleads/v2/errors/multiplier_error.proto @@ -0,0 +1,82 @@ +// 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.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 = "MultiplierErrorProto"; +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 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/v2/errors/mutate_error.proto b/google/ads/googleads/v2/errors/mutate_error.proto new file mode 100644 index 000000000..78a492a84 --- /dev/null +++ b/google/ads/googleads/v2/errors/mutate_error.proto @@ -0,0 +1,64 @@ +// 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.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 = "MutateErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/mutate_job_error.proto b/google/ads/googleads/v2/errors/mutate_job_error.proto new file mode 100644 index 000000000..482c8bcfe --- /dev/null +++ b/google/ads/googleads/v2/errors/mutate_job_error.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.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 = "MutateJobErrorProto"; +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 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/v2/errors/new_resource_creation_error.proto b/google/ads/googleads/v2/errors/new_resource_creation_error.proto new file mode 100644 index 000000000..0a329e5fa --- /dev/null +++ b/google/ads/googleads/v2/errors/new_resource_creation_error.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.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 = "NewResourceCreationErrorProto"; +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 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/v2/errors/not_empty_error.proto b/google/ads/googleads/v2/errors/not_empty_error.proto new file mode 100644 index 000000000..6ce8e191c --- /dev/null +++ b/google/ads/googleads/v2/errors/not_empty_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "NotEmptyErrorProto"; +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 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/v2/errors/not_whitelisted_error.proto b/google/ads/googleads/v2/errors/not_whitelisted_error.proto new file mode 100644 index 000000000..559f694a6 --- /dev/null +++ b/google/ads/googleads/v2/errors/not_whitelisted_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "NotWhitelistedErrorProto"; +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 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/v2/errors/null_error.proto b/google/ads/googleads/v2/errors/null_error.proto new file mode 100644 index 000000000..f93b149d5 --- /dev/null +++ b/google/ads/googleads/v2/errors/null_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "NullErrorProto"; +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 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/v2/errors/operation_access_denied_error.proto b/google/ads/googleads/v2/errors/operation_access_denied_error.proto new file mode 100644 index 000000000..59986c22f --- /dev/null +++ b/google/ads/googleads/v2/errors/operation_access_denied_error.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.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 = "OperationAccessDeniedErrorProto"; +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 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/v2/errors/operator_error.proto b/google/ads/googleads/v2/errors/operator_error.proto new file mode 100644 index 000000000..8e56aaa42 --- /dev/null +++ b/google/ads/googleads/v2/errors/operator_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "OperatorErrorProto"; +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 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/v2/errors/partial_failure_error.proto b/google/ads/googleads/v2/errors/partial_failure_error.proto new file mode 100644 index 000000000..f6d7e9f94 --- /dev/null +++ b/google/ads/googleads/v2/errors/partial_failure_error.proto @@ -0,0 +1,49 @@ +// 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.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 = "PartialFailureErrorProto"; +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 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/v2/errors/policy_finding_error.proto b/google/ads/googleads/v2/errors/policy_finding_error.proto new file mode 100644 index 000000000..15701cdb5 --- /dev/null +++ b/google/ads/googleads/v2/errors/policy_finding_error.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.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 = "PolicyFindingErrorProto"; +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 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/v2/errors/policy_validation_parameter_error.proto b/google/ads/googleads/v2/errors/policy_validation_parameter_error.proto new file mode 100644 index 000000000..5cb642369 --- /dev/null +++ b/google/ads/googleads/v2/errors/policy_validation_parameter_error.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.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 = "PolicyValidationParameterErrorProto"; +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 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/v2/errors/policy_violation_error.proto b/google/ads/googleads/v2/errors/policy_violation_error.proto new file mode 100644 index 000000000..07e462bfc --- /dev/null +++ b/google/ads/googleads/v2/errors/policy_violation_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "PolicyViolationErrorProto"; +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 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/v2/errors/query_error.proto b/google/ads/googleads/v2/errors/query_error.proto new file mode 100644 index 000000000..8a56b4897 --- /dev/null +++ b/google/ads/googleads/v2/errors/query_error.proto @@ -0,0 +1,219 @@ +// 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.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 = "QueryErrorProto"; +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 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/v2/errors/quota_error.proto b/google/ads/googleads/v2/errors/quota_error.proto new file mode 100644 index 000000000..869c3e8a8 --- /dev/null +++ b/google/ads/googleads/v2/errors/quota_error.proto @@ -0,0 +1,54 @@ +// 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.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 = "QuotaErrorProto"; +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 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/v2/errors/range_error.proto b/google/ads/googleads/v2/errors/range_error.proto new file mode 100644 index 000000000..954701048 --- /dev/null +++ b/google/ads/googleads/v2/errors/range_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "RangeErrorProto"; +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 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/v2/errors/recommendation_error.proto b/google/ads/googleads/v2/errors/recommendation_error.proto new file mode 100644 index 000000000..34a0d6d81 --- /dev/null +++ b/google/ads/googleads/v2/errors/recommendation_error.proto @@ -0,0 +1,91 @@ +// 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.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 = "RecommendationErrorProto"; +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 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/v2/errors/region_code_error.proto b/google/ads/googleads/v2/errors/region_code_error.proto new file mode 100644 index 000000000..608fd1378 --- /dev/null +++ b/google/ads/googleads/v2/errors/region_code_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "RegionCodeErrorProto"; +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 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/v2/errors/request_error.proto b/google/ads/googleads/v2/errors/request_error.proto new file mode 100644 index 000000000..0a9569511 --- /dev/null +++ b/google/ads/googleads/v2/errors/request_error.proto @@ -0,0 +1,113 @@ +// 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.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 = "RequestErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/errors/resource_access_denied_error.proto b/google/ads/googleads/v2/errors/resource_access_denied_error.proto new file mode 100644 index 000000000..a683d4521 --- /dev/null +++ b/google/ads/googleads/v2/errors/resource_access_denied_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "ResourceAccessDeniedErrorProto"; +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 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/v2/errors/resource_count_limit_exceeded_error.proto b/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto new file mode 100644 index 000000000..025f69b3d --- /dev/null +++ b/google/ads/googleads/v2/errors/resource_count_limit_exceeded_error.proto @@ -0,0 +1,94 @@ +// 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.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 = "ResourceCountLimitExceededErrorProto"; +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 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/v2/errors/setting_error.proto b/google/ads/googleads/v2/errors/setting_error.proto new file mode 100644 index 000000000..5aa5f09a3 --- /dev/null +++ b/google/ads/googleads/v2/errors/setting_error.proto @@ -0,0 +1,106 @@ +// 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.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 = "SettingErrorProto"; +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 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; + + // Duplicate description in universal app setting description field. + UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13; + + // Description line width is too long in universal app setting description + // field. + UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14; + + // Universal app setting appId field cannot be modified for COMPLETE + // campaigns. + UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15; + + // YoutubeVideoMediaIds in universal app setting cannot exceed size limit. + TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16; + + // ImageMediaIds in universal app setting cannot exceed size limit. + TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17; + + // Media is incompatible for universal app campaign. + MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18; + + // Too many exclamation marks in universal app campaign ad text ideas. + TOO_MANY_EXCLAMATION_MARKS = 19; + } + + +} diff --git a/google/ads/googleads/v2/errors/shared_criterion_error.proto b/google/ads/googleads/v2/errors/shared_criterion_error.proto new file mode 100644 index 000000000..1af20ad74 --- /dev/null +++ b/google/ads/googleads/v2/errors/shared_criterion_error.proto @@ -0,0 +1,48 @@ +// 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.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 = "SharedCriterionErrorProto"; +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 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/v2/errors/shared_set_error.proto b/google/ads/googleads/v2/errors/shared_set_error.proto new file mode 100644 index 000000000..d47e1d41e --- /dev/null +++ b/google/ads/googleads/v2/errors/shared_set_error.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.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 = "SharedSetErrorProto"; +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 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/v2/errors/size_limit_error.proto b/google/ads/googleads/v2/errors/size_limit_error.proto new file mode 100644 index 000000000..f49ee810d --- /dev/null +++ b/google/ads/googleads/v2/errors/size_limit_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "SizeLimitErrorProto"; +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 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/v2/errors/string_format_error.proto b/google/ads/googleads/v2/errors/string_format_error.proto new file mode 100644 index 000000000..63b3916ec --- /dev/null +++ b/google/ads/googleads/v2/errors/string_format_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "StringFormatErrorProto"; +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 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/v2/errors/string_length_error.proto b/google/ads/googleads/v2/errors/string_length_error.proto new file mode 100644 index 000000000..3191fb42b --- /dev/null +++ b/google/ads/googleads/v2/errors/string_length_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "StringLengthErrorProto"; +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 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; + + // Too short. + TOO_SHORT = 2; + + // Too long. + TOO_LONG = 3; + } + + +} diff --git a/google/ads/googleads/v2/errors/url_field_error.proto b/google/ads/googleads/v2/errors/url_field_error.proto new file mode 100644 index 000000000..715aac112 --- /dev/null +++ b/google/ads/googleads/v2/errors/url_field_error.proto @@ -0,0 +1,216 @@ +// 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.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 = "UrlFieldErrorProto"; +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 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/v2/errors/user_list_error.proto b/google/ads/googleads/v2/errors/user_list_error.proto new file mode 100644 index 000000000..afd4d5d4d --- /dev/null +++ b/google/ads/googleads/v2/errors/user_list_error.proto @@ -0,0 +1,130 @@ +// 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.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 = "UserListErrorProto"; +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 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/v2/errors/youtube_video_registration_error.proto b/google/ads/googleads/v2/errors/youtube_video_registration_error.proto new file mode 100644 index 000000000..7eec32be0 --- /dev/null +++ b/google/ads/googleads/v2/errors/youtube_video_registration_error.proto @@ -0,0 +1,51 @@ +// 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.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 = "YoutubeVideoRegistrationErrorProto"; +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 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; + } + + +} diff --git a/google/ads/googleads/v2/resources/account_budget.proto b/google/ads/googleads/v2/resources/account_budget.proto new file mode 100644 index 000000000..74abe4d32 --- /dev/null +++ b/google/ads/googleads/v2/resources/account_budget.proto @@ -0,0 +1,232 @@ +// 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.v2.resources; + +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/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 = "AccountBudgetProto"; +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 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 { + // A pending proposal associated with the enclosing account-level budget, + // if applicable. + message PendingAccountBudgetProposal { + // 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 + // with this proposal. + google.ads.googleads.v2.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2; + + // The name to assign to the account-level budget. + google.protobuf.StringValue name = 3; + + // The start time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue start_date_time = 4; + + // A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 9; + + // Notes associated with this budget. + google.protobuf.StringValue notes = 10; + + // 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; + + // 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; + + // The end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 6; + } + + // The spending limit. + oneof spending_limit { + // The spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value spending_limit_micros = 7; + + // The spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8; + } + } + + // 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; + + // The ID of the account-level budget. + google.protobuf.Int64Value id = 2; + + // 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; + + // The status of this account-level budget. + google.ads.googleads.v2.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4; + + // The name of the account-level budget. + google.protobuf.StringValue name = 5; + + // 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; + + // 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; + + // The total adjustments amount. + // + // An example of an adjustment is courtesy credits. + google.protobuf.Int64Value total_adjustments_micros = 18; + + // 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; + + // A purchase order number is a value that helps users reference this budget + // in their monthly invoices. + google.protobuf.StringValue purchase_order_number = 20; + + // Notes associated with the budget. + google.protobuf.StringValue notes = 21; + + // The pending proposal to modify this budget, if applicable. + PendingAccountBudgetProposal pending_proposal = 22; + + // 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; + + // The proposed end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9; + } + + // 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 { + // The approved end time in yyyy-MM-dd HH:mm:ss format. + google.protobuf.StringValue approved_end_date_time = 10; + + // The approved end time as a well-defined type, e.g. FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType approved_end_time_type = 11; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 12; + + // The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13; + } + + // 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 { + // 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; + + // 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; + } + + // 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 { + // 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; + + // 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; + } +} diff --git a/google/ads/googleads/v2/resources/account_budget_proposal.proto b/google/ads/googleads/v2/resources/account_budget_proposal.proto new file mode 100644 index 000000000..7d8e9302d --- /dev/null +++ b/google/ads/googleads/v2/resources/account_budget_proposal.proto @@ -0,0 +1,140 @@ +// 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.v2.resources; + +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/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 = "AccountBudgetProposalProto"; +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 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 { + // 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 + // proposal. + google.protobuf.StringValue account_budget = 3; + + // 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; + + // 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; + + // The name to assign to the account-level budget. + google.protobuf.StringValue proposed_name = 5; + + // The approved start date time in yyyy-mm-dd hh:mm:ss format. + google.protobuf.StringValue approved_start_date_time = 20; + + // 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; + + // Notes associated with this budget. + google.protobuf.StringValue proposed_notes = 13; + + // 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; + + // The date time when this account-level budget was approved, if applicable. + google.protobuf.StringValue approval_date_time = 17; + + // 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; + + // 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; + } + + // 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; + + // 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; + } + + // 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; + + // 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; + } + + // The proposed spending limit. + oneof proposed_spending_limit { + // The proposed spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value proposed_spending_limit_micros = 10; + + // The proposed spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 11; + } + + // The approved spending limit. + oneof approved_spending_limit { + // The approved spending limit in micros. One million is equivalent to + // one unit. + google.protobuf.Int64Value approved_spending_limit_micros = 23; + + // The approved spending limit as a well-defined type, e.g. INFINITE. + google.ads.googleads.v2.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 24; + } +} diff --git a/google/ads/googleads/v2/resources/ad.proto b/google/ads/googleads/v2/resources/ad.proto new file mode 100644 index 000000000..36c839b4b --- /dev/null +++ b/google/ads/googleads/v2/resources/ad.proto @@ -0,0 +1,163 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/ad_type_infos.proto"; +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/common/final_app_url.proto"; +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/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 = "AdProto"; +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 ad type. + +// An ad. +message Ad { + // The resource name of the ad. + // Ad resource names have the form: + // + // `customers/{customer_id}/ads/{ad_id}` + string resource_name = 37; + + // The ID of the ad. + google.protobuf.Int64Value id = 1; + + // 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.v2.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 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; + + // 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; + + // 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; + + // 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.v2.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.v2.common.UrlCollection url_collections = 26; + + // 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; + + // 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; + + // Details pertinent to the ad type. Exactly one value must be set. + oneof ad_data { + // Details pertaining to a text ad. + google.ads.googleads.v2.common.TextAdInfo text_ad = 6; + + // Details pertaining to an expanded text ad. + google.ads.googleads.v2.common.ExpandedTextAdInfo expanded_text_ad = 7; + + // Details pertaining to a call-only ad. + google.ads.googleads.v2.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.v2.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14; + + // Details pertaining to a hotel ad. + google.ads.googleads.v2.common.HotelAdInfo hotel_ad = 15; + + // Details pertaining to a Smart Shopping ad. + google.ads.googleads.v2.common.ShoppingSmartAdInfo shopping_smart_ad = 17; + + // Details pertaining to a Shopping product ad. + google.ads.googleads.v2.common.ShoppingProductAdInfo shopping_product_ad = 18; + + // Details pertaining to a Gmail ad. + google.ads.googleads.v2.common.GmailAdInfo gmail_ad = 21; + + // Details pertaining to an Image ad. + google.ads.googleads.v2.common.ImageAdInfo image_ad = 22; + + // Details pertaining to a Video ad. + google.ads.googleads.v2.common.VideoAdInfo video_ad = 24; + + // Details pertaining to a responsive search ad. + google.ads.googleads.v2.common.ResponsiveSearchAdInfo responsive_search_ad = 25; + + // Details pertaining to a legacy responsive display ad. + google.ads.googleads.v2.common.LegacyResponsiveDisplayAdInfo legacy_responsive_display_ad = 28; + + // 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; + + // Details pertaining to a responsive display ad. + google.ads.googleads.v2.common.ResponsiveDisplayAdInfo responsive_display_ad = 31; + + // Details pertaining to a display upload ad. + google.ads.googleads.v2.common.DisplayUploadAdInfo display_upload_ad = 33; + + // Details pertaining to an app engagement ad. + google.ads.googleads.v2.common.AppEngagementAdInfo app_engagement_ad = 34; + + // Details pertaining to a Shopping Comparison Listing ad. + google.ads.googleads.v2.common.ShoppingComparisonListingAdInfo shopping_comparison_listing_ad = 36; + } +} diff --git a/google/ads/googleads/v2/resources/ad_group.proto b/google/ads/googleads/v2/resources/ad_group.proto new file mode 100644 index 000000000..e1d85f74e --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group.proto @@ -0,0 +1,151 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/common/explorer_auto_optimizer_setting.proto"; +import "google/ads/googleads/v2/common/targeting_setting.proto"; +import "google/ads/googleads/v2/enums/ad_group_ad_rotation_mode.proto"; +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/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 = "AdGroupProto"; +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 ad group resource. + +// An ad group. +message AdGroup { + // 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; + + // The ID of the ad group. + google.protobuf.Int64Value id = 3; + + // 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.v2.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + + // The type of the ad group. + google.ads.googleads.v2.enums.AdGroupTypeEnum.AdGroupType type = 12; + + // 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 + // 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; + + // 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.v2.common.CustomParameter url_custom_parameters = 6; + + // The campaign to which the ad group belongs. + google.protobuf.StringValue campaign = 10; + + // 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; + + // The CPV (cost-per-view) bid. + google.protobuf.Int64Value cpv_bid_micros = 17; + + // 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.v2.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.v2.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.v2.common.TargetingSetting targeting_setting = 25; + + // The effective target CPA (cost-per-acquisition). + // This field is read-only. + google.protobuf.Int64Value effective_target_cpa_micros = 28; + + // Source of the effective target CPA. + // This field is read-only. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_target_cpa_source = 29; + + // The effective target ROAS (return-on-ad-spend). + // This field is read-only. + google.protobuf.DoubleValue effective_target_roas = 31; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/ad_group_ad.proto b/google/ads/googleads/v2/resources/ad_group_ad.proto new file mode 100644 index 000000000..ff2a256e1 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_ad.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/common/policy.proto"; +import "google/ads/googleads/v2/enums/ad_group_ad_status.proto"; +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/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 = "AdGroupAdProto"; +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 ad group ad resource. + +// An ad group ad. +message AdGroupAd { + // 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; + + // 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; + + // The ad. + Ad ad = 5; + + // Policy information for the ad. + AdGroupAdPolicySummary policy_summary = 6; + + // Overall ad strength for this ad group ad. + google.ads.googleads.v2.enums.AdStrengthEnum.AdStrength ad_strength = 7; +} + +// 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; + + // Where in the review process this ad is. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2; + + // 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; +} 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 new file mode 100644 index 000000000..88a772ce5 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto @@ -0,0 +1,74 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/policy.proto"; +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/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 = "AdGroupAdAssetViewProto"; +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 ad group ad asset view resource. + +// A link between an AdGroupAd and an Asset. +message AdGroupAdAssetView { + // 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; + + // The ad group ad to which the asset is linked. + google.protobuf.StringValue ad_group_ad = 5; + + // The asset which is linked to the ad group ad. + google.protobuf.StringValue asset = 6; + + // Role that the asset takes in the ad. + google.ads.googleads.v2.enums.AssetFieldTypeEnum.AssetFieldType field_type = 2; + + // Policy information for the ad group ad asset. + AdGroupAdAssetPolicySummary policy_summary = 3; + + // Performance of an asset linkage. + google.ads.googleads.v2.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel performance_label = 4; +} + +// 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; + + // Where in the review process this ad group ad asset is. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/ad_group_ad_label.proto b/google/ads/googleads/v2/resources/ad_group_ad_label.proto new file mode 100644 index 000000000..fe7640ab1 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_ad_label.proto @@ -0,0 +1,46 @@ +// 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.v2.resources; + +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 = "AdGroupAdLabelProto"; +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 ad group ad label resource. + +// A relationship between an ad group ad and a label. +message AdGroupAdLabel { + // 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; + + // The ad group ad to which the label is attached. + google.protobuf.StringValue ad_group_ad = 2; + + // The label assigned to the ad group ad. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v2/resources/ad_group_audience_view.proto b/google/ads/googleads/v2/resources/ad_group_audience_view.proto new file mode 100644 index 000000000..78adb1b1e --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_audience_view.proto @@ -0,0 +1,43 @@ +// 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.v2.resources; + +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 = "AdGroupAudienceViewProto"; +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 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 { + // 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; +} diff --git a/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto b/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto new file mode 100644 index 000000000..8565356ae --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_bid_modifier.proto @@ -0,0 +1,87 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/enums/bid_modifier_source.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 = "AdGroupBidModifierProto"; +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 ad group bid modifier resource. + +// Represents an ad group bid modifier. +message AdGroupBidModifier { + // 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. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3; + + // 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 + // 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; + + // Bid modifier source. + google.ads.googleads.v2.enums.BidModifierSourceEnum.BidModifierSource bid_modifier_source = 10; + + // 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; + + // 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; + + // Criterion for length of hotel stay in nights. + google.ads.googleads.v2.common.HotelLengthOfStayInfo hotel_length_of_stay = 7; + + // Criterion for day of the week the booking is for. + google.ads.googleads.v2.common.HotelCheckInDayInfo hotel_check_in_day = 8; + + // A device criterion. + google.ads.googleads.v2.common.DeviceInfo device = 11; + + // A preferred content criterion. + google.ads.googleads.v2.common.PreferredContentInfo preferred_content = 12; + } +} diff --git a/google/ads/googleads/v2/resources/ad_group_criterion.proto b/google/ads/googleads/v2/resources/ad_group_criterion.proto new file mode 100644 index 000000000..b839cfb45 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_criterion.proto @@ -0,0 +1,240 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/enums/ad_group_criterion_approval_status.proto"; +import "google/ads/googleads/v2/enums/ad_group_criterion_status.proto"; +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/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 = "AdGroupCriterionProto"; +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 ad group criterion resource. + +// An ad group criterion. +message AdGroupCriterion { + // A container for ad group criterion quality information. + message QualityInfo { + // 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; + + // The performance of the ad compared to other advertisers. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2; + + // The quality score of the landing page. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3; + + // The click-through rate compared to that of other advertisers. + google.ads.googleads.v2.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4; + } + + // Estimates for criterion bids at various positions. + message PositionEstimates { + // 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; + + // 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; + + // 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; + + // 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; + + // 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; + } + + // 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. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 26; + + // 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; + + // The ad group to which the criterion belongs. + google.protobuf.StringValue ad_group = 5; + + // The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 25; + + // 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; + + // Serving status of the criterion. + google.ads.googleads.v2.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus system_serving_status = 52; + + // Approval status of the criterion. + google.ads.googleads.v2.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatus approval_status = 53; + + // 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; + + // The effective CPC (cost-per-click) bid. + google.protobuf.Int64Value effective_cpc_bid_micros = 18; + + // The effective CPM (cost-per-thousand viewable impressions) bid. + google.protobuf.Int64Value effective_cpm_bid_micros = 19; + + // The effective CPV (cost-per-view) bid. + google.protobuf.Int64Value effective_cpv_bid_micros = 20; + + // The effective Percent CPC bid amount. + google.protobuf.Int64Value effective_percent_cpc_bid_micros = 34; + + // Source of the effective CPC bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21; + + // Source of the effective CPM bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22; + + // Source of the effective CPV bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23; + + // Source of the effective Percent CPC bid. + google.ads.googleads.v2.enums.BiddingSourceEnum.BiddingSource effective_percent_cpc_bid_source = 35; + + // Estimates for criterion bids at various positions. + PositionEstimates position_estimates = 10; + + // 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.v2.common.CustomParameter url_custom_parameters = 14; + + // The ad group criterion. + // + // Exactly one must be set. + oneof criterion { + // Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 27; + + // Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 28; + + // Mobile app category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 29; + + // Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 30; + + // Listing group. + google.ads.googleads.v2.common.ListingGroupInfo listing_group = 32; + + // Age range. + google.ads.googleads.v2.common.AgeRangeInfo age_range = 36; + + // Gender. + google.ads.googleads.v2.common.GenderInfo gender = 37; + + // Income range. + google.ads.googleads.v2.common.IncomeRangeInfo income_range = 38; + + // Parental status. + google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 39; + + // User List. + google.ads.googleads.v2.common.UserListInfo user_list = 42; + + // YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 40; + + // YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 41; + + // Topic. + google.ads.googleads.v2.common.TopicInfo topic = 43; + + // User Interest. + google.ads.googleads.v2.common.UserInterestInfo user_interest = 45; + + // Webpage + google.ads.googleads.v2.common.WebpageInfo webpage = 46; + + // App Payment Model. + google.ads.googleads.v2.common.AppPaymentModelInfo app_payment_model = 47; + + // Custom Affinity. + google.ads.googleads.v2.common.CustomAffinityInfo custom_affinity = 48; + + // Custom Intent. + google.ads.googleads.v2.common.CustomIntentInfo custom_intent = 49; + } +} diff --git a/google/ads/googleads/v2/resources/ad_group_criterion_label.proto b/google/ads/googleads/v2/resources/ad_group_criterion_label.proto new file mode 100644 index 000000000..25f65231c --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_criterion_label.proto @@ -0,0 +1,46 @@ +// 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.v2.resources; + +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 = "AdGroupCriterionLabelProto"; +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 ad group criterion label resource. + +// A relationship between an ad group criterion and a label. +message AdGroupCriterionLabel { + // 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; + + // The ad group criterion to which the label is attached. + google.protobuf.StringValue ad_group_criterion = 2; + + // The label assigned to the ad group criterion. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto b/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto new file mode 100644 index 000000000..4cf32d5e2 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto @@ -0,0 +1,74 @@ +// 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.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/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 = "AdGroupCriterionSimulationProto"; +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 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. +// +// DISPLAY KEYWORD CPC_BID UNIFORM +// SEARCH KEYWORD CPC_BID UNIFORM +// SHOPPING LISTING_GROUP CPC_BID UNIFORM +message AdGroupCriterionSimulation { + // 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; + + // AdGroup ID of the simulation. + google.protobuf.Int64Value ad_group_id = 2; + + // Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3; + + // The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4; + + // How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6; + + // Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7; + + // 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; + } +} diff --git a/google/ads/googleads/v2/resources/ad_group_extension_setting.proto b/google/ads/googleads/v2/resources/ad_group_extension_setting.proto new file mode 100644 index 000000000..f1244580a --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_extension_setting.proto @@ -0,0 +1,62 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/extension_setting_device.proto"; +import "google/ads/googleads/v2/enums/extension_type.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 = "AdGroupExtensionSettingProto"; +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 AdGroupExtensionSetting resource. + +// An ad group extension setting. +message AdGroupExtensionSetting { + // 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; + + // The extension type of the ad group extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + + // 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; + + // 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; + + // 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 new file mode 100644 index 000000000..9d7692c92 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_feed.proto @@ -0,0 +1,63 @@ +// 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.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/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 = "AdGroupFeedProto"; +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 AdGroupFeed resource. + +// An ad group feed. +message AdGroupFeed { + // 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; + + // The feed being linked to the ad group. + google.protobuf.StringValue feed = 2; + + // The ad group being linked to the feed. + google.protobuf.StringValue ad_group = 3; + + // Indicates which placeholder types the feed may populate under the connected + // ad group. Required. + repeated google.ads.googleads.v2.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.v2.common.MatchingFunction matching_function = 5; + + // Status of the ad group feed. + // This field is read-only. + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; +} diff --git a/google/ads/googleads/v2/resources/ad_group_label.proto b/google/ads/googleads/v2/resources/ad_group_label.proto new file mode 100644 index 000000000..7595e9643 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_label.proto @@ -0,0 +1,46 @@ +// 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.v2.resources; + +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 = "AdGroupLabelProto"; +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 ad group label resource. + +// A relationship between an ad group and a label. +message AdGroupLabel { + // 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; + + // The ad group to which the label is attached. + google.protobuf.StringValue ad_group = 2; + + // The label assigned to the ad group. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v2/resources/ad_group_simulation.proto b/google/ads/googleads/v2/resources/ad_group_simulation.proto new file mode 100644 index 000000000..af4b9e884 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_group_simulation.proto @@ -0,0 +1,82 @@ +// 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.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/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 = "AdGroupSimulationProto"; +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 ad group simulation resource. + +// An ad group simulation. Supported combinations of advertising +// 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 +message AdGroupSimulation { + // 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; + + // Ad group id of the simulation. + google.protobuf.Int64Value ad_group_id = 2; + + // The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 3; + + // How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 4; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 5; + + // Last day on which the simulation is based, in YYYY-MM-DD format + google.protobuf.StringValue end_date = 6; + + // 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; + + // Simulation points if the simulation type is CPV_BID. + google.ads.googleads.v2.common.CpvBidSimulationPointList cpv_bid_point_list = 10; + + // Simulation points if the simulation type is TARGET_CPA. + google.ads.googleads.v2.common.TargetCpaSimulationPointList target_cpa_point_list = 9; + } +} diff --git a/google/ads/googleads/v2/resources/ad_parameter.proto b/google/ads/googleads/v2/resources/ad_parameter.proto new file mode 100644 index 000000000..4f11cfb8d --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_parameter.proto @@ -0,0 +1,67 @@ +// 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.v2.resources; + +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 = "AdParameterProto"; +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 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 { + // 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; + + // The ad group criterion that this ad parameter belongs to. + google.protobuf.StringValue ad_group_criterion = 2; + + // The unique index of this ad parameter. Must be either 1 or 2. + google.protobuf.Int64Value parameter_index = 3; + + // 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/v2/resources/ad_schedule_view.proto b/google/ads/googleads/v2/resources/ad_schedule_view.proto new file mode 100644 index 000000000..618c96106 --- /dev/null +++ b/google/ads/googleads/v2/resources/ad_schedule_view.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.ads.googleads.v2.resources; + +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 = "AdScheduleViewProto"; +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 ad schedule view resource. + +// An ad schedule view summarizes the performance of campaigns by +// AdSchedule criteria. +message AdScheduleView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/age_range_view.proto b/google/ads/googleads/v2/resources/age_range_view.proto new file mode 100644 index 000000000..5f1c1b405 --- /dev/null +++ b/google/ads/googleads/v2/resources/age_range_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "AgeRangeViewProto"; +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 age range view resource. + +// An age range view. +message AgeRangeView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/asset.proto b/google/ads/googleads/v2/resources/asset.proto new file mode 100644 index 000000000..fc473ce3c --- /dev/null +++ b/google/ads/googleads/v2/resources/asset.proto @@ -0,0 +1,68 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/asset_types.proto"; +import "google/ads/googleads/v2/enums/asset_type.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 = "AssetProto"; +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 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 { + // The resource name of the asset. + // Asset resource names have the form: + // + // `customers/{customer_id}/assets/{asset_id}` + string resource_name = 1; + + // The ID of the asset. + google.protobuf.Int64Value id = 2; + + // Optional name of the asset. + google.protobuf.StringValue name = 3; + + // Type of the asset. + google.ads.googleads.v2.enums.AssetTypeEnum.AssetType type = 4; + + // The specific type of the asset. + oneof asset_data { + // A YouTube video asset. + google.ads.googleads.v2.common.YoutubeVideoAsset youtube_video_asset = 5; + + // A media bundle asset. + google.ads.googleads.v2.common.MediaBundleAsset media_bundle_asset = 6; + + // An image asset. + google.ads.googleads.v2.common.ImageAsset image_asset = 7; + + // A text asset. + google.ads.googleads.v2.common.TextAsset text_asset = 8; + } +} diff --git a/google/ads/googleads/v2/resources/bidding_strategy.proto b/google/ads/googleads/v2/resources/bidding_strategy.proto new file mode 100644 index 000000000..1c3cf33a8 --- /dev/null +++ b/google/ads/googleads/v2/resources/bidding_strategy.proto @@ -0,0 +1,117 @@ +// 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.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/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 = "BiddingStrategyProto"; +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 BiddingStrategy resource + +// A bidding strategy. +message BiddingStrategy { + // 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; + + // The ID of the bidding strategy. + google.protobuf.Int64Value id = 3; + + // 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; + + // The status of the bidding strategy. + // + // This field is read-only. + google.ads.googleads.v2.enums.BiddingStrategyStatusEnum.BiddingStrategyStatus status = 15; + + // 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; + + // The number of campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value campaign_count = 13; + + // The number of non-removed campaigns attached to this bidding strategy. + // + // This field is read-only. + google.protobuf.Int64Value non_removed_campaign_count = 14; + + // 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.v2.common.EnhancedCpc enhanced_cpc = 7; + + // 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.v2.common.PageOnePromoted page_one_promoted = 8; + + // 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.v2.common.TargetCpa target_cpa = 9; + + // A bidding strategy that automatically optimizes towards a desired + // percentage of impressions. + google.ads.googleads.v2.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.v2.common.TargetOutrankShare target_outrank_share = 10; + + // A bidding strategy that helps you maximize revenue while averaging a + // specific target Return On Ad Spend (ROAS). + google.ads.googleads.v2.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.v2.common.TargetSpend target_spend = 12; + } +} diff --git a/google/ads/googleads/v2/resources/billing_setup.proto b/google/ads/googleads/v2/resources/billing_setup.proto new file mode 100644 index 000000000..15d1c3843 --- /dev/null +++ b/google/ads/googleads/v2/resources/billing_setup.proto @@ -0,0 +1,124 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/billing_setup_status.proto"; +import "google/ads/googleads/v2/enums/time_type.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 = "BillingSetupProto"; +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 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. +message BillingSetup { + // Container of Payments account information for this billing. + message PaymentsAccountInfo { + // 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; + + // 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; + + // 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; + + // The name of the Payments profile associated with the billing setup. + google.protobuf.StringValue payments_profile_name = 4; + + // 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; + } + + // The resource name of the billing setup. + // BillingSetup resource names have the form: + // + // `customers/{customer_id}/billingSetups/{billing_setup_id}` + string resource_name = 1; + + // The ID of the billing setup. + google.protobuf.Int64Value id = 2; + + // The status of the billing setup. + google.ads.googleads.v2.enums.BillingSetupStatusEnum.BillingSetupStatus status = 3; + + // 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; + + // 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; + + // 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 { + // 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; + + // The start time as a type. Only NOW is allowed. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType start_time_type = 10; + } + + // 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; + + // The end time as a type. The only possible value is FOREVER. + google.ads.googleads.v2.enums.TimeTypeEnum.TimeType end_time_type = 14; + } +} diff --git a/google/ads/googleads/v2/resources/campaign.proto b/google/ads/googleads/v2/resources/campaign.proto new file mode 100644 index 000000000..e42a01aaa --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign.proto @@ -0,0 +1,360 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/bidding.proto"; +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/common/frequency_cap.proto"; +import "google/ads/googleads/v2/common/real_time_bidding_setting.proto"; +import "google/ads/googleads/v2/common/targeting_setting.proto"; +import "google/ads/googleads/v2/enums/ad_serving_optimization_status.proto"; +import "google/ads/googleads/v2/enums/advertising_channel_sub_type.proto"; +import "google/ads/googleads/v2/enums/advertising_channel_type.proto"; +import "google/ads/googleads/v2/enums/app_campaign_app_store.proto"; +import "google/ads/googleads/v2/enums/app_campaign_bidding_strategy_goal_type.proto"; +import "google/ads/googleads/v2/enums/bidding_strategy_type.proto"; +import "google/ads/googleads/v2/enums/brand_safety_suitability.proto"; +import "google/ads/googleads/v2/enums/campaign_experiment_type.proto"; +import "google/ads/googleads/v2/enums/campaign_serving_status.proto"; +import "google/ads/googleads/v2/enums/campaign_status.proto"; +import "google/ads/googleads/v2/enums/negative_geo_target_type.proto"; +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/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 = "CampaignProto"; +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 Campaign resource. + +// A campaign. +message 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 { + // The linked Hotel Center account. + google.protobuf.Int64Value hotel_center_id = 1; + } + + // 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; + + // The list of page feeds associated with the campaign. + repeated google.protobuf.StringValue feeds = 5; + } + + // 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. + // This field is required for create operations. This field is immutable for + // Shopping campaigns. + google.protobuf.Int64Value merchant_id = 1; + + // 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; + + // 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; + } + + // 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; + } + + // 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; + + // The application store that distributes this specific app. + google.ads.googleads.v2.enums.AppCampaignAppStoreEnum.AppCampaignAppStore app_store = 3; + } + + // 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 resource name of the campaign. + // Campaign resource names have the form: + // + // `customers/{customer_id}/campaigns/{campaign_id}` + string resource_name = 1; + + // The ID of the campaign. + google.protobuf.Int64Value id = 3; + + // 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.v2.enums.CampaignStatusEnum.CampaignStatus status = 5; + + // The ad serving status of the campaign. + google.ads.googleads.v2.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + + // 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. + // 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.v2.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + + // 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; + + // 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.v2.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.v2.common.RealTimeBiddingSetting real_time_bidding_setting = 39; + + // The network settings for the campaign. + NetworkSettings network_settings = 14; + + // The hotel setting for the campaign. + HotelSettingInfo hotel_setting = 32; + + // 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.v2.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; + + // The resource names of labels attached to this campaign. + repeated google.protobuf.StringValue labels = 53; + + // The type of campaign: normal, draft, or experiment. + google.ads.googleads.v2.enums.CampaignExperimentTypeEnum.CampaignExperimentType experiment_type = 17; + + // 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; + + // The budget of the campaign. + google.protobuf.StringValue campaign_budget = 6; + + // 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; + + // 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.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; + + // 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; + + // Campaign level settings for tracking information. + TrackingSetting tracking_setting = 46; + + // Payment mode for the campaign. + google.ads.googleads.v2.enums.PaymentModeEnum.PaymentMode payment_mode = 52; + + // 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; + + // Commission is an automatic bidding strategy in which the advertiser pays + // a certain portion of the conversion value. + google.ads.googleads.v2.common.Commission commission = 49; + + // Standard Manual CPC bidding strategy. + // Manual click-based bidding where user pays per click. + google.ads.googleads.v2.common.ManualCpc manual_cpc = 24; + + // Standard Manual CPM bidding strategy. + // Manual impression-based bidding where user pays per thousand + // 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; + + // Standard Maximize Conversions bidding strategy that automatically + // maximizes number of conversions given a daily budget. + google.ads.googleads.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.common.PercentCpc percent_cpc = 34; + + // A bidding strategy that automatically optimizes cost per thousand + // impressions. + google.ads.googleads.v2.common.TargetCpm target_cpm = 41; + } +} diff --git a/google/ads/googleads/v2/resources/campaign_audience_view.proto b/google/ads/googleads/v2/resources/campaign_audience_view.proto new file mode 100644 index 000000000..9950d5d9f --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_audience_view.proto @@ -0,0 +1,44 @@ +// 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.v2.resources; + +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 = "CampaignAudienceViewProto"; +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 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 { + // 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; +} diff --git a/google/ads/googleads/v2/resources/campaign_bid_modifier.proto b/google/ads/googleads/v2/resources/campaign_bid_modifier.proto new file mode 100644 index 000000000..d12e8eda7 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_bid_modifier.proto @@ -0,0 +1,59 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.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 = "CampaignBidModifierProto"; +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 Campaign Bid Modifier resource. + +// Represents a bid-modifiable only criterion at the campaign level. +message CampaignBidModifier { + // 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; + + // The campaign to which this criterion belongs. + google.protobuf.StringValue campaign = 2; + + // The ID of the criterion to bid modify. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 3; + + // 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; + } +} diff --git a/google/ads/googleads/v2/resources/campaign_budget.proto b/google/ads/googleads/v2/resources/campaign_budget.proto new file mode 100644 index 000000000..4a8725e75 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_budget.proto @@ -0,0 +1,146 @@ +// 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.v2.resources; + +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/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 = "CampaignBudgetProto"; +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 Budget resource. + +// A campaign budget. +message CampaignBudget { + // The resource name of the campaign budget. + // Campaign budget resource names have the form: + // + // `customers/{customer_id}/campaignBudgets/{budget_id}` + string resource_name = 1; + + // 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; + + // 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; + + // The status of this campaign budget. This field is read-only. + google.ads.googleads.v2.enums.BudgetStatusEnum.BudgetStatus status = 6; + + // 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.v2.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; + + // The number of campaigns actively using the budget. + // + // This field is read-only. + google.protobuf.Int64Value reference_count = 9; + + // Indicates whether there is a recommended budget for this campaign budget. + // + // This field is read-only. + google.protobuf.BoolValue has_recommended_budget = 11; + + // 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; + + // Period over which to spend the budget. Defaults to DAILY if not specified. + google.ads.googleads.v2.enums.BudgetPeriodEnum.BudgetPeriod period = 13; + + // 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; + + // 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; + + // 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; + + // 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; + + // The type of the campaign budget. + google.ads.googleads.v2.enums.BudgetTypeEnum.BudgetType type = 18; +} diff --git a/google/ads/googleads/v2/resources/campaign_criterion.proto b/google/ads/googleads/v2/resources/campaign_criterion.proto new file mode 100644 index 000000000..f1f34ea4e --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_criterion.proto @@ -0,0 +1,149 @@ +// 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.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/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 = "CampaignCriterionProto"; +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 Campaign Criterion resource. + +// A campaign criterion. +message CampaignCriterion { + // 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. + // + // This field is ignored during mutate. + google.protobuf.Int64Value criterion_id = 5; + + // 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; + + // The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 6; + + // The status of the criterion. + google.ads.googleads.v2.enums.CampaignCriterionStatusEnum.CampaignCriterionStatus status = 35; + + // The campaign criterion. + // + // Exactly one must be set. + oneof criterion { + // Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 8; + + // Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 9; + + // Mobile app category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 10; + + // Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 11; + + // Location. + google.ads.googleads.v2.common.LocationInfo location = 12; + + // Device. + google.ads.googleads.v2.common.DeviceInfo device = 13; + + // Ad Schedule. + google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 15; + + // Age range. + google.ads.googleads.v2.common.AgeRangeInfo age_range = 16; + + // Gender. + google.ads.googleads.v2.common.GenderInfo gender = 17; + + // Income range. + google.ads.googleads.v2.common.IncomeRangeInfo income_range = 18; + + // Parental status. + google.ads.googleads.v2.common.ParentalStatusInfo parental_status = 19; + + // User List. + google.ads.googleads.v2.common.UserListInfo user_list = 22; + + // YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 20; + + // YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 21; + + // Proximity. + google.ads.googleads.v2.common.ProximityInfo proximity = 23; + + // Topic. + google.ads.googleads.v2.common.TopicInfo topic = 24; + + // Listing scope. + google.ads.googleads.v2.common.ListingScopeInfo listing_scope = 25; + + // Language. + google.ads.googleads.v2.common.LanguageInfo language = 26; + + // IpBlock. + google.ads.googleads.v2.common.IpBlockInfo ip_block = 27; + + // ContentLabel. + google.ads.googleads.v2.common.ContentLabelInfo content_label = 28; + + // Carrier. + google.ads.googleads.v2.common.CarrierInfo carrier = 29; + + // User Interest. + google.ads.googleads.v2.common.UserInterestInfo user_interest = 30; + + // Webpage. + google.ads.googleads.v2.common.WebpageInfo webpage = 31; + + // Operating system version. + google.ads.googleads.v2.common.OperatingSystemVersionInfo operating_system_version = 32; + + // Mobile Device. + google.ads.googleads.v2.common.MobileDeviceInfo mobile_device = 33; + + // Location Group + google.ads.googleads.v2.common.LocationGroupInfo location_group = 34; + } +} diff --git a/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto b/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto new file mode 100644 index 000000000..f3cdcc3e5 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_criterion_simulation.proto @@ -0,0 +1,74 @@ +// 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.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/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 = "CampaignCriterionSimulationProto"; +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 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. +// +// SEARCH 30000,30001,30002 BID_MODIFIER UNIFORM +// SHOPPING 30000,30001,30002 BID_MODIFIER UNIFORM +// DISPLAY 30001 BID_MODIFIER UNIFORM +message CampaignCriterionSimulation { + // 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; + + // Campaign ID of the simulation. + google.protobuf.Int64Value campaign_id = 2; + + // Criterion ID of the simulation. + google.protobuf.Int64Value criterion_id = 3; + + // The field that the simulation modifies. + google.ads.googleads.v2.enums.SimulationTypeEnum.SimulationType type = 4; + + // How the simulation modifies the field. + google.ads.googleads.v2.enums.SimulationModificationMethodEnum.SimulationModificationMethod modification_method = 5; + + // First day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue start_date = 6; + + // Last day on which the simulation is based, in YYYY-MM-DD format. + google.protobuf.StringValue end_date = 7; + + // 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; + } +} diff --git a/google/ads/googleads/v2/resources/campaign_draft.proto b/google/ads/googleads/v2/resources/campaign_draft.proto new file mode 100644 index 000000000..f6b7f1de0 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_draft.proto @@ -0,0 +1,78 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/campaign_draft_status.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 = "CampaignDraftProto"; +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 Campaign Draft resource. + +// A campaign draft. +message CampaignDraft { + // 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; + + // The ID of the draft. + // + // This field is read-only. + google.protobuf.Int64Value draft_id = 2; + + // The base campaign to which the draft belongs. + google.protobuf.StringValue base_campaign = 3; + + // 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; + + // 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; + + // 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; + + // Whether there is an experiment based on this draft currently serving. + google.protobuf.BoolValue has_experiment_running = 7; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/campaign_experiment.proto b/google/ads/googleads/v2/resources/campaign_experiment.proto new file mode 100644 index 000000000..ecf55d8a9 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_experiment.proto @@ -0,0 +1,101 @@ +// 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.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/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 = "CampaignExperimentProto"; +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 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 { + // 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. + // + // This field is read-only. + google.protobuf.Int64Value id = 2; + + // The campaign draft with staged changes to the base campaign. + google.protobuf.StringValue campaign_draft = 3; + + // 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; + + // 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; + + // Determines the behavior of the traffic split. + google.ads.googleads.v2.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7; + + // The experiment campaign, as opposed to the base campaign. + google.protobuf.StringValue experiment_campaign = 8; + + // The status of the campaign experiment. This field is read-only. + google.ads.googleads.v2.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9; + + // 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; + + // 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/v2/resources/campaign_extension_setting.proto b/google/ads/googleads/v2/resources/campaign_extension_setting.proto new file mode 100644 index 000000000..c497dffc1 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_extension_setting.proto @@ -0,0 +1,62 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/extension_setting_device.proto"; +import "google/ads/googleads/v2/enums/extension_type.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 = "CampaignExtensionSettingProto"; +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 CampaignExtensionSetting resource. + +// A campaign extension setting. +message CampaignExtensionSetting { + // 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; + + // The extension type of the customer extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + + // 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; + + // 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; + + // 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 new file mode 100644 index 000000000..d23594519 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_feed.proto @@ -0,0 +1,63 @@ +// 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.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/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 = "CampaignFeedProto"; +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 CampaignFeed resource. + +// A campaign feed. +message CampaignFeed { + // 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; + + // The feed to which the CampaignFeed belongs. + google.protobuf.StringValue feed = 2; + + // The campaign to which the CampaignFeed belongs. + google.protobuf.StringValue campaign = 3; + + // Indicates which placeholder types the feed may populate under the connected + // campaign. Required. + repeated google.ads.googleads.v2.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.v2.common.MatchingFunction matching_function = 5; + + // Status of the campaign feed. + // This field is read-only. + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 6; +} diff --git a/google/ads/googleads/v2/resources/campaign_label.proto b/google/ads/googleads/v2/resources/campaign_label.proto new file mode 100644 index 000000000..f3b320e47 --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_label.proto @@ -0,0 +1,46 @@ +// 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.v2.resources; + +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 = "CampaignLabelProto"; +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 campaign label resource. + +// Represents a relationship between a campaign and a label. +message CampaignLabel { + // Name of the resource. + // Campaign label resource names have the form: + // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + string resource_name = 1; + + // The campaign to which the label is attached. + google.protobuf.StringValue campaign = 2; + + // The label assigned to the campaign. + google.protobuf.StringValue label = 3; +} diff --git a/google/ads/googleads/v2/resources/campaign_shared_set.proto b/google/ads/googleads/v2/resources/campaign_shared_set.proto new file mode 100644 index 000000000..e1e0ece8e --- /dev/null +++ b/google/ads/googleads/v2/resources/campaign_shared_set.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/campaign_shared_set_status.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 = "CampaignSharedSetProto"; +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 CampaignSharedSet resource. + +// CampaignSharedSets are used for managing the shared sets associated with a +// campaign. +message CampaignSharedSet { + // 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; + + // The campaign to which the campaign shared set belongs. + google.protobuf.StringValue campaign = 3; + + // 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; + + // The status of this campaign shared set. Read only. + google.ads.googleads.v2.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus status = 2; +} diff --git a/google/ads/googleads/v2/resources/carrier_constant.proto b/google/ads/googleads/v2/resources/carrier_constant.proto new file mode 100644 index 000000000..3ffa24d99 --- /dev/null +++ b/google/ads/googleads/v2/resources/carrier_constant.proto @@ -0,0 +1,51 @@ +// 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.v2.resources; + +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 = "CarrierConstantProto"; +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 Carrier constant resource. + +// A carrier criterion that can be used in campaign targeting. +message CarrierConstant { + // The resource name of the carrier criterion. + // Carrier criterion resource names have the form: + // + // `carrierConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the carrier criterion. + google.protobuf.Int64Value id = 2; + + // The full name of the carrier in English. + google.protobuf.StringValue name = 3; + + // The country code of the country where the carrier is located, e.g., "AR", + // "FR", etc. + google.protobuf.StringValue country_code = 4; +} diff --git a/google/ads/googleads/v2/resources/change_status.proto b/google/ads/googleads/v2/resources/change_status.proto new file mode 100644 index 000000000..626b16ee1 --- /dev/null +++ b/google/ads/googleads/v2/resources/change_status.proto @@ -0,0 +1,84 @@ +// 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.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/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 = "ChangeStatusProto"; +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 Change Status resource. + +// Describes the status of returned resource. +message ChangeStatus { + // 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; + + // Time at which the most recent change has occurred on this resource. + google.protobuf.StringValue last_change_date_time = 3; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/click_view.proto b/google/ads/googleads/v2/resources/click_view.proto new file mode 100644 index 000000000..ff2c50c13 --- /dev/null +++ b/google/ads/googleads/v2/resources/click_view.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/common/click_location.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 = "ClickViewProto"; +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 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. +message ClickView { + // 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; + + // The Google Click ID. + google.protobuf.StringValue gclid = 2; + + // The location criteria matching the area of interest associated with the + // impression. + google.ads.googleads.v2.common.ClickLocation area_of_interest = 3; + + // The location criteria matching the location of presence associated with the + // impression. + google.ads.googleads.v2.common.ClickLocation location_of_presence = 4; + + // Page number in search results where the ad was shown. + google.protobuf.Int64Value page_number = 5; + + // The associated ad. + google.protobuf.StringValue ad_group_ad = 7; +} diff --git a/google/ads/googleads/v2/resources/conversion_action.proto b/google/ads/googleads/v2/resources/conversion_action.proto new file mode 100644 index 000000000..89d6e59fb --- /dev/null +++ b/google/ads/googleads/v2/resources/conversion_action.proto @@ -0,0 +1,133 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/tag_snippet.proto"; +import "google/ads/googleads/v2/enums/attribution_model.proto"; +import "google/ads/googleads/v2/enums/conversion_action_category.proto"; +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/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 = "ConversionActionProto"; +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 Conversion Action resource. + +// A conversion action. +message ConversionAction { + // 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 + // action. + google.ads.googleads.v2.enums.DataDrivenModelStatusEnum.DataDrivenModelStatus data_driven_model_status = 2; + } + + // 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; + } + + // 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; + + // The ID of the conversion action. + google.protobuf.Int64Value id = 2; + + // 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.v2.enums.ConversionActionStatusEnum.ConversionActionStatus status = 4; + + // The type of this conversion action. + google.ads.googleads.v2.enums.ConversionActionTypeEnum.ConversionActionType type = 5; + + // 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 + // is a system-defined conversion action. + google.protobuf.StringValue owner_customer = 7; + + // 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.v2.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.v2.common.TagSnippet tag_snippets = 14; + + // 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/v2/resources/custom_interest.proto b/google/ads/googleads/v2/resources/custom_interest.proto new file mode 100644 index 000000000..9bd79b227 --- /dev/null +++ b/google/ads/googleads/v2/resources/custom_interest.proto @@ -0,0 +1,79 @@ +// 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.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/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 = "CustomInterestProto"; +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 Custom Interest resource. + +// A custom interest. This is a list of users by interest. +message CustomInterest { + // 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; + + // Id of the custom interest. + google.protobuf.Int64Value id = 2; + + // Status of this custom interest. Indicates whether the custom interest is + // enabled or removed. + google.ads.googleads.v2.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.v2.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.v2.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/v2/resources/customer.proto b/google/ads/googleads/v2/resources/customer.proto new file mode 100644 index 000000000..6322bb9f1 --- /dev/null +++ b/google/ads/googleads/v2/resources/customer.proto @@ -0,0 +1,125 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/customer_pay_per_conversion_eligibility_failure_reason.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 = "CustomerProto"; +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 Customer resource. + +// A customer. +message Customer { + // The resource name of the customer. + // Customer resource names have the form: + // + // `customers/{customer_id}` + string resource_name = 1; + + // The ID of the customer. + google.protobuf.Int64Value id = 3; + + // Optional, non-unique descriptive name of the customer. + google.protobuf.StringValue descriptive_name = 4; + + // 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; + + // The local timezone ID of the customer. + google.protobuf.StringValue time_zone = 6; + + // 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; + + // 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; + + // Whether the customer is a manager. + google.protobuf.BoolValue manager = 12; + + // Whether the customer is a test account. + google.protobuf.BoolValue test_account = 13; + + // Call reporting setting for a customer. + CallReportingSetting call_reporting_setting = 10; + + // Conversion tracking setting for a customer. + ConversionTrackingSetting conversion_tracking_setting = 14; + + // Remarketing setting for a customer. + RemarketingSetting remarketing_setting = 15; + + // 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; +} + +// 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; +} + +// 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 + // 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; + + // 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; +} + +// Remarketing setting for a customer. +message RemarketingSetting { + // The Google global site tag. + google.protobuf.StringValue google_global_site_tag = 1; +} diff --git a/google/ads/googleads/v2/resources/customer_client.proto b/google/ads/googleads/v2/resources/customer_client.proto new file mode 100644 index 000000000..90b7c049b --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_client.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.ads.googleads.v2.resources; + +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 = "CustomerClientProto"; +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 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 { + // The resource name of the customer client. + // CustomerClient resource names have the form: + // `customers/{customer_id}/customerClients/{client_customer_id}` + string resource_name = 1; + + // The resource name of the client-customer which is linked to + // the given customer. Read only. + google.protobuf.StringValue client_customer = 3; + + // Specifies whether this is a + // [hidden account](https://support.google.com/google-ads/answer/7519830). + // Read only. + google.protobuf.BoolValue hidden = 4; + + // Distance between given customer and client. For self link, the level value + // will be 0. Read only. + google.protobuf.Int64Value level = 5; +} diff --git a/google/ads/googleads/v2/resources/customer_client_link.proto b/google/ads/googleads/v2/resources/customer_client_link.proto new file mode 100644 index 000000000..a346f8451 --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_client_link.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/manager_link_status.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 = "CustomerClientLinkProto"; +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 CustomerClientLink resource. + +// Represents customer client link relationship. +message CustomerClientLink { + // Name of the resource. + // CustomerClientLink resource names have the form: + // `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` + string resource_name = 1; + + // The client customer linked to this customer. + google.protobuf.StringValue client_customer = 3; + + // This is uniquely identifies a customer client link. Read only. + google.protobuf.Int64Value manager_link_id = 4; + + // This is the status of the link between client and manager. + google.ads.googleads.v2.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/v2/resources/customer_extension_setting.proto b/google/ads/googleads/v2/resources/customer_extension_setting.proto new file mode 100644 index 000000000..a877779af --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_extension_setting.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.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/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 = "CustomerExtensionSettingProto"; +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 CustomerExtensionSetting resource. + +// A customer extension setting. +message CustomerExtensionSetting { + // The resource name of the customer extension setting. + // CustomerExtensionSetting resource names have the form: + // + // `customers/{customer_id}/customerExtensionSettings/{extension_type}` + string resource_name = 1; + + // The extension type of the customer extension setting. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 2; + + // 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; + + // 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 new file mode 100644 index 000000000..e17dc363e --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_feed.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.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/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 = "CustomerFeedProto"; +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 CustomerFeed resource. + +// A customer feed. +message CustomerFeed { + // The resource name of the customer feed. + // Customer feed resource names have the form: + // + // `customers/{customer_id}/customerFeeds/{feed_id}` + string resource_name = 1; + + // The feed being linked to the customer. + google.protobuf.StringValue feed = 2; + + // Indicates which placeholder types the feed may populate under the connected + // customer. Required. + repeated google.ads.googleads.v2.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.v2.common.MatchingFunction matching_function = 4; + + // Status of the customer feed. + // This field is read-only. + google.ads.googleads.v2.enums.FeedLinkStatusEnum.FeedLinkStatus status = 5; +} diff --git a/google/ads/googleads/v2/resources/customer_label.proto b/google/ads/googleads/v2/resources/customer_label.proto new file mode 100644 index 000000000..c67989a6e --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_label.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.ads.googleads.v2.resources; + +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 = "CustomerLabelProto"; +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 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 { + // 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. + // Read only. + google.protobuf.StringValue customer = 2; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/customer_manager_link.proto b/google/ads/googleads/v2/resources/customer_manager_link.proto new file mode 100644 index 000000000..09f46a832 --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_manager_link.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/manager_link_status.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 = "CustomerManagerLinkProto"; +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 CustomerManagerLink resource. + +// Represents customer-manager link relationship. +message CustomerManagerLink { + // 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; + + // 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 new file mode 100644 index 000000000..230c82b8d --- /dev/null +++ b/google/ads/googleads/v2/resources/customer_negative_criterion.proto @@ -0,0 +1,72 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/enums/criterion_type.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 = "CustomerNegativeCriterionProto"; +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 Customer Negative Criterion resource. + +// A negative criterion for exclusions at the customer level. +message CustomerNegativeCriterion { + // 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; + + // The ID of the criterion. + google.protobuf.Int64Value id = 2; + + // The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 3; + + // The customer negative criterion. + // + // Exactly one must be set. + oneof criterion { + // ContentLabel. + google.ads.googleads.v2.common.ContentLabelInfo content_label = 4; + + // MobileApplication. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 5; + + // MobileAppCategory. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 6; + + // Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 7; + + // YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 8; + + // YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 9; + } +} diff --git a/google/ads/googleads/v2/resources/detail_placement_view.proto b/google/ads/googleads/v2/resources/detail_placement_view.proto new file mode 100644 index 000000000..5568cac9e --- /dev/null +++ b/google/ads/googleads/v2/resources/detail_placement_view.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/placement_type.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 = "DetailPlacementViewProto"; +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 detail placement view resource. + +// A view with metrics aggregated by ad group and URL or YouTube video. +message DetailPlacementView { + // 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; + + // The automatic placement string at detail level, e. g. website URL, mobile + // application ID, or a YouTube video ID. + google.protobuf.StringValue placement = 2; + + // 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; + + // 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; + + // 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; + + // Type of the placement, e.g. Website, YouTube Video, and Mobile Application. + google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 6; +} diff --git a/google/ads/googleads/v2/resources/display_keyword_view.proto b/google/ads/googleads/v2/resources/display_keyword_view.proto new file mode 100644 index 000000000..e5f8ab942 --- /dev/null +++ b/google/ads/googleads/v2/resources/display_keyword_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "DisplayKeywordViewProto"; +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 display keyword view resource. + +// A display keyword view. +message DisplayKeywordView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/distance_view.proto b/google/ads/googleads/v2/resources/distance_view.proto new file mode 100644 index 000000000..3074a0d8a --- /dev/null +++ b/google/ads/googleads/v2/resources/distance_view.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/distance_bucket.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 = "DistanceViewProto"; +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 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 { + // 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; +} diff --git a/google/ads/googleads/v2/resources/domain_category.proto b/google/ads/googleads/v2/resources/domain_category.proto new file mode 100644 index 000000000..3b79b4b43 --- /dev/null +++ b/google/ads/googleads/v2/resources/domain_category.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.ads.googleads.v2.resources; + +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 = "DomainCategoryProto"; +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 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 { + // 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; + + // The campaign this category is recommended for. + google.protobuf.StringValue campaign = 2; + + // 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; + + // 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; + + // The domain for the website. The domain can be specified in the + // DynamicSearchAdsSetting required for dynamic search ads. + google.protobuf.StringValue domain = 5; + + // Fraction of pages on your site that this category matches. + google.protobuf.DoubleValue coverage_fraction = 6; + + // 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; + + // Indicates whether this category has sub-categories. + google.protobuf.BoolValue has_children = 8; + + // The recommended cost per click for the category. + google.protobuf.Int64Value recommended_cpc_bid_micros = 9; +} 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 new file mode 100644 index 000000000..222ba1f4f --- /dev/null +++ b/google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.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.ads.googleads.v2.resources; + +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 = "DynamicSearchAdsSearchTermViewProto"; +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 Dynamic Search Ads Search Term View resource. + +// A dynamic search ads search term view. +message DynamicSearchAdsSearchTermView { + // 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; + + // Search term + // + // This field is read-only. + google.protobuf.StringValue search_term = 2; + + // The dynamically generated headline of the Dynamic Search Ad. + // + // This field is read-only. + google.protobuf.StringValue headline = 3; + + // The dynamically selected landing page URL of the impression. + // + // This field is read-only. + google.protobuf.StringValue landing_page = 4; + + // The URL of page feed item served for the impression. + // + // This field is read-only. + google.protobuf.StringValue page_url = 5; +} diff --git a/google/ads/googleads/v2/resources/expanded_landing_page_view.proto b/google/ads/googleads/v2/resources/expanded_landing_page_view.proto new file mode 100644 index 000000000..c99db6001 --- /dev/null +++ b/google/ads/googleads/v2/resources/expanded_landing_page_view.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.ads.googleads.v2.resources; + +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 = "ExpandedLandingPageViewProto"; +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 expanded landing page view resource. + +// A landing page view with metrics aggregated at the expanded final URL +// level. +message ExpandedLandingPageView { + // 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; + + // The final URL that clicks are directed to. + google.protobuf.StringValue expanded_final_url = 2; +} diff --git a/google/ads/googleads/v2/resources/extension_feed_item.proto b/google/ads/googleads/v2/resources/extension_feed_item.proto new file mode 100644 index 000000000..5956ea87b --- /dev/null +++ b/google/ads/googleads/v2/resources/extension_feed_item.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +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/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 = "ExtensionFeedItemProto"; +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 ExtensionFeedItem resource. + +// An extension feed item. +message ExtensionFeedItem { + // 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. + // This field is read-only. + google.ads.googleads.v2.enums.ExtensionTypeEnum.ExtensionType extension_type = 13; + + // 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.v2.common.AdScheduleInfo ad_schedules = 16; + + // The targeted device. + google.ads.googleads.v2.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 17; + + // The targeted geo target constant. + google.protobuf.StringValue targeted_geo_target_constant = 20; + + // The targeted keyword. + google.ads.googleads.v2.common.KeywordInfo targeted_keyword = 22; + + // Status of the feed item. + // This field is read-only. + google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 4; + + // Extension type. + oneof extension { + // Sitelink extension. + google.ads.googleads.v2.common.SitelinkFeedItem sitelink_feed_item = 2; + + // Structured snippet extension. + google.ads.googleads.v2.common.StructuredSnippetFeedItem structured_snippet_feed_item = 3; + + // App extension. + google.ads.googleads.v2.common.AppFeedItem app_feed_item = 7; + + // Call extension. + google.ads.googleads.v2.common.CallFeedItem call_feed_item = 8; + + // Callout extension. + google.ads.googleads.v2.common.CalloutFeedItem callout_feed_item = 9; + + // Text message extension. + google.ads.googleads.v2.common.TextMessageFeedItem text_message_feed_item = 10; + + // Price extension. + google.ads.googleads.v2.common.PriceFeedItem price_feed_item = 11; + + // Promotion extension. + google.ads.googleads.v2.common.PromotionFeedItem promotion_feed_item = 12; + + // 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; + + // 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; + } + + // 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; + + // The targeted ad group. + google.protobuf.StringValue targeted_ad_group = 19; + } +} diff --git a/google/ads/googleads/v2/resources/feed.proto b/google/ads/googleads/v2/resources/feed.proto new file mode 100644 index 000000000..1760048d3 --- /dev/null +++ b/google/ads/googleads/v2/resources/feed.proto @@ -0,0 +1,180 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/affiliate_location_feed_relationship_type.proto"; +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/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 = "FeedProto"; +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 Feed resource. + +// A feed. +message 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; + } + + // 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; + + // 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.v2.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2; + } + + // The resource name of the feed. + // Feed resource names have the form: + // + // `customers/{customer_id}/feeds/{feed_id}` + string resource_name = 1; + + // The ID of the feed. + // This field is read-only. + google.protobuf.Int64Value id = 2; + + // Name of the feed. Required. + google.protobuf.StringValue name = 3; + + // The Feed's attributes. Required on CREATE. + // 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; + + // Specifies who manages the FeedAttributes for the Feed. + google.ads.googleads.v2.enums.FeedOriginEnum.FeedOrigin origin = 5; + + // Status of the feed. + // This field is read-only. + google.ads.googleads.v2.enums.FeedStatusEnum.FeedStatus status = 8; + + // 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.v2.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; + } + + // Type of list operation to perform. + Operator operator = 1; + + // The feed attribute being added to the list. + FeedAttribute value = 2; +} diff --git a/google/ads/googleads/v2/resources/feed_item.proto b/google/ads/googleads/v2/resources/feed_item.proto new file mode 100644 index 000000000..1ba2df744 --- /dev/null +++ b/google/ads/googleads/v2/resources/feed_item.proto @@ -0,0 +1,199 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/custom_parameter.proto"; +import "google/ads/googleads/v2/common/feed_common.proto"; +import "google/ads/googleads/v2/common/policy.proto"; +import "google/ads/googleads/v2/enums/feed_item_quality_approval_status.proto"; +import "google/ads/googleads/v2/enums/feed_item_quality_disapproval_reason.proto"; +import "google/ads/googleads/v2/enums/feed_item_status.proto"; +import "google/ads/googleads/v2/enums/feed_item_validation_status.proto"; +import "google/ads/googleads/v2/enums/geo_targeting_restriction.proto"; +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/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 = "FeedItemProto"; +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 FeedItem resource. + +// A feed item. +message FeedItem { + // 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. 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.v2.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.v2.common.CustomParameter url_custom_parameters = 8; + + // Status of the feed item. + // This field is read-only. + google.ads.googleads.v2.enums.FeedItemStatusEnum.FeedItemStatus status = 9; + + // 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; +} + +// 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 format of the string must + // be the same as start and end time for the feed item. + 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.v2.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 { + // The placeholder type. + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type_enum = 10; + + // The FeedMapping that contains the placeholder type. + google.protobuf.StringValue feed_mapping_resource_name = 2; + + // Where the placeholder type is in the review process. + google.ads.googleads.v2.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 3; + + // 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; + + // The list of policy findings for the placeholder type. + repeated google.ads.googleads.v2.common.PolicyTopicEntry policy_topic_entries = 5; + + // The validation status of the palceholder type. + google.ads.googleads.v2.enums.FeedItemValidationStatusEnum.FeedItemValidationStatus validation_status = 6; + + // List of placeholder type validation errors. + repeated FeedItemValidationError validation_errors = 7; + + // Placeholder type quality evaluation approval status. + google.ads.googleads.v2.enums.FeedItemQualityApprovalStatusEnum.FeedItemQualityApprovalStatus quality_approval_status = 8; + + // List of placeholder type quality evaluation disapproval reasons. + repeated google.ads.googleads.v2.enums.FeedItemQualityDisapprovalReasonEnum.FeedItemQualityDisapprovalReason quality_disapproval_reasons = 9; +} + +// 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 + // of the error can be found in the 'description' field. + google.ads.googleads.v2.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1; + + // The description of the validation error. + google.protobuf.StringValue description = 2; + + // 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; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/feed_item_target.proto b/google/ads/googleads/v2/resources/feed_item_target.proto new file mode 100644 index 000000000..7d15e0a68 --- /dev/null +++ b/google/ads/googleads/v2/resources/feed_item_target.proto @@ -0,0 +1,73 @@ +// 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.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/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 = "FeedItemTargetProto"; +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 FeedItemTarget resource. + +// A feed item target. +message FeedItemTarget { + // 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; + + // The feed item to which this feed item target belongs. + google.protobuf.StringValue feed_item = 2; + + // 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; + + // The ID of the targeted resource. This field is read-only. + google.protobuf.Int64Value feed_item_target_id = 6; + + // The targeted resource. + oneof target { + // The targeted campaign. + google.protobuf.StringValue campaign = 4; + + // The targeted ad group. + google.protobuf.StringValue ad_group = 5; + + // The targeted keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 7; + + // The targeted geo target constant resource name. + google.protobuf.StringValue geo_target_constant = 8; + + // The targeted device. + google.ads.googleads.v2.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9; + + // The targeted schedule. + google.ads.googleads.v2.common.AdScheduleInfo ad_schedule = 10; + } +} diff --git a/google/ads/googleads/v2/resources/feed_mapping.proto b/google/ads/googleads/v2/resources/feed_mapping.proto new file mode 100644 index 000000000..5d7a601f0 --- /dev/null +++ b/google/ads/googleads/v2/resources/feed_mapping.proto @@ -0,0 +1,170 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/ad_customizer_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/affiliate_location_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/app_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/call_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/callout_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/custom_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/dsa_page_feed_criterion_field.proto"; +import "google/ads/googleads/v2/enums/education_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/feed_mapping_criterion_type.proto"; +import "google/ads/googleads/v2/enums/feed_mapping_status.proto"; +import "google/ads/googleads/v2/enums/flight_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/hotel_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/job_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/local_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/location_extension_targeting_criterion_field.proto"; +import "google/ads/googleads/v2/enums/location_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/message_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/placeholder_type.proto"; +import "google/ads/googleads/v2/enums/price_placeholder_field.proto"; +import "google/ads/googleads/v2/enums/promotion_placeholder_field.proto"; +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/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 = "FeedMappingProto"; +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 FeedMapping resource. + +// A feed mapping. +message FeedMapping { + // 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 + // 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; + + // Status of the feed mapping. + // This field is read-only. + google.ads.googleads.v2.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6; + + // 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 + // attributes to placeholder fields). + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3; + + // 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; + } +} + +// 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; + + // 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; + + // 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; + + // Call Placeholder Fields. + google.ads.googleads.v2.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4; + + // App Placeholder Fields. + google.ads.googleads.v2.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5; + + // Location Placeholder Fields. This field is read-only. + google.ads.googleads.v2.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6; + + // Affiliate Location Placeholder Fields. This field is read-only. + google.ads.googleads.v2.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7; + + // Callout Placeholder Fields. + google.ads.googleads.v2.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8; + + // Structured Snippet Placeholder Fields. + google.ads.googleads.v2.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9; + + // Message Placeholder Fields. + google.ads.googleads.v2.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10; + + // Price Placeholder Fields. + google.ads.googleads.v2.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11; + + // Promotion Placeholder Fields. + google.ads.googleads.v2.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12; + + // Ad Customizer Placeholder Fields + google.ads.googleads.v2.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13; + + // Dynamic Search Ad Page Feed Fields. + google.ads.googleads.v2.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14; + + // Location Target Fields. + google.ads.googleads.v2.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15; + + // Education Placeholder Fields + google.ads.googleads.v2.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16; + + // Flight Placeholder Fields + google.ads.googleads.v2.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17; + + // Custom Placeholder Fields + google.ads.googleads.v2.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18; + + // Hotel Placeholder Fields + google.ads.googleads.v2.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19; + + // Real Estate Placeholder Fields + google.ads.googleads.v2.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20; + + // Travel Placeholder Fields + google.ads.googleads.v2.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21; + + // Local Placeholder Fields + google.ads.googleads.v2.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22; + + // Job Placeholder Fields + google.ads.googleads.v2.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23; + } +} diff --git a/google/ads/googleads/v2/resources/feed_placeholder_view.proto b/google/ads/googleads/v2/resources/feed_placeholder_view.proto new file mode 100644 index 000000000..a3f6f0e33 --- /dev/null +++ b/google/ads/googleads/v2/resources/feed_placeholder_view.proto @@ -0,0 +1,44 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/placeholder_type.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 = "FeedPlaceholderViewProto"; +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 FeedPlaceholderView resource. + +// A feed placeholder view. +message FeedPlaceholderView { + // 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; + + // The placeholder type of the feed placeholder view. + google.ads.googleads.v2.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 2; +} diff --git a/google/ads/googleads/v2/resources/gender_view.proto b/google/ads/googleads/v2/resources/gender_view.proto new file mode 100644 index 000000000..77d0631aa --- /dev/null +++ b/google/ads/googleads/v2/resources/gender_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "GenderViewProto"; +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 gender view resource. + +// A gender view. +message GenderView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/geo_target_constant.proto b/google/ads/googleads/v2/resources/geo_target_constant.proto new file mode 100644 index 000000000..1cbe1d1d2 --- /dev/null +++ b/google/ads/googleads/v2/resources/geo_target_constant.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/geo_target_constant_status.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 = "GeoTargetConstantProto"; +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 geo target constant resource. + +// A geo target constant. +message GeoTargetConstant { + // 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; + + // The ID of the geo target constant. + google.protobuf.Int64Value id = 3; + + // Geo target constant English name. + google.protobuf.StringValue name = 4; + + // The ISO-3166-1 alpha-2 country code that is associated with the target. + google.protobuf.StringValue country_code = 5; + + // Geo target constant target type. + google.protobuf.StringValue target_type = 6; + + // Geo target constant status. + google.ads.googleads.v2.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus status = 7; + + // The fully qualified English name, consisting of the target's name and that + // of its parent and country. + google.protobuf.StringValue canonical_name = 8; +} diff --git a/google/ads/googleads/v2/resources/geographic_view.proto b/google/ads/googleads/v2/resources/geographic_view.proto new file mode 100644 index 000000000..85159e6f1 --- /dev/null +++ b/google/ads/googleads/v2/resources/geographic_view.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/geo_targeting_type.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 = "GeographicViewProto"; +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 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 { + // 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; + + // Type of the geo targeting of the campaign. + google.ads.googleads.v2.enums.GeoTargetingTypeEnum.GeoTargetingType location_type = 3; + + // Criterion Id for the country. + google.protobuf.Int64Value country_criterion_id = 4; +} diff --git a/google/ads/googleads/v2/resources/google_ads_field.proto b/google/ads/googleads/v2/resources/google_ads_field.proto new file mode 100644 index 000000000..ecdbc0e0a --- /dev/null +++ b/google/ads/googleads/v2/resources/google_ads_field.proto @@ -0,0 +1,107 @@ +// 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.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/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 = "GoogleAdsFieldProto"; +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 Google Ads Field resource. + +// A field or resource (artifact) used by GoogleAdsService. +message GoogleAdsField { + // The resource name of the artifact. + // Artifact resource names have the form: + // + // `googleAdsFields/{name}` + string resource_name = 1; + + // The name of the artifact. + google.protobuf.StringValue name = 2; + + // The category of the artifact. + google.ads.googleads.v2.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3; + + // Whether the artifact can be used in a SELECT clause in search + // queries. + google.protobuf.BoolValue selectable = 4; + + // Whether the artifact can be used in a WHERE clause in search + // queries. + google.protobuf.BoolValue filterable = 5; + + // Whether the artifact can be used in a ORDER BY clause in search + // queries. + google.protobuf.BoolValue sortable = 6; + + // The names of all resources, segments, and metrics that are selectable with + // the described artifact. + repeated google.protobuf.StringValue selectable_with = 7; + + // 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; + + // 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; + + // 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; + + // 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; + + // 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; + + // The URL of proto describing the artifact's data type. + google.protobuf.StringValue type_url = 13; + + // Whether the field artifact is repeated. + google.protobuf.BoolValue is_repeated = 14; +} diff --git a/google/ads/googleads/v2/resources/group_placement_view.proto b/google/ads/googleads/v2/resources/group_placement_view.proto new file mode 100644 index 000000000..9f22e1770 --- /dev/null +++ b/google/ads/googleads/v2/resources/group_placement_view.proto @@ -0,0 +1,56 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/placement_type.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 = "GroupPlacementViewProto"; +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 group placement view resource. + +// A group placement view. +message GroupPlacementView { + // 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; + + // The automatic placement string at group level, e. g. web domain, mobile + // app ID, or a YouTube channel ID. + google.protobuf.StringValue placement = 2; + + // Domain name for websites and YouTube channel name for YouTube channels. + google.protobuf.StringValue display_name = 3; + + // 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; + + // Type of the placement, e.g. Website, YouTube Channel, Mobile Application. + google.ads.googleads.v2.enums.PlacementTypeEnum.PlacementType placement_type = 5; +} diff --git a/google/ads/googleads/v2/resources/hotel_group_view.proto b/google/ads/googleads/v2/resources/hotel_group_view.proto new file mode 100644 index 000000000..bcdec2814 --- /dev/null +++ b/google/ads/googleads/v2/resources/hotel_group_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "HotelGroupViewProto"; +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 hotel group view resource. + +// A hotel group view. +message HotelGroupView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/hotel_performance_view.proto b/google/ads/googleads/v2/resources/hotel_performance_view.proto new file mode 100644 index 000000000..bc2546414 --- /dev/null +++ b/google/ads/googleads/v2/resources/hotel_performance_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "HotelPerformanceViewProto"; +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 hotel performance view resource. + +// A hotel performance view. +message HotelPerformanceView { + // The resource name of the hotel performance view. + // Hotel performance view resource names have the form: + // + // `customers/{customer_id}/hotelPerformanceView` + string resource_name = 1; +} diff --git a/google/ads/googleads/v2/resources/keyword_plan.proto b/google/ads/googleads/v2/resources/keyword_plan.proto new file mode 100644 index 000000000..653dde2cf --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_plan.proto @@ -0,0 +1,72 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/dates.proto"; +import "google/ads/googleads/v2/enums/keyword_plan_forecast_interval.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 = "KeywordPlanProto"; +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 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 { + // 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; + + // The ID of the keyword plan. + google.protobuf.Int64Value id = 2; + + // 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.v2.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.v2.common.DateRange date_range = 2; + } +} diff --git a/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto b/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto new file mode 100644 index 000000000..fe47479c4 --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_plan_ad_group.proto @@ -0,0 +1,59 @@ +// 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.v2.resources; + +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 = "KeywordPlanAdGroupProto"; +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 keyword plan ad group resource. + +// 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. + // KeywordPlanAdGroup resource names have the form: + // + // `customers/{customer_id}/keywordPlanAdGroups/{kp_ad_group_id}` + string resource_name = 1; + + // The keyword plan campaign to which this ad group belongs. + google.protobuf.StringValue keyword_plan_campaign = 2; + + // The ID of the keyword plan ad group. + google.protobuf.Int64Value id = 3; + + // 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/v2/resources/keyword_plan_campaign.proto b/google/ads/googleads/v2/resources/keyword_plan_campaign.proto new file mode 100644 index 000000000..5bdb79465 --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_plan_campaign.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/keyword_plan_network.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 = "KeywordPlanCampaignProto"; +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 keyword plan campaign resource. + +// A Keyword Plan campaign. +// Max number of keyword plan campaigns per plan allowed: 1. +message KeywordPlanCampaign { + // 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; + + // The keyword plan this campaign belongs to. + google.protobuf.StringValue keyword_plan = 2; + + // The ID of the Keyword Plan campaign. + google.protobuf.Int64Value id = 3; + + // 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; + + // Targeting network. + // + // This field is required and should not be empty when creating Keyword Plan + // campaigns. + google.ads.googleads.v2.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. +// Next ID: 3 +message KeywordPlanGeoTarget { + // Required. The resource name of the geo target. + google.protobuf.StringValue geo_target_constant = 1; +} diff --git a/google/ads/googleads/v2/resources/keyword_plan_keyword.proto b/google/ads/googleads/v2/resources/keyword_plan_keyword.proto new file mode 100644 index 000000000..f4ecf0ee1 --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_plan_keyword.proto @@ -0,0 +1,59 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/keyword_match_type.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 = "KeywordPlanKeywordProto"; +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 keyword plan keyword resource. + +// 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. + // KeywordPlanKeyword resource names have the form: + // + // `customers/{customer_id}/keywordPlanKeywords/{kp_ad_group_keyword_id}` + string resource_name = 1; + + // The Keyword Plan ad group to which this keyword belongs. + google.protobuf.StringValue keyword_plan_ad_group = 2; + + // The ID of the Keyword Plan keyword. + google.protobuf.Int64Value id = 3; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + google.ads.googleads.v2.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/v2/resources/keyword_plan_negative_keyword.proto b/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto new file mode 100644 index 000000000..d45bb3bcc --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_plan_negative_keyword.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/keyword_match_type.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 = "KeywordPlanNegativeKeywordProto"; +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 keyword plan negative keyword resource. + +// 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. + // KeywordPlanNegativeKeyword resource names have the form: + // + // `customers/{customer_id}/keywordPlanNegativeKeywords/{kp_negative_keyword_id}` + string resource_name = 1; + + // The Keyword Plan campaign to which this negative keyword belongs. + google.protobuf.StringValue keyword_plan_campaign = 2; + + // The ID of the Keyword Plan negative keyword. + google.protobuf.Int64Value id = 3; + + // The keyword text. + google.protobuf.StringValue text = 4; + + // The keyword match type. + google.ads.googleads.v2.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 5; +} diff --git a/google/ads/googleads/v2/resources/keyword_view.proto b/google/ads/googleads/v2/resources/keyword_view.proto new file mode 100644 index 000000000..9e8c2843b --- /dev/null +++ b/google/ads/googleads/v2/resources/keyword_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "KeywordViewProto"; +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 keyword view resource. + +// A keyword view. +message KeywordView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/label.proto b/google/ads/googleads/v2/resources/label.proto new file mode 100644 index 000000000..c105e8631 --- /dev/null +++ b/google/ads/googleads/v2/resources/label.proto @@ -0,0 +1,56 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/text_label.proto"; +import "google/ads/googleads/v2/enums/label_status.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 = "LabelProto"; +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"; + +// A label. +message Label { + // Name of the resource. + // Label resource names have the form: + // `customers/{customer_id}/labels/{label_id}` + string resource_name = 1; + + // Id of the label. Read only. + google.protobuf.Int64Value id = 2; + + // 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; + + // Status of the label. Read only. + google.ads.googleads.v2.enums.LabelStatusEnum.LabelStatus status = 4; + + // 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 new file mode 100644 index 000000000..702997e57 --- /dev/null +++ b/google/ads/googleads/v2/resources/landing_page_view.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.ads.googleads.v2.resources; + +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 = "LandingPageViewProto"; +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 landing page view resource. + +// A landing page view with metrics aggregated at the unexpanded final URL +// level. +message LandingPageView { + // 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; + + // The advertiser-specified final URL. + google.protobuf.StringValue unexpanded_final_url = 2; +} diff --git a/google/ads/googleads/v2/resources/language_constant.proto b/google/ads/googleads/v2/resources/language_constant.proto new file mode 100644 index 000000000..6b5f92a1c --- /dev/null +++ b/google/ads/googleads/v2/resources/language_constant.proto @@ -0,0 +1,54 @@ +// 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.v2.resources; + +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 = "LanguageConstantProto"; +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 language constant resource. + +// A language. +message LanguageConstant { + // The resource name of the language constant. + // Language constant resource names have the form: + // + // `languageConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the language constant. + google.protobuf.Int64Value id = 2; + + // The language code, e.g. "en_US", "en_AU", "es", "fr", etc. + google.protobuf.StringValue code = 3; + + // The full name of the language in English, e.g., "English (US)", "Spanish", + // etc. + google.protobuf.StringValue name = 4; + + // Whether the language is targetable. + google.protobuf.BoolValue targetable = 5; +} diff --git a/google/ads/googleads/v2/resources/location_view.proto b/google/ads/googleads/v2/resources/location_view.proto new file mode 100644 index 000000000..56bf76fa7 --- /dev/null +++ b/google/ads/googleads/v2/resources/location_view.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.ads.googleads.v2.resources; + +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 = "LocationViewProto"; +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 location view resource. + +// A location view summarizes the performance of campaigns by +// Location criteria. +message LocationView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/managed_placement_view.proto b/google/ads/googleads/v2/resources/managed_placement_view.proto new file mode 100644 index 000000000..b28b8326c --- /dev/null +++ b/google/ads/googleads/v2/resources/managed_placement_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "ManagedPlacementViewProto"; +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 Managed Placement view resource. + +// A managed placement view. +message ManagedPlacementView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/media_file.proto b/google/ads/googleads/v2/resources/media_file.proto new file mode 100644 index 000000000..476923b5c --- /dev/null +++ b/google/ads/googleads/v2/resources/media_file.proto @@ -0,0 +1,114 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/media_type.proto"; +import "google/ads/googleads/v2/enums/mime_type.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 = "MediaFileProto"; +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 media file resource. + +// A media file. +message MediaFile { + // 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; + + // The ID of the media file. + google.protobuf.Int64Value id = 2; + + // Type of the media file. + google.ads.googleads.v2.enums.MediaTypeEnum.MediaType type = 5; + + // The mime type of the media file. + google.ads.googleads.v2.enums.MimeTypeEnum.MimeType mime_type = 6; + + // 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; + + // The name of the media file. The name can be used by clients to help + // identify previously uploaded media. + google.protobuf.StringValue name = 8; + + // The size of the media file in bytes. + google.protobuf.Int64Value file_size = 9; + + // The specific type of the media file. + oneof mediatype { + // Encapsulates an Image. + MediaImage image = 3; + + // A ZIP archive media the content of which contains HTML5 assets. + MediaBundle media_bundle = 4; + + // Encapsulates an Audio. + MediaAudio audio = 10; + + // Encapsulates a Video. + MediaVideo video = 11; + } +} + +// Encapsulates an Image. +message MediaImage { + // Raw image data. + google.protobuf.BytesValue data = 1; +} + +// Represents a ZIP archive media the content of which contains HTML5 assets. +message MediaBundle { + // Raw zipped data. + google.protobuf.BytesValue data = 1; +} + +// Encapsulates an Audio. +message MediaAudio { + // The duration of the Audio in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1; +} + +// Encapsulates a Video. +message MediaVideo { + // The duration of the Video in milliseconds. + google.protobuf.Int64Value ad_duration_millis = 1; + + // The YouTube video ID (as seen in YouTube URLs). + google.protobuf.StringValue youtube_video_id = 2; + + // 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; + + // The Industry Standard Commercial Identifier code for this video, used + // mainly for television commercials. + google.protobuf.StringValue isci_code = 4; +} diff --git a/google/ads/googleads/v2/resources/merchant_center_link.proto b/google/ads/googleads/v2/resources/merchant_center_link.proto new file mode 100644 index 000000000..f94b6196c --- /dev/null +++ b/google/ads/googleads/v2/resources/merchant_center_link.proto @@ -0,0 +1,54 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/merchant_center_link_status.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 = "MerchantCenterLinkProto"; +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 Merchant Center link resource. + +// 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. + // Merchant center link resource names have the form: + // + // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}` + string resource_name = 1; + + // The ID of the Merchant Center account. + // This field is readonly. + google.protobuf.Int64Value id = 3; + + // The name of the Merchant Center account. + // This field is readonly. + google.protobuf.StringValue merchant_center_account_name = 4; + + // 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 new file mode 100644 index 000000000..b33e32a9d --- /dev/null +++ b/google/ads/googleads/v2/resources/mobile_app_category_constant.proto @@ -0,0 +1,47 @@ +// 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.v2.resources; + +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 = "MobileAppCategoryConstantProto"; +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 Mobile App Category Constant resource. + +// A mobile application category constant. +message MobileAppCategoryConstant { + // 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; +} diff --git a/google/ads/googleads/v2/resources/mobile_device_constant.proto b/google/ads/googleads/v2/resources/mobile_device_constant.proto new file mode 100644 index 000000000..5050f4d78 --- /dev/null +++ b/google/ads/googleads/v2/resources/mobile_device_constant.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/mobile_device_type.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 = "MobileDeviceConstantProto"; +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 mobile device constant resource. + +// A mobile device constant. +message MobileDeviceConstant { + // The resource name of the mobile device constant. + // Mobile device constant resource names have the form: + // + // `mobileDeviceConstants/{criterion_id}` + string resource_name = 1; + + // The ID of the mobile device constant. + google.protobuf.Int64Value id = 2; + + // The name of the mobile device. + google.protobuf.StringValue name = 3; + + // The manufacturer of the mobile device. + google.protobuf.StringValue manufacturer_name = 4; + + // The operating system of the mobile device. + google.protobuf.StringValue operating_system_name = 5; + + // The type of mobile device. + google.ads.googleads.v2.enums.MobileDeviceTypeEnum.MobileDeviceType type = 6; +} diff --git a/google/ads/googleads/v2/resources/mutate_job.proto b/google/ads/googleads/v2/resources/mutate_job.proto new file mode 100644 index 000000000..abb48467a --- /dev/null +++ b/google/ads/googleads/v2/resources/mutate_job.proto @@ -0,0 +1,84 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/mutate_job_status.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 = "MutateJobProto"; +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 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 { + // 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. + // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00" + google.protobuf.StringValue creation_date_time = 1; + + // 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; + + // 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; + + // The number of mutate operations in the mutate job. + google.protobuf.Int64Value operation_count = 4; + + // 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; + } + + // 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; + + // ID of this mutate job. + google.protobuf.Int64Value id = 2; + + // 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; + + // Contains additional information about this mutate job. + MutateJobMetadata metadata = 4; + + // Status of this mutate job. + google.ads.googleads.v2.enums.MutateJobStatusEnum.MutateJobStatus status = 5; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/operating_system_version_constant.proto b/google/ads/googleads/v2/resources/operating_system_version_constant.proto new file mode 100644 index 000000000..ef484b58a --- /dev/null +++ b/google/ads/googleads/v2/resources/operating_system_version_constant.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.v2.resources; + +import "google/ads/googleads/v2/enums/operating_system_version_operator_type.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 = "OperatingSystemVersionConstantProto"; +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 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 { + // 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; + + // The ID of the operating system version. + google.protobuf.Int64Value id = 2; + + // Name of the operating system. + google.protobuf.StringValue name = 3; + + // The OS Major Version number. + google.protobuf.Int32Value os_major_version = 4; + + // The OS Minor Version number. + google.protobuf.Int32Value os_minor_version = 5; + + // Determines whether this constant represents a single version or a range of + // versions. + google.ads.googleads.v2.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorType operator_type = 6; +} 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 new file mode 100644 index 000000000..4569dc206 --- /dev/null +++ b/google/ads/googleads/v2/resources/paid_organic_search_term_view.proto @@ -0,0 +1,46 @@ +// 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.v2.resources; + +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 = "PaidOrganicSearchTermViewProto"; +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 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 { + // 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; + + // The search term. + google.protobuf.StringValue search_term = 2; +} diff --git a/google/ads/googleads/v2/resources/parental_status_view.proto b/google/ads/googleads/v2/resources/parental_status_view.proto new file mode 100644 index 000000000..a189d18a9 --- /dev/null +++ b/google/ads/googleads/v2/resources/parental_status_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "ParentalStatusViewProto"; +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 parental status view resource. + +// A parental status view. +message ParentalStatusView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/payments_account.proto b/google/ads/googleads/v2/resources/payments_account.proto new file mode 100644 index 000000000..ecabea6ef --- /dev/null +++ b/google/ads/googleads/v2/resources/payments_account.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.v2.resources; + +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 = "PaymentsAccountProto"; +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 PaymentsAccount resource. + +// A Payments account, which can be used to set up billing for an Ads customer. +message PaymentsAccount { + // The resource name of the Payments account. + // PaymentsAccount resource names have the form: + // + // `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + string resource_name = 1; + + // A 16 digit ID used to identify a Payments account. + google.protobuf.StringValue payments_account_id = 2; + + // The name of the Payments account. + google.protobuf.StringValue name = 3; + + // 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; + + // A 12 digit ID used to identify the Payments profile associated with the + // Payments account. + google.protobuf.StringValue payments_profile_id = 5; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/product_bidding_category_constant.proto b/google/ads/googleads/v2/resources/product_bidding_category_constant.proto new file mode 100644 index 000000000..3cdc323a5 --- /dev/null +++ b/google/ads/googleads/v2/resources/product_bidding_category_constant.proto @@ -0,0 +1,68 @@ +// 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.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/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 = "ProductBiddingCategoryConstantProto"; +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 ProductBiddingCategoryConstant resource. + +// A Product Bidding Category. +message ProductBiddingCategoryConstant { + // 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; + + // 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; + + // Two-letter upper-case country code of the product bidding category. + google.protobuf.StringValue country_code = 3; + + // Resource name of the parent product bidding category. + google.protobuf.StringValue product_bidding_category_constant_parent = 4; + + // Level of the product bidding category. + google.ads.googleads.v2.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 5; + + // Status of the product bidding category. + google.ads.googleads.v2.enums.ProductBiddingCategoryStatusEnum.ProductBiddingCategoryStatus status = 6; + + // Language code of the product bidding category. + google.protobuf.StringValue language_code = 7; + + // Display value of the product bidding category localized according to + // language_code. + google.protobuf.StringValue localized_name = 8; +} diff --git a/google/ads/googleads/v2/resources/product_group_view.proto b/google/ads/googleads/v2/resources/product_group_view.proto new file mode 100644 index 000000000..d9965d327 --- /dev/null +++ b/google/ads/googleads/v2/resources/product_group_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "ProductGroupViewProto"; +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 ProductGroup View resource. + +// A product group view. +message ProductGroupView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/recommendation.proto b/google/ads/googleads/v2/resources/recommendation.proto new file mode 100644 index 000000000..55f7b56b3 --- /dev/null +++ b/google/ads/googleads/v2/resources/recommendation.proto @@ -0,0 +1,293 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/common/extensions.proto"; +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/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 = "RecommendationProto"; +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 Recommendation resource. + +// A recommendation. +message 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; + + // Estimated metrics if the recommendation is applied. + RecommendationMetrics potential_metrics = 2; + } + + // 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; + + // Number of ad clicks. + google.protobuf.DoubleValue clicks = 2; + + // Cost (in micros) for advertising, in the local currency for the account. + google.protobuf.Int64Value cost_micros = 3; + + // Number of conversions. + google.protobuf.DoubleValue conversions = 4; + + // Number of video views for a video ad campaign. + google.protobuf.DoubleValue video_views = 5; + } + + // 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; + + // The impact estimate if budget is changed to amount specified in this + // option. + RecommendationImpact impact = 2; + } + + // The current budget amount in micros. + google.protobuf.Int64Value current_budget_amount_micros = 1; + + // The recommended budget amount in micros. + google.protobuf.Int64Value recommended_budget_amount_micros = 2; + + // The budget amounts and associated impact estimates for some values of + // possible budget amounts. + repeated CampaignBudgetRecommendationOption budget_options = 3; + } + + // 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 { + + } + + // The move unused budget recommendation. + message MoveUnusedBudgetRecommendation { + // The excess budget's resource_name. + google.protobuf.StringValue excess_campaign_budget = 1; + + // The recommendation for the constrained budget to increase. + CampaignBudgetRecommendation budget_recommendation = 2; + } + + // The text ad recommendation. + message TextAdRecommendation { + // Recommended ad. + Ad ad = 1; + + // Creation date of the recommended ad. + // YYYY-MM-DD format, e.g., 2018-04-17. + google.protobuf.StringValue creation_date = 2; + + // 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; + } + + // 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; + + // Average CPA target. + google.protobuf.Int64Value target_cpa_micros = 2; + + // 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; + + // The impact estimate if this option is selected. + RecommendationImpact impact = 4; + } + + // The available goals and corresponding options for Target CPA strategy. + repeated TargetCpaOptInRecommendationOption options = 1; + + // 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; + } + + // The Maximize Conversions Opt-In recommendation. + message MaximizeConversionsOptInRecommendation { + // The recommended new budget amount. + google.protobuf.Int64Value recommended_budget_amount_micros = 1; + } + + // The Enhanced Cost-Per-Click Opt-In recommendation. + message EnhancedCpcOptInRecommendation { + + } + + // 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 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 Sitelink extension recommendation. + message SitelinkExtensionRecommendation { + // Sitelink extensions recommended to be added. + repeated google.ads.googleads.v2.common.SitelinkFeedItem recommended_extensions = 1; + } + + // 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. + // + // `customers/{customer_id}/recommendations/{recommendation_id}` + string resource_name = 1; + + // The type of recommendation. + google.ads.googleads.v2.enums.RecommendationTypeEnum.RecommendationType type = 2; + + // The impact on account performance as a result of applying the + // recommendation. + RecommendationImpact impact = 3; + + // 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; + + // 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; + + // 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; + + // Whether the recommendation is dismissed or not. + google.protobuf.BoolValue dismissed = 13; + + // The details of recommendation. + oneof recommendation { + // The campaign budget recommendation. + CampaignBudgetRecommendation campaign_budget_recommendation = 4; + + // The keyword recommendation. + KeywordRecommendation keyword_recommendation = 8; + + // Add expanded text ad recommendation. + TextAdRecommendation text_ad_recommendation = 9; + + // The TargetCPA opt-in recommendation. + TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10; + + // The MaximizeConversions Opt-In recommendation. + MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11; + + // The Enhanced Cost-Per-Click Opt-In recommendation. + EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12; + + // The Search Partners Opt-In recommendation. + SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14; + + // The MaximizeClicks Opt-In recommendation. + MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15; + + // The Optimize Ad Rotation recommendation. + OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16; + + // The Callout extension recommendation. + CalloutExtensionRecommendation callout_extension_recommendation = 17; + + // The Sitelink extension recommendation. + SitelinkExtensionRecommendation sitelink_extension_recommendation = 18; + + // The Call extension recommendation. + CallExtensionRecommendation call_extension_recommendation = 19; + + // The keyword match type recommendation. + KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20; + + // The move unused budget recommendation. + MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21; + } +} diff --git a/google/ads/googleads/v2/resources/remarketing_action.proto b/google/ads/googleads/v2/resources/remarketing_action.proto new file mode 100644 index 000000000..b5f30a8db --- /dev/null +++ b/google/ads/googleads/v2/resources/remarketing_action.proto @@ -0,0 +1,56 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/tag_snippet.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 = "RemarketingActionProto"; +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 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 { + // 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; + + // Id of the remarketing action. + google.protobuf.Int64Value id = 2; + + // 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; + + // The snippets used for tracking remarketing actions. + repeated google.ads.googleads.v2.common.TagSnippet tag_snippets = 4; +} diff --git a/google/ads/googleads/v2/resources/search_term_view.proto b/google/ads/googleads/v2/resources/search_term_view.proto new file mode 100644 index 000000000..bbeb1f97e --- /dev/null +++ b/google/ads/googleads/v2/resources/search_term_view.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.ads.googleads.v2.resources; + +import "google/ads/googleads/v2/enums/search_term_targeting_status.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 = "SearchTermViewProto"; +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 SearchTermView resource. + +// 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. + // 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; + + // The search term. + google.protobuf.StringValue search_term = 2; + + // The ad group the search term served in. + google.protobuf.StringValue ad_group = 3; + + // Indicates whether the search term is currently one of your + // targeted or excluded keywords. + google.ads.googleads.v2.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus status = 4; +} diff --git a/google/ads/googleads/v2/resources/shared_criterion.proto b/google/ads/googleads/v2/resources/shared_criterion.proto new file mode 100644 index 000000000..954d48bbd --- /dev/null +++ b/google/ads/googleads/v2/resources/shared_criterion.proto @@ -0,0 +1,77 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/criteria.proto"; +import "google/ads/googleads/v2/enums/criterion_type.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 = "SharedCriterionProto"; +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 SharedCriterion resource. + +// A criterion belonging to a shared set. +message SharedCriterion { + // 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; + + // The shared set to which the shared criterion belongs. + google.protobuf.StringValue shared_set = 2; + + // The ID of the criterion. + // + // This field is ignored for mutates. + google.protobuf.Int64Value criterion_id = 26; + + // The type of the criterion. + google.ads.googleads.v2.enums.CriterionTypeEnum.CriterionType type = 4; + + // The criterion. + // + // Exactly one must be set. + oneof criterion { + // Keyword. + google.ads.googleads.v2.common.KeywordInfo keyword = 3; + + // YouTube Video. + google.ads.googleads.v2.common.YouTubeVideoInfo youtube_video = 5; + + // YouTube Channel. + google.ads.googleads.v2.common.YouTubeChannelInfo youtube_channel = 6; + + // Placement. + google.ads.googleads.v2.common.PlacementInfo placement = 7; + + // Mobile App Category. + google.ads.googleads.v2.common.MobileAppCategoryInfo mobile_app_category = 8; + + // Mobile application. + google.ads.googleads.v2.common.MobileApplicationInfo mobile_application = 9; + } +} diff --git a/google/ads/googleads/v2/resources/shared_set.proto b/google/ads/googleads/v2/resources/shared_set.proto new file mode 100644 index 000000000..027cbcfba --- /dev/null +++ b/google/ads/googleads/v2/resources/shared_set.proto @@ -0,0 +1,67 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/enums/shared_set_status.proto"; +import "google/ads/googleads/v2/enums/shared_set_type.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 = "SharedSetProto"; +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 SharedSet resource. + +// SharedSets are used for sharing criterion exclusions across multiple +// campaigns. +message SharedSet { + // 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; + + // The ID of this shared set. Read only. + google.protobuf.Int64Value id = 2; + + // 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; + + // 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; + + // The status of this shared set. Read only. + google.ads.googleads.v2.enums.SharedSetStatusEnum.SharedSetStatus status = 5; + + // The number of shared criteria within this shared set. Read only. + google.protobuf.Int64Value member_count = 6; + + // The number of campaigns associated with this shared set. Read only. + google.protobuf.Int64Value reference_count = 7; +} diff --git a/google/ads/googleads/v2/resources/shopping_performance_view.proto b/google/ads/googleads/v2/resources/shopping_performance_view.proto new file mode 100644 index 000000000..ed5744580 --- /dev/null +++ b/google/ads/googleads/v2/resources/shopping_performance_view.proto @@ -0,0 +1,44 @@ +// 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.v2.resources; + +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 = "ShoppingPerformanceViewProto"; +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 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 { + // The resource name of the Shopping performance view. + // Shopping performance view resource names have the form: + // `customers/{customer_id}/shoppingPerformanceView` + string resource_name = 1; +} diff --git a/google/ads/googleads/v2/resources/topic_constant.proto b/google/ads/googleads/v2/resources/topic_constant.proto new file mode 100644 index 000000000..d0ba4a459 --- /dev/null +++ b/google/ads/googleads/v2/resources/topic_constant.proto @@ -0,0 +1,56 @@ +// 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.v2.resources; + +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 = "TopicConstantProto"; +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 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 { + // The resource name of the topic constant. + // topic constant resource names have the form: + // + // `topicConstants/{topic_id}` + string resource_name = 1; + + // The ID of the topic. + google.protobuf.Int64Value id = 2; + + // Resource name of parent of the topic constant. + google.protobuf.StringValue topic_constant_parent = 3; + + // 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; +} diff --git a/google/ads/googleads/v2/resources/topic_view.proto b/google/ads/googleads/v2/resources/topic_view.proto new file mode 100644 index 000000000..747500139 --- /dev/null +++ b/google/ads/googleads/v2/resources/topic_view.proto @@ -0,0 +1,40 @@ +// 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.v2.resources; + +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 = "TopicViewProto"; +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 topic view resource. + +// A topic view. +message TopicView { + // 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; +} diff --git a/google/ads/googleads/v2/resources/user_interest.proto b/google/ads/googleads/v2/resources/user_interest.proto new file mode 100644 index 000000000..c956e28a0 --- /dev/null +++ b/google/ads/googleads/v2/resources/user_interest.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.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/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 = "UserInterestProto"; +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 User Interest resource. + +// A user interest: a particular interest-based vertical to be targeted. +message UserInterest { + // 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; + + // Taxonomy type of the user interest. + google.ads.googleads.v2.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType taxonomy_type = 2; + + // The ID of the user interest. + google.protobuf.Int64Value user_interest_id = 3; + + // The name of the user interest. + google.protobuf.StringValue name = 4; + + // The parent of the user interest. + google.protobuf.StringValue user_interest_parent = 5; + + // True if the user interest is launched to all channels and locales. + google.protobuf.BoolValue launched_to_all = 6; + + // Availability information of the user interest. + repeated google.ads.googleads.v2.common.CriterionCategoryAvailability availabilities = 7; +} diff --git a/google/ads/googleads/v2/resources/user_list.proto b/google/ads/googleads/v2/resources/user_list.proto new file mode 100644 index 000000000..9157e4269 --- /dev/null +++ b/google/ads/googleads/v2/resources/user_list.proto @@ -0,0 +1,157 @@ +// 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.v2.resources; + +import "google/ads/googleads/v2/common/user_lists.proto"; +import "google/ads/googleads/v2/enums/access_reason.proto"; +import "google/ads/googleads/v2/enums/user_list_access_status.proto"; +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/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 = "UserListProto"; +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 User List resource. + +// A user list. This is a list of users a customer may target. +message UserList { + // 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; + + // Id of the user list. + google.protobuf.Int64Value id = 2; + + // 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; + + // 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.v2.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; + + // 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; + + // 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; + + // 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; + + // 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; + + // Type of this list. + // + // This field is read-only. + google.ads.googleads.v2.enums.UserListTypeEnum.UserListType type = 13; + + // 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. + // The reason can be SHARED, OWNED, LICENSED or SUBSCRIBED. + // + // This field is read-only. + google.ads.googleads.v2.enums.AccessReasonEnum.AccessReason access_reason = 15; + + // 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.v2.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. + // + // This field is read-only. + google.protobuf.BoolValue eligible_for_display = 18; + + // The user list. + // + // Exactly one must be set. + oneof user_list { + // 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. + // These lists are readonly and automatically created by google. + google.ads.googleads.v2.common.SimilarUserListInfo similar_user_list = 20; + + // User list generated by a rule. + google.ads.googleads.v2.common.RuleBasedUserListInfo rule_based_user_list = 21; + + // User list that is a custom combination of user lists and user interests. + google.ads.googleads.v2.common.LogicalUserListInfo logical_user_list = 22; + + // User list targeting as a collection of conversion or remarketing actions. + google.ads.googleads.v2.common.BasicUserListInfo basic_user_list = 23; + } +} diff --git a/google/ads/googleads/v2/resources/user_location_view.proto b/google/ads/googleads/v2/resources/user_location_view.proto new file mode 100644 index 000000000..a99de5e59 --- /dev/null +++ b/google/ads/googleads/v2/resources/user_location_view.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.ads.googleads.v2.resources; + +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 = "UserLocationViewProto"; +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 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 { + // 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; +} diff --git a/google/ads/googleads/v2/resources/video.proto b/google/ads/googleads/v2/resources/video.proto new file mode 100644 index 000000000..de05bc4c3 --- /dev/null +++ b/google/ads/googleads/v2/resources/video.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.ads.googleads.v2.resources; + +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 = "VideoProto"; +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 video resource. + +// A video. +message Video { + // The resource name of the video. + // Video resource names have the form: + // + // `customers/{customer_id}/videos/{video_id}` + string resource_name = 1; + + // The ID of the video. + google.protobuf.StringValue id = 2; + + // The owner channel id of the video. + google.protobuf.StringValue channel_id = 3; + + // The duration of the video in milliseconds. + google.protobuf.Int64Value duration_millis = 4; + + // The title of the video. + google.protobuf.StringValue title = 5; +} diff --git a/google/ads/googleads/v2/services/account_budget_proposal_service.proto b/google/ads/googleads/v2/services/account_budget_proposal_service.proto new file mode 100644 index 000000000..5b47c06d6 --- /dev/null +++ b/google/ads/googleads/v2/services/account_budget_proposal_service.proto @@ -0,0 +1,129 @@ +// 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.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"; + +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 = "AccountBudgetProposalServiceProto"; +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 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.v2.resources.AccountBudgetProposal) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/accountBudgetProposals/*}" + }; + } + + // Creates, updates, or removes account budget proposals. Operation statuses + // are returned. + rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/accountBudgetProposals:mutate" + body: "*" + }; + } +} + +// 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; +} + +// Request message for +// [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v2.services.AccountBudgetProposalService.MutateAccountBudgetProposal]. +message MutateAccountBudgetProposalRequest { + // The ID of the customer. + string customer_id = 1; + + // The operation to perform on an individual account-level budget proposal. + AccountBudgetProposalOperation operation = 2; + + // 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.v2.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/v2/services/account_budget_service.proto b/google/ads/googleads/v2/services/account_budget_service.proto new file mode 100644 index 000000000..f793c5129 --- /dev/null +++ b/google/ads/googleads/v2/services/account_budget_service.proto @@ -0,0 +1,54 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/account_budget.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AccountBudgetServiceProto"; +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 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.v2.resources.AccountBudget) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/accountBudgets/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..1ddcf83df --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_ad_asset_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdAssetViewServiceProto"; +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 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.v2.resources.AdGroupAdAssetView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupAdAssetViews/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..044f7bb12 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_ad_label_service.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.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"; + +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 = "AdGroupAdLabelServiceProto"; +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 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.v2.resources.AdGroupAdLabel) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupAdLabels/*}" + }; + } + + // Creates and removes ad group ad labels. + // Operation statuses are returned. + rpc MutateAdGroupAdLabels(MutateAdGroupAdLabelsRequest) returns (MutateAdGroupAdLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupAdLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group ad labels. + repeated AdGroupAdLabelOperation operations = 2; + + // 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.v2.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/v2/services/ad_group_ad_service.proto b/google/ads/googleads/v2/services/ad_group_ad_service.proto new file mode 100644 index 000000000..852de5c5e --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_ad_service.proto @@ -0,0 +1,123 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAdServiceProto"; +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 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.v2.resources.AdGroupAd) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupAds/*}" + }; + } + + // Creates, updates, or removes ads. Operation statuses are returned. + rpc MutateAdGroupAds(MutateAdGroupAdsRequest) returns (MutateAdGroupAdsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupAds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ads. + repeated AdGroupAdOperation operations = 2; + + // 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.v2.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.v2.resources.AdGroupAd create = 1; + + // Update operation: The ad is expected to have a valid resource name. + google.ads.googleads.v2.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/v2/services/ad_group_audience_view_service.proto b/google/ads/googleads/v2/services/ad_group_audience_view_service.proto new file mode 100644 index 000000000..d07da3d9e --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_audience_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_audience_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupAudienceViewServiceProto"; +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 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.v2.resources.AdGroupAudienceView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupAudienceViews/*}" + }; + } +} + +// Request message for [AdGroupAudienceViewService.GetAdGoupAudienceView][]. +message GetAdGroupAudienceViewRequest { + // The resource name of the ad group audience view to fetch. + string resource_name = 1; +} 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 new file mode 100644 index 000000000..9a7327d59 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto @@ -0,0 +1,122 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_bid_modifier.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupBidModifierServiceProto"; +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 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.v2.resources.AdGroupBidModifier) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupBidModifiers/*}" + }; + } + + // Creates, updates, or removes ad group bid modifiers. + // Operation statuses are returned. + rpc MutateAdGroupBidModifiers(MutateAdGroupBidModifiersRequest) returns (MutateAdGroupBidModifiersResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupBidModifiers:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad group bid modifiers. + repeated AdGroupBidModifierOperation operations = 2; + + // 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.v2.resources.AdGroupBidModifier create = 1; + + // Update operation: The ad group bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/ad_group_criterion_label_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto new file mode 100644 index 000000000..c64db682d --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_criterion_label_service.proto @@ -0,0 +1,116 @@ +// 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.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"; + +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 = "AdGroupCriterionLabelServiceProto"; +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 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.v2.resources.AdGroupCriterionLabel) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupCriterionLabels/*}" + }; + } + + // Creates and removes ad group criterion labels. + // Operation statuses are returned. + rpc MutateAdGroupCriterionLabels(MutateAdGroupCriterionLabelsRequest) returns (MutateAdGroupCriterionLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupCriterionLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group criterion labels. + repeated AdGroupCriterionLabelOperation operations = 2; + + // 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.v2.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/v2/services/ad_group_criterion_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_service.proto new file mode 100644 index 000000000..bb0c2f887 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_criterion_service.proto @@ -0,0 +1,132 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupCriterionServiceProto"; +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 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.v2.resources.AdGroupCriterion) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupCriteria/*}" + }; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest) returns (MutateAdGroupCriteriaResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated AdGroupCriterionOperation operations = 2; + + // 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.v2.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.v2.resources.AdGroupCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/ad_group_criterion_simulation_service.proto b/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.proto new file mode 100644 index 000000000..c407a2a51 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_criterion_simulation_service.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.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"; + +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 = "AdGroupCriterionSimulationServiceProto"; +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 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.v2.resources.AdGroupCriterionSimulation) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupCriterionSimulations/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..87f6b7e8f --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_extension_setting_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_extension_setting.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupExtensionSettingServiceProto"; +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 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.v2.resources.AdGroupExtensionSetting) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupExtensionSettings/*}" + }; + } + + // Creates, updates, or removes ad group extension settings. Operation + // statuses are returned. + rpc MutateAdGroupExtensionSettings(MutateAdGroupExtensionSettingsRequest) returns (MutateAdGroupExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual ad group extension + // settings. + repeated AdGroupExtensionSettingOperation operations = 2; + + // 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.v2.resources.AdGroupExtensionSetting create = 1; + + // Update operation: The ad group extension setting is expected to have a + // valid resource name. + google.ads.googleads.v2.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/v2/services/ad_group_feed_service.proto b/google/ads/googleads/v2/services/ad_group_feed_service.proto new file mode 100644 index 000000000..15c07d433 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_feed_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_feed.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupFeedServiceProto"; +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 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.v2.resources.AdGroupFeed) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupFeeds/*}" + }; + } + + // Creates, updates, or removes ad group feeds. Operation statuses are + // returned. + rpc MutateAdGroupFeeds(MutateAdGroupFeedsRequest) returns (MutateAdGroupFeedsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad group feeds. + repeated AdGroupFeedOperation operations = 2; + + // 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.v2.resources.AdGroupFeed create = 1; + + // Update operation: The ad group feed is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/ad_group_label_service.proto b/google/ads/googleads/v2/services/ad_group_label_service.proto new file mode 100644 index 000000000..de6481451 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_label_service.proto @@ -0,0 +1,114 @@ +// 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.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"; + +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 = "AdGroupLabelServiceProto"; +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 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.v2.resources.AdGroupLabel) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupLabels/*}" + }; + } + + // Creates and removes ad group labels. + // Operation statuses are returned. + rpc MutateAdGroupLabels(MutateAdGroupLabelsRequest) returns (MutateAdGroupLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroupLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on ad group labels. + repeated AdGroupLabelOperation operations = 2; + + // 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.v2.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/v2/services/ad_group_service.proto b/google/ads/googleads/v2/services/ad_group_service.proto new file mode 100644 index 000000000..3d01e537d --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/ad_group.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupServiceProto"; +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 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.v2.resources.AdGroup) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroups/*}" + }; + } + + // Creates, updates, or removes ad groups. Operation statuses are returned. + rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adGroups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad groups. + repeated AdGroupOperation operations = 2; + + // 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.v2.resources.AdGroup create = 1; + + // Update operation: The ad group is expected to have a valid resource name. + google.ads.googleads.v2.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/v2/services/ad_group_simulation_service.proto b/google/ads/googleads/v2/services/ad_group_simulation_service.proto new file mode 100644 index 000000000..cfebaab16 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_group_simulation_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_group_simulation.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdGroupSimulationServiceProto"; +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 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.v2.resources.AdGroupSimulation) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adGroupSimulations/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/ad_parameter_service.proto b/google/ads/googleads/v2/services/ad_parameter_service.proto new file mode 100644 index 000000000..2993711b9 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_parameter_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_parameter.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdParameterServiceProto"; +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 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.v2.resources.AdParameter) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adParameters/*}" + }; + } + + // Creates, updates, or removes ad parameters. Operation statuses are + // returned. + rpc MutateAdParameters(MutateAdParametersRequest) returns (MutateAdParametersResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/adParameters:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ad parameters. + repeated AdParameterOperation operations = 2; + + // 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.v2.resources.AdParameter create = 1; + + // Update operation: The ad parameter is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/ad_schedule_view_service.proto b/google/ads/googleads/v2/services/ad_schedule_view_service.proto new file mode 100644 index 000000000..465f25a01 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_schedule_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/ad_schedule_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AdScheduleViewServiceProto"; +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 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.v2.resources.AdScheduleView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/adScheduleViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/ad_service.proto b/google/ads/googleads/v2/services/ad_service.proto new file mode 100644 index 000000000..9f764d7c7 --- /dev/null +++ b/google/ads/googleads/v2/services/ad_service.proto @@ -0,0 +1,96 @@ +// 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.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"; + +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 = "AdServiceProto"; +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 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.v2.resources.Ad) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/ads/*}" + }; + } + + // Updates ads. Operation statuses are returned. + rpc MutateAds(MutateAdsRequest) returns (MutateAdsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/ads:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual ads. + repeated AdOperation operations = 2; +} + +// 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.v2.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/v2/services/age_range_view_service.proto b/google/ads/googleads/v2/services/age_range_view_service.proto new file mode 100644 index 000000000..5db684b06 --- /dev/null +++ b/google/ads/googleads/v2/services/age_range_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/age_range_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeViewServiceProto"; +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 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.v2.resources.AgeRangeView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/ageRangeViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/asset_service.proto b/google/ads/googleads/v2/services/asset_service.proto new file mode 100644 index 000000000..394c52b2d --- /dev/null +++ b/google/ads/googleads/v2/services/asset_service.proto @@ -0,0 +1,93 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/asset.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +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 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.v2.resources.Asset) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/assets/*}" + }; + } + + // Creates assets. Operation statuses are returned. + rpc MutateAssets(MutateAssetsRequest) returns (MutateAssetsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/assets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual assets. + repeated AssetOperation operations = 2; +} + +// A single operation to create an asset. Supported asset types are +// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. 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.v2.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/v2/services/bidding_strategy_service.proto b/google/ads/googleads/v2/services/bidding_strategy_service.proto new file mode 100644 index 000000000..74af8c08d --- /dev/null +++ b/google/ads/googleads/v2/services/bidding_strategy_service.proto @@ -0,0 +1,122 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/bidding_strategy.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "BiddingStrategyServiceProto"; +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 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.v2.resources.BiddingStrategy) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/biddingStrategies/*}" + }; + } + + // Creates, updates, or removes bidding strategies. Operation statuses are + // returned. + rpc MutateBiddingStrategies(MutateBiddingStrategiesRequest) returns (MutateBiddingStrategiesResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/biddingStrategies:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual bidding strategies. + repeated BiddingStrategyOperation operations = 2; + + // 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.v2.resources.BiddingStrategy create = 1; + + // Update operation: The bidding strategy is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/billing_setup_service.proto b/google/ads/googleads/v2/services/billing_setup_service.proto new file mode 100644 index 000000000..abec2596a --- /dev/null +++ b/google/ads/googleads/v2/services/billing_setup_service.proto @@ -0,0 +1,107 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/billing_setup.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "BillingSetupServiceProto"; +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 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.v2.resources.BillingSetup) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/billingSetups/*}" + }; + } + + // Creates a billing setup, or cancels an existing billing setup. + rpc MutateBillingSetup(MutateBillingSetupRequest) returns (MutateBillingSetupResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/billingSetups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform. + BillingSetupOperation operation = 2; +} + +// 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.v2.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/v2/services/campaign_audience_view_service.proto b/google/ads/googleads/v2/services/campaign_audience_view_service.proto new file mode 100644 index 000000000..410da40a2 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_audience_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_audience_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignAudienceViewServiceProto"; +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 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.v2.resources.CampaignAudienceView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignAudienceViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto b/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto new file mode 100644 index 000000000..3ed35d600 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_bid_modifier_service.proto @@ -0,0 +1,122 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_bid_modifier.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBidModifierServiceProto"; +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 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.v2.resources.CampaignBidModifier) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignBidModifiers/*}" + }; + } + + // Creates, updates, or removes campaign bid modifiers. + // Operation statuses are returned. + rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest) returns (MutateCampaignBidModifiersResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignBidModifiers:mutate" + body: "*" + }; + } +} + +// 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; +} + +// Request message for [CampaignBidModifierService.MutateCampaignBidModifier][]. +message MutateCampaignBidModifiersRequest { + // ID of the customer whose campaign bid modifiers are being modified. + string customer_id = 1; + + // The list of operations to perform on individual campaign bid modifiers. + repeated CampaignBidModifierOperation operations = 2; + + // 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.v2.resources.CampaignBidModifier create = 1; + + // Update operation: The campaign bid modifier is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/campaign_budget_service.proto b/google/ads/googleads/v2/services/campaign_budget_service.proto new file mode 100644 index 000000000..a9171c897 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_budget_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_budget.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignBudgetServiceProto"; +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 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.v2.resources.CampaignBudget) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignBudgets/*}" + }; + } + + // Creates, updates, or removes campaign budgets. Operation statuses are + // returned. + rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest) returns (MutateCampaignBudgetsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignBudgets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign budgets. + repeated CampaignBudgetOperation operations = 2; + + // 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.v2.resources.CampaignBudget create = 1; + + // Update operation: The campaign budget is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/campaign_criterion_service.proto b/google/ads/googleads/v2/services/campaign_criterion_service.proto new file mode 100644 index 000000000..ae4c60080 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_criterion_service.proto @@ -0,0 +1,120 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_criterion.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionServiceProto"; +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 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.v2.resources.CampaignCriterion) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignCriteria/*}" + }; + } + + // Creates, updates, or removes criteria. Operation statuses are returned. + rpc MutateCampaignCriteria(MutateCampaignCriteriaRequest) returns (MutateCampaignCriteriaResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated CampaignCriterionOperation operations = 2; + + // 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.v2.resources.CampaignCriterion create = 1; + + // Update operation: The criterion is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/campaign_criterion_simulation_service.proto b/google/ads/googleads/v2/services/campaign_criterion_simulation_service.proto new file mode 100644 index 000000000..2c7e8dd72 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_criterion_simulation_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/campaign_criterion_simulation.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignCriterionSimulationServiceProto"; +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 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.v2.resources.CampaignCriterionSimulation) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignCriterionSimulations/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/campaign_draft_service.proto b/google/ads/googleads/v2/services/campaign_draft_service.proto new file mode 100644 index 000000000..bd0b6cb0d --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_draft_service.proto @@ -0,0 +1,183 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_draft.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignDraftServiceProto"; +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 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.v2.resources.CampaignDraft) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignDrafts/*}" + }; + } + + // Creates, updates, or removes campaign drafts. Operation statuses are + // returned. + rpc MutateCampaignDrafts(MutateCampaignDraftsRequest) returns (MutateCampaignDraftsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignDrafts:mutate" + body: "*" + }; + } + + // 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.v2.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of + // error reasons. + rpc PromoteCampaignDraft(PromoteCampaignDraftRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{campaign_draft=customers/*/campaignDrafts/*}:promote" + body: "*" + }; + } + + // 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: "/v2/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign drafts. + repeated CampaignDraftOperation operations = 2; + + // 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.v2.services.CampaignDraftService.PromoteCampaignDraft]. +message PromoteCampaignDraftRequest { + // The resource name of the campaign draft to promote. + string campaign_draft = 1; +} + +// 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.v2.resources.CampaignDraft create = 1; + + // Update operation: The campaign draft is expected to have a valid + // resource name. + google.ads.googleads.v2.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.v2.services.CampaignDraftService.ListCampaignDraftAsyncErrors]. +message ListCampaignDraftAsyncErrorsRequest { + // The name of the campaign draft from which to retrieve the async errors. + string resource_name = 1; + + // 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.v2.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/v2/services/campaign_experiment_service.proto b/google/ads/googleads/v2/services/campaign_experiment_service.proto new file mode 100644 index 000000000..8707bece2 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_experiment_service.proto @@ -0,0 +1,267 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_experiment.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExperimentServiceProto"; +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 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.v2.resources.CampaignExperiment) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignExperiments/*}" + }; + } + + // 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: "/v2/customers/{customer_id=*}/campaignExperiments:create" + body: "*" + }; + } + + // Updates campaign experiments. Operation statuses are returned. + rpc MutateCampaignExperiments(MutateCampaignExperimentsRequest) returns (MutateCampaignExperimentsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignExperiments:mutate" + body: "*" + }; + } + + // 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: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:graduate" + body: "*" + }; + } + + // 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: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:promote" + body: "*" + }; + } + + // 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: "/v2/{campaign_experiment=customers/*/campaignExperiments/*}:end" + body: "*" + }; + } + + // 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: "/v2/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign experiments. + repeated CampaignExperimentOperation operations = 2; + + // 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.v2.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.v2.services.CampaignExperimentService.CreateCampaignExperiment]. +message CreateCampaignExperimentRequest { + // The ID of the customer whose campaign experiment is being created. + string customer_id = 1; + + // The campaign experiment to be created. + google.ads.googleads.v2.resources.CampaignExperiment campaign_experiment = 2; + + // 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.v2.services.CampaignExperimentService.GraduateCampaignExperiment]. +message GraduateCampaignExperimentRequest { + // The resource name of the campaign experiment to graduate. + string campaign_experiment = 1; + + // Resource name of the budget to attach to the campaign graduated from the + // experiment. + string campaign_budget = 2; +} + +// 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.v2.services.CampaignExperimentService.PromoteCampaignExperiment]. +message PromoteCampaignExperimentRequest { + // The resource name of the campaign experiment to promote. + string campaign_experiment = 1; +} + +// 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; +} + +// 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 + // errors. + string resource_name = 1; + + // 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.v2.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/v2/services/campaign_extension_setting_service.proto b/google/ads/googleads/v2/services/campaign_extension_setting_service.proto new file mode 100644 index 000000000..39f9221c2 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_extension_setting_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/campaign_extension_setting.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignExtensionSettingServiceProto"; +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 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.v2.resources.CampaignExtensionSetting) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignExtensionSettings/*}" + }; + } + + // Creates, updates, or removes campaign extension settings. Operation + // statuses are returned. + rpc MutateCampaignExtensionSettings(MutateCampaignExtensionSettingsRequest) returns (MutateCampaignExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual campaign extension + // settings. + repeated CampaignExtensionSettingOperation operations = 2; + + // 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.v2.resources.CampaignExtensionSetting create = 1; + + // Update operation: The campaign extension setting is expected to have a + // valid resource name. + google.ads.googleads.v2.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/v2/services/campaign_feed_service.proto b/google/ads/googleads/v2/services/campaign_feed_service.proto new file mode 100644 index 000000000..6cc483ea6 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_feed_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign_feed.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignFeedServiceProto"; +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 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.v2.resources.CampaignFeed) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignFeeds/*}" + }; + } + + // Creates, updates, or removes campaign feeds. Operation statuses are + // returned. + rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) returns (MutateCampaignFeedsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign feeds. + repeated CampaignFeedOperation operations = 2; + + // 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.v2.resources.CampaignFeed create = 1; + + // Update operation: The campaign feed is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/campaign_label_service.proto b/google/ads/googleads/v2/services/campaign_label_service.proto new file mode 100644 index 000000000..b08184df8 --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_label_service.proto @@ -0,0 +1,114 @@ +// 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.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"; + +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 = "CampaignLabelServiceProto"; +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 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.v2.resources.CampaignLabel) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignLabels/*}" + }; + } + + // Creates and removes campaign-label relationships. + // Operation statuses are returned. + rpc MutateCampaignLabels(MutateCampaignLabelsRequest) returns (MutateCampaignLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on campaign-label relationships. + repeated CampaignLabelOperation operations = 2; + + // 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.v2.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/v2/services/campaign_service.proto b/google/ads/googleads/v2/services/campaign_service.proto new file mode 100644 index 000000000..d972fa6cd --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_service.proto @@ -0,0 +1,120 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/campaign.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CampaignServiceProto"; +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 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.v2.resources.Campaign) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaigns/*}" + }; + } + + // Creates, updates, or removes campaigns. Operation statuses are returned. + rpc MutateCampaigns(MutateCampaignsRequest) returns (MutateCampaignsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaigns:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaigns. + repeated CampaignOperation operations = 2; + + // 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.v2.resources.Campaign create = 1; + + // Update operation: The campaign is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/campaign_shared_set_service.proto b/google/ads/googleads/v2/services/campaign_shared_set_service.proto new file mode 100644 index 000000000..9e358599c --- /dev/null +++ b/google/ads/googleads/v2/services/campaign_shared_set_service.proto @@ -0,0 +1,113 @@ +// 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.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"; + +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 = "CampaignSharedSetServiceProto"; +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 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.v2.resources.CampaignSharedSet) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/campaignSharedSets/*}" + }; + } + + // Creates or removes campaign shared sets. Operation statuses are returned. + rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest) returns (MutateCampaignSharedSetsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/campaignSharedSets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual campaign shared sets. + repeated CampaignSharedSetOperation operations = 2; + + // 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.v2.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/v2/services/carrier_constant_service.proto b/google/ads/googleads/v2/services/carrier_constant_service.proto new file mode 100644 index 000000000..20cc19c9a --- /dev/null +++ b/google/ads/googleads/v2/services/carrier_constant_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/carrier_constant.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CarrierConstantServiceProto"; +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 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.v2.resources.CarrierConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=carrierConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/change_status_service.proto b/google/ads/googleads/v2/services/change_status_service.proto new file mode 100644 index 000000000..29014b304 --- /dev/null +++ b/google/ads/googleads/v2/services/change_status_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/change_status.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ChangeStatusServiceProto"; +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 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.v2.resources.ChangeStatus) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/changeStatus/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/click_view_service.proto b/google/ads/googleads/v2/services/click_view_service.proto new file mode 100644 index 000000000..f6a68b142 --- /dev/null +++ b/google/ads/googleads/v2/services/click_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/click_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ClickViewServiceProto"; +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 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.v2.resources.ClickView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/clickViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/conversion_action_service.proto b/google/ads/googleads/v2/services/conversion_action_service.proto new file mode 100644 index 000000000..d056d551d --- /dev/null +++ b/google/ads/googleads/v2/services/conversion_action_service.proto @@ -0,0 +1,122 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/conversion_action.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionActionServiceProto"; +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 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.v2.resources.ConversionAction) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/conversionActions/*}" + }; + } + + // Creates, updates or removes conversion actions. Operation statuses are + // returned. + rpc MutateConversionActions(MutateConversionActionsRequest) returns (MutateConversionActionsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/conversionActions:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual conversion actions. + repeated ConversionActionOperation operations = 2; + + // 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.v2.resources.ConversionAction create = 1; + + // Update operation: The conversion action is expected to have a valid + // resource name. + google.ads.googleads.v2.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.v2.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/v2/services/conversion_adjustment_upload_service.proto b/google/ads/googleads/v2/services/conversion_adjustment_upload_service.proto new file mode 100644 index 000000000..7b643cfad --- /dev/null +++ b/google/ads/googleads/v2/services/conversion_adjustment_upload_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/enums/conversion_adjustment_type.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionAdjustmentUploadServiceProto"; +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"; + +// 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: "/v2/customers/{customer_id=*}:uploadConversionAdjustments" + body: "*" + }; + } +} + +// 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; + + // The conversion adjustments that are being uploaded. + repeated ConversionAdjustment conversion_adjustments = 2; + + // 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; + + // 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.v2.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.v2.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.v2.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/v2/services/conversion_upload_service.proto b/google/ads/googleads/v2/services/conversion_upload_service.proto new file mode 100644 index 000000000..de70a7909 --- /dev/null +++ b/google/ads/googleads/v2/services/conversion_upload_service.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.googleads.v2.services; + +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ConversionUploadServiceProto"; +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"; + +// 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: "/v2/customers/{customer_id=*}:uploadClickConversions" + body: "*" + }; + } + + // Processes the given call conversions. + rpc UploadCallConversions(UploadCallConversionsRequest) returns (UploadCallConversionsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}:uploadCallConversions" + body: "*" + }; + } +} + +// 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; + + // The conversions that are being uploaded. + repeated ClickConversion conversions = 2; + + // 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; + + // 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.v2.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.v2.services.ConversionUploadService.UploadCallConversions]. +message UploadCallConversionsRequest { + // The ID of the customer performing the upload. + string customer_id = 1; + + // The conversions that are being uploaded. + repeated CallConversion conversions = 2; + + // 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; + + // 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.v2.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/v2/services/custom_interest_service.proto b/google/ads/googleads/v2/services/custom_interest_service.proto new file mode 100644 index 000000000..eef10f29f --- /dev/null +++ b/google/ads/googleads/v2/services/custom_interest_service.proto @@ -0,0 +1,102 @@ +// 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.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"; + +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 = "CustomInterestServiceProto"; +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 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.v2.resources.CustomInterest) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customInterests/*}" + }; + } + + // Creates or updates custom interests. Operation statuses are returned. + rpc MutateCustomInterests(MutateCustomInterestsRequest) returns (MutateCustomInterestsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customInterests:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual custom interests. + repeated CustomInterestOperation operations = 2; + + // 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.v2.resources.CustomInterest create = 1; + + // Update operation: The custom interest is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/customer_client_link_service.proto b/google/ads/googleads/v2/services/customer_client_link_service.proto new file mode 100644 index 000000000..747309999 --- /dev/null +++ b/google/ads/googleads/v2/services/customer_client_link_service.proto @@ -0,0 +1,94 @@ +// 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.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"; + +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 = "CustomerClientLinkServiceProto"; +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"; + +// 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.v2.resources.CustomerClientLink) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerClientLinks/*}" + }; + } + + // Creates or updates a customer client link. Operation statuses are returned. + rpc MutateCustomerClientLink(MutateCustomerClientLinkRequest) returns (MutateCustomerClientLinkResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerClientLinks:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform on the individual CustomerClientLink. + CustomerClientLinkOperation operation = 2; +} + +// 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.v2.resources.CustomerClientLink create = 1; + + // Update operation: The link is expected to have a valid resource name. + google.ads.googleads.v2.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/v2/services/customer_client_service.proto b/google/ads/googleads/v2/services/customer_client_service.proto new file mode 100644 index 000000000..495d8c118 --- /dev/null +++ b/google/ads/googleads/v2/services/customer_client_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/customer_client.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerClientServiceProto"; +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 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.v2.resources.CustomerClient) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerClients/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/customer_extension_setting_service.proto b/google/ads/googleads/v2/services/customer_extension_setting_service.proto new file mode 100644 index 000000000..7dce72c4a --- /dev/null +++ b/google/ads/googleads/v2/services/customer_extension_setting_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/customer_extension_setting.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerExtensionSettingServiceProto"; +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 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.v2.resources.CustomerExtensionSetting) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerExtensionSettings/*}" + }; + } + + // Creates, updates, or removes customer extension settings. Operation + // statuses are returned. + rpc MutateCustomerExtensionSettings(MutateCustomerExtensionSettingsRequest) returns (MutateCustomerExtensionSettingsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerExtensionSettings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual customer extension + // settings. + repeated CustomerExtensionSettingOperation operations = 2; + + // 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.v2.resources.CustomerExtensionSetting create = 1; + + // Update operation: The customer extension setting is expected to have a + // valid resource name. + google.ads.googleads.v2.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/v2/services/customer_feed_service.proto b/google/ads/googleads/v2/services/customer_feed_service.proto new file mode 100644 index 000000000..5cfde1128 --- /dev/null +++ b/google/ads/googleads/v2/services/customer_feed_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/customer_feed.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerFeedServiceProto"; +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 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.v2.resources.CustomerFeed) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerFeeds/*}" + }; + } + + // Creates, updates, or removes customer feeds. Operation statuses are + // returned. + rpc MutateCustomerFeeds(MutateCustomerFeedsRequest) returns (MutateCustomerFeedsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerFeeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual customer feeds. + repeated CustomerFeedOperation operations = 2; + + // 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.v2.resources.CustomerFeed create = 1; + + // Update operation: The customer feed is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/customer_label_service.proto b/google/ads/googleads/v2/services/customer_label_service.proto new file mode 100644 index 000000000..00f8cb254 --- /dev/null +++ b/google/ads/googleads/v2/services/customer_label_service.proto @@ -0,0 +1,114 @@ +// 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.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"; + +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 = "CustomerLabelServiceProto"; +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 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.v2.resources.CustomerLabel) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerLabels/*}" + }; + } + + // Creates and removes customer-label relationships. + // Operation statuses are returned. + rpc MutateCustomerLabels(MutateCustomerLabelsRequest) returns (MutateCustomerLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerLabels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on customer-label relationships. + repeated CustomerLabelOperation operations = 2; + + // 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.v2.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/v2/services/customer_manager_link_service.proto b/google/ads/googleads/v2/services/customer_manager_link_service.proto new file mode 100644 index 000000000..b98cb3df1 --- /dev/null +++ b/google/ads/googleads/v2/services/customer_manager_link_service.proto @@ -0,0 +1,95 @@ +// 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.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"; + +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 = "CustomerManagerLinkServiceProto"; +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"; + +// 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.v2.resources.CustomerManagerLink) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerManagerLinks/*}" + }; + } + + // Creates or updates customer manager links. Operation statuses are returned. + rpc MutateCustomerManagerLink(MutateCustomerManagerLinkRequest) returns (MutateCustomerManagerLinkResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerManagerLinks:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual customer manager links. + repeated CustomerManagerLinkOperation operations = 2; +} + +// 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.v2.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; +} + +// The result for the customer manager link mutate. +message MutateCustomerManagerLinkResult { + // Returned for successful operations. + string resource_name = 1; +} diff --git a/google/ads/googleads/v2/services/customer_negative_criterion_service.proto b/google/ads/googleads/v2/services/customer_negative_criterion_service.proto new file mode 100644 index 000000000..bcd6d2a2d --- /dev/null +++ b/google/ads/googleads/v2/services/customer_negative_criterion_service.proto @@ -0,0 +1,114 @@ +// 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.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"; + +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 = "CustomerNegativeCriterionServiceProto"; +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 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.v2.resources.CustomerNegativeCriterion) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/customerNegativeCriteria/*}" + }; + } + + // Creates or removes criteria. Operation statuses are returned. + rpc MutateCustomerNegativeCriteria(MutateCustomerNegativeCriteriaRequest) returns (MutateCustomerNegativeCriteriaResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/customerNegativeCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual criteria. + repeated CustomerNegativeCriterionOperation operations = 2; + + // 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.v2.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/v2/services/customer_service.proto b/google/ads/googleads/v2/services/customer_service.proto new file mode 100644 index 000000000..beba6c60e --- /dev/null +++ b/google/ads/googleads/v2/services/customer_service.proto @@ -0,0 +1,148 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "CustomerServiceProto"; +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 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.v2.resources.Customer) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*}" + }; + } + + // Updates a customer. Operation statuses are returned. + rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}:mutate" + body: "*" + }; + } + + // Returns resource names of customers directly accessible by the + // user authenticating the call. + rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) { + option (google.api.http) = { + get: "/v2/customers:listAccessibleCustomers" + }; + } + + // Creates a new client under manager. The new client customer is returned. + rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}:createCustomerClient" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The operation to perform on the customer + CustomerOperation operation = 4; + + // 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.v2.services.CustomerService.CreateCustomerClient]. +message CreateCustomerClientRequest { + // The ID of the Manager under whom client customer is being created. + string customer_id = 1; + + // The new client customer to create. The resource name on this customer + // will be ignored. + google.ads.googleads.v2.resources.Customer customer_client = 2; + + // 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.v2.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.v2.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.v2.services.CustomerService.ListAccessibleCustomers]. +message ListAccessibleCustomersRequest { + +} + +// Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v2.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/v2/services/detail_placement_view_service.proto b/google/ads/googleads/v2/services/detail_placement_view_service.proto new file mode 100644 index 000000000..21847c11b --- /dev/null +++ b/google/ads/googleads/v2/services/detail_placement_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/detail_placement_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "DetailPlacementViewServiceProto"; +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 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.v2.resources.DetailPlacementView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/detailPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/display_keyword_view_service.proto b/google/ads/googleads/v2/services/display_keyword_view_service.proto new file mode 100644 index 000000000..22c82bf5f --- /dev/null +++ b/google/ads/googleads/v2/services/display_keyword_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/display_keyword_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "DisplayKeywordViewServiceProto"; +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 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.v2.resources.DisplayKeywordView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/displayKeywordViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/distance_view_service.proto b/google/ads/googleads/v2/services/distance_view_service.proto new file mode 100644 index 000000000..44ffaf91e --- /dev/null +++ b/google/ads/googleads/v2/services/distance_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/distance_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "DistanceViewServiceProto"; +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 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.v2.resources.DistanceView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/distanceViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/domain_category_service.proto b/google/ads/googleads/v2/services/domain_category_service.proto new file mode 100644 index 000000000..eba38c15d --- /dev/null +++ b/google/ads/googleads/v2/services/domain_category_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/domain_category.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "DomainCategoryServiceProto"; +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 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.v2.resources.DomainCategory) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/domainCategories/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..922b7e705 --- /dev/null +++ b/google/ads/googleads/v2/services/dynamic_search_ads_search_term_view_service.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.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"; + +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 = "DynamicSearchAdsSearchTermViewServiceProto"; +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 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.v2.resources.DynamicSearchAdsSearchTermView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/dynamicSearchAdsSearchTermViews/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..96cf5701d --- /dev/null +++ b/google/ads/googleads/v2/services/expanded_landing_page_view_service.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.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"; + +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 = "ExpandedLandingPageViewServiceProto"; +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 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.v2.resources.ExpandedLandingPageView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/expandedLandingPageViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/extension_feed_item_service.proto b/google/ads/googleads/v2/services/extension_feed_item_service.proto new file mode 100644 index 000000000..5a5f65bf6 --- /dev/null +++ b/google/ads/googleads/v2/services/extension_feed_item_service.proto @@ -0,0 +1,123 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/extension_feed_item.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ExtensionFeedItemServiceProto"; +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 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.v2.resources.ExtensionFeedItem) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/extensionFeedItems/*}" + }; + } + + // Creates, updates, or removes extension feed items. Operation + // statuses are returned. + rpc MutateExtensionFeedItems(MutateExtensionFeedItemsRequest) returns (MutateExtensionFeedItemsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/extensionFeedItems:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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 + // modified. + string customer_id = 1; + + // The list of operations to perform on individual extension feed items. + repeated ExtensionFeedItemOperation operations = 2; + + // 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.v2.resources.ExtensionFeedItem create = 1; + + // Update operation: The extension feed item is expected to have a + // valid resource name. + google.ads.googleads.v2.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/v2/services/feed_item_service.proto b/google/ads/googleads/v2/services/feed_item_service.proto new file mode 100644 index 000000000..3387c28f4 --- /dev/null +++ b/google/ads/googleads/v2/services/feed_item_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/feed_item.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemServiceProto"; +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 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.v2.resources.FeedItem) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/feedItems/*}" + }; + } + + // Creates, updates, or removes feed items. Operation statuses are + // returned. + rpc MutateFeedItems(MutateFeedItemsRequest) returns (MutateFeedItemsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/feedItems:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed items. + repeated FeedItemOperation operations = 2; + + // 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.v2.resources.FeedItem create = 1; + + // Update operation: The feed item is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/feed_item_target_service.proto b/google/ads/googleads/v2/services/feed_item_target_service.proto new file mode 100644 index 000000000..33a30f80a --- /dev/null +++ b/google/ads/googleads/v2/services/feed_item_target_service.proto @@ -0,0 +1,96 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/feed_item_target.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "FeedItemTargetServiceProto"; +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 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.v2.resources.FeedItemTarget) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/feedItemTargets/*}" + }; + } + + // Creates or removes feed item targets. Operation statuses are returned. + rpc MutateFeedItemTargets(MutateFeedItemTargetsRequest) returns (MutateFeedItemTargetsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/feedItemTargets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed item targets. + repeated FeedItemTargetOperation operations = 2; +} + +// 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.v2.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/v2/services/feed_mapping_service.proto b/google/ads/googleads/v2/services/feed_mapping_service.proto new file mode 100644 index 000000000..c27fc80a4 --- /dev/null +++ b/google/ads/googleads/v2/services/feed_mapping_service.proto @@ -0,0 +1,113 @@ +// 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.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"; + +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 = "FeedMappingServiceProto"; +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 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.v2.resources.FeedMapping) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/feedMappings/*}" + }; + } + + // Creates or removes feed mappings. Operation statuses are + // returned. + rpc MutateFeedMappings(MutateFeedMappingsRequest) returns (MutateFeedMappingsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/feedMappings:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feed mappings. + repeated FeedMappingOperation operations = 2; + + // 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.v2.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/v2/services/feed_placeholder_view_service.proto b/google/ads/googleads/v2/services/feed_placeholder_view_service.proto new file mode 100644 index 000000000..03f7520b8 --- /dev/null +++ b/google/ads/googleads/v2/services/feed_placeholder_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/feed_placeholder_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "FeedPlaceholderViewServiceProto"; +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 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.v2.resources.FeedPlaceholderView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/feedPlaceholderViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/feed_service.proto b/google/ads/googleads/v2/services/feed_service.proto new file mode 100644 index 000000000..e3f667b64 --- /dev/null +++ b/google/ads/googleads/v2/services/feed_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/feed.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "FeedServiceProto"; +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 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.v2.resources.Feed) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/feeds/*}" + }; + } + + // Creates, updates, or removes feeds. Operation statuses are + // returned. + rpc MutateFeeds(MutateFeedsRequest) returns (MutateFeedsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/feeds:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual feeds. + repeated FeedOperation operations = 2; + + // 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.v2.resources.Feed create = 1; + + // Update operation: The feed is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/gender_view_service.proto b/google/ads/googleads/v2/services/gender_view_service.proto new file mode 100644 index 000000000..7804be7b2 --- /dev/null +++ b/google/ads/googleads/v2/services/gender_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/gender_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "GenderViewServiceProto"; +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 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.v2.resources.GenderView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/genderViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/geo_target_constant_service.proto b/google/ads/googleads/v2/services/geo_target_constant_service.proto new file mode 100644 index 000000000..45e808446 --- /dev/null +++ b/google/ads/googleads/v2/services/geo_target_constant_service.proto @@ -0,0 +1,122 @@ +// 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.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"; + +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 = "GeoTargetConstantServiceProto"; +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 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.v2.resources.GeoTargetConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=geoTargetConstants/*}" + }; + } + + // Returns GeoTargetConstant suggestions by location name or by resource name. + rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) returns (SuggestGeoTargetConstantsResponse) { + option (google.api.http) = { + post: "/v2/geoTargetConstants:suggest" + body: "*" + }; + } +} + +// 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; +} + +// 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.v2.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.v2.resources.GeoTargetConstant geo_target_constant = 4; + + // The list of parents of the geo target constant. + repeated google.ads.googleads.v2.resources.GeoTargetConstant geo_target_constant_parents = 5; +} diff --git a/google/ads/googleads/v2/services/geographic_view_service.proto b/google/ads/googleads/v2/services/geographic_view_service.proto new file mode 100644 index 000000000..424710aad --- /dev/null +++ b/google/ads/googleads/v2/services/geographic_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/geographic_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "GeographicViewServiceProto"; +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 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.v2.resources.GeographicView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/geographicViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/google_ads_field_service.proto b/google/ads/googleads/v2/services/google_ads_field_service.proto new file mode 100644 index 000000000..5eb683a25 --- /dev/null +++ b/google/ads/googleads/v2/services/google_ads_field_service.proto @@ -0,0 +1,89 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/google_ads_field.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsFieldServiceProto"; +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 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.v2.resources.GoogleAdsField) { + option (google.api.http) = { + get: "/v2/{resource_name=googleAdsFields/*}" + }; + } + + // Returns all fields that match the search query. + rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) returns (SearchGoogleAdsFieldsResponse) { + option (google.api.http) = { + post: "/v2/googleAdsFields:search" + body: "*" + }; + } +} + +// 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; +} + +// Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v2.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsRequest { + // The query string. + string query = 1; + + // 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.v2.services.GoogleAdsFieldService.SearchGoogleAdsFields]. +message SearchGoogleAdsFieldsResponse { + // The list of fields that matched the query. + repeated google.ads.googleads.v2.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/v2/services/google_ads_service.proto b/google/ads/googleads/v2/services/google_ads_service.proto new file mode 100644 index 000000000..df5197982 --- /dev/null +++ b/google/ads/googleads/v2/services/google_ads_service.proto @@ -0,0 +1,867 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/common/metrics.proto"; +import "google/ads/googleads/v2/common/segments.proto"; +import "google/ads/googleads/v2/resources/account_budget.proto"; +import "google/ads/googleads/v2/resources/account_budget_proposal.proto"; +import "google/ads/googleads/v2/resources/ad_group.proto"; +import "google/ads/googleads/v2/resources/ad_group_ad.proto"; +import "google/ads/googleads/v2/resources/ad_group_ad_asset_view.proto"; +import "google/ads/googleads/v2/resources/ad_group_ad_label.proto"; +import "google/ads/googleads/v2/resources/ad_group_audience_view.proto"; +import "google/ads/googleads/v2/resources/ad_group_bid_modifier.proto"; +import "google/ads/googleads/v2/resources/ad_group_criterion.proto"; +import "google/ads/googleads/v2/resources/ad_group_criterion_label.proto"; +import "google/ads/googleads/v2/resources/ad_group_criterion_simulation.proto"; +import "google/ads/googleads/v2/resources/ad_group_extension_setting.proto"; +import "google/ads/googleads/v2/resources/ad_group_feed.proto"; +import "google/ads/googleads/v2/resources/ad_group_label.proto"; +import "google/ads/googleads/v2/resources/ad_group_simulation.proto"; +import "google/ads/googleads/v2/resources/ad_parameter.proto"; +import "google/ads/googleads/v2/resources/ad_schedule_view.proto"; +import "google/ads/googleads/v2/resources/age_range_view.proto"; +import "google/ads/googleads/v2/resources/asset.proto"; +import "google/ads/googleads/v2/resources/bidding_strategy.proto"; +import "google/ads/googleads/v2/resources/billing_setup.proto"; +import "google/ads/googleads/v2/resources/campaign.proto"; +import "google/ads/googleads/v2/resources/campaign_audience_view.proto"; +import "google/ads/googleads/v2/resources/campaign_bid_modifier.proto"; +import "google/ads/googleads/v2/resources/campaign_budget.proto"; +import "google/ads/googleads/v2/resources/campaign_criterion.proto"; +import "google/ads/googleads/v2/resources/campaign_criterion_simulation.proto"; +import "google/ads/googleads/v2/resources/campaign_draft.proto"; +import "google/ads/googleads/v2/resources/campaign_experiment.proto"; +import "google/ads/googleads/v2/resources/campaign_extension_setting.proto"; +import "google/ads/googleads/v2/resources/campaign_feed.proto"; +import "google/ads/googleads/v2/resources/campaign_label.proto"; +import "google/ads/googleads/v2/resources/campaign_shared_set.proto"; +import "google/ads/googleads/v2/resources/carrier_constant.proto"; +import "google/ads/googleads/v2/resources/change_status.proto"; +import "google/ads/googleads/v2/resources/click_view.proto"; +import "google/ads/googleads/v2/resources/conversion_action.proto"; +import "google/ads/googleads/v2/resources/custom_interest.proto"; +import "google/ads/googleads/v2/resources/customer.proto"; +import "google/ads/googleads/v2/resources/customer_client.proto"; +import "google/ads/googleads/v2/resources/customer_client_link.proto"; +import "google/ads/googleads/v2/resources/customer_extension_setting.proto"; +import "google/ads/googleads/v2/resources/customer_feed.proto"; +import "google/ads/googleads/v2/resources/customer_label.proto"; +import "google/ads/googleads/v2/resources/customer_manager_link.proto"; +import "google/ads/googleads/v2/resources/customer_negative_criterion.proto"; +import "google/ads/googleads/v2/resources/detail_placement_view.proto"; +import "google/ads/googleads/v2/resources/display_keyword_view.proto"; +import "google/ads/googleads/v2/resources/distance_view.proto"; +import "google/ads/googleads/v2/resources/domain_category.proto"; +import "google/ads/googleads/v2/resources/dynamic_search_ads_search_term_view.proto"; +import "google/ads/googleads/v2/resources/expanded_landing_page_view.proto"; +import "google/ads/googleads/v2/resources/extension_feed_item.proto"; +import "google/ads/googleads/v2/resources/feed.proto"; +import "google/ads/googleads/v2/resources/feed_item.proto"; +import "google/ads/googleads/v2/resources/feed_item_target.proto"; +import "google/ads/googleads/v2/resources/feed_mapping.proto"; +import "google/ads/googleads/v2/resources/feed_placeholder_view.proto"; +import "google/ads/googleads/v2/resources/gender_view.proto"; +import "google/ads/googleads/v2/resources/geo_target_constant.proto"; +import "google/ads/googleads/v2/resources/geographic_view.proto"; +import "google/ads/googleads/v2/resources/group_placement_view.proto"; +import "google/ads/googleads/v2/resources/hotel_group_view.proto"; +import "google/ads/googleads/v2/resources/hotel_performance_view.proto"; +import "google/ads/googleads/v2/resources/keyword_plan.proto"; +import "google/ads/googleads/v2/resources/keyword_plan_ad_group.proto"; +import "google/ads/googleads/v2/resources/keyword_plan_campaign.proto"; +import "google/ads/googleads/v2/resources/keyword_plan_keyword.proto"; +import "google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto"; +import "google/ads/googleads/v2/resources/keyword_view.proto"; +import "google/ads/googleads/v2/resources/label.proto"; +import "google/ads/googleads/v2/resources/landing_page_view.proto"; +import "google/ads/googleads/v2/resources/language_constant.proto"; +import "google/ads/googleads/v2/resources/location_view.proto"; +import "google/ads/googleads/v2/resources/managed_placement_view.proto"; +import "google/ads/googleads/v2/resources/media_file.proto"; +import "google/ads/googleads/v2/resources/mobile_app_category_constant.proto"; +import "google/ads/googleads/v2/resources/mobile_device_constant.proto"; +import "google/ads/googleads/v2/resources/mutate_job.proto"; +import "google/ads/googleads/v2/resources/operating_system_version_constant.proto"; +import "google/ads/googleads/v2/resources/paid_organic_search_term_view.proto"; +import "google/ads/googleads/v2/resources/parental_status_view.proto"; +import "google/ads/googleads/v2/resources/product_bidding_category_constant.proto"; +import "google/ads/googleads/v2/resources/product_group_view.proto"; +import "google/ads/googleads/v2/resources/recommendation.proto"; +import "google/ads/googleads/v2/resources/remarketing_action.proto"; +import "google/ads/googleads/v2/resources/search_term_view.proto"; +import "google/ads/googleads/v2/resources/shared_criterion.proto"; +import "google/ads/googleads/v2/resources/shared_set.proto"; +import "google/ads/googleads/v2/resources/shopping_performance_view.proto"; +import "google/ads/googleads/v2/resources/topic_constant.proto"; +import "google/ads/googleads/v2/resources/topic_view.proto"; +import "google/ads/googleads/v2/resources/user_interest.proto"; +import "google/ads/googleads/v2/resources/user_list.proto"; +import "google/ads/googleads/v2/resources/user_location_view.proto"; +import "google/ads/googleads/v2/resources/video.proto"; +import "google/ads/googleads/v2/services/ad_group_ad_label_service.proto"; +import "google/ads/googleads/v2/services/ad_group_ad_service.proto"; +import "google/ads/googleads/v2/services/ad_group_bid_modifier_service.proto"; +import "google/ads/googleads/v2/services/ad_group_criterion_label_service.proto"; +import "google/ads/googleads/v2/services/ad_group_criterion_service.proto"; +import "google/ads/googleads/v2/services/ad_group_extension_setting_service.proto"; +import "google/ads/googleads/v2/services/ad_group_feed_service.proto"; +import "google/ads/googleads/v2/services/ad_group_label_service.proto"; +import "google/ads/googleads/v2/services/ad_group_service.proto"; +import "google/ads/googleads/v2/services/ad_parameter_service.proto"; +import "google/ads/googleads/v2/services/asset_service.proto"; +import "google/ads/googleads/v2/services/bidding_strategy_service.proto"; +import "google/ads/googleads/v2/services/campaign_bid_modifier_service.proto"; +import "google/ads/googleads/v2/services/campaign_budget_service.proto"; +import "google/ads/googleads/v2/services/campaign_criterion_service.proto"; +import "google/ads/googleads/v2/services/campaign_draft_service.proto"; +import "google/ads/googleads/v2/services/campaign_experiment_service.proto"; +import "google/ads/googleads/v2/services/campaign_extension_setting_service.proto"; +import "google/ads/googleads/v2/services/campaign_feed_service.proto"; +import "google/ads/googleads/v2/services/campaign_label_service.proto"; +import "google/ads/googleads/v2/services/campaign_service.proto"; +import "google/ads/googleads/v2/services/campaign_shared_set_service.proto"; +import "google/ads/googleads/v2/services/conversion_action_service.proto"; +import "google/ads/googleads/v2/services/customer_extension_setting_service.proto"; +import "google/ads/googleads/v2/services/customer_feed_service.proto"; +import "google/ads/googleads/v2/services/customer_label_service.proto"; +import "google/ads/googleads/v2/services/customer_negative_criterion_service.proto"; +import "google/ads/googleads/v2/services/customer_service.proto"; +import "google/ads/googleads/v2/services/extension_feed_item_service.proto"; +import "google/ads/googleads/v2/services/feed_item_service.proto"; +import "google/ads/googleads/v2/services/feed_item_target_service.proto"; +import "google/ads/googleads/v2/services/feed_mapping_service.proto"; +import "google/ads/googleads/v2/services/feed_service.proto"; +import "google/ads/googleads/v2/services/label_service.proto"; +import "google/ads/googleads/v2/services/media_file_service.proto"; +import "google/ads/googleads/v2/services/remarketing_action_service.proto"; +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/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"; +option java_multiple_files = true; +option java_outer_classname = "GoogleAdsServiceProto"; +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 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: "/v2/customers/{customer_id=*}/googleAds:search" + body: "*" + }; + } + + // 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: "/v2/customers/{customer_id=*}/googleAds:mutate" + body: "*" + }; + } +} + +// 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; + + // The query string. + string query = 2; + + // 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, summary row will be included in the response. + // Otherwise(false or not specified) summary row will not be returned. + bool return_summary_row = 6; +} + +// Response message for [GoogleAdsService.Search][google.ads.googleads.v2.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; +} + +// A returned row from the query. +message GoogleAdsRow { + // The account budget in the query. + google.ads.googleads.v2.resources.AccountBudget account_budget = 42; + + // The account budget proposal referenced in the query. + google.ads.googleads.v2.resources.AccountBudgetProposal account_budget_proposal = 43; + + // The ad group referenced in the query. + google.ads.googleads.v2.resources.AdGroup ad_group = 3; + + // The ad referenced in the query. + google.ads.googleads.v2.resources.AdGroupAd ad_group_ad = 16; + + // The ad group ad asset view in the query. + google.ads.googleads.v2.resources.AdGroupAdAssetView ad_group_ad_asset_view = 131; + + // The ad group ad label referenced in the query. + google.ads.googleads.v2.resources.AdGroupAdLabel ad_group_ad_label = 120; + + // The ad group audience view referenced in the query. + google.ads.googleads.v2.resources.AdGroupAudienceView ad_group_audience_view = 57; + + // The bid modifier referenced in the query. + google.ads.googleads.v2.resources.AdGroupBidModifier ad_group_bid_modifier = 24; + + // The criterion referenced in the query. + google.ads.googleads.v2.resources.AdGroupCriterion ad_group_criterion = 17; + + // The ad group criterion label referenced in the query. + google.ads.googleads.v2.resources.AdGroupCriterionLabel ad_group_criterion_label = 121; + + // The ad group criterion simulation referenced in the query. + google.ads.googleads.v2.resources.AdGroupCriterionSimulation ad_group_criterion_simulation = 110; + + // The ad group extension setting referenced in the query. + google.ads.googleads.v2.resources.AdGroupExtensionSetting ad_group_extension_setting = 112; + + // The ad group feed referenced in the query. + google.ads.googleads.v2.resources.AdGroupFeed ad_group_feed = 67; + + // The ad group label referenced in the query. + google.ads.googleads.v2.resources.AdGroupLabel ad_group_label = 115; + + // The ad group simulation referenced in the query. + google.ads.googleads.v2.resources.AdGroupSimulation ad_group_simulation = 107; + + // The ad parameter referenced in the query. + google.ads.googleads.v2.resources.AdParameter ad_parameter = 130; + + // The age range view referenced in the query. + google.ads.googleads.v2.resources.AgeRangeView age_range_view = 48; + + // The ad schedule view referenced in the query. + google.ads.googleads.v2.resources.AdScheduleView ad_schedule_view = 89; + + // The domain category referenced in the query. + google.ads.googleads.v2.resources.DomainCategory domain_category = 91; + + // The asset referenced in the query. + google.ads.googleads.v2.resources.Asset asset = 105; + + // The bidding strategy referenced in the query. + google.ads.googleads.v2.resources.BiddingStrategy bidding_strategy = 18; + + // The billing setup referenced in the query. + google.ads.googleads.v2.resources.BillingSetup billing_setup = 41; + + // The campaign budget referenced in the query. + google.ads.googleads.v2.resources.CampaignBudget campaign_budget = 19; + + // The campaign referenced in the query. + google.ads.googleads.v2.resources.Campaign campaign = 2; + + // The campaign audience view referenced in the query. + google.ads.googleads.v2.resources.CampaignAudienceView campaign_audience_view = 69; + + // The campaign bid modifier referenced in the query. + google.ads.googleads.v2.resources.CampaignBidModifier campaign_bid_modifier = 26; + + // The campaign criterion referenced in the query. + google.ads.googleads.v2.resources.CampaignCriterion campaign_criterion = 20; + + // The campaign criterion simulation referenced in the query. + google.ads.googleads.v2.resources.CampaignCriterionSimulation campaign_criterion_simulation = 111; + + // The campaign draft referenced in the query. + google.ads.googleads.v2.resources.CampaignDraft campaign_draft = 49; + + // The campaign experiment referenced in the query. + google.ads.googleads.v2.resources.CampaignExperiment campaign_experiment = 84; + + // The campaign extension setting referenced in the query. + google.ads.googleads.v2.resources.CampaignExtensionSetting campaign_extension_setting = 113; + + // The campaign feed referenced in the query. + google.ads.googleads.v2.resources.CampaignFeed campaign_feed = 63; + + // The campaign label referenced in the query. + google.ads.googleads.v2.resources.CampaignLabel campaign_label = 108; + + // Campaign Shared Set referenced in AWQL query. + google.ads.googleads.v2.resources.CampaignSharedSet campaign_shared_set = 30; + + // The carrier constant referenced in the query. + google.ads.googleads.v2.resources.CarrierConstant carrier_constant = 66; + + // The ChangeStatus referenced in the query. + google.ads.googleads.v2.resources.ChangeStatus change_status = 37; + + // The conversion action referenced in the query. + google.ads.googleads.v2.resources.ConversionAction conversion_action = 103; + + // The ClickView referenced in the query. + google.ads.googleads.v2.resources.ClickView click_view = 122; + + // The CustomInterest referenced in the query. + google.ads.googleads.v2.resources.CustomInterest custom_interest = 104; + + // The customer referenced in the query. + google.ads.googleads.v2.resources.Customer customer = 1; + + // The CustomerManagerLink referenced in the query. + google.ads.googleads.v2.resources.CustomerManagerLink customer_manager_link = 61; + + // The CustomerClientLink referenced in the query. + google.ads.googleads.v2.resources.CustomerClientLink customer_client_link = 62; + + // The CustomerClient referenced in the query. + google.ads.googleads.v2.resources.CustomerClient customer_client = 70; + + // The customer extension setting referenced in the query. + google.ads.googleads.v2.resources.CustomerExtensionSetting customer_extension_setting = 114; + + // The customer feed referenced in the query. + google.ads.googleads.v2.resources.CustomerFeed customer_feed = 64; + + // The customer label referenced in the query. + google.ads.googleads.v2.resources.CustomerLabel customer_label = 124; + + // The customer negative criterion referenced in the query. + google.ads.googleads.v2.resources.CustomerNegativeCriterion customer_negative_criterion = 88; + + // The detail placement view referenced in the query. + google.ads.googleads.v2.resources.DetailPlacementView detail_placement_view = 118; + + // The display keyword view referenced in the query. + google.ads.googleads.v2.resources.DisplayKeywordView display_keyword_view = 47; + + // The distance view referenced in the query. + google.ads.googleads.v2.resources.DistanceView distance_view = 132; + + // The dynamic search ads search term view referenced in the query. + google.ads.googleads.v2.resources.DynamicSearchAdsSearchTermView dynamic_search_ads_search_term_view = 106; + + // The expanded landing page view referenced in the query. + google.ads.googleads.v2.resources.ExpandedLandingPageView expanded_landing_page_view = 128; + + // The extension feed item referenced in the query. + google.ads.googleads.v2.resources.ExtensionFeedItem extension_feed_item = 85; + + // The feed referenced in the query. + google.ads.googleads.v2.resources.Feed feed = 46; + + // The feed item referenced in the query. + google.ads.googleads.v2.resources.FeedItem feed_item = 50; + + // The feed item target referenced in the query. + google.ads.googleads.v2.resources.FeedItemTarget feed_item_target = 116; + + // The feed mapping referenced in the query. + google.ads.googleads.v2.resources.FeedMapping feed_mapping = 58; + + // The feed placeholder view referenced in the query. + google.ads.googleads.v2.resources.FeedPlaceholderView feed_placeholder_view = 97; + + // The gender view referenced in the query. + google.ads.googleads.v2.resources.GenderView gender_view = 40; + + // The geo target constant referenced in the query. + google.ads.googleads.v2.resources.GeoTargetConstant geo_target_constant = 23; + + // The geographic view referenced in the query. + google.ads.googleads.v2.resources.GeographicView geographic_view = 125; + + // The group placement view referenced in the query. + google.ads.googleads.v2.resources.GroupPlacementView group_placement_view = 119; + + // The hotel group view referenced in the query. + google.ads.googleads.v2.resources.HotelGroupView hotel_group_view = 51; + + // The hotel performance view referenced in the query. + google.ads.googleads.v2.resources.HotelPerformanceView hotel_performance_view = 71; + + // The keyword view referenced in the query. + google.ads.googleads.v2.resources.KeywordView keyword_view = 21; + + // The keyword plan referenced in the query. + google.ads.googleads.v2.resources.KeywordPlan keyword_plan = 32; + + // The keyword plan campaign referenced in the query. + google.ads.googleads.v2.resources.KeywordPlanCampaign keyword_plan_campaign = 33; + + // The keyword plan negative keyword referenced in the query. + google.ads.googleads.v2.resources.KeywordPlanNegativeKeyword keyword_plan_negative_keyword = 34; + + // The keyword plan ad group referenced in the query. + google.ads.googleads.v2.resources.KeywordPlanAdGroup keyword_plan_ad_group = 35; + + // The keyword plan keyword referenced in the query. + google.ads.googleads.v2.resources.KeywordPlanKeyword keyword_plan_keyword = 36; + + // The label referenced in the query. + google.ads.googleads.v2.resources.Label label = 52; + + // The landing page view referenced in the query. + google.ads.googleads.v2.resources.LandingPageView landing_page_view = 126; + + // The language constant referenced in the query. + google.ads.googleads.v2.resources.LanguageConstant language_constant = 55; + + // The location view referenced in the query. + google.ads.googleads.v2.resources.LocationView location_view = 123; + + // The managed placement view referenced in the query. + google.ads.googleads.v2.resources.ManagedPlacementView managed_placement_view = 53; + + // The media file referenced in the query. + google.ads.googleads.v2.resources.MediaFile media_file = 90; + + // The mobile app category constant referenced in the query. + google.ads.googleads.v2.resources.MobileAppCategoryConstant mobile_app_category_constant = 87; + + // The mobile device constant referenced in the query. + google.ads.googleads.v2.resources.MobileDeviceConstant mobile_device_constant = 98; + + // The mutate job referenced in the query. + google.ads.googleads.v2.resources.MutateJob mutate_job = 127; + + // The operating system version constant referenced in the query. + google.ads.googleads.v2.resources.OperatingSystemVersionConstant operating_system_version_constant = 86; + + // The paid organic search term view referenced in the query. + google.ads.googleads.v2.resources.PaidOrganicSearchTermView paid_organic_search_term_view = 129; + + // The parental status view referenced in the query. + google.ads.googleads.v2.resources.ParentalStatusView parental_status_view = 45; + + // The Product Bidding Category referenced in the query. + google.ads.googleads.v2.resources.ProductBiddingCategoryConstant product_bidding_category_constant = 109; + + // The product group view referenced in the query. + google.ads.googleads.v2.resources.ProductGroupView product_group_view = 54; + + // The recommendation referenced in the query. + google.ads.googleads.v2.resources.Recommendation recommendation = 22; + + // The search term view referenced in the query. + google.ads.googleads.v2.resources.SearchTermView search_term_view = 68; + + // The shared set referenced in the query. + google.ads.googleads.v2.resources.SharedCriterion shared_criterion = 29; + + // The shared set referenced in the query. + google.ads.googleads.v2.resources.SharedSet shared_set = 27; + + // The shopping performance view referenced in the query. + google.ads.googleads.v2.resources.ShoppingPerformanceView shopping_performance_view = 117; + + // The topic view referenced in the query. + google.ads.googleads.v2.resources.TopicView topic_view = 44; + + // The user interest referenced in the query. + google.ads.googleads.v2.resources.UserInterest user_interest = 59; + + // The user list referenced in the query. + google.ads.googleads.v2.resources.UserList user_list = 38; + + // The user location view referenced in the query. + google.ads.googleads.v2.resources.UserLocationView user_location_view = 135; + + // The remarketing action referenced in the query. + google.ads.googleads.v2.resources.RemarketingAction remarketing_action = 60; + + // The topic constant referenced in the query. + google.ads.googleads.v2.resources.TopicConstant topic_constant = 31; + + // The video referenced in the query. + google.ads.googleads.v2.resources.Video video = 39; + + // The metrics. + google.ads.googleads.v2.common.Metrics metrics = 4; + + // The segments. + google.ads.googleads.v2.common.Segments segments = 102; +} + +// 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; + + // The list of operations to perform on individual resources. + repeated MutateOperation mutate_operations = 2; + + // 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.v2.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 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 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/v2/services/group_placement_view_service.proto b/google/ads/googleads/v2/services/group_placement_view_service.proto new file mode 100644 index 000000000..6bdae84d9 --- /dev/null +++ b/google/ads/googleads/v2/services/group_placement_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/group_placement_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "GroupPlacementViewServiceProto"; +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 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.v2.resources.GroupPlacementView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/groupPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/hotel_group_view_service.proto b/google/ads/googleads/v2/services/hotel_group_view_service.proto new file mode 100644 index 000000000..9a3ab0ddc --- /dev/null +++ b/google/ads/googleads/v2/services/hotel_group_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/hotel_group_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "HotelGroupViewServiceProto"; +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 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.v2.resources.HotelGroupView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/hotelGroupViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/hotel_performance_view_service.proto b/google/ads/googleads/v2/services/hotel_performance_view_service.proto new file mode 100644 index 000000000..ab54b8a98 --- /dev/null +++ b/google/ads/googleads/v2/services/hotel_performance_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/hotel_performance_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "HotelPerformanceViewServiceProto"; +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 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.v2.resources.HotelPerformanceView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/hotelPerformanceView}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..f6ae5a9da --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_ad_group_service.proto @@ -0,0 +1,123 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/keyword_plan_ad_group.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanAdGroupServiceProto"; +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 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.v2.resources.KeywordPlanAdGroup) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordPlanAdGroups/*}" + }; + } + + // Creates, updates, or removes Keyword Plan ad groups. Operation statuses are + // returned. + rpc MutateKeywordPlanAdGroups(MutateKeywordPlanAdGroupsRequest) returns (MutateKeywordPlanAdGroupsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/keywordPlanAdGroups:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan ad groups. + repeated KeywordPlanAdGroupOperation operations = 2; + + // 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.v2.resources.KeywordPlanAdGroup create = 1; + + // Update operation: The Keyword Plan ad group is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/keyword_plan_campaign_service.proto b/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto new file mode 100644 index 000000000..70ee20af9 --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_campaign_service.proto @@ -0,0 +1,124 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/keyword_plan_campaign.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanCampaignServiceProto"; +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 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.v2.resources.KeywordPlanCampaign) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordPlanCampaigns/*}" + }; + } + + // Creates, updates, or removes Keyword Plan campaigns. Operation statuses are + // returned. + rpc MutateKeywordPlanCampaigns(MutateKeywordPlanCampaignsRequest) returns (MutateKeywordPlanCampaignsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/keywordPlanCampaigns:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan campaigns. + repeated KeywordPlanCampaignOperation operations = 2; + + // 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.v2.resources.KeywordPlanCampaign create = 1; + + // Update operation: The Keyword Plan campaign is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/keyword_plan_idea_service.proto b/google/ads/googleads/v2/services/keyword_plan_idea_service.proto new file mode 100644 index 000000000..1e656665a --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_idea_service.proto @@ -0,0 +1,117 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanIdeaServiceProto"; +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 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: "/v2/customers/{customer_id=*}:generateKeywordIdeas" + body: "*" + }; + } +} + +// Request message for [KeywordIdeaService.GenerateKeywordIdeas][]. +message GenerateKeywordIdeasRequest { + // The ID of the customer with the recommendation. + string customer_id = 1; + + // The resource name of the language to target. + // Required + google.protobuf.StringValue language = 7; + + // The resource names of the location to target. + // Max 10 + repeated google.protobuf.StringValue geo_target_constants = 8; + + // Targeting network. + google.ads.googleads.v2.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.v2.common.KeywordPlanHistoricalMetrics keyword_idea_metrics = 3; +} diff --git a/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto b/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto new file mode 100644 index 000000000..1e9a1aad5 --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_keyword_service.proto @@ -0,0 +1,123 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/keyword_plan_keyword.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanKeywordServiceProto"; +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 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.v2.resources.KeywordPlanKeyword) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordPlanKeywords/*}" + }; + } + + // Creates, updates, or removes Keyword Plan keywords. Operation statuses are + // returned. + rpc MutateKeywordPlanKeywords(MutateKeywordPlanKeywordsRequest) returns (MutateKeywordPlanKeywordsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/keywordPlanKeywords:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan keywords. + repeated KeywordPlanKeywordOperation operations = 2; + + // 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.v2.resources.KeywordPlanKeyword create = 1; + + // Update operation: The Keyword Plan keyword is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/keyword_plan_negative_keyword_service.proto b/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto new file mode 100644 index 000000000..197cae4d7 --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_negative_keyword_service.proto @@ -0,0 +1,127 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/keyword_plan_negative_keyword.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanNegativeKeywordServiceProto"; +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 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.v2.resources.KeywordPlanNegativeKeyword) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordPlanNegativeKeywords/*}" + }; + } + + // Creates, updates, or removes Keyword Plan negative keywords. Operation + // statuses are returned. + rpc MutateKeywordPlanNegativeKeywords(MutateKeywordPlanNegativeKeywordsRequest) returns (MutateKeywordPlanNegativeKeywordsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/keywordPlanNegativeKeywords:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual Keyword Plan negative + // keywords. + repeated KeywordPlanNegativeKeywordOperation operations = 2; + + // 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.v2.resources.KeywordPlanNegativeKeyword create = 1; + + // Update operation: The Keyword Plan negative keyword expected to have a + // valid resource name. + google.ads.googleads.v2.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/v2/services/keyword_plan_service.proto b/google/ads/googleads/v2/services/keyword_plan_service.proto new file mode 100644 index 000000000..7d5095ab3 --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_plan_service.proto @@ -0,0 +1,239 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordPlanServiceProto"; +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 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.v2.resources.KeywordPlan) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordPlans/*}" + }; + } + + // Creates, updates, or removes keyword plans. Operation statuses are + // returned. + rpc MutateKeywordPlans(MutateKeywordPlansRequest) returns (MutateKeywordPlansResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/keywordPlans:mutate" + body: "*" + }; + } + + // Returns the requested Keyword Plan forecasts. + rpc GenerateForecastMetrics(GenerateForecastMetricsRequest) returns (GenerateForecastMetricsResponse) { + option (google.api.http) = { + post: "/v2/{keyword_plan=customers/*/keywordPlans/*}:generateForecastMetrics" + body: "*" + }; + } + + // Returns the requested Keyword Plan historical metrics. + rpc GenerateHistoricalMetrics(GenerateHistoricalMetricsRequest) returns (GenerateHistoricalMetricsResponse) { + option (google.api.http) = { + post: "/v2/{keyword_plan=customers/*/keywordPlans/*}:generateHistoricalMetrics" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual keyword plans. + repeated KeywordPlanOperation operations = 2; + + // 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.v2.resources.KeywordPlan create = 1; + + // Update operation: The keyword plan is expected to have a valid resource + // name. + google.ads.googleads.v2.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.v2.services.KeywordPlanService.GenerateForecastMetrics]. +message GenerateForecastMetricsRequest { + // The resource name of the keyword plan to be forecasted. + string keyword_plan = 1; +} + +// Response message for [KeywordPlanService.GenerateForecastMetrics][google.ads.googleads.v2.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.v2.services.KeywordPlanService.GenerateHistoricalMetrics]. +message GenerateHistoricalMetricsRequest { + // The resource name of the keyword plan of which historical metrics are + // requested. + string keyword_plan = 1; +} + +// Response message for [KeywordPlanService.GenerateHistoricalMetrics][google.ads.googleads.v2.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.v2.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; +} diff --git a/google/ads/googleads/v2/services/keyword_view_service.proto b/google/ads/googleads/v2/services/keyword_view_service.proto new file mode 100644 index 000000000..776c594eb --- /dev/null +++ b/google/ads/googleads/v2/services/keyword_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/keyword_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "KeywordViewServiceProto"; +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 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.v2.resources.KeywordView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/keywordViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/label_service.proto b/google/ads/googleads/v2/services/label_service.proto new file mode 100644 index 000000000..06a682c40 --- /dev/null +++ b/google/ads/googleads/v2/services/label_service.proto @@ -0,0 +1,118 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/label.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "LabelServiceProto"; +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"; + +// 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.v2.resources.Label) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/labels/*}" + }; + } + + // Creates, updates, or removes labels. Operation statuses are returned. + rpc MutateLabels(MutateLabelsRequest) returns (MutateLabelsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/labels:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on labels. + repeated LabelOperation operations = 2; + + // 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.v2.resources.Label create = 1; + + // Update operation: The label is expected to have a valid resource name. + google.ads.googleads.v2.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/v2/services/landing_page_view_service.proto b/google/ads/googleads/v2/services/landing_page_view_service.proto new file mode 100644 index 000000000..ef5e9f135 --- /dev/null +++ b/google/ads/googleads/v2/services/landing_page_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/landing_page_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "LandingPageViewServiceProto"; +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 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.v2.resources.LandingPageView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/landingPageViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/language_constant_service.proto b/google/ads/googleads/v2/services/language_constant_service.proto new file mode 100644 index 000000000..b326a54ea --- /dev/null +++ b/google/ads/googleads/v2/services/language_constant_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/language_constant.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "LanguageConstantServiceProto"; +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 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.v2.resources.LanguageConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=languageConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/location_view_service.proto b/google/ads/googleads/v2/services/location_view_service.proto new file mode 100644 index 000000000..2e164c5c5 --- /dev/null +++ b/google/ads/googleads/v2/services/location_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/location_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "LocationViewServiceProto"; +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 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.v2.resources.LocationView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/locationViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/managed_placement_view_service.proto b/google/ads/googleads/v2/services/managed_placement_view_service.proto new file mode 100644 index 000000000..3575c8b4f --- /dev/null +++ b/google/ads/googleads/v2/services/managed_placement_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/managed_placement_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ManagedPlacementViewServiceProto"; +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 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.v2.resources.ManagedPlacementView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/managedPlacementViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/media_file_service.proto b/google/ads/googleads/v2/services/media_file_service.proto new file mode 100644 index 000000000..3e9f42651 --- /dev/null +++ b/google/ads/googleads/v2/services/media_file_service.proto @@ -0,0 +1,107 @@ +// 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.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"; + +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 = "MediaFileServiceProto"; +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 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.v2.resources.MediaFile) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/mediaFiles/*}" + }; + } + + // Creates media files. Operation statuses are returned. + rpc MutateMediaFiles(MutateMediaFilesRequest) returns (MutateMediaFilesResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/mediaFiles:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual media file. + repeated MediaFileOperation operations = 2; + + // 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.v2.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/v2/services/merchant_center_link_service.proto b/google/ads/googleads/v2/services/merchant_center_link_service.proto new file mode 100644 index 000000000..28e9b41a0 --- /dev/null +++ b/google/ads/googleads/v2/services/merchant_center_link_service.proto @@ -0,0 +1,121 @@ +// 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.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"; + +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 = "MerchantCenterLinkServiceProto"; +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 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 tor this customer. + rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) { + option (google.api.http) = { + get: "/v2/customers/{customer_id=*}/merchantCenterLinks" + }; + } + + // Returns the Merchant Center link in full detail. + rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) returns (google.ads.googleads.v2.resources.MerchantCenterLink) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/merchantCenterLinks/*}" + }; + } + + // Updates status or removes a Merchant Center link. + rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) returns (MutateMerchantCenterLinkResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/merchantCenterLinks:mutate" + body: "*" + }; + } +} + +// 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 + // operation. + string customer_id = 1; +} + +// Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v2.services.MerchantCenterLinkService.ListMerchantCenterLinks]. +message ListMerchantCenterLinksResponse { + // Merchant Center links available for the requested customer + repeated google.ads.googleads.v2.resources.MerchantCenterLink merchant_center_links = 1; +} + +// 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; +} + +// 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; + + // The operation to perform on the link + MerchantCenterLinkOperation operation = 2; +} + +// 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.v2.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/v2/services/mobile_app_category_constant_service.proto b/google/ads/googleads/v2/services/mobile_app_category_constant_service.proto new file mode 100644 index 000000000..180c99f9e --- /dev/null +++ b/google/ads/googleads/v2/services/mobile_app_category_constant_service.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.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"; + +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 = "MobileAppCategoryConstantServiceProto"; +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"; + +// 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.v2.resources.MobileAppCategoryConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=mobileAppCategoryConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/mobile_device_constant_service.proto b/google/ads/googleads/v2/services/mobile_device_constant_service.proto new file mode 100644 index 000000000..9a7427920 --- /dev/null +++ b/google/ads/googleads/v2/services/mobile_device_constant_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/mobile_device_constant.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceConstantServiceProto"; +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 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.v2.resources.MobileDeviceConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=mobileDeviceConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/mutate_job_service.proto b/google/ads/googleads/v2/services/mutate_job_service.proto new file mode 100644 index 000000000..e6c72cee8 --- /dev/null +++ b/google/ads/googleads/v2/services/mutate_job_service.proto @@ -0,0 +1,186 @@ +// 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.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/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"; +option java_multiple_files = true; +option java_outer_classname = "MutateJobServiceProto"; +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 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: "/v2/customers/{customer_id=*}/mutateJobs:create" + body: "*" + }; + } + + // Returns the mutate job. + rpc GetMutateJob(GetMutateJobRequest) returns (google.ads.googleads.v2.resources.MutateJob) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/mutateJobs/*}" + }; + } + + // 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: "/v2/{resource_name=customers/*/mutateJobs/*}:listResults" + }; + } + + // 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: "/v2/{resource_name=customers/*/mutateJobs/*}:run" + body: "*" + }; + } + + // Add operations to the mutate job. + rpc AddMutateJobOperations(AddMutateJobOperationsRequest) returns (AddMutateJobOperationsResponse) { + option (google.api.http) = { + post: "/v2/{resource_name=customers/*/mutateJobs/*}:addOperations" + body: "*" + }; + } +} + +// Request message for [MutateJobService.CreateMutateJobRequest][] +message CreateMutateJobRequest { + // The ID of the customer for which to create a mutate job. + string customer_id = 1; +} + +// 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.v2.services.MutateJobService.GetMutateJob] +message GetMutateJobRequest { + // The resource name of the MutateJob to get. + string resource_name = 1; +} + +// 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; +} + +// Request message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v2.services.MutateJobService.AddMutateJobOperations] +message AddMutateJobOperationsRequest { + // The resource name of the MutateJob. + string resource_name = 1; + + // 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; + + // 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; +} + +// Response message for [MutateJobService.AddMutateJobOperations][google.ads.googleads.v2.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.v2.services.MutateJobService.ListMutateJobResults]. +message ListMutateJobResultsRequest { + // The resource name of the MutateJob whose results are being listed. + string resource_name = 1; + + // 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.v2.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/v2/services/operating_system_version_constant_service.proto b/google/ads/googleads/v2/services/operating_system_version_constant_service.proto new file mode 100644 index 000000000..349ab351b --- /dev/null +++ b/google/ads/googleads/v2/services/operating_system_version_constant_service.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.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"; + +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 = "OperatingSystemVersionConstantServiceProto"; +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 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.v2.resources.OperatingSystemVersionConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=operatingSystemVersionConstants/*}" + }; + } +} + +// 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; +} 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 new file mode 100644 index 000000000..586f9fd42 --- /dev/null +++ b/google/ads/googleads/v2/services/paid_organic_search_term_view_service.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.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"; + +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 = "PaidOrganicSearchTermViewServiceProto"; +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 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.v2.resources.PaidOrganicSearchTermView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/paidOrganicSearchTermViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/parental_status_view_service.proto b/google/ads/googleads/v2/services/parental_status_view_service.proto new file mode 100644 index 000000000..2ae50b215 --- /dev/null +++ b/google/ads/googleads/v2/services/parental_status_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/parental_status_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ParentalStatusViewServiceProto"; +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 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.v2.resources.ParentalStatusView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/parentalStatusViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/payments_account_service.proto b/google/ads/googleads/v2/services/payments_account_service.proto new file mode 100644 index 000000000..5c3073c02 --- /dev/null +++ b/google/ads/googleads/v2/services/payments_account_service.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.v2.services; + +import "google/ads/googleads/v2/resources/payments_account.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "PaymentsAccountServiceProto"; +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 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: "/v2/customers/{customer_id=*}/paymentsAccounts" + }; + } +} + +// 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; +} + +// Response message for [PaymentsAccountService.ListPaymentsAccounts][google.ads.googleads.v2.services.PaymentsAccountService.ListPaymentsAccounts]. +message ListPaymentsAccountsResponse { + // 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 new file mode 100644 index 000000000..7f32d21b7 --- /dev/null +++ b/google/ads/googleads/v2/services/product_bidding_category_constant_service.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.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"; + +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 = "ProductBiddingCategoryConstantServiceProto"; +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 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.v2.resources.ProductBiddingCategoryConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=productBiddingCategoryConstants/*}" + }; + } +} + +// Request message for +// [ProductBiddingCategoryService.GetProductBiddingCategory][]. +message GetProductBiddingCategoryConstantRequest { + // Resource name of the Product Bidding Category to fetch. + string resource_name = 1; +} diff --git a/google/ads/googleads/v2/services/product_group_view_service.proto b/google/ads/googleads/v2/services/product_group_view_service.proto new file mode 100644 index 000000000..08f7a1d46 --- /dev/null +++ b/google/ads/googleads/v2/services/product_group_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/product_group_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ProductGroupViewServiceProto"; +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 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.v2.resources.ProductGroupView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/productGroupViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/recommendation_service.proto b/google/ads/googleads/v2/services/recommendation_service.proto new file mode 100644 index 000000000..92d6ad11e --- /dev/null +++ b/google/ads/googleads/v2/services/recommendation_service.proto @@ -0,0 +1,246 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/common/extensions.proto"; +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/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"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationServiceProto"; +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 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.v2.resources.Recommendation) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/recommendations/*}" + }; + } + + // Applies given recommendations with corresponding apply parameters. + rpc ApplyRecommendation(ApplyRecommendationRequest) returns (ApplyRecommendationResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/recommendations:apply" + body: "*" + }; + } + + // Dismisses given recommendations. + rpc DismissRecommendation(DismissRecommendationRequest) returns (DismissRecommendationResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/recommendations:dismiss" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // 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; + + // 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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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; + } + + // The ID of the customer with the recommendation. + string customer_id = 1; + + // 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; + + // 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.v2.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/v2/services/remarketing_action_service.proto b/google/ads/googleads/v2/services/remarketing_action_service.proto new file mode 100644 index 000000000..68379b370 --- /dev/null +++ b/google/ads/googleads/v2/services/remarketing_action_service.proto @@ -0,0 +1,116 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/remarketing_action.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "RemarketingActionServiceProto"; +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 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.v2.resources.RemarketingAction) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/remarketingActions/*}" + }; + } + + // Creates or updates remarketing actions. Operation statuses are returned. + rpc MutateRemarketingActions(MutateRemarketingActionsRequest) returns (MutateRemarketingActionsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/remarketingActions:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual remarketing actions. + repeated RemarketingActionOperation operations = 2; + + // 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.v2.resources.RemarketingAction create = 1; + + // Update operation: The remarketing action is expected to have a valid + // resource name. + google.ads.googleads.v2.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/v2/services/search_term_view_service.proto b/google/ads/googleads/v2/services/search_term_view_service.proto new file mode 100644 index 000000000..f319ca179 --- /dev/null +++ b/google/ads/googleads/v2/services/search_term_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/search_term_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "SearchTermViewServiceProto"; +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 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.v2.resources.SearchTermView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/searchTermViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/shared_criterion_service.proto b/google/ads/googleads/v2/services/shared_criterion_service.proto new file mode 100644 index 000000000..6d4703c1a --- /dev/null +++ b/google/ads/googleads/v2/services/shared_criterion_service.proto @@ -0,0 +1,114 @@ +// 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.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"; + +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 = "SharedCriterionServiceProto"; +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 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.v2.resources.SharedCriterion) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/sharedCriteria/*}" + }; + } + + // Creates or removes shared criteria. Operation statuses are returned. + rpc MutateSharedCriteria(MutateSharedCriteriaRequest) returns (MutateSharedCriteriaResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/sharedCriteria:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual shared criteria. + repeated SharedCriterionOperation operations = 2; + + // 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.v2.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/v2/services/shared_set_service.proto b/google/ads/googleads/v2/services/shared_set_service.proto new file mode 100644 index 000000000..c0890b608 --- /dev/null +++ b/google/ads/googleads/v2/services/shared_set_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/shared_set.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "SharedSetServiceProto"; +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 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.v2.resources.SharedSet) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/sharedSets/*}" + }; + } + + // Creates, updates, or removes shared sets. Operation statuses are returned. + rpc MutateSharedSets(MutateSharedSetsRequest) returns (MutateSharedSetsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/sharedSets:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual shared sets. + repeated SharedSetOperation operations = 2; + + // 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.v2.resources.SharedSet create = 1; + + // Update operation: The shared set is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/shopping_performance_view_service.proto b/google/ads/googleads/v2/services/shopping_performance_view_service.proto new file mode 100644 index 000000000..4f36ba392 --- /dev/null +++ b/google/ads/googleads/v2/services/shopping_performance_view_service.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.ads.googleads.v2.services; + +import "google/ads/googleads/v2/resources/shopping_performance_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "ShoppingPerformanceViewServiceProto"; +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 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.v2.resources.ShoppingPerformanceView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/shoppingPerformanceView}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/topic_constant_service.proto b/google/ads/googleads/v2/services/topic_constant_service.proto new file mode 100644 index 000000000..dc08e3a1d --- /dev/null +++ b/google/ads/googleads/v2/services/topic_constant_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/topic_constant.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "TopicConstantServiceProto"; +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 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.v2.resources.TopicConstant) { + option (google.api.http) = { + get: "/v2/{resource_name=topicConstants/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/topic_view_service.proto b/google/ads/googleads/v2/services/topic_view_service.proto new file mode 100644 index 000000000..4692ef933 --- /dev/null +++ b/google/ads/googleads/v2/services/topic_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/topic_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "TopicViewServiceProto"; +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 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.v2.resources.TopicView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/topicViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/user_interest_service.proto b/google/ads/googleads/v2/services/user_interest_service.proto new file mode 100644 index 000000000..df98d0a5c --- /dev/null +++ b/google/ads/googleads/v2/services/user_interest_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/user_interest.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "UserInterestServiceProto"; +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 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.v2.resources.UserInterest) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/userInterests/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/user_list_service.proto b/google/ads/googleads/v2/services/user_list_service.proto new file mode 100644 index 000000000..a5e268f3e --- /dev/null +++ b/google/ads/googleads/v2/services/user_list_service.proto @@ -0,0 +1,121 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/user_list.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "UserListServiceProto"; +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 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.v2.resources.UserList) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/userLists/*}" + }; + } + + // Creates or updates user lists. Operation statuses are returned. + rpc MutateUserLists(MutateUserListsRequest) returns (MutateUserListsResponse) { + option (google.api.http) = { + post: "/v2/customers/{customer_id=*}/userLists:mutate" + body: "*" + }; + } +} + +// 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; +} + +// 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; + + // The list of operations to perform on individual user lists. + repeated UserListOperation operations = 2; + + // 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.v2.resources.UserList create = 1; + + // Update operation: The user list is expected to have a valid resource + // name. + google.ads.googleads.v2.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/v2/services/user_location_view_service.proto b/google/ads/googleads/v2/services/user_location_view_service.proto new file mode 100644 index 000000000..43494edf0 --- /dev/null +++ b/google/ads/googleads/v2/services/user_location_view_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/user_location_view.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "UserLocationViewServiceProto"; +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 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.v2.resources.UserLocationView) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/userLocationViews/*}" + }; + } +} + +// 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; +} diff --git a/google/ads/googleads/v2/services/video_service.proto b/google/ads/googleads/v2/services/video_service.proto new file mode 100644 index 000000000..7acb6fbe6 --- /dev/null +++ b/google/ads/googleads/v2/services/video_service.proto @@ -0,0 +1,51 @@ +// 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.v2.services; + +import "google/ads/googleads/v2/resources/video.proto"; +import "google/api/annotations.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"; +option java_multiple_files = true; +option java_outer_classname = "VideoServiceProto"; +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 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.v2.resources.Video) { + option (google.api.http) = { + get: "/v2/{resource_name=customers/*/videos/*}" + }; + } +} + +// 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; +} diff --git a/google/api/BUILD.bazel b/google/api/BUILD.bazel new file mode 100644 index 000000000..f7c43cd32 --- /dev/null +++ b/google/api/BUILD.bazel @@ -0,0 +1,526 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +proto_library( + name = "annotations_proto", + srcs = ["annotations.proto"], + deps = [ + ":http_proto", + "@com_google_protobuf//:descriptor_proto", + ], +) + +proto_library( + name = "auth_proto", + srcs = ["auth.proto"], + deps = [":annotations_proto"], +) + +proto_library( + name = "backend_proto", + srcs = ["backend.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "billing_proto", + srcs = ["billing.proto"], + deps = [ + ":annotations_proto", + ":metric_proto", + ], +) + +proto_library( + name = "client_proto", + srcs = ["client.proto"], + deps = [ + "@com_google_protobuf//:descriptor_proto", + ], +) + +proto_library( + name = "config_change_proto", + srcs = ["config_change.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "consumer_proto", + srcs = ["consumer.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "context_proto", + srcs = ["context.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "control_proto", + srcs = ["control.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "distribution_proto", + srcs = ["distribution.proto"], + deps = [ + ":annotations_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library( + name = "documentation_proto", + srcs = ["documentation.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "endpoint_proto", + srcs = ["endpoint.proto"], + deps = [":annotations_proto"], +) + +proto_library( + name = "field_behavior_proto", + srcs = ["field_behavior.proto"], + deps = [ + "@com_google_protobuf//:descriptor_proto", + ], +) + +proto_library( + name = "http_proto", + srcs = ["http.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "httpbody_proto", + srcs = ["httpbody.proto"], + deps = ["@com_google_protobuf//:any_proto"], +) + +proto_library( + name = "label_proto", + srcs = ["label.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "launch_stage_proto", + srcs = ["launch_stage.proto"], +) + +proto_library( + name = "log_proto", + srcs = ["log.proto"], + deps = [":label_proto"], +) + +proto_library( + name = "logging_proto", + srcs = ["logging.proto"], + deps = [ + ":annotations_proto", + ":label_proto", + ], +) + +proto_library( + name = "metric_proto", + srcs = ["metric.proto"], + deps = [ + ":label_proto", + ":launch_stage_proto", + "@com_google_protobuf//:duration_proto", + ], +) + +proto_library( + name = "monitored_resource_proto", + srcs = ["monitored_resource.proto"], + deps = [ + ":label_proto", + ":launch_stage_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +proto_library( + name = "monitoring_proto", + srcs = ["monitoring.proto"], + deps = [":annotations_proto"], +) + +proto_library( + name = "quota_proto", + srcs = ["quota.proto"], + deps = [":annotations_proto"], +) + +proto_library( + name = "resource_proto", + srcs = ["resource.proto"], + deps = [ + "@com_google_protobuf//:descriptor_proto", + ], +) + +proto_library( + name = "service_proto", + srcs = ["service.proto"], + deps = [ + ":annotations_proto", + ":auth_proto", + ":backend_proto", + ":billing_proto", + ":context_proto", + ":control_proto", + ":documentation_proto", + ":endpoint_proto", + ":http_proto", + ":label_proto", + ":log_proto", + ":logging_proto", + ":metric_proto", + ":monitored_resource_proto", + ":monitoring_proto", + ":quota_proto", + ":resource_proto", + ":source_info_proto", + ":system_parameter_proto", + ":usage_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:api_proto", + "@com_google_protobuf//:type_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library( + name = "source_info_proto", + srcs = ["source_info.proto"], + deps = ["@com_google_protobuf//:any_proto"], +) + +proto_library( + name = "system_parameter_proto", + srcs = ["system_parameter.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "usage_proto", + srcs = ["usage.proto"], + deps = [":annotations_proto"], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") + +java_proto_library( + name = "api_java_proto", + deps = [ + "annotations_proto", + "auth_proto", + "backend_proto", + "billing_proto", + "client_proto", + "config_change_proto", + "consumer_proto", + "context_proto", + "control_proto", + "distribution_proto", + "documentation_proto", + "endpoint_proto", + "field_behavior_proto", + "http_proto", + "httpbody_proto", + "label_proto", + "launch_stage_proto", + "log_proto", + "logging_proto", + "metric_proto", + "monitored_resource_proto", + "monitoring_proto", + "quota_proto", + "resource_proto", + "service_proto", + "source_info_proto", + "system_parameter_proto", + "usage_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "annotations_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/annotations", + protos = [ + ":annotations_proto", + ":http_proto", + ], +) + +go_proto_library( + name = "client_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations", + protos = [":client_proto"], +) + +go_proto_library( + name = "configchange_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/configchange", + protos = [":config_change_proto"], +) + +go_proto_library( + name = "distribution_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/distribution", + protos = [":distribution_proto"], +) + +go_proto_library( + name = "field_behavior_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations", + protos = [":field_behavior_proto"], +) + +go_proto_library( + name = "httpbody_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/httpbody", + protos = [":httpbody_proto"], +) + +go_proto_library( + name = "label_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/label", + protos = [":label_proto"], +) + +go_proto_library( + name = "api_go_proto", + 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", + ], +) + +go_proto_library( + name = "metric_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/metric", + protos = [":metric_proto"], + deps = [ + ":api_go_proto", + ":label_go_proto", + ], +) + +go_proto_library( + name = "monitoredres_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/monitoredres", + protos = [":monitored_resource_proto"], + deps = [ + ":api_go_proto", + ":label_go_proto", + ], +) + +go_proto_library( + name = "resource_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/annotations;annotations", + protos = [":resource_proto"], +) + +go_proto_library( + name = "serviceconfig_go_proto", + importpath = "google.golang.org/genproto/googleapis/api/serviceconfig", + protos = [ + ":auth_proto", + ":backend_proto", + ":billing_proto", + ":context_proto", + ":control_proto", + ":documentation_proto", + ":endpoint_proto", + ":log_proto", + ":logging_proto", + ":monitoring_proto", + ":quota_proto", + ":service_proto", + ":source_info_proto", + ":system_parameter_proto", + ":usage_proto", + ], + deps = [ + ":annotations_go_proto", + ":api_go_proto", + ":label_go_proto", + ":metric_go_proto", + ":monitoredres_go_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "cc_proto_library") + +cc_proto_library( + name = "annotations_cc_proto", + deps = [":annotations_proto"], +) + +cc_proto_library( + name = "auth_cc_proto", + deps = [":auth_proto"], +) + +cc_proto_library( + name = "backend_cc_proto", + deps = [":backend_proto"], +) + +cc_proto_library( + name = "billing_cc_proto", + deps = [":billing_proto"], +) + +cc_proto_library( + name = "client_cc_proto", + deps = [":client_proto"], +) + +cc_proto_library( + name = "config_change_cc_proto", + deps = [":config_change_proto"], +) + +cc_proto_library( + name = "consumer_cc_proto", + deps = [":consumer_proto"], +) + +cc_proto_library( + name = "context_cc_proto", + deps = [":context_proto"], +) + +cc_proto_library( + name = "control_cc_proto", + deps = [":control_proto"], +) + +cc_proto_library( + name = "distribution_cc_proto", + deps = [":distribution_proto"], +) + +cc_proto_library( + name = "documentation_cc_proto", + deps = [":documentation_proto"], +) + +cc_proto_library( + name = "endpoint_cc_proto", + deps = [":endpoint_proto"], +) + +cc_proto_library( + name = "field_behavior_cc_proto", + deps = [":field_behavior_proto"], +) + +cc_proto_library( + name = "http_cc_proto", + deps = [":http_proto"], +) + +cc_proto_library( + name = "httpbody_cc_proto", + deps = [":httpbody_proto"], +) + +cc_proto_library( + name = "label_cc_proto", + deps = [":label_proto"], +) + +cc_proto_library( + name = "launch_stage_cc_proto", + deps = [":launch_stage_proto"], +) + +cc_proto_library( + name = "log_cc_proto", + deps = [":log_proto"], +) + +cc_proto_library( + name = "logging_cc_proto", + deps = [":logging_proto"], +) + +cc_proto_library( + name = "metric_cc_proto", + deps = [":metric_proto"], +) + +cc_proto_library( + name = "monitored_resource_cc_proto", + deps = [":monitored_resource_proto"], +) + +cc_proto_library( + name = "monitoring_cc_proto", + deps = ["monitoring_proto"], +) + +cc_proto_library( + name = "quota_cc_proto", + deps = ["quota_proto"], +) + +cc_proto_library( + name = "resource_cc_proto", + deps = [":resource_proto"], +) + +cc_proto_library( + name = "service_cc_proto", + deps = [":service_proto"], +) + +cc_proto_library( + name = "source_info_cc_proto", + deps = [":source_info_proto"], +) + +cc_proto_library( + name = "system_parameter_cc_proto", + deps = [":system_parameter_proto"], +) + +cc_proto_library( + name = "usage_cc_proto", + deps = [":usage_proto"], +) diff --git a/google/api/auth.proto b/google/api/auth.proto index cdbc1efe9..7c5d61666 100644 --- a/google/api/auth.proto +++ b/google/api/auth.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,20 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "AuthProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Authentication` defines the authentication configuration for an API. // // Example for an API targeted for external use: @@ -74,8 +72,9 @@ message AuthenticationRule { repeated AuthRequirement requirements = 7; } -// Configuration for an anthentication provider, including support for -// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +// Configuration for an authentication provider, including support for +// [JSON Web Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). message AuthProvider { // The unique identifier of the auth provider. It will be referred to by // `AuthRequirement.provider_id`. @@ -92,12 +91,15 @@ message AuthProvider { string issuer = 2; // URL of the provider's public key set to validate signature of the JWT. See - // [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). // Optional if the key set document: // - can be retrieved from - // [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html - // of the issuer. - // - can be inferred from the email domain of the issuer (e.g. a Google service account). + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of + // the issuer. + // - can be inferred from the email domain of the issuer (e.g. a Google + // service account). // // Example: https://www.googleapis.com/oauth2/v1/certs string jwks_uri = 3; @@ -117,7 +119,7 @@ message AuthProvider { // bookstore_web.apps.googleusercontent.com string audiences = 4; - // Redirect URL if JWT token is required but no present or is expired. + // Redirect URL if JWT token is required but not present or is expired. // Implement authorizationUrl of securityDefinitions in OpenAPI spec. string authorization_url = 5; } @@ -152,7 +154,8 @@ message OAuthRequirements { } // User-defined authentication requirements, including support for -// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +// [JSON Web Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). message AuthRequirement { // [id][google.api.AuthProvider.id] from authentication provider. // diff --git a/google/api/backend.proto b/google/api/backend.proto index dd22919d0..26a16ef41 100644 --- a/google/api/backend.proto +++ b/google/api/backend.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"; @@ -22,7 +23,6 @@ option java_outer_classname = "BackendProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Backend` defines the backend configuration for a service. message Backend { // A list of API backend rules that apply to individual API methods. @@ -33,6 +33,63 @@ message Backend { // A backend rule provides configuration for an individual API element. message BackendRule { + // Path Translation specifies how to combine the backend address with the + // request path in order to produce the appropriate forwarding URL for the + // request. + // + // Path Translation is applicable only to HTTP-based backends. Backends which + // do not accept requests over HTTP/HTTPS should leave `path_translation` + // unspecified. + enum PathTranslation { + PATH_TRANSLATION_UNSPECIFIED = 0; + + // Use the backend address as-is, with no modification to the path. If the + // URL pattern contains variables, the variable names and values will be + // appended to the query string. If a query string parameter and a URL + // pattern variable have the same name, this may result in duplicate keys in + // the query string. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.cloudfunctions.net/getUser + // + // Requests to the following request paths will call the backend at the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + CONSTANT_ADDRESS = 1; + + // The request path will be appended to the backend address. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.appspot.com + // + // Requests to the following request paths will call the backend at the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // https://example.appspot.com/api/company/widgetworks/user/johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + APPEND_PATH_TO_ADDRESS = 2; + } + // Selects the methods to which this rule applies. // // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. @@ -48,4 +105,23 @@ message BackendRule { // Minimum deadline in seconds needed for this method. Calls having deadline // value lower than this will be rejected. double min_deadline = 4; + + // The number of seconds to wait for the completion of a long running + // operation. The default is no deadline. + double operation_deadline = 5; + + PathTranslation path_translation = 6; + + // Authentication settings used by the backend. + // + // These are typically used to provide service management functionality to + // a backend served on a publicly-routable URL. The `authentication` + // details should match the authentication behavior used by the backend. + // + // For example, specifying `jwt_audience` implies that the backend expects + // authentication via a JWT. + oneof authentication { + // The JWT audience is used when generating a JWT id token for the backend. + string jwt_audience = 7; + } } diff --git a/google/api/billing.proto b/google/api/billing.proto index a20bd58f7..87c11e7ff 100644 --- a/google/api/billing.proto +++ b/google/api/billing.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,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.api; -import "google/api/annotations.proto"; import "google/api/metric.proto"; option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; @@ -25,7 +25,6 @@ option java_outer_classname = "BillingProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Billing related configuration of the service. // // The following example shows how to configure monitored resources and metrics diff --git a/google/api/client.proto b/google/api/client.proto new file mode 100644 index 000000000..56f8664aa --- /dev/null +++ b/google/api/client.proto @@ -0,0 +1,100 @@ +// 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.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "ClientProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // A definition of a client library method signature. + // + // In client libraries, each proto RPC corresponds to one or more methods + // which the end user is able to call, and calls the underlying RPC. + // Normally, this method receives a single argument (a struct or instance + // corresponding to the RPC request object). Defining this field will + // add one or more overloads providing flattened or simpler method signatures + // in some languages. + // + // The fields on the method signature are provided as a comma-separated + // string. + // + // For example, the proto RPC and annotation: + // + // rpc CreateSubscription(CreateSubscriptionRequest) + // returns (Subscription) { + // option (google.api.method_signature) = "name,topic"; + // } + // + // Would add the following Java overload (in addition to the method accepting + // the request object): + // + // public final Subscription createSubscription(String name, String topic) + // + // The following backwards-compatibility guidelines apply: + // + // * Adding this annotation to an unannotated method is backwards + // compatible. + // * Adding this annotation to a method which already has existing + // method signature annotations is backwards compatible if and only if + // the new method signature annotation is last in the sequence. + // * Modifying or removing an existing method signature annotation is + // a breaking change. + // * Re-ordering existing method signature annotations is a breaking + // change. + repeated string method_signature = 1051; +} + +extend google.protobuf.ServiceOptions { + // The hostname for this service. + // This should be specified with no prefix or protocol. + // + // Example: + // + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } + string default_host = 1049; + + // OAuth scopes needed for the client. + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } + // + // If there is more than one scope, use a comma-separated string: + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } + string oauth_scopes = 1050; +} diff --git a/google/api/config_change.proto b/google/api/config_change.proto index 1e787931c..c36764a5a 100644 --- a/google/api/config_change.proto +++ b/google/api/config_change.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"; @@ -22,7 +23,6 @@ option java_outer_classname = "ConfigChangeProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Output generated from semantically comparing two versions of a service // configuration. // @@ -36,7 +36,7 @@ message ConfigChange { // 'key' is used. If the field has no unique identifier, the numeric index // is used. // Examples: - // - visibility.rules[selector=="google.LibraryService.CreateBook"].restriction + // - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction // - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value // - logging.producer_destinations[0] string element = 1; diff --git a/google/api/consumer.proto b/google/api/consumer.proto index 4e963168e..0facc2eb1 100644 --- a/google/api/consumer.proto +++ b/google/api/consumer.proto @@ -21,7 +21,6 @@ option java_multiple_files = true; option java_outer_classname = "ConsumerProto"; option java_package = "com.google.api"; - // A descriptor for defining project properties for a service. One service may // have many consumer projects, and the service may want to behave differently // depending on some properties on the project. For example, a project may be diff --git a/google/api/context.proto b/google/api/context.proto index fd03fcae9..2d330f6f2 100644 --- a/google/api/context.proto +++ b/google/api/context.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,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"; @@ -22,7 +23,6 @@ option java_outer_classname = "ContextProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Context` defines which contexts an API requests. // // Example: @@ -40,6 +40,25 @@ option objc_class_prefix = "GAPI"; // // Available context types are defined in package // `google.rpc.context`. +// +// This also provides mechanism to whitelist any protobuf message extension that +// can be sent in grpc metadata using “x-goog-ext--bin” and +// “x-goog-ext--jspb” format. For example, list any service +// specific protobuf types that can appear in grpc metadata as follows in your +// yaml file: +// +// Example: +// +// context: +// rules: +// - selector: "google.example.library.v1.LibraryService.CreateBook" +// allowed_request_extensions: +// - google.foo.v1.NewExtension +// allowed_response_extensions: +// - google.foo.v1.NewExtension +// +// You can also specify extension ID instead of fully qualified extension name +// here. message Context { // A list of RPC context rules that apply to individual API methods. // @@ -60,4 +79,12 @@ message ContextRule { // A list of full type names of provided contexts. repeated string provided = 3; + + // A list of full type names or extension IDs of extensions allowed in grpc + // side channel from client to backend. + repeated string allowed_request_extensions = 4; + + // A list of full type names or extension IDs of extensions allowed in grpc + // side channel from backend to client. + repeated string allowed_response_extensions = 5; } diff --git a/google/api/control.proto b/google/api/control.proto index 772d61175..e769f9783 100644 --- a/google/api/control.proto +++ b/google/api/control.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"; @@ -22,7 +23,6 @@ option java_outer_classname = "ControlProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Selects and configures the service controller used by the service. The // service controller handles features like abuse, quota, billing, logging, // monitoring, etc. diff --git a/google/api/distribution.proto b/google/api/distribution.proto index 2861e9b6f..ee45d9dcd 100644 --- a/google/api/distribution.proto +++ b/google/api/distribution.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,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.api; -import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; @@ -24,19 +24,18 @@ option go_package = "google.golang.org/genproto/googleapis/api/distribution;dist option java_multiple_files = true; option java_outer_classname = "DistributionProto"; option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; - -// Distribution contains summary statistics for a population of values and, -// optionally, a histogram representing the distribution of those values across -// a specified set of histogram buckets. +// `Distribution` contains summary statistics for a population of values. It +// optionally contains a histogram representing the distribution of those values +// across a set of buckets. // // The summary statistics are the count, mean, sum of the squared deviation from // the mean, the minimum, and the maximum of the set of population of values. -// // The histogram is based on a sequence of buckets and gives a count of values -// that fall into each bucket. The boundaries of the buckets are given either -// explicitly or by specifying parameters for a method of computing them -// (buckets of fixed width or buckets of exponentially increasing width). +// that fall into each bucket. The boundaries of the buckets are given either +// explicitly or by formulas for buckets of fixed or exponentially increasing +// widths. // // Although it is not forbidden, it is generally a bad idea to include // non-finite values (infinities or NaNs) in the population of values, as this @@ -51,36 +50,28 @@ message Distribution { double max = 2; } - // A Distribution may optionally contain a histogram of the values in the - // population. The histogram is given in `bucket_counts` as counts of values - // that fall into one of a sequence of non-overlapping buckets. The sequence - // of buckets is described by `bucket_options`. - // - // A bucket specifies an inclusive lower bound and exclusive upper bound for - // the values that are counted for that bucket. The upper bound of a bucket - // is strictly greater than the lower bound. + // `BucketOptions` describes the bucket boundaries used to create a histogram + // for the distribution. The buckets can be in a linear sequence, an + // exponential sequence, or each bucket can be specified explicitly. + // `BucketOptions` does not include the number of values in each bucket. // - // The sequence of N buckets for a Distribution consists of an underflow - // bucket (number 0), zero or more finite buckets (number 1 through N - 2) and - // an overflow bucket (number N - 1). The buckets are contiguous: the lower - // bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. - // The buckets span the whole range of finite values: lower bound of the - // underflow bucket is -infinity and the upper bound of the overflow bucket is - // +infinity. The finite buckets are so-called because both bounds are - // finite. - // - // `BucketOptions` describes bucket boundaries in one of three ways. Two - // describe the boundaries by giving parameters for a formula to generate - // boundaries and one gives the bucket boundaries explicitly. - // - // If `bucket_boundaries` is not given, then no `bucket_counts` may be given. + // A bucket has an inclusive lower bound and exclusive upper bound for the + // values that are counted for that bucket. The upper bound of a bucket must + // be strictly greater than the lower bound. The sequence of N buckets for a + // distribution consists of an underflow bucket (number 0), zero or more + // finite buckets (number 1 through N - 2) and an overflow bucket (number N - + // 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + // same as the upper bound of bucket i - 1. The buckets span the whole range + // of finite values: lower bound of the underflow bucket is -infinity and the + // upper bound of the overflow bucket is +infinity. The finite buckets are + // so-called because both bounds are finite. message BucketOptions { - // Specify a sequence of buckets that all have the same width (except - // overflow and underflow). Each bucket represents a constant absolute - // uncertainty on the specific value in the bucket. + // Specifies a linear sequence of buckets that all have the same width + // (except overflow and underflow). Each bucket represents a constant + // absolute uncertainty on the specific value in the bucket. // - // Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for - // bucket `i`: + // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + // following boundaries: // // Upper bound (0 <= i < N-1): offset + (width * i). // Lower bound (1 <= i < N): offset + (width * (i - 1)). @@ -95,12 +86,12 @@ message Distribution { double offset = 3; } - // Specify a sequence of buckets that have a width that is proportional to - // the value of the lower bound. Each bucket represents a constant relative - // uncertainty on a specific value in the bucket. + // Specifies an exponential sequence of buckets that have a width that is + // proportional to the value of the lower bound. Each bucket represents a + // constant relative uncertainty on a specific value in the bucket. // - // Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for - // bucket i: + // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + // following boundaries: // // Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). // Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). @@ -115,17 +106,17 @@ message Distribution { double scale = 3; } - // A set of buckets with arbitrary widths. + // Specifies a set of buckets with arbitrary widths. // - // Defines `size(bounds) + 1` (= N) buckets with these boundaries for - // bucket i: + // There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + // boundaries: // // Upper bound (0 <= i < N-1): bounds[i] // Lower bound (1 <= i < N); bounds[i - 1] // - // There must be at least one element in `bounds`. If `bounds` has only one - // element, there are no finite buckets, and that single element is the - // common boundary of the overflow and underflow buckets. + // The `bounds` field must contain at least one element. If `bounds` has + // only one element, then there are no finite buckets, and that single + // element is the common boundary of the overflow and underflow buckets. message Explicit { // The values must be monotonically increasing. repeated double bounds = 1; @@ -144,7 +135,36 @@ message Distribution { } } - // The number of values in the population. Must be non-negative. + // Exemplars are example points that may be used to annotate aggregated + // distribution values. They are metadata that gives information about a + // particular value added to a Distribution bucket, such as a trace ID that + // was active when a value was added. They may contain further information, + // such as a example values and timestamps, origin, etc. + message Exemplar { + // Value of the exemplar point. This value determines to which bucket the + // exemplar belongs. + double value = 1; + + // The observation (sampling) time of the above value. + google.protobuf.Timestamp timestamp = 2; + + // Contextual information about the example value. Examples are: + // + // Trace: type.googleapis.com/google.monitoring.v3.SpanContext + // + // Literal string: type.googleapis.com/google.protobuf.StringValue + // + // Labels dropped during aggregation: + // type.googleapis.com/google.monitoring.v3.DroppedLabels + // + // There may be only a single attachment of any given message type in a + // single exemplar, and this is enforced by the system. + repeated google.protobuf.Any attachments = 3; + } + + // The number of values in the population. Must be non-negative. This value + // must equal the sum of the values in `bucket_counts` if a histogram is + // provided. int64 count = 1; // The arithmetic mean of the values in the population. If `count` is zero @@ -152,7 +172,7 @@ message Distribution { double mean = 2; // The sum of squared deviations from the mean of the values in the - // population. For values x_i this is: + // population. For values x_i this is: // // Sum[i=1..n]((x_i - mean)^2) // @@ -166,20 +186,27 @@ message Distribution { // must not be present if the `count` is zero. Range range = 4; - // Defines the histogram bucket boundaries. + // Defines the histogram bucket boundaries. If the distribution does not + // contain a histogram, then omit this field. BucketOptions bucket_options = 6; - // If `bucket_options` is given, then the sum of the values in `bucket_counts` - // must equal the value in `count`. If `bucket_options` is not given, no - // `bucket_counts` fields may be given. + // The number of values in each bucket of the histogram, as described in + // `bucket_options`. If the distribution does not have a histogram, then omit + // this field. If there is a histogram, then the sum of the values in + // `bucket_counts` must equal the value in the `count` field of the + // distribution. // - // Bucket counts are given in order under the numbering scheme described - // above (the underflow bucket has number 0; the finite buckets, if any, - // have numbers 1 through N-2; the overflow bucket has number N-1). + // If present, `bucket_counts` should contain N values, where N is the number + // of buckets specified in `bucket_options`. If you supply fewer than N + // values, the remaining values are assumed to be 0. // - // The size of `bucket_counts` must be no greater than N as defined in - // `bucket_options`. - // - // Any suffix of trailing zero bucket_count fields may be omitted. + // The order of the values in `bucket_counts` follows the bucket numbering + // schemes described for the three bucket types. The first value must be the + // count for the underflow bucket (number 0). The next N-2 values are the + // counts for the finite buckets (number 1 through N-2). The N'th value in + // `bucket_counts` is the count for the overflow bucket (number N-1). repeated int64 bucket_counts = 7; + + // Must be in increasing order of `value` field. + repeated Exemplar exemplars = 10; } diff --git a/google/api/documentation.proto b/google/api/documentation.proto index 03cd73109..74cbf67e9 100644 --- a/google/api/documentation.proto +++ b/google/api/documentation.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"; @@ -22,7 +23,6 @@ option java_outer_classname = "DocumentationProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Documentation` provides the information for describing a service. // // Example: @@ -115,16 +115,16 @@ message DocumentationRule { // The selector is a comma-separated list of patterns. Each pattern is a // qualified name of the element which may end in "*", indicating a wildcard. // Wildcards are only allowed at the end and for a whole component of the - // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To - // specify a default for all applicable elements, the whole pattern "*" - // is used. + // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A + // wildcard will match one or more components. To specify a default for all + // applicable elements, the whole pattern "*" is used. string selector = 1; // Description of the selected API(s). string description = 2; - // Deprecation description of the selected element(s). It can be provided if an - // element is marked as `deprecated`. + // Deprecation description of the selected element(s). It can be provided if + // an element is marked as `deprecated`. string deprecation_description = 3; } @@ -147,8 +147,8 @@ message Page { // `[Java][Tutorial.Java]`. string name = 1; - // The Markdown content of the page. You can use (== include {path} ==) - // to include content from a Markdown file. + // The Markdown content of the page. You can use (== include {path} + // ==) to include content from a Markdown file. string content = 2; // Subpages of this page. The order of subpages specified here will be diff --git a/google/api/endpoint.proto b/google/api/endpoint.proto index c7bb13b03..2077334d2 100644 --- a/google/api/endpoint.proto +++ b/google/api/endpoint.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,20 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "EndpointProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Endpoint` describes a network endpoint that serves a set of APIs. // A service may expose any number of endpoints, and all endpoints share the // same service configuration, such as quota configuration and monitoring @@ -50,15 +48,16 @@ message Endpoint { // aliases. // // Additional names that this endpoint will be hosted on. - repeated string aliases = 2; + repeated string aliases = 2 [deprecated = true]; // The list of features enabled on this endpoint. repeated string features = 4; // The specification of an Internet routable address of API frontend that will - // handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). - // It should be either a valid IPv4 address or a fully-qualified domain name. - // For example, "8.8.8.8" or "myservice.appspot.com". + // handle requests to this [API + // Endpoint](https://cloud.google.com/apis/design/glossary). It should be + // either a valid IPv4 address or a fully-qualified domain name. For example, + // "8.8.8.8" or "myservice.appspot.com". string target = 101; // Allowing diff --git a/google/api/experimental/authorization_config.proto b/google/api/experimental/authorization_config.proto deleted file mode 100644 index 21b35af48..000000000 --- a/google/api/experimental/authorization_config.proto +++ /dev/null @@ -1,40 +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; - -option go_package = "google.golang.org/genproto/googleapis/api;api"; -option java_multiple_files = true; -option java_outer_classname = "AuthorizationConfigProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// Configuration of authorization. -// -// This section determines the authorization provider, if unspecified, then no -// authorization check will be done. -// -// Example: -// -// experimental: -// authorization: -// provider: firebaserules.googleapis.com -message AuthorizationConfig { - // The name of the authorization provider, such as - // firebaserules.googleapis.com. - string provider = 1; -} diff --git a/google/api/expr/BUILD.bazel b/google/api/expr/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/api/expr/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/api/expr/artman_cel.yaml b/google/api/expr/artman_cel.yaml new file mode 100644 index 000000000..89d2d28b2 --- /dev/null +++ b/google/api/expr/artman_cel.yaml @@ -0,0 +1,37 @@ +# 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/cel.yaml b/google/api/expr/cel.yaml new file mode 100644 index 000000000..bbe7fbde1 --- /dev/null +++ b/google/api/expr/cel.yaml @@ -0,0 +1,61 @@ +type: google.api.Service +config_version: 3 +name: cel.googleapis.com +title: Common Expression Language + +apis: +- name: google.api.expr.v1alpha1.ConformanceService +- name: google.api.expr.v1alpha1.CelService + +documentation: + summary: Defines common types for the Common Expression Language. + overview: |- + # Common Expression Language + + The Common Expression Language (CEL) implements common semantics for + expression evaluation, enabling different applications to more easily + interoperate. + + Key Applications + + * Security policy: organization have complex infrastructure and need + common tooling to reason about the system as a whole * Protocols: + expressions are a useful data type and require interoperability across + programming languages and platforms. + + + + Guiding philosophy: + + 1. Keep it small & fast. * CEL evaluates in linear time, is mutation + free, and not Turing-complete. This limitation is a feature of the language + design, which allows the implementation to evaluate orders of magnitude + faster than equivalently sandboxed JavaScript. 2. Make it extensible. * + CEL is designed to be embedded in applications, and allows for extensibility + via its context which allows for functions and data to be provided by the + software that embeds it. 3. Developer-friendly * The language is + approachable to developers. The initial spec was based on the experience of + developing Firebase Rules and usability testing many prior iterations. * + The library itself and accompanying toolings should be easy to adopt by + teams that seek to integrate CEL into their platforms. + + The required components of a system that supports CEL are: + + * The textual representation of an expression as written by a developer. + It is of similar syntax of expressions in C/C++/Java/JavaScript * A binary + representation of an expression. It is an abstract syntax tree (AST). * A + compiler library that converts the textual representation to the binary + representation. This can be done ahead of time (in the control plane) or + just before evaluation (in the data plane). * A context containing one or + more typed variables, often protobuf messages. Most use-case will use + attribute_context.proto * An evaluator library that takes the binary + format in the context and produces a result, usually a Boolean. + + Example of boolean conditions and object construction: + + ``` c // Condition account.balance >= transaction.withdrawal || + (account.overdraftProtection && account.overdraftLimit >= + transaction.withdrawal - account.balance) + + // Object construction common.GeoPoint{ latitude: 10.0, longitude: -5.5 } + ``` diff --git a/google/api/expr/v1alpha1/BUILD.bazel b/google/api/expr/v1alpha1/BUILD.bazel new file mode 100644 index 000000000..6334c9d3d --- /dev/null +++ b/google/api/expr/v1alpha1/BUILD.bazel @@ -0,0 +1,265 @@ +# 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 = "cel_service_proto", + srcs = ["cel_service.proto"], + deps = [ + ":conformance_service_proto", + ], +) + +proto_library( + name = "checked_proto", + srcs = ["checked.proto"], + deps = [ + ":syntax_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +proto_library( + name = "conformance_service_proto", + srcs = ["conformance_service.proto"], + deps = [ + ":checked_proto", + ":eval_proto", + ":syntax_proto", + "//google/rpc:status_proto", + ], +) + +proto_library( + name = "eval_proto", + srcs = ["eval.proto"], + deps = [ + ":value_proto", + "//google/rpc:status_proto", + ], +) + +proto_library( + name = "explain_proto", + srcs = ["explain.proto"], + deps = [ + ":value_proto", + ], +) + +proto_library( + name = "syntax_proto", + srcs = ["syntax.proto"], + deps = [ + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library( + name = "value_proto", + srcs = ["value.proto"], + deps = [ + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +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 = "cel_java_proto", + deps = [":cel_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", +) + +############################################################################## +# Go +############################################################################## +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", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/api/expr/v1alpha1", + protos = [":cel_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_test( + name = "cel_go_gapic_test", + srcs = [":cel_go_gapic_srcjar_test"], + embed = [":cel_go_gapic"], + importpath = "cloud.google.com/go/expr/apiv1alpha1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-cel-v1alpha1-go", + deps = [ + ":cel_go_gapic", + ":cel_go_gapic_srcjar-smoke-test.srcjar", + ":cel_go_gapic_srcjar-test.srcjar", + ":cel_go_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "cel_service_cc_proto", + deps = [":cel_service_proto"], +) + +cc_grpc_library( + name = "cel_service_cc_grpc", + srcs = [":cel_service_proto"], + deps = [":cel_service_cc_proto"], + grpc_only = True, +) + +cc_proto_library( + name = "checked_cc_proto", + deps = [":checked_proto"], +) + +cc_proto_library( + name = "conformance_service_cc_proto", + deps = [":conformance_service_proto"], +) + +cc_grpc_library( + name = "conformance_service_cc_grpc", + srcs = [":conformance_service_proto"], + deps = [":conformance_service_cc_proto"], + grpc_only = True, +) + +cc_proto_library( + name = "eval_cc_proto", + deps = [":eval_proto"], +) + +cc_proto_library( + name = "explain_cc_proto", + deps = [":explain_proto"], +) + +cc_proto_library( + name = "syntax_cc_proto", + deps = [":syntax_proto"], +) + +cc_proto_library( + name = "value_cc_proto", + deps = [":value_proto"], +) diff --git a/google/api/expr/v1alpha1/cel_gapic.yaml b/google/api/expr/v1alpha1/cel_gapic.yaml new file mode 100644 index 000000000..d2213fc7e --- /dev/null +++ b/google/api/expr/v1alpha1/cel_gapic.yaml @@ -0,0 +1,248 @@ +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.expr.v1alpha1 + python: + package_name: google.cloud.api.expr_v1alpha1.gapic + go: + package_name: cloud.google.com/go/expr/apiv1alpha1 + csharp: + package_name: Google.Api.Expr.V1alpha1 + ruby: + package_name: Google::Cloud::Api::Expr::V1alpha1 + php: + package_name: Google\Cloud\Api\Expr\V1alpha1 + nodejs: + package_name: expr.v1alpha1 +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.api.expr.v1alpha1.CelService + # 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: Parse + flattening: + groups: + - parameters: + - cel_source + required_fields: + - cel_source + 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 + flattening: + groups: + - parameters: + required_fields: + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + # The fully qualified name of the API interface. +- name: google.api.expr.v1alpha1.ConformanceService + # 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: Parse + flattening: + groups: + - parameters: + - cel_source + required_fields: + - cel_source + 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 + flattening: + groups: + - parameters: + required_fields: + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/api/expr/v1alpha1/cel_service.proto b/google/api/expr/v1alpha1/cel_service.proto new file mode 100644 index 000000000..0bf649ff5 --- /dev/null +++ b/google/api/expr/v1alpha1/cel_service.proto @@ -0,0 +1,44 @@ +// 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 new file mode 100644 index 000000000..60dd09e20 --- /dev/null +++ b/google/api/expr/v1alpha1/checked.proto @@ -0,0 +1,336 @@ +// 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/syntax.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.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 = "DeclProto"; +option java_package = "com.google.api.expr.v1alpha1"; + +// Protos for representing CEL declarations and typed checked expressions. + +// A CEL expression which has been successfully type checked. +message CheckedExpr { + // A map from expression ids to resolved references. + // + // The following entries are in this table: + // + // - An Ident or Select expression is represented here if it resolves to a + // declaration. For instance, if `a.b.c` is represented by + // `select(select(id(a), b), c)`, and `a.b` resolves to a declaration, + // while `c` is a field selection, then the reference is attached to the + // nested select expression (but not to the id or or the outer select). + // In turn, if `a` resolves to a declaration and `b.c` are field selections, + // the reference is attached to the ident expression. + // - Every Call expression has an entry here, identifying the function being + // called. + // - Every CreateStruct expression for a message has an entry, identifying + // the message. + map reference_map = 2; + + // A map from expression ids to types. + // + // Every expression node which has a type different than DYN has a mapping + // here. If an expression has type DYN, it is omitted from this map to save + // space. + map type_map = 3; + + // The source info derived from input that generated the parsed `expr` and + // any optimizations made during the type-checking pass. + SourceInfo source_info = 5; + + // The checked expression. Semantically equivalent to the parsed `expr`, but + // may have structural differences. + Expr expr = 4; +} + +// Represents a CEL type. +message Type { + // List type with typed elements, e.g. `list`. + message ListType { + // The element type. + Type elem_type = 1; + } + + // Map type with parameterized key and value types, e.g. `map`. + message MapType { + // The type of the key. + Type key_type = 1; + + // The type of the value. + Type value_type = 2; + } + + // Function type with result and arg types. + message FunctionType { + // Result type of the function. + Type result_type = 1; + + // Argument types of the function. + repeated Type arg_types = 2; + } + + // Application defined abstract type. + message AbstractType { + // The fully qualified name of this abstract type. + string name = 1; + + // Parameter types for this abstract type. + repeated Type parameter_types = 2; + } + + // CEL primitive types. + enum PrimitiveType { + // Unspecified type. + PRIMITIVE_TYPE_UNSPECIFIED = 0; + + // Boolean type. + BOOL = 1; + + // Int64 type. + // + // Proto-based integer values are widened to int64. + INT64 = 2; + + // Uint64 type. + // + // Proto-based unsigned integer values are widened to uint64. + UINT64 = 3; + + // Double type. + // + // Proto-based float values are widened to double values. + DOUBLE = 4; + + // String type. + STRING = 5; + + // Bytes type. + BYTES = 6; + } + + // Well-known protobuf types treated with first-class support in CEL. + enum WellKnownType { + // Unspecified type. + WELL_KNOWN_TYPE_UNSPECIFIED = 0; + + // Well-known protobuf.Any type. + // + // Any types are a polymorphic message type. During type-checking they are + // treated like `DYN` types, but at runtime they are resolved to a specific + // message type specified at evaluation time. + ANY = 1; + + // Well-known protobuf.Timestamp type, internally referenced as `timestamp`. + TIMESTAMP = 2; + + // Well-known protobuf.Duration type, internally referenced as `duration`. + DURATION = 3; + } + + // The kind of type. + oneof type_kind { + // Dynamic type. + google.protobuf.Empty dyn = 1; + + // Null value. + google.protobuf.NullValue null = 2; + + // Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`. + PrimitiveType primitive = 3; + + // Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`. + PrimitiveType wrapper = 4; + + // Well-known protobuf type such as `google.protobuf.Timestamp`. + WellKnownType well_known = 5; + + // Parameterized list with elements of `list_type`, e.g. `list`. + ListType list_type = 6; + + // Parameterized map with typed keys and values. + MapType map_type = 7; + + // Function type. + FunctionType function = 8; + + // Protocol buffer message type. + // + // The `message_type` string specifies the qualified message type name. For + // example, `google.plus.Profile`. + string message_type = 9; + + // Type param type. + // + // The `type_param` string specifies the type parameter name, e.g. `list` + // would be a `list_type` whose element type was a `type_param` type + // named `E`. + string type_param = 10; + + // Type type. + // + // The `type` value specifies the target type. e.g. int is type with a + // target type of `Primitive.INT`. + Type type = 11; + + // Error type. + // + // During type-checking if an expression is an error, its type is propagated + // as the `ERROR` type. This permits the type-checker to discover other + // errors present in the expression. + google.protobuf.Empty error = 12; + + // Abstract, application defined type. + AbstractType abstract_type = 14; + } +} + +// Represents a declaration of a named value or function. +// +// A declaration is part of the contract between the expression, the agent +// evaluating that expression, and the caller requesting evaluation. +message Decl { + // Identifier declaration which specifies its type and optional `Expr` value. + // + // An identifier without a value is a declaration that must be provided at + // evaluation time. An identifier with a value should resolve to a constant, + // but may be used in conjunction with other identifiers bound at evaluation + // time. + message IdentDecl { + // Required. The type of the identifier. + Type type = 1; + + // The constant value of the identifier. If not specified, the identifier + // must be supplied at evaluation time. + Constant value = 2; + + // Documentation string for the identifier. + string doc = 3; + } + + // Function declaration specifies one or more overloads which indicate the + // function's parameter types and return type, and may optionally specify a + // function definition in terms of CEL expressions. + // + // Functions have no observable side-effects (there may be side-effects like + // 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. + // + // Functions overloads are declared in either a function or method + // call-style. For methods, the `params[0]` is the expected type of the + // target receiver. + // + // Overloads must have non-overlapping argument types after erasure of all + // parameterized type variables (similar as type erasure in Java). + message Overload { + // 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`. + string overload_id = 1; + + // 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 + // any other type, this means that if `A` is a type parameter, the + // function types `int` and `int` are not disjoint. Likewise, + // `map` is not disjoint from `map`. + // + // When the `result_type` of a function is a generic type param, the + // type param name also appears as the `type` of on at least one params. + repeated Type params = 2; + + // The type param names associated with the function declaration. + // + // For example, `function ex(K key, map map) : V` would yield + // the type params of `K, V`. + repeated string type_params = 3; + + // Required. The result type of the function. For example, the operator + // `string.isEmpty()` would have `result_type` of `kind: BOOL`. + Type result_type = 4; + + // Whether the function is to be used in a method call-style `x.f(...)` + // of a function call-style `f(x, ...)`. + // + // For methods, the first parameter declaration, `params[0]` is the + // expected type of the target receiver. + bool is_instance_function = 5; + + // Documentation string for the overload. + string doc = 6; + } + + // Required. List of function overloads, must contain at least one overload. + repeated Overload overloads = 1; + } + + // The fully qualified name of the declaration. + // + // 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]. + string name = 1; + + // Required. The declaration kind. + oneof decl_kind { + // Identifier declaration. + IdentDecl ident = 2; + + // Function declaration. + FunctionDecl function = 3; + } +} + +// Describes a resolved reference to a declaration. +message Reference { + // The fully qualified name of the declaration. + string name = 1; + + // For references to functions, this is a list of `Overload.overload_id` + // values which match according to typing rules. + // + // If the list has more than one element, overload resolution among the + // 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]. + repeated string overload_id = 3; + + // For references to constants, this may contain the value of the + // constant if known at compile time. + Constant value = 4; +} diff --git a/google/api/expr/v1alpha1/conformance_service.proto b/google/api/expr/v1alpha1/conformance_service.proto new file mode 100644 index 000000000..7a9321a0e --- /dev/null +++ b/google/api/expr/v1alpha1/conformance_service.proto @@ -0,0 +1,165 @@ +// 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/checked.proto"; +import "google/api/expr/v1alpha1/eval.proto"; +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 java_multiple_files = true; +option java_outer_classname = "ConformanceServiceProto"; +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 +// and other utilities. +service ConformanceService { + // 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) {} +} + +// Request message for the Parse method. +message ParseRequest { + // Required. Source text in CEL syntax. + string cel_source = 1; + + // 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]. + string source_location = 3; + + // Prevent macro expansion. See "Macros" in Language Defiinition. + bool disable_macros = 4; +} + +// Response message for the Parse method. +message ParseResponse { + // The parsed representation, or unset if parsing failed. + ParsedExpr parsed_expr = 1; + + // Any number of issues with [StatusDetails][] as the details. + repeated google.rpc.Status issues = 2; +} + +// Request message for the Check method. +message CheckRequest { + // Required. The parsed representation of the CEL program. + ParsedExpr parsed_expr = 1; + + // Declarations of types for external variables and functions. + // Required if program uses external variables or functions + // not in the default environment. + repeated Decl type_env = 2; + + // The protocol buffer context. See "Name Resolution" in the + // 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. + bool no_std_env = 4; +} + +// Response message for the Check method. +message CheckResponse { + // The annotated representation, or unset if checking failed. + CheckedExpr checked_expr = 1; + + // Any number of issues with [StatusDetails][] as the details. + repeated google.rpc.Status issues = 2; +} + +// Request message for the Eval method. +message EvalRequest { + // Required. Either the parsed or annotated representation of the CEL program. + oneof expr_kind { + // Evaluate based on the parsed representation. + ParsedExpr parsed_expr = 1; + + // Evaluate based on the checked representation. + CheckedExpr checked_expr = 2; + } + + // Bindings for the external variables. The types SHOULD be compatible + // 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. + string container = 4; +} + +// Response message for the Eval method. +message EvalResponse { + // The execution result, or unset if execution couldn't start. + 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. + repeated google.rpc.Status issues = 2; +} + +// Warnings or errors in service execution are represented by +// [google.rpc.Status][google.rpc.Status] messages, with the following message +// in the details field. +message IssueDetails { + // Severities of issues. + enum Severity { + // An unspecified severity. + SEVERITY_UNSPECIFIED = 0; + + // Deprecation issue for statements and method that may no longer be + // supported or maintained. + DEPRECATION = 1; + + // Warnings such as: unused variables. + WARNING = 2; + + // Errors such as: unmatched curly braces or variable redefinition. + ERROR = 3; + } + + // The severity of the issue. + Severity severity = 1; + + // Position in the source, if known. + SourcePosition position = 2; + + // Expression ID from [Expr][google.api.expr.v1alpha1.Expr], 0 if unknown. + int64 id = 3; +} diff --git a/google/api/expr/v1alpha1/eval.proto b/google/api/expr/v1alpha1/eval.proto new file mode 100644 index 000000000..f516ba6bc --- /dev/null +++ b/google/api/expr/v1alpha1/eval.proto @@ -0,0 +1,119 @@ +// 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/value.proto"; +import "google/rpc/status.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 = "EvalProto"; +option java_package = "com.google.api.expr.v1alpha1"; + +// The state of an evaluation. +// +// Can represent an inital, partial, or completed state of evaluation. +message EvalState { + // A single evalution result. + message Result { + // The id of the expression this result if for. + int64 expr = 1; + + // The index in `values` of the resulting value. + int64 value = 2; + } + + // The unique values referenced in this message. + repeated ExprValue values = 1; + + // An ordered list of results. + // + // Tracks the flow of evaluation through the expression. + // May be sparse. + repeated Result results = 3; +} + +// The value of an evaluated expression. +message ExprValue { + // An expression can resolve to a value, error or unknown. + oneof kind { + // A concrete value. + Value value = 1; + + // The set of errors in the critical path of evalution. + // + // Only errors in the critical path are included. For example, + // `( || true) && ` will only result in ``, + // while ` || ` will result in both `` and + // ``. + // + // Errors cause by the presence of other errors are not included in the + // set. For example `.foo`, `foo()`, and ` + 1` will + // only result in ``. + // + // Multiple errors *might* be included when evaluation could result + // in different errors. For example ` + ` and + // `foo(, )` may result in ``, `` or both. + // The exact subset of errors included for this case is unspecified and + // depends on the implementation details of the evaluator. + ErrorSet error = 2; + + // The set of unknowns in the critical path of evaluation. + // + // Unknown behaves identically to Error with regards to propagation. + // Specifically, only unknowns in the critical path are included, unknowns + // caused by the presence of other unknowns are not included, and multiple + // unknowns *might* be included included when evaluation could result in + // different unknowns. For example: + // + // ( || true) && -> + // || -> + // .foo -> + // foo() -> + // + -> or + // + // Unknown takes precidence over Error in cases where a `Value` can short + // circuit the result: + // + // || -> + // && -> + // + // Errors take precidence in all other cases: + // + // + -> + // foo(, ) -> + UnknownSet unknown = 3; + } +} + +// A set of errors. +// +// The errors included depend on the context. See `ExprValue.error`. +message ErrorSet { + // The errors in the set. + repeated google.rpc.Status errors = 1; +} + +// A set of expressions for which the value is unknown. +// +// The unknowns included depend on the context. See `ExprValue.unknown`. +message UnknownSet { + // The ids of the expressions with unknown values. + repeated int64 exprs = 1; +} diff --git a/google/api/expr/v1alpha1/explain.proto b/google/api/expr/v1alpha1/explain.proto new file mode 100644 index 000000000..089e144a1 --- /dev/null +++ b/google/api/expr/v1alpha1/explain.proto @@ -0,0 +1,54 @@ +// 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/value.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 = "ExplainProto"; +option java_package = "com.google.api.expr.v1alpha1"; + +// Values of intermediate expressions produced when evaluating expression. +// Deprecated, use `EvalState` instead. +message Explain { + option deprecated = true; + + // ID and value index of one step. + message ExprStep { + // ID of corresponding Expr node. + int64 id = 1; + + // Index of the value in the values list. + int32 value_index = 2; + } + + // All of the observed values. + // + // The field value_index is an index in the values list. + // Separating values from steps is needed to remove redundant values. + repeated Value values = 1; + + // List of steps. + // + // Repeated evaluations of the same expression generate new ExprStep + // instances. The order of such ExprStep instances matches the order of + // elements returned by Comprehension.iter_range. + repeated ExprStep expr_steps = 2; +} diff --git a/google/api/expr/v1alpha1/syntax.proto b/google/api/expr/v1alpha1/syntax.proto new file mode 100644 index 000000000..4a3cb907a --- /dev/null +++ b/google/api/expr/v1alpha1/syntax.proto @@ -0,0 +1,322 @@ +// 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/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.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 = "SyntaxProto"; +option java_package = "com.google.api.expr.v1alpha1"; + +// A representation of the abstract syntax of the Common Expression Language. + +// An expression together with source information as returned by the parser. +message ParsedExpr { + // The parsed expression. + Expr expr = 2; + + // The source info derived from input that generated the parsed `expr`. + SourceInfo source_info = 3; +} + +// An abstract representation of a common expression. +// +// Expressions are abstractly represented as a collection of identifiers, +// select statements, function calls, literals, and comprehensions. All +// 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. +// +// 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`. +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. + string name = 1; + } + + // A field selection expression. e.g. `request.auth`. + message Select { + // Required. The target of the selection expression. + // + // For example, in the select expression `request.auth`, the `request` + // portion of the expression is the `operand`. + Expr operand = 1; + + // Required. The name of the field to select. + // + // For example, in the select expression `request.auth`, the `auth` portion + // of the expression would be the `field`. + string field = 2; + + // Whether the select is to be interpreted as a field presence test. + // + // This results from the macro `has(request.auth)`. + bool test_only = 3; + } + + // A call expression, including calls to predefined functions and operators. + // + // For example, `value == 10`, `size(map_value)`. + message Call { + // The target of an method call-style expression. For example, `x` in + // `x.f()`. + Expr target = 1; + + // Required. The name of the function or method being called. + string function = 2; + + // The arguments. + repeated Expr args = 3; + } + + // A list creation expression. + // + // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g. + // `dyn([1, 'hello', 2.0])` + message CreateList { + // The elements part of the list. + repeated Expr elements = 1; + } + + // A map or message creation expression. + // + // Maps are constructed as `{'key_name': 'value'}`. Message construction is + // similar, but prefixed with a type name and composed of field ids: + // `types.MyType{field_id: 'value'}`. + message CreateStruct { + // Represents an entry. + message Entry { + // Required. An id assigned to this node by the parser which is unique + // in a given expression tree. This is used to associate type + // information and other attributes to the node. + int64 id = 1; + + // The `Entry` key kinds. + oneof key_kind { + // The field key for a message creator statement. + string field_key = 2; + + // The key expression for a map creation statement. + Expr map_key = 3; + } + + // Required. The value assigned to the key. + Expr value = 4; + } + + // The type name of the message to be created, empty when creating map + // literals. + string message_name = 1; + + // The entries in the creation expression. + repeated Entry entries = 2; + } + + // A comprehension expression applied to a list or map. + // + // Comprehensions are not part of the core syntax, but enabled with macros. + // A macro matches a specific call signature within a parsed AST and replaces + // the call with an alternate AST block. Macro expansion happens at parse + // time. + // + // The following macros are supported within CEL: + // + // Aggregate type macros may be applied to all elements in a list or all keys + // in a map: + // + // * `all`, `exists`, `exists_one` - test a predicate expression against + // the inputs and return `true` if the predicate is satisfied for all, + // any, or only one value `list.all(x, x < 10)`. + // * `filter` - test a predicate expression against the inputs and return + // the subset of elements which satisfy the predicate: + // `payments.filter(p, p > 1000)`. + // * `map` - apply an expression to all elements in the input and return the + // output aggregate type: `[1, 2, 3].map(i, i * i)`. + // + // The `has(m.x)` macro tests whether the property `x` is present in struct + // `m`. The semantics of this macro depend on the type of `m`. For proto2 + // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the + // macro tests whether the property is set to its default. For map and struct + // types, the macro tests whether the property `x` is defined on `m`. + message Comprehension { + // The name of the iteration variable. + string iter_var = 1; + + // The range over which var iterates. + Expr iter_range = 2; + + // The name of the variable used for accumulation of the result. + string accu_var = 3; + + // The initial value of the accumulator. + Expr accu_init = 4; + + // An expression which can contain iter_var and accu_var. + // + // Returns false when the result has been computed and may be used as + // a hint to short-circuit the remainder of the comprehension. + Expr loop_condition = 5; + + // An expression which can contain iter_var and accu_var. + // + // Computes the next value of accu_var. + Expr loop_step = 6; + + // An expression which can contain accu_var. + // + // Computes the result. + Expr result = 7; + } + + // Required. An id assigned to this node by the parser which is unique in a + // given expression tree. This is used to associate type information and other + // attributes to a node in the parse tree. + int64 id = 2; + + // Required. Variants of expressions. + oneof expr_kind { + // A literal expression. + Constant const_expr = 3; + + // An identifier expression. + Ident ident_expr = 4; + + // A field selection expression, e.g. `request.auth`. + Select select_expr = 5; + + // A call expression, including calls to predefined functions and operators. + Call call_expr = 6; + + // A list creation expression. + CreateList list_expr = 7; + + // A map or message creation expression. + CreateStruct struct_expr = 8; + + // A comprehension expression. + Comprehension comprehension_expr = 9; + } +} + +// Represents a primitive literal. +// +// Named 'Constant' here for backwards compatibility. +// +// This is similar as the primitives supported in the well-known type +// `google.protobuf.Value`, but richer so it can represent CEL's full range of +// 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. +// +// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, +// `true`, `null`. +message Constant { + // Required. The valid constant kinds. + oneof constant_kind { + // null value. + google.protobuf.NullValue null_value = 1; + + // boolean value. + bool bool_value = 2; + + // int64 value. + int64 int64_value = 3; + + // uint64 value. + uint64 uint64_value = 4; + + // double value. + double double_value = 5; + + // string value. + string string_value = 6; + + // bytes value. + bytes bytes_value = 7; + + // protobuf.Duration value. + // + // Deprecated: duration is no longer considered a builtin cel type. + google.protobuf.Duration duration_value = 8 [deprecated = true]; + + // protobuf.Timestamp value. + // + // Deprecated: timestamp is no longer considered a builtin cel type. + google.protobuf.Timestamp timestamp_value = 9 [deprecated = true]; + } +} + +// Source information collected at parse time. +message SourceInfo { + // The syntax version of the source, e.g. `cel1`. + string syntax_version = 1; + + // The location name. All position information attached to an expression is + // relative to this location. + // + // The location could be a file, UI element, or similar. For example, + // `acme/app/AnvilPolicy.cel`. + string location = 2; + + // Monotonically increasing list of character offsets where newlines appear. + // + // The line number of a given position is the index `i` where for a given + // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The + // column may be derivd from `id_positions[id] - line_offsets[i]`. + repeated int32 line_offsets = 3; + + // A map from the parse node id (e.g. `Expr.id`) to the character offset + // within source. + map positions = 4; +} + +// A specific position in source. +message SourcePosition { + // The soucre location name (e.g. file name). + string location = 1; + + // The character offset. + int32 offset = 2; + + // The 1-based index of the starting line in the source text + // where the issue occurs, or 0 if unknown. + int32 line = 3; + + // The 0-based index of the starting position within the line of source text + // where the issue occurs. Only meaningful if line is nonzero. + int32 column = 4; +} diff --git a/google/api/expr/v1alpha1/value.proto b/google/api/expr/v1alpha1/value.proto new file mode 100644 index 000000000..a0508ed91 --- /dev/null +++ b/google/api/expr/v1alpha1/value.proto @@ -0,0 +1,116 @@ +// 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/protobuf/any.proto"; +import "google/protobuf/struct.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 = "ValueProto"; +option java_package = "com.google.api.expr.v1alpha1"; + +// Contains representations for CEL runtime values. + +// Represents a CEL value. +// +// This is similar to `google.protobuf.Value`, but can represent CEL's full +// range of values. +message Value { + // Required. The valid kinds of values. + oneof kind { + // Null value. + google.protobuf.NullValue null_value = 1; + + // Boolean value. + bool bool_value = 2; + + // Signed integer value. + int64 int64_value = 3; + + // Unsigned integer value. + uint64 uint64_value = 4; + + // Floating point value. + double double_value = 5; + + // UTF-8 string value. + string string_value = 6; + + // Byte string value. + bytes bytes_value = 7; + + // An enum value. + EnumValue enum_value = 9; + + // The proto message backing an object value. + google.protobuf.Any object_value = 10; + + // Map value. + MapValue map_value = 11; + + // List value. + ListValue list_value = 12; + + // Type value. + string type_value = 15; + } +} + +// An enum value. +message EnumValue { + // The fully qualified name of the enum type. + string type = 1; + + // The value of the enum. + int32 value = 2; +} + +// A list. +// +// Wrapped in a message so 'not set' and empty can be differentiated, which is +// required for use in a 'oneof'. +message ListValue { + // The ordered values in the list. + repeated Value values = 1; +} + +// A map. +// +// Wrapped in a message so 'not set' and empty can be differentiated, which is +// required for use in a 'oneof'. +message MapValue { + // An entry in the map. + message Entry { + // The key. + // + // Must be unique with in the map. + // Currently only boolean, int, uint, and string values can be keys. + Value key = 1; + + // The value. + Value value = 2; + } + + // The set of map entries. + // + // CEL has fewer restrictions on keys, so a protobuf map represenation + // cannot be used. + repeated Entry entries = 1; +} diff --git a/google/api/expr/v1beta1/BUILD.bazel b/google/api/expr/v1beta1/BUILD.bazel new file mode 100644 index 000000000..bcf7e6f03 --- /dev/null +++ b/google/api/expr/v1beta1/BUILD.bazel @@ -0,0 +1,89 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +proto_library( + name = "decl_proto", + srcs = ["decl.proto"], + deps = [ + ":expr_proto", + ], +) + +proto_library( + name = "eval_proto", + srcs = ["eval.proto"], + deps = [ + ":value_proto", + "//google/rpc:status_proto", + ], +) + +proto_library( + name = "expr_proto", + srcs = ["expr.proto"], + deps = [ + ":source_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +proto_library( + name = "source_proto", + srcs = ["source.proto"], +) + +proto_library( + name = "value_proto", + srcs = ["value.proto"], + deps = [ + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +proto_library( + name = "cel_proto", + deps = [ + ":decl_proto", + ":eval_proto", + ":expr_proto", + ":source_proto", + ":value_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", +) + +cc_proto_library( + name = "decl_cc_proto", + deps = [":decl_proto"], +) + +cc_proto_library( + name = "eval_cc_proto", + deps = [":eval_proto"], +) + +cc_proto_library( + name = "expr_cc_proto", + deps = [":expr_proto"], +) + +cc_proto_library( + name = "source_cc_proto", + deps = [":source_proto"], +) + +cc_proto_library( + name = "value_cc_proto", + deps = [":value_proto"], +) diff --git a/google/api/expr/v1beta1/decl.proto b/google/api/expr/v1beta1/decl.proto new file mode 100644 index 000000000..6d079b822 --- /dev/null +++ b/google/api/expr/v1beta1/decl.proto @@ -0,0 +1,84 @@ +// 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.v1beta1; + +import "google/api/expr/v1beta1/expr.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; +option java_multiple_files = true; +option java_outer_classname = "DeclProto"; +option java_package = "com.google.api.expr.v1beta1"; + +// A declaration. +message Decl { + // The id of the declaration. + int32 id = 1; + + // The name of the declaration. + string name = 2; + + // The documentation string for the declaration. + string doc = 3; + + // The kind of declaration. + oneof kind { + // An identifier declaration. + IdentDecl ident = 4; + + // A function declaration. + FunctionDecl function = 5; + } +} + +// The declared type of a variable. +// +// Extends runtime type values with extra information used for type checking +// and dispatching. +message DeclType { + // The expression id of the declared type, if applicable. + int32 id = 1; + + // The type name, e.g. 'int', 'my.type.Type' or 'T' + string type = 2; + + // An ordered list of type parameters, e.g. ``. + // Only applies to a subset of types, e.g. `map`, `list`. + repeated DeclType type_params = 4; +} + +// An identifier declaration. +message IdentDecl { + // Optional type of the identifier. + DeclType type = 3; + + // Optional value of the identifier. + Expr value = 4; +} + +// A function declaration. +message FunctionDecl { + // The function arguments. + repeated IdentDecl args = 1; + + // Optional declared return type. + DeclType return_type = 2; + + // If the first argument of the function is the receiver. + bool receiver_function = 3; +} diff --git a/google/api/expr/v1beta1/eval.proto b/google/api/expr/v1beta1/eval.proto new file mode 100644 index 000000000..cdbe6ac3f --- /dev/null +++ b/google/api/expr/v1beta1/eval.proto @@ -0,0 +1,125 @@ +// 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.v1beta1; + +import "google/api/expr/v1beta1/value.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; +option java_multiple_files = true; +option java_outer_classname = "EvalProto"; +option java_package = "com.google.api.expr.v1beta1"; + +// The state of an evaluation. +// +// Can represent an initial, partial, or completed state of evaluation. +message EvalState { + // A single evaluation result. + message Result { + // The expression this result is for. + IdRef expr = 1; + + // The index in `values` of the resulting value. + int32 value = 2; + } + + // The unique values referenced in this message. + repeated ExprValue values = 1; + + // An ordered list of results. + // + // Tracks the flow of evaluation through the expression. + // May be sparse. + repeated Result results = 3; +} + +// The value of an evaluated expression. +message ExprValue { + // An expression can resolve to a value, error or unknown. + oneof kind { + // A concrete value. + Value value = 1; + + // The set of errors in the critical path of evalution. + // + // Only errors in the critical path are included. For example, + // `( || true) && ` will only result in ``, + // while ` || ` will result in both `` and + // ``. + // + // Errors cause by the presence of other errors are not included in the + // set. For example `.foo`, `foo()`, and ` + 1` will + // only result in ``. + // + // Multiple errors *might* be included when evaluation could result + // in different errors. For example ` + ` and + // `foo(, )` may result in ``, `` or both. + // The exact subset of errors included for this case is unspecified and + // depends on the implementation details of the evaluator. + ErrorSet error = 2; + + // The set of unknowns in the critical path of evaluation. + // + // Unknown behaves identically to Error with regards to propagation. + // Specifically, only unknowns in the critical path are included, unknowns + // caused by the presence of other unknowns are not included, and multiple + // unknowns *might* be included included when evaluation could result in + // different unknowns. For example: + // + // ( || true) && -> + // || -> + // .foo -> + // foo() -> + // + -> or + // + // Unknown takes precidence over Error in cases where a `Value` can short + // circuit the result: + // + // || -> + // && -> + // + // Errors take precidence in all other cases: + // + // + -> + // foo(, ) -> + UnknownSet unknown = 3; + } +} + +// A set of errors. +// +// The errors included depend on the context. See `ExprValue.error`. +message ErrorSet { + // The errors in the set. + repeated google.rpc.Status errors = 1; +} + +// A set of expressions for which the value is unknown. +// +// The unknowns included depend on the context. See `ExprValue.unknown`. +message UnknownSet { + // The ids of the expressions with unknown values. + repeated IdRef exprs = 1; +} + +// A reference to an expression id. +message IdRef { + // The expression id. + int32 id = 1; +} diff --git a/google/api/expr/v1beta1/expr.proto b/google/api/expr/v1beta1/expr.proto new file mode 100644 index 000000000..93b917f14 --- /dev/null +++ b/google/api/expr/v1beta1/expr.proto @@ -0,0 +1,269 @@ +// 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.v1beta1; + +import "google/api/expr/v1beta1/source.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; +option java_multiple_files = true; +option java_outer_classname = "ExprProto"; +option java_package = "com.google.api.expr.v1beta1"; + +// An expression together with source information as returned by the parser. +message ParsedExpr { + // The parsed expression. + Expr expr = 2; + + // The source info derived from input that generated the parsed `expr`. + SourceInfo source_info = 3; + + // The syntax version of the source, e.g. `cel1`. + string syntax_version = 4; +} + +// An abstract representation of a common expression. +// +// Expressions are abstractly represented as a collection of identifiers, +// select statements, function calls, literals, and comprehensions. All +// 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. +// +// 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`. +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. + string name = 1; + } + + // A field selection expression. e.g. `request.auth`. + message Select { + // Required. The target of the selection expression. + // + // For example, in the select expression `request.auth`, the `request` + // portion of the expression is the `operand`. + Expr operand = 1; + + // Required. The name of the field to select. + // + // For example, in the select expression `request.auth`, the `auth` portion + // of the expression would be the `field`. + string field = 2; + + // Whether the select is to be interpreted as a field presence test. + // + // This results from the macro `has(request.auth)`. + bool test_only = 3; + } + + // A call expression, including calls to predefined functions and operators. + // + // For example, `value == 10`, `size(map_value)`. + message Call { + // The target of an method call-style expression. For example, `x` in + // `x.f()`. + Expr target = 1; + + // Required. The name of the function or method being called. + string function = 2; + + // The arguments. + repeated Expr args = 3; + } + + // A list creation expression. + // + // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g. + // `dyn([1, 'hello', 2.0])` + message CreateList { + // The elements part of the list. + repeated Expr elements = 1; + } + + // A map or message creation expression. + // + // Maps are constructed as `{'key_name': 'value'}`. Message construction is + // similar, but prefixed with a type name and composed of field ids: + // `types.MyType{field_id: 'value'}`. + message CreateStruct { + // Represents an entry. + message Entry { + // Required. An id assigned to this node by the parser which is unique + // in a given expression tree. This is used to associate type + // information and other attributes to the node. + int32 id = 1; + + // The `Entry` key kinds. + oneof key_kind { + // The field key for a message creator statement. + string field_key = 2; + + // The key expression for a map creation statement. + Expr map_key = 3; + } + + // Required. The value assigned to the key. + Expr value = 4; + } + + // The type name of the message to be created, empty when creating map + // literals. + string type = 1; + + // The entries in the creation expression. + repeated Entry entries = 2; + } + + // A comprehension expression applied to a list or map. + // + // Comprehensions are not part of the core syntax, but enabled with macros. + // A macro matches a specific call signature within a parsed AST and replaces + // the call with an alternate AST block. Macro expansion happens at parse + // time. + // + // The following macros are supported within CEL: + // + // Aggregate type macros may be applied to all elements in a list or all keys + // in a map: + // + // * `all`, `exists`, `exists_one` - test a predicate expression against + // the inputs and return `true` if the predicate is satisfied for all, + // any, or only one value `list.all(x, x < 10)`. + // * `filter` - test a predicate expression against the inputs and return + // the subset of elements which satisfy the predicate: + // `payments.filter(p, p > 1000)`. + // * `map` - apply an expression to all elements in the input and return the + // output aggregate type: `[1, 2, 3].map(i, i * i)`. + // + // The `has(m.x)` macro tests whether the property `x` is present in struct + // `m`. The semantics of this macro depend on the type of `m`. For proto2 + // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the + // macro tests whether the property is set to its default. For map and struct + // types, the macro tests whether the property `x` is defined on `m`. + message Comprehension { + // The name of the iteration variable. + string iter_var = 1; + + // The range over which var iterates. + Expr iter_range = 2; + + // The name of the variable used for accumulation of the result. + string accu_var = 3; + + // The initial value of the accumulator. + Expr accu_init = 4; + + // An expression which can contain iter_var and accu_var. + // + // Returns false when the result has been computed and may be used as + // a hint to short-circuit the remainder of the comprehension. + Expr loop_condition = 5; + + // An expression which can contain iter_var and accu_var. + // + // Computes the next value of accu_var. + Expr loop_step = 6; + + // An expression which can contain accu_var. + // + // Computes the result. + Expr result = 7; + } + + // Required. An id assigned to this node by the parser which is unique in a + // given expression tree. This is used to associate type information and other + // attributes to a node in the parse tree. + int32 id = 2; + + // Required. Variants of expressions. + oneof expr_kind { + // A literal expression. + Literal literal_expr = 3; + + // An identifier expression. + Ident ident_expr = 4; + + // A field selection expression, e.g. `request.auth`. + Select select_expr = 5; + + // A call expression, including calls to predefined functions and operators. + Call call_expr = 6; + + // A list creation expression. + CreateList list_expr = 7; + + // A map or object creation expression. + CreateStruct struct_expr = 8; + + // A comprehension expression. + Comprehension comprehension_expr = 9; + } +} + +// Represents a primitive literal. +// +// This is similar to the primitives supported in the well-known type +// `google.protobuf.Value`, but richer so it can represent CEL's full range of +// 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. +// +// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, +// `true`, `null`. +message Literal { + // Required. The valid constant kinds. + oneof constant_kind { + // null value. + google.protobuf.NullValue null_value = 1; + + // boolean value. + bool bool_value = 2; + + // int64 value. + int64 int64_value = 3; + + // uint64 value. + uint64 uint64_value = 4; + + // double value. + double double_value = 5; + + // string value. + string string_value = 6; + + // bytes value. + bytes bytes_value = 7; + } +} diff --git a/google/api/expr/v1beta1/source.proto b/google/api/expr/v1beta1/source.proto new file mode 100644 index 000000000..adaf84d5e --- /dev/null +++ b/google/api/expr/v1beta1/source.proto @@ -0,0 +1,62 @@ +// 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.v1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; +option java_multiple_files = true; +option java_outer_classname = "SourceProto"; +option java_package = "com.google.api.expr.v1beta1"; + +// Source information collected at parse time. +message SourceInfo { + // The location name. All position information attached to an expression is + // relative to this location. + // + // The location could be a file, UI element, or similar. For example, + // `acme/app/AnvilPolicy.cel`. + string location = 2; + + // Monotonically increasing list of character offsets where newlines appear. + // + // The line number of a given position is the index `i` where for a given + // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The + // column may be derivd from `id_positions[id] - line_offsets[i]`. + repeated int32 line_offsets = 3; + + // A map from the parse node id (e.g. `Expr.id`) to the character offset + // within source. + map positions = 4; +} + +// A specific position in source. +message SourcePosition { + // The soucre location name (e.g. file name). + string location = 1; + + // The character offset. + int32 offset = 2; + + // The 1-based index of the starting line in the source text + // where the issue occurs, or 0 if unknown. + int32 line = 3; + + // The 0-based index of the starting position within the line of source text + // where the issue occurs. Only meaningful if line is nonzer.. + int32 column = 4; +} diff --git a/google/api/expr/v1beta1/value.proto b/google/api/expr/v1beta1/value.proto new file mode 100644 index 000000000..a5ae06766 --- /dev/null +++ b/google/api/expr/v1beta1/value.proto @@ -0,0 +1,114 @@ +// 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.v1beta1; + +import "google/protobuf/any.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; +option java_multiple_files = true; +option java_outer_classname = "ValueProto"; +option java_package = "com.google.api.expr.v1beta1"; + +// Represents a CEL value. +// +// This is similar to `google.protobuf.Value`, but can represent CEL's full +// range of values. +message Value { + // Required. The valid kinds of values. + oneof kind { + // Null value. + google.protobuf.NullValue null_value = 1; + + // Boolean value. + bool bool_value = 2; + + // Signed integer value. + int64 int64_value = 3; + + // Unsigned integer value. + uint64 uint64_value = 4; + + // Floating point value. + double double_value = 5; + + // UTF-8 string value. + string string_value = 6; + + // Byte string value. + bytes bytes_value = 7; + + // An enum value. + EnumValue enum_value = 9; + + // The proto message backing an object value. + google.protobuf.Any object_value = 10; + + // Map value. + MapValue map_value = 11; + + // List value. + ListValue list_value = 12; + + // A Type value represented by the fully qualified name of the type. + string type_value = 15; + } +} + +// An enum value. +message EnumValue { + // The fully qualified name of the enum type. + string type = 1; + + // The value of the enum. + int32 value = 2; +} + +// A list. +// +// Wrapped in a message so 'not set' and empty can be differentiated, which is +// required for use in a 'oneof'. +message ListValue { + // The ordered values in the list. + repeated Value values = 1; +} + +// A map. +// +// Wrapped in a message so 'not set' and empty can be differentiated, which is +// required for use in a 'oneof'. +message MapValue { + // An entry in the map. + message Entry { + // The key. + // + // Must be unique with in the map. + // Currently only boolean, int, uint, and string values can be keys. + Value key = 1; + + // The value. + Value value = 2; + } + + // The set of map entries. + // + // CEL has fewer restrictions on keys, so a protobuf map represenation + // cannot be used. + repeated Entry entries = 1; +} diff --git a/google/api/field_behavior.proto b/google/api/field_behavior.proto new file mode 100644 index 000000000..eb7f78ef1 --- /dev/null +++ b/google/api/field_behavior.proto @@ -0,0 +1,79 @@ +// 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.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "FieldBehaviorProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.FieldOptions { + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + repeated google.api.FieldBehavior field_behavior = 1052; +} + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +enum FieldBehavior { + // Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0; + + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + OPTIONAL = 1; + + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2; + + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3; + + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + INPUT_ONLY = 4; + + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + IMMUTABLE = 5; +} diff --git a/google/api/http.proto b/google/api/http.proto index 78d515d4b..b2977f514 100644 --- a/google/api/http.proto +++ b/google/api/http.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"; @@ -23,7 +24,6 @@ option java_outer_classname = "HttpProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Defines the HTTP configuration for an API service. It contains a list of // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method // to one or more HTTP REST API methods. @@ -33,7 +33,7 @@ message Http { // **NOTE:** All service configuration rules follow "last one wins" order. repeated HttpRule rules = 1; - // When set to true, URL path parmeters will be fully URI-decoded except in + // When set to true, URL path parameters will be fully URI-decoded except in // cases of single segment matches in reserved expansion, where "%2F" will be // left encoded. // @@ -42,94 +42,94 @@ message Http { bool fully_decode_reserved_expansion = 2; } -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; // } // } // message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped +// string name = 1; // Mapped to URL path. // } // message Message { -// string text = 1; // content of the resource +// string text = 1; // The resource content. // } // -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} +// This enables an HTTP REST to gRPC mapping as below: // -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` // +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. // } // -// // This enables a HTTP JSON to RPC mapping as below: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field // specifies the mapping. Consider a REST update method on the // message resource collection: // -// // service Messaging { // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { // option (google.api.http) = { -// put: "/v1/messages/{message_id}" +// patch: "/v1/messages/{message_id}" // body: "message" // }; // } @@ -139,14 +139,14 @@ message Http { // Message message = 2; // mapped to the body // } // -// // The following HTTP JSON to RPC mapping is enabled, where the // representation of the JSON in the request body is determined by // protos JSON encoding: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define that // every field not bound by the path template should be mapped to the @@ -156,7 +156,7 @@ message Http { // service Messaging { // rpc UpdateMessage(Message) returns (Message) { // option (google.api.http) = { -// put: "/v1/messages/{message_id}" +// patch: "/v1/messages/{message_id}" // body: "*" // }; // } @@ -169,13 +169,14 @@ message Http { // // The following HTTP JSON to RPC mapping is enabled: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible to // have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of +// the body. This makes this option more rarely used in practice when // defining REST APIs. The common usage of `*` is in custom methods // which don't use the URL at all for transferring data. // @@ -197,32 +198,31 @@ message Http { // string user_id = 2; // } // +// This enables the following two alternative HTTP JSON to RPC mappings: // -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC +// HTTP | gRPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax // // Template = "/" Segments [ Verb ] ; // Segments = Segment { "/" Segment } ; @@ -231,36 +231,88 @@ message Http { // FieldPath = IDENT { "." IDENT } ; // Verb = ":" LITERAL ; // -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. // // The syntax `Variable` matches part of the URL path as specified by its // template. A variable template must not contain other variables. If a variable // matches a single path segment, its template may be omitted, e.g. `{var}` // is equivalent to `{var=*}`. // +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// // If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion // does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. // -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. message HttpRule { - // Selects methods to which this rule applies. + // Selects a method to which this rule applies. // // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. string selector = 1; @@ -269,19 +321,20 @@ message HttpRule { // used with any of the {get|put|post|delete|patch} methods. A custom method // can be defined using the 'custom' field. oneof pattern { - // Used for listing and getting information about resources. + // Maps to HTTP GET. Used for listing and getting information about + // resources. string get = 2; - // Used for updating a resource. + // Maps to HTTP PUT. Used for replacing a resource. string put = 3; - // Used for creating a resource. + // Maps to HTTP POST. Used for creating a resource or performing an action. string post = 4; - // Used for deleting a resource. + // Maps to HTTP DELETE. Used for deleting a resource. string delete = 5; - // Used for updating a resource. + // Maps to HTTP PATCH. Used for updating a resource. string patch = 6; // The custom pattern is used for specifying an HTTP method that is not @@ -291,12 +344,22 @@ message HttpRule { CustomHttpPattern custom = 8; } - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. string body = 7; + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + // Additional HTTP bindings for the selector. Nested bindings must // not contain an `additional_bindings` field themselves (that is, // the nesting may only be one level deep). diff --git a/google/api/httpbody.proto b/google/api/httpbody.proto index 0e86e267d..45c1e76b1 100644 --- a/google/api/httpbody.proto +++ b/google/api/httpbody.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"; @@ -18,13 +19,13 @@ package google.api; import "google/protobuf/any.proto"; +option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; option java_multiple_files = true; option java_outer_classname = "HttpBodyProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Message that represents an arbitrary HTTP body. It should only be used for // payload formats that can't be represented as JSON, such as raw binary or // an HTML page. @@ -49,7 +50,8 @@ option objc_class_prefix = "GAPI"; // // service ResourceService { // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); // } // // Example with streaming methods: @@ -64,10 +66,10 @@ option objc_class_prefix = "GAPI"; // Use of this type only changes how the request and response bodies are // handled, all other features will continue to work unchanged. message HttpBody { - // The HTTP Content-Type string representing the content type of the body. + // The HTTP Content-Type header value specifying the content type of the body. string content_type = 1; - // HTTP body binary data. + // The HTTP request/response body as raw binary. bytes data = 2; // Application specific response metadata. Must be set in the first response diff --git a/google/api/label.proto b/google/api/label.proto index 3c20752ce..668efd1c6 100644 --- a/google/api/label.proto +++ b/google/api/label.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"; @@ -23,7 +24,6 @@ option java_outer_classname = "LabelProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // A description of a label. message LabelDescriptor { // Value types that can be used as label values. diff --git a/google/api/launch_stage.proto b/google/api/launch_stage.proto new file mode 100644 index 000000000..55fd91424 --- /dev/null +++ b/google/api/launch_stage.proto @@ -0,0 +1,67 @@ +// 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.api; + +option go_package = "google.golang.org/genproto/googleapis/api;api"; +option java_multiple_files = true; +option java_outer_classname = "LaunchStageProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// The launch stage as defined by [Google Cloud Platform +// Launch Stages](http://cloud.google.com/terms/launch-stages). +enum LaunchStage { + // Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0; + + // Early Access features are limited to a closed group of testers. To use + // these features, you must sign up in advance and sign a Trusted Tester + // agreement (which includes confidentiality provisions). These features may + // be unstable, changed in backward-incompatible ways, and are not + // guaranteed to be released. + EARLY_ACCESS = 1; + + // Alpha is a limited availability test for releases before they are cleared + // for widespread use. By Alpha, all significant design issues are resolved + // and we are in the process of verifying functionality. Alpha customers + // need to apply for access, agree to applicable terms, and have their + // projects whitelisted. Alpha releases don’t have to be feature complete, + // no SLAs are provided, and there are no technical support obligations, but + // they will be far enough along that customers can actually use them in + // test environments or for limited-use tests -- just like they would in + // normal production cases. + ALPHA = 2; + + // Beta is the point at which we are ready to open a release for any + // customer to use. There are no SLA or technical support obligations in a + // Beta release. Products will be complete from a feature perspective, but + // may have some open outstanding issues. Beta releases are suitable for + // limited production use cases. + BETA = 3; + + // GA features are open to all developers and are considered stable and + // fully qualified for production use. + GA = 4; + + // Deprecated features are scheduled to be shut down and removed. For more + // information, see the “Deprecation Policy” section of our [Terms of + // Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5; +} diff --git a/google/api/log.proto b/google/api/log.proto index 673b5245a..1125e1fe3 100644 --- a/google/api/log.proto +++ b/google/api/log.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"; @@ -24,7 +25,6 @@ option java_outer_classname = "LogProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // A description of a log type. Example in YAML format: // // - name: library.googleapis.com/activity_history diff --git a/google/api/logging.proto b/google/api/logging.proto index ee7c1966e..9090b2a1c 100644 --- a/google/api/logging.proto +++ b/google/api/logging.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,20 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Logging configuration of the service. // // The following example shows how to configure logs to be sent to the diff --git a/google/api/metric.proto b/google/api/metric.proto index 5473ce5bf..cd2762a94 100644 --- a/google/api/metric.proto +++ b/google/api/metric.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,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.api; import "google/api/label.proto"; +import "google/api/launch_stage.proto"; +import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/api/metric;metric"; option java_multiple_files = true; @@ -24,11 +27,28 @@ option java_outer_classname = "MetricProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Defines a metric type and its schema. Once a metric descriptor is created, // deleting or altering it stops data collection and makes the metric type's // existing data unusable. message MetricDescriptor { + // Additional annotations that can be used to guide the usage of a metric. + message MetricDescriptorMetadata { + // Deprecated. Please use the MetricDescriptor.launch_stage instead. + // The launch stage of the metric definition. + LaunchStage launch_stage = 1 [deprecated = true]; + + // The sampling period of metric data points. For metrics which are written + // periodically, consecutive data points are stored at this time interval, + // excluding data loss due to errors. Metrics with a higher granularity have + // a smaller sampling period. + google.protobuf.Duration sample_period = 2; + + // The delay of data points caused by ingestion. Data points older than this + // age are guaranteed to be ingested and available to be read, excluding + // data loss due to errors. + google.protobuf.Duration ingest_delay = 3; + } + // The kind of measurement. It describes how the data is reported. enum MetricKind { // Do not use this default value. @@ -78,11 +98,12 @@ message MetricDescriptor { string name = 1; // The metric type, including its DNS name prefix. The type is not - // URL-encoded. All user-defined custom metric types have the DNS name - // `custom.googleapis.com`. Metric types should use a natural hierarchical - // grouping. For example: + // URL-encoded. All user-defined metric types have the DNS name + // `custom.googleapis.com` or `external.googleapis.com`. Metric types should + // use a natural hierarchical grouping. For example: // // "custom.googleapis.com/invoice/paid/amount" + // "external.googleapis.com/prometheus/up" // "appengine.googleapis.com/http/server/response_latencies" string type = 8; @@ -177,6 +198,12 @@ message MetricDescriptor { // This field is optional but it is recommended to be set for any metrics // associated with user-visible concepts, such as Quota. string display_name = 7; + + // Optional. Metadata which can be used to guide usage of the metric. + MetricDescriptorMetadata metadata = 10; + + // Optional. The launch stage of the metric definition. + LaunchStage launch_stage = 12; } // A specific metric, identified by specifying values for all of the diff --git a/google/api/monitored_resource.proto b/google/api/monitored_resource.proto index 189ccd4aa..2c94902a2 100644 --- a/google/api/monitored_resource.proto +++ b/google/api/monitored_resource.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.api; import "google/api/label.proto"; +import "google/api/launch_stage.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; @@ -26,7 +28,6 @@ option java_outer_classname = "MonitoredResourceProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // An object that describes the schema of a [MonitoredResource][google.api.MonitoredResource] object using a // type name and a set of labels. For example, the monitored resource // descriptor for Google Compute Engine VM instances has a type of @@ -64,6 +65,9 @@ message MonitoredResourceDescriptor { // resource type. For example, an individual Google Cloud SQL database is // identified by values for the labels `"database_id"` and `"zone"`. repeated LabelDescriptor labels = 4; + + // Optional. The launch stage of the monitored resource definition. + LaunchStage launch_stage = 7; } // An object representing a resource that can be used for monitoring, logging, @@ -94,14 +98,13 @@ message MonitoredResource { // Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] object. // [MonitoredResource][google.api.MonitoredResource] objects contain the minimum set of information to // uniquely identify a monitored resource instance. There is some other useful -// auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion -// pipeline to extract metadata for cloud resources of all types , and stores +// auxiliary metadata. Monitoring and Logging use an ingestion +// pipeline to extract metadata for cloud resources of all types, and store // the metadata in this message. message MonitoredResourceMetadata { // Output only. Values for predefined system metadata labels. - // System labels are a kind of metadata extracted by Google Stackdriver. - // Stackdriver determines what system labels are useful and how to obtain - // their values. Some examples: "machine_image", "vpc", "subnet_id", + // System labels are a kind of metadata extracted by Google, including + // "machine_image", "vpc", "subnet_id", // "security_group", "name", etc. // System label values can be only strings, Boolean values, or a list of // strings. For example: diff --git a/google/api/monitoring.proto b/google/api/monitoring.proto index 30572146d..07e962d1b 100644 --- a/google/api/monitoring.proto +++ b/google/api/monitoring.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,20 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "MonitoringProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Monitoring configuration of the service. // // The example below shows how to configure monitored resources and metrics @@ -70,20 +68,24 @@ message Monitoring { // [Service.monitored_resources][google.api.Service.monitored_resources] section. string monitored_resource = 1; - // Names of the metrics to report to this monitoring destination. - // Each name must be defined in [Service.metrics][google.api.Service.metrics] section. + // Types of the metrics to report to this monitoring destination. + // Each type must be defined in [Service.metrics][google.api.Service.metrics] section. repeated string metrics = 2; } // Monitoring configurations for sending metrics to the producer project. - // There can be multiple producer destinations, each one must have a - // different monitored resource type. A metric can be used in at most - // one producer destination. + // There can be multiple producer destinations. A monitored resouce type may + // appear in multiple monitoring destinations if different aggregations are + // needed for different sets of metrics associated with that monitored + // resource type. A monitored resource and metric pair may only be used once + // in the Monitoring configuration. repeated MonitoringDestination producer_destinations = 1; // Monitoring configurations for sending metrics to the consumer project. - // There can be multiple consumer destinations, each one must have a - // different monitored resource type. A metric can be used in at most - // one consumer destination. + // There can be multiple consumer destinations. A monitored resouce type may + // appear in multiple monitoring destinations if different aggregations are + // needed for different sets of metrics associated with that monitored + // resource type. A monitored resource and metric pair may only be used once + // in the Monitoring configuration. repeated MonitoringDestination consumer_destinations = 2; } diff --git a/google/api/quota.proto b/google/api/quota.proto index aa327a196..2e6e52b66 100644 --- a/google/api/quota.proto +++ b/google/api/quota.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,24 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "QuotaProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Quota configuration helps to achieve fairness and budgeting in service // usage. // -// The quota configuration works this way: +// The metric based quota configuration works this way: // - The service configuration defines a set of metrics. // - For API calls, the quota.metric_rules maps methods to metrics with // corresponding costs. @@ -46,6 +44,7 @@ option objc_class_prefix = "GAPI"; // values: // STANDARD: 10000 // +// // # The metric rules bind all methods to the read_calls metric, // # except for the UpdateBook and DeleteBook methods. These two methods // # are mapped to the write_calls metric, with the UpdateBook method @@ -74,24 +73,18 @@ option objc_class_prefix = "GAPI"; // metric_kind: DELTA // value_type: INT64 // +// message Quota { // List of `QuotaLimit` definitions for the service. - // - // Used by metric-based quotas only. repeated QuotaLimit limits = 3; // List of `MetricRule` definitions, each one mapping a selected method to one // or more metrics. - // - // Used by metric-based quotas only. repeated MetricRule metric_rules = 4; } // Bind API methods to metrics. Binding a method to a metric causes that -// metric's configured quota, billing, and monitoring behaviors to apply to the -// method call. -// -// Used by metric-based quotas only. +// metric's configured quota behaviors to apply to the method call. message MetricRule { // Selects the methods to which this rule applies. // @@ -111,24 +104,12 @@ message MetricRule { // for a limit type. There can be at most one limit for a duration and limit // type combination defined within a `QuotaGroup`. message QuotaLimit { - // Name of the quota limit. The name is used to refer to the limit when - // overriding the default limit on per-consumer basis. + // Name of the quota limit. // - // For group-based quota limits, the name must be unique within the quota - // group. If a name is not provided, it will be generated from the limit_by - // and duration fields. - // - // For metric-based quota limits, the name must be provided, and it must be - // unique within the service. The name can only include alphanumeric - // characters as well as '-'. + // The name must be provided, and it must be unique within the service. The + // name can only include alphanumeric characters as well as '-'. // // The maximum length of the limit name is 64 characters. - // - // The name of a limit is used as a unique identifier for this limit. - // Therefore, once a limit has been put into use, its name should be - // immutable. You can use the display_name field to provide a user-friendly - // name for the limit. The display name can be evolved over time without - // affecting the identity of the limit. string name = 6; // Optional. User-visible, extended description for this quota limit. @@ -180,75 +161,22 @@ message QuotaLimit { // The name of the metric this quota limit applies to. The quota limits with // the same metric will be checked together during runtime. The metric must be // defined within the service config. - // - // Used by metric-based quotas only. string metric = 8; // Specify the unit of the quota limit. It uses the same syntax as // [Metric.unit][]. The supported unit kinds are determined by the quota // backend system. // - // The [Google Service Control](https://cloud.google.com/service-control) - // supports the following unit components: - // * One of the time intevals: - // * "/min" for quota every minute. - // * "/d" for quota every 24 hours, starting 00:00 US Pacific Time. - // * Otherwise the quota won't be reset by time, such as storage limit. - // * One and only one of the granted containers: - // * "/{organization}" quota for an organization. - // * "/{project}" quota for a project. - // * "/{folder}" quota for a folder. - // * "/{resource}" quota for a universal resource. - // * Zero or more quota segmentation dimension. Not all combos are valid. - // * "/{region}" quota for every region. Not to be used with time intervals. - // * Otherwise the resources granted on the target is not segmented. - // * "/{zone}" quota for every zone. Not to be used with time intervals. - // * Otherwise the resources granted on the target is not segmented. - // * "/{resource}" quota for a resource associated with a project or org. - // // Here are some examples: // * "1/min/{project}" for quota per minute per project. - // * "1/min/{user}" for quota per minute per user. - // * "1/min/{organization}" for quota per minute per organization. // // Note: the order of unit components is insignificant. // The "1" at the beginning is required to follow the metric unit syntax. - // - // Used by metric-based quotas only. string unit = 9; - // Tiered limit values. Also allows for regional or zone overrides for these - // values if "/{region}" or "/{zone}" is specified in the unit field. - // - // Currently supported tiers from low to high: - // VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH - // - // To apply different limit values for users according to their tiers, specify - // the values for the tiers you want to differentiate. For example: - // {LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000} - // - // The limit value for each tier is optional except for the tier STANDARD. - // The limit value for an unspecified tier falls to the value of its next - // tier towards tier STANDARD. For the above example, the limit value for tier - // STANDARD is 500. - // - // To apply the same limit value for all users, just specify limit value for - // tier STANDARD. For example: {STANDARD:500}. - // - // To apply a regional overide for a tier, add a map entry with key - // "/", where is a region name. Similarly, for a zone - // override, add a map entry with key "/{zone}". - // Further, a wildcard can be used at the end of a zone name in order to - // specify zone level overrides. For example: - // LOW: 10, STANDARD: 50, HIGH: 100, - // LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200, - // LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80 - // - // The regional overrides tier set for each region must be the same as - // the tier set for default limit values. Same rule applies for zone overrides - // tier as well. - // - // Used by metric-based quotas only. + // Tiered limit values. You must specify this as a key:value pair, with an + // integer value that is the maximum number of requests allowed for the + // specified unit. Currently only STANDARD is supported. map values = 10; // User-visible display name for this limit. diff --git a/google/api/resource.proto b/google/api/resource.proto new file mode 100644 index 000000000..ad6230f1e --- /dev/null +++ b/google/api/resource.proto @@ -0,0 +1,175 @@ +// 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.api; + +import "google/protobuf/descriptor.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "ResourceProto"; +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" + // }]; + // } + google.api.ResourceReference resource_reference = 1055; +} + +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}" + // }; + // } + google.api.ResourceDescriptor resource = 1053; +} + +// A simple descriptor of a resource type. +// +// ResourceDescriptor annotates a resource message (either by means of a +// protobuf annotation or use in the service config), and associates the +// resource's schema, the resource type, and the pattern of the resource name. +// +// 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}" +// }; +// } +// +// 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 ResourceDescriptor { + // A description of the historical or future-looking state of the + // resource pattern. + enum History { + // The "unset" value. + HISTORY_UNSPECIFIED = 0; + + // The resource originally had one pattern and launched as such, and + // additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1; + + // The resource has one pattern, but the API owner expects to add more + // later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + // that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2; + } + + // The resource type. It must be in the format of + // {service_name}/{resource_type_kind}. The `resource_type_kind` must be + // singular and must not include version numbers. + // + // Example: `storage.googleapis.com/Bucket` + // + // The value of the resource_type_kind must follow the regular expression + // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + // should use PascalCase (UpperCamelCase). The maximum number of + // characters allowed for the `resource_type_kind` is 100. + string type = 1; + + // Optional. The valid resource name pattern(s) for this resource type. + // + // Examples: + // - "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, + // the same component name (e.g. "project") refers to IDs of the same + // type of resource. + repeated string pattern = 2; + + // Optional. The field on the resource that designates the resource name + // field. If omitted, this is assumed to be "name". + string name_field = 3; + + // 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 + // }; + // } + History history = 4; +} + +// Defines a proto annotation that describes a field that refers to a 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" + // }]; + // } + 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. + // + // Example: + // + // message ListLogEntriesRequest { + // string parent = 1 [(google.api.resource_reference) = { + // child_type: "logging.googleapis.com/LogEntry" + // }; + // } + string child_type = 2; +} diff --git a/google/api/service.proto b/google/api/service.proto index 87fba7ba6..c29eb5c89 100644 --- a/google/api/service.proto +++ b/google/api/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,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.api; -import "google/api/annotations.proto"; import "google/api/auth.proto"; import "google/api/backend.proto"; import "google/api/billing.proto"; @@ -24,7 +24,6 @@ import "google/api/context.proto"; import "google/api/control.proto"; import "google/api/documentation.proto"; import "google/api/endpoint.proto"; -import "google/api/experimental/experimental.proto"; import "google/api/http.proto"; import "google/api/label.proto"; import "google/api/log.proto"; @@ -33,6 +32,7 @@ import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/api/monitoring.proto"; import "google/api/quota.proto"; +import "google/api/resource.proto"; import "google/api/source_info.proto"; import "google/api/system_parameter.proto"; import "google/api/usage.proto"; @@ -47,7 +47,6 @@ option java_outer_classname = "ServiceProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // `Service` is the root object of Google service configuration schema. It // describes basic information about a service, such as the name and the // title, and delegates other aspects to sub-sections. Each sub-section is @@ -78,13 +77,15 @@ message Service { // The latest config version is `3`. google.protobuf.UInt32Value config_version = 20; - // The DNS address at which this service is available, - // e.g. `calendar.googleapis.com`. + // The service name, which is a DNS-like logical identifier for the + // service, such as `calendar.googleapis.com`. The service name + // typically goes through DNS verification to make sure the owner + // of the service also owns the DNS name. string name = 1; // A unique ID for a specific instance of this message, typically assigned // by the client for tracking purpose. If empty, the server may choose to - // generate one instead. + // generate one instead. Must be no longer than 60 characters. string id = 33; // The product title for this service. @@ -172,7 +173,4 @@ message Service { // Output only. The source information for this configuration if available. SourceInfo source_info = 37; - - // Experimental configuration. - Experimental experimental = 101; } diff --git a/google/api/serviceconfig.yaml b/google/api/serviceconfig.yaml new file mode 100644 index 000000000..6d883d428 --- /dev/null +++ b/google/api/serviceconfig.yaml @@ -0,0 +1,24 @@ +type: google.api.Service +config_version: 1 +name: serviceconfig.googleapis.com +title: Service Config API + +types: +- name: google.api.ConfigChange +- name: google.api.Distribution +- name: google.api.DocumentationRule +- name: google.api.HttpBody +- name: google.api.LabelDescriptor +- name: google.api.Metric +- name: google.api.MonitoredResource +- name: google.api.MonitoredResourceDescriptor +- name: google.api.MonitoredResourceMetadata +- name: google.api.ResourceDescriptor +- name: google.api.ResourceReference +- name: google.api.Service + +enums: +- name: google.api.FieldBehavior + +documentation: + summary: Lets you define and config your API service. diff --git a/google/api/servicecontrol/BUILD.bazel b/google/api/servicecontrol/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/google/api/servicecontrol/v1/check_error.proto b/google/api/servicecontrol/v1/check_error.proto index 7d0d7adad..3395839d8 100644 --- a/google/api/servicecontrol/v1/check_error.proto +++ b/google/api/servicecontrol/v1/check_error.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "CheckErrorProto"; option java_package = "com.google.api.servicecontrol.v1"; - // Defines the errors to be returned in // [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors]. message CheckError { @@ -68,6 +67,10 @@ message CheckError { // specific consumer project. CLIENT_APP_BLOCKED = 111; + // The API targeted by this request is invalid for the specified consumer + // project. + API_TARGET_BLOCKED = 122; + // The consumer's API key is invalid. API_KEY_INVALID = 105; diff --git a/google/api/servicecontrol/v1/distribution.proto b/google/api/servicecontrol/v1/distribution.proto index 757bbfc0e..40b89f5ba 100644 --- a/google/api/servicecontrol/v1/distribution.proto +++ b/google/api/servicecontrol/v1/distribution.proto @@ -22,7 +22,6 @@ option java_multiple_files = true; option java_outer_classname = "DistributionProto"; option java_package = "com.google.api.servicecontrol.v1"; - // Distribution represents a frequency distribution of double-valued sample // points. It contains the size of the population of sample points plus // additional optional information: diff --git a/google/api/servicecontrol/v1/log_entry.proto b/google/api/servicecontrol/v1/log_entry.proto index c06232f3d..50b0fc468 100644 --- a/google/api/servicecontrol/v1/log_entry.proto +++ b/google/api/servicecontrol/v1/log_entry.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.api.servicecontrol.v1"; - // An individual log entry. message LogEntry { // Required. The log to which this log entry belongs. Examples: `"syslog"`, diff --git a/google/api/servicecontrol/v1/metric_value.proto b/google/api/servicecontrol/v1/metric_value.proto index bfc40a8fb..9a62ff698 100644 --- a/google/api/servicecontrol/v1/metric_value.proto +++ b/google/api/servicecontrol/v1/metric_value.proto @@ -27,12 +27,12 @@ option java_multiple_files = true; option java_outer_classname = "MetricValueSetProto"; option java_package = "com.google.api.servicecontrol.v1"; - // Represents a single metric value. message MetricValue { // The labels describing the metric value. - // See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for - // the overriding relationship. + // See comments on + // [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] + // for the overriding relationship. map labels = 1; // The start of the time period over which this metric value's measurement diff --git a/google/api/servicecontrol/v1/operation.proto b/google/api/servicecontrol/v1/operation.proto index 37aa81fbe..301f3575c 100644 --- a/google/api/servicecontrol/v1/operation.proto +++ b/google/api/servicecontrol/v1/operation.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "OperationProto"; option java_package = "com.google.api.servicecontrol.v1"; - // Represents information regarding an operation. message Operation { // Defines the importance of the data contained in the operation. @@ -71,8 +70,10 @@ message Operation { google.protobuf.Timestamp start_time = 4; // End time of the operation. - // Required when the operation is used in [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report], - // but optional when the operation is used in [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check]. + // Required when the operation is used in + // [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report], + // but optional when the operation is used in + // [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check]. google.protobuf.Timestamp end_time = 5; // Labels describing the operation. Only the following labels are allowed: diff --git a/google/api/servicecontrol/v1/quota_controller.proto b/google/api/servicecontrol/v1/quota_controller.proto index 3d48620d8..808a73545 100644 --- a/google/api/servicecontrol/v1/quota_controller.proto +++ b/google/api/servicecontrol/v1/quota_controller.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "QuotaControllerProto"; option java_package = "com.google.api.servicecontrol.v1"; - // [Google Quota Control API](/service-control/overview) // // Allows clients to allocate and release quota against a [managed @@ -43,7 +42,10 @@ service QuotaController { // reliability, the server may inject these errors to prohibit any hard // dependency on the quota functionality. rpc AllocateQuota(AllocateQuotaRequest) returns (AllocateQuotaResponse) { - option (google.api.http) = { post: "/v1/services/{service_name}:allocateQuota" body: "*" }; + option (google.api.http) = { + post: "/v1/services/{service_name}:allocateQuota" + body: "*" + }; } } @@ -52,7 +54,8 @@ message AllocateQuotaRequest { // Name of the service as specified in the service configuration. For example, // `"pubsub.googleapis.com"`. // - // See [google.api.Service][google.api.Service] for the definition of a service name. + // See [google.api.Service][google.api.Service] for the definition of a + // service name. string service_name = 1; // Operation that describes the quota allocation. @@ -160,7 +163,8 @@ message AllocateQuotaResponse { string service_config_id = 4; } -// Represents error information for [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation]. +// Represents error information for +// [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation]. message QuotaError { // Error codes related to project config validations are deprecated since the // quota controller methods do not perform these validations. Instead services diff --git a/google/api/servicecontrol/v1/service_controller.proto b/google/api/servicecontrol/v1/service_controller.proto index 38171ba58..38f53ca06 100644 --- a/google/api/servicecontrol/v1/service_controller.proto +++ b/google/api/servicecontrol/v1/service_controller.proto @@ -28,7 +28,6 @@ option java_outer_classname = "ServiceControllerProto"; option java_package = "com.google.api.servicecontrol.v1"; option objc_class_prefix = "GASC"; - // [Google Service Control API](/service-control/overview) // // Lets clients check and report operations against a [managed @@ -42,13 +41,17 @@ service ServiceController { // 60 seconds. In case of server errors, the client can rely on the cached // results for longer time. // - // NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit of 64KB. + // NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the + // size limit of 64KB. // // This method requires the `servicemanagement.services.check` permission // on the specified service. For more information, see // [Google Cloud IAM](https://cloud.google.com/iam). rpc Check(CheckRequest) returns (CheckResponse) { - option (google.api.http) = { post: "/v1/services/{service_name}:check" body: "*" }; + option (google.api.http) = { + post: "/v1/services/{service_name}:check" + body: "*" + }; } // Reports operation results to Google Service Control, such as logs and @@ -60,13 +63,17 @@ service ServiceController { // the aggregation time window to avoid data loss risk more than 0.01% // for business and compliance reasons. // - // NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit of 1MB. + // NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has + // the size limit of 1MB. // // This method requires the `servicemanagement.services.report` permission // on the specified service. For more information, see // [Google Cloud IAM](https://cloud.google.com/iam). rpc Report(ReportRequest) returns (ReportResponse) { - option (google.api.http) = { post: "/v1/services/{service_name}:report" body: "*" }; + option (google.api.http) = { + post: "/v1/services/{service_name}:report" + body: "*" + }; } } @@ -105,10 +112,14 @@ message CheckResponse { int64 project_number = 1; } - // The same operation_id value used in the [CheckRequest][google.api.servicecontrol.v1.CheckRequest]. - // Used for logging and diagnostics purposes. + // The same operation_id value used in the + // [CheckRequest][google.api.servicecontrol.v1.CheckRequest]. Used for logging + // and diagnostics purposes. string operation_id = 1; + // The current service rollout id used to process the request. + string service_rollout_id = 11; + // Indicate the decision of the check. // // If no check errors are present, the service should process the operation. @@ -141,8 +152,9 @@ message ReportRequest { // of the report. // // If multiple operations are in a single request, the total request size - // should be no larger than 1MB. See [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors] for - // partial failure behavior. + // should be no larger than 1MB. See + // [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors] + // for partial failure behavior. repeated Operation operations = 2; // Specifies which version of service config should be used to process the @@ -155,12 +167,16 @@ message ReportRequest { // Response message for the Report method. message ReportResponse { - // Represents the processing error of one [Operation][google.api.servicecontrol.v1.Operation] in the request. + // Represents the processing error of one + // [Operation][google.api.servicecontrol.v1.Operation] in the request. message ReportError { - // The [Operation.operation_id][google.api.servicecontrol.v1.Operation.operation_id] value from the request. + // The + // [Operation.operation_id][google.api.servicecontrol.v1.Operation.operation_id] + // value from the request. string operation_id = 1; - // Details of the error when processing the [Operation][google.api.servicecontrol.v1.Operation]. + // Details of the error when processing the + // [Operation][google.api.servicecontrol.v1.Operation]. google.rpc.Status status = 2; } @@ -182,4 +198,7 @@ message ReportResponse { // The actual config id used to process the request. string service_config_id = 2; + + // The current service rollout id used to process the request. + string service_rollout_id = 4; } diff --git a/google/api/servicemanagement/BUILD.bazel b/google/api/servicemanagement/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/google/api/servicemanagement/artman_servicemanagement_v1.yaml b/google/api/servicemanagement/artman_servicemanagement_v1.yaml index 7af19c940..cfb5fce21 100644 --- a/google/api/servicemanagement/artman_servicemanagement_v1.yaml +++ b/google/api/servicemanagement/artman_servicemanagement_v1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-servicemanagement-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-servicemanagement-v1 - - name: proto - dest: generated/java/proto-google-cloud-servicemanagement-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-servicemanagement - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-servicemanagement-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/api/servicemanagement/v1/resources.proto b/google/api/servicemanagement/v1/resources.proto index 08f334f4f..1c924849c 100644 --- a/google/api/servicemanagement/v1/resources.proto +++ b/google/api/servicemanagement/v1/resources.proto @@ -35,7 +35,6 @@ option java_package = "com.google.api.servicemanagement.v1"; option objc_class_prefix = "GASM"; option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; - // The full representation of a Service that is managed by // Google Service Management. message ManagedService { @@ -233,9 +232,7 @@ 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 { diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml index c9dfc8d4d..0cca80e29 100644 --- a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml +++ b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Api\Servicemanagement\V1 nodejs: package_name: servicemanagement.v1 -# 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. @@ -75,10 +69,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -125,7 +115,6 @@ interfaces: - producer_project_id - consumer_id required_fields: - request_object_method: false page_streaming: request: page_size_field: page_size @@ -143,7 +132,6 @@ interfaces: - service_name required_fields: - service_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 @@ -154,7 +142,6 @@ interfaces: - service required_fields: - service - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 20000 @@ -165,7 +152,6 @@ interfaces: - service_name required_fields: - service_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -176,7 +162,6 @@ interfaces: - service_name required_fields: - service_name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default # REVIEW: Could this operation take a long time? @@ -188,7 +173,6 @@ interfaces: - service_name required_fields: - service_name - request_object_method: false page_streaming: request: page_size_field: page_size @@ -209,7 +193,6 @@ interfaces: required_fields: - service_name - config_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 @@ -222,7 +205,6 @@ interfaces: required_fields: - service_name - service_config - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 20000 @@ -236,7 +218,6 @@ interfaces: required_fields: - service_name - config_source - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 10000 @@ -248,7 +229,6 @@ interfaces: - filter required_fields: - service_name - request_object_method: false page_streaming: request: page_size_field: page_size @@ -268,7 +248,6 @@ interfaces: required_fields: - service_name - rollout_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 @@ -281,7 +260,6 @@ interfaces: required_fields: - service_name - rollout - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 10000 @@ -294,7 +272,6 @@ interfaces: required_fields: - new_config - old_config - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 10000 @@ -307,7 +284,6 @@ interfaces: required_fields: - service_name - consumer_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 @@ -320,7 +296,6 @@ interfaces: required_fields: - service_name - consumer_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 diff --git a/google/api/servicemanagement/v1/servicemanager.proto b/google/api/servicemanagement/v1/servicemanager.proto index cde85eb54..02d506665 100644 --- a/google/api/servicemanagement/v1/servicemanager.proto +++ b/google/api/servicemanagement/v1/servicemanager.proto @@ -33,7 +33,6 @@ option java_package = "com.google.api.servicemanagement.v1"; option objc_class_prefix = "GASM"; option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; - // [Google Service Management API](/service-management/overview) service ServiceManager { // Lists managed services. @@ -63,7 +62,8 @@ service ServiceManager { // 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" @@ -72,11 +72,14 @@ service ServiceManager { // 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}" }; @@ -88,7 +91,8 @@ 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" }; @@ -96,7 +100,8 @@ service ServiceManager { // 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" }; @@ -106,9 +111,7 @@ service ServiceManager { 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" } }; } @@ -120,7 +123,8 @@ 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" @@ -133,14 +137,16 @@ 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: "*" @@ -149,13 +155,15 @@ service ServiceManager { // 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" }; } - // 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}" @@ -176,7 +184,8 @@ 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" @@ -194,32 +203,35 @@ 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: "*" }; } - // 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 (google.api.http) = { post: "/v1/services/{service_name}:enable" body: "*" }; } - // 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 (google.api.http) = { post: "/v1/services/{service_name}:disable" body: "*" diff --git a/google/api/source_info.proto b/google/api/source_info.proto index 58777856f..5954143de 100644 --- a/google/api/source_info.proto +++ b/google/api/source_info.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"; @@ -24,7 +25,6 @@ option java_outer_classname = "SourceInfoProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Source information used to create a Service Config message SourceInfo { // All files used during config generation. diff --git a/google/api/system_parameter.proto b/google/api/system_parameter.proto index a55212f04..740a5538b 100644 --- a/google/api/system_parameter.proto +++ b/google/api/system_parameter.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"; @@ -22,7 +23,6 @@ option java_outer_classname = "SystemParameterProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // ### System parameter configuration // // A system parameter is a special kind of parameter defined by the API diff --git a/google/api/usage.proto b/google/api/usage.proto index 63299b56d..6ab4e408c 100644 --- a/google/api/usage.proto +++ b/google/api/usage.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,20 +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.api; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; option java_multiple_files = true; option java_outer_classname = "UsageProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Configuration controlling usage of a service. message Usage { // Requirements that must be satisfied before a consumer project can use the diff --git a/google/appengine/artman_appengine.yaml b/google/appengine/artman_appengine.yaml index 7254882b7..62472c75f 100644 --- a/google/appengine/artman_appengine.yaml +++ b/google/appengine/artman_appengine.yaml @@ -7,26 +7,11 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 artifacts: - name: java_grpc type: GRPC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/java/grpc-google-appengine-v1 - - name: proto - dest: generated/java/proto-google-appengine-v1 - name: php_grpc type: GRPC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/php/google-appengine diff --git a/google/appengine/legacy/audit_data.proto b/google/appengine/legacy/audit_data.proto index 75c2a9b20..05181457b 100644 --- a/google/appengine/legacy/audit_data.proto +++ b/google/appengine/legacy/audit_data.proto @@ -21,7 +21,6 @@ option java_multiple_files = true; option java_outer_classname = "AuditDataProto"; option java_package = "com.google.appengine.legacy"; - // Admin Console legacy audit log. message AuditData { // Text description of the admin event. diff --git a/google/appengine/logging/v1/request_log.proto b/google/appengine/logging/v1/request_log.proto index 678ea9a5e..f3e2630a5 100644 --- a/google/appengine/logging/v1/request_log.proto +++ b/google/appengine/logging/v1/request_log.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "RequestLogProto"; option java_package = "com.google.appengine.logging.v1"; - // Application log line emitted while processing a request. message LogLine { // Approximate time when this log entry was made. diff --git a/google/appengine/v1/app_yaml.proto b/google/appengine/v1/app_yaml.proto index 2892ef30d..c0bb2ce21 100644 --- a/google/appengine/v1/app_yaml.proto +++ b/google/appengine/v1/app_yaml.proto @@ -24,8 +24,8 @@ option java_multiple_files = true; option java_outer_classname = "AppYamlProto"; option java_package = "com.google.appengine.v1"; - -// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/) +// [Google Cloud +// Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/) // configuration for API handlers. message ApiConfigHandler { // Action to take when users access resources that require @@ -51,6 +51,7 @@ message ErrorHandler { // Error codes. enum ErrorCode { option allow_alias = true; + // Not specified. ERROR_CODE_DEFAULT is assumed. ERROR_CODE_UNSPECIFIED = 0; @@ -261,6 +262,7 @@ enum LoginRequirement { // Methods to enforce security (HTTPS) on a URL. enum SecurityLevel { option allow_alias = true; + // Not specified. SECURE_UNSPECIFIED = 0; diff --git a/google/appengine/v1/appengine.proto b/google/appengine/v1/appengine.proto index ef947a65b..6b9c38477 100644 --- a/google/appengine/v1/appengine.proto +++ b/google/appengine/v1/appengine.proto @@ -32,22 +32,28 @@ option java_multiple_files = true; option java_outer_classname = "AppengineProto"; option java_package = "com.google.appengine.v1"; - // Manages instances of a version. service Instances { // Lists the instances of a version. rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { - option (google.api.http) = { get: "/v1/{parent=apps/*/services/*/versions/*}/instances" }; + option (google.api.http) = { + get: "/v1/{parent=apps/*/services/*/versions/*}/instances" + }; } // Gets instance information. rpc GetInstance(GetInstanceRequest) returns (Instance) { - option (google.api.http) = { get: "/v1/{name=apps/*/services/*/versions/*/instances/*}" }; + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*/versions/*/instances/*}" + }; } // Stops a running instance. - rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}" }; + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}" + }; } // Enables debugging on a VM instance. This allows you to use the SSH @@ -58,8 +64,12 @@ service Instances { // should be started. // // Only applicable for instances in App Engine flexible environment. - rpc DebugInstance(DebugInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug" body: "*" }; + rpc DebugInstance(DebugInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug" + body: "*" + }; } } @@ -67,19 +77,27 @@ service Instances { service Versions { // Lists the versions of a service. rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { - option (google.api.http) = { get: "/v1/{parent=apps/*/services/*}/versions" }; + option (google.api.http) = { + get: "/v1/{parent=apps/*/services/*}/versions" + }; } // Gets the specified Version resource. // By default, only a `BASIC_VIEW` will be returned. // Specify the `FULL_VIEW` parameter to get the full resource. rpc GetVersion(GetVersionRequest) returns (Version) { - option (google.api.http) = { get: "/v1/{name=apps/*/services/*/versions/*}" }; + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*/versions/*}" + }; } // Deploys code and resource files to a new version. - rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/{parent=apps/*/services/*}/versions" body: "version" }; + rpc CreateVersion(CreateVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=apps/*/services/*}/versions" + body: "version" + }; } // Updates the specified Version resource. @@ -97,13 +115,20 @@ service Versions { // * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): // For Version resources that use automatic scaling and run in the App // Engine standard environment. - rpc UpdateVersion(UpdateVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { patch: "/v1/{name=apps/*/services/*/versions/*}" body: "version" }; + rpc UpdateVersion(UpdateVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/services/*/versions/*}" + body: "version" + }; } // Deletes an existing Version resource. - rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/{name=apps/*/services/*/versions/*}" }; + rpc DeleteVersion(DeleteVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*/versions/*}" + }; } } @@ -111,22 +136,33 @@ service Versions { service Services { // Lists all the services in the application. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { - option (google.api.http) = { get: "/v1/{parent=apps/*}/services" }; + option (google.api.http) = { + get: "/v1/{parent=apps/*}/services" + }; } // Gets the current configuration of the specified service. rpc GetService(GetServiceRequest) returns (Service) { - option (google.api.http) = { get: "/v1/{name=apps/*/services/*}" }; + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*}" + }; } // Updates the configuration of the specified service. - rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { patch: "/v1/{name=apps/*/services/*}" body: "service" }; + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/services/*}" + body: "service" + }; } // Deletes the specified service and all enclosed versions. - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/{name=apps/*/services/*}" }; + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*}" + }; } } @@ -134,15 +170,21 @@ service Services { service Applications { // Gets information about an application. rpc GetApplication(GetApplicationRequest) returns (Application) { - option (google.api.http) = { get: "/v1/{name=apps/*}" }; + option (google.api.http) = { + get: "/v1/{name=apps/*}" + }; } // Recreates the required App Engine features for the application in your // project, for example a Cloud Storage bucket or App Engine service account. // Use this method if you receive an error message about a missing feature, // for example "*Error retrieving the App Engine service account*". - rpc RepairApplication(RepairApplicationRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/{name=apps/*}:repair" body: "*" }; + rpc RepairApplication(RepairApplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=apps/*}:repair" + body: "*" + }; } } @@ -201,14 +243,17 @@ message UpdateServiceRequest { // single version. By default, traffic is shifted immediately. // For gradual traffic migration, the target version // must be located within instances that are configured for both - // [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) + // [warmup + // requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) // and - // [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). + // [automatic + // scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). // You must specify the // [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) // field in the Service resource. Gradual traffic migration is not // supported in the App Engine flexible environment. For examples, see - // [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + // [Migrating and Splitting + // Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). bool migrate_traffic = 4; } @@ -327,8 +372,8 @@ message DebugInstanceRequest { string name = 1; } -// Fields that should be returned when [Version][google.appengine.v1.Version] resources -// are retreived. +// Fields that should be returned when [Version][google.appengine.v1.Version] +// resources are retreived. enum VersionView { // Basic version information including scaling and inbound services, // but not detailed deployment information. diff --git a/google/appengine/v1/application.proto b/google/appengine/v1/application.proto index d962dda6b..f85375fe8 100644 --- a/google/appengine/v1/application.proto +++ b/google/appengine/v1/application.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "ApplicationProto"; option java_package = "com.google.appengine.v1"; - // An Application resource contains the top-level configuration of an App // Engine application. message Application { diff --git a/google/appengine/v1/audit_data.proto b/google/appengine/v1/audit_data.proto index 6318a9600..db8d97df7 100644 --- a/google/appengine/v1/audit_data.proto +++ b/google/appengine/v1/audit_data.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "AuditDataProto"; option java_package = "com.google.appengine.v1"; - // App Engine admin service audit log. message AuditData { // Detailed information about methods that require it. Does not include diff --git a/google/appengine/v1/deploy.proto b/google/appengine/v1/deploy.proto index 77e6444fd..e8419993d 100644 --- a/google/appengine/v1/deploy.proto +++ b/google/appengine/v1/deploy.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "DeployProto"; option java_package = "com.google.appengine.v1"; - // Code and application artifacts used to deploy a version to App Engine. message Deployment { // Manifest of the files stored in Google Cloud Storage that are included diff --git a/google/appengine/v1/instance.proto b/google/appengine/v1/instance.proto index 206af2699..e7c87ee2b 100644 --- a/google/appengine/v1/instance.proto +++ b/google/appengine/v1/instance.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "InstanceProto"; option java_package = "com.google.appengine.v1"; - // An Instance resource is the computing unit that App Engine uses to // automatically scale an application. message Instance { diff --git a/google/appengine/v1/location.proto b/google/appengine/v1/location.proto index 2a81fb912..8364dde89 100644 --- a/google/appengine/v1/location.proto +++ b/google/appengine/v1/location.proto @@ -24,8 +24,8 @@ option java_multiple_files = true; option java_outer_classname = "LocationProto"; option java_package = "com.google.appengine.v1"; - -// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. +// Metadata for the given +// [google.cloud.location.Location][google.cloud.location.Location]. message LocationMetadata { // App Engine Standard Environment is available in the given location. // diff --git a/google/appengine/v1/operation.proto b/google/appengine/v1/operation.proto index ec7988892..b1c9e2358 100644 --- a/google/appengine/v1/operation.proto +++ b/google/appengine/v1/operation.proto @@ -24,8 +24,8 @@ option java_multiple_files = true; option java_outer_classname = "OperationProto"; option java_package = "com.google.appengine.v1"; - -// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation]. +// Metadata for the given +// [google.longrunning.Operation][google.longrunning.Operation]. message OperationMetadataV1 { // API method that initiated this operation. Example: // `google.appengine.v1.Versions.CreateVersion`. diff --git a/google/appengine/v1/service.proto b/google/appengine/v1/service.proto index 2a24c47fd..2726fae9e 100644 --- a/google/appengine/v1/service.proto +++ b/google/appengine/v1/service.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "ServiceProto"; option java_package = "com.google.appengine.v1"; - // A Service resource is a logical component of an application that can share // state and communicate in a secure fashion with other services. // For example, an application that handles customer requests might diff --git a/google/appengine/v1/version.proto b/google/appengine/v1/version.proto index b32e1ac5f..94ed0b0cc 100644 --- a/google/appengine/v1/version.proto +++ b/google/appengine/v1/version.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "VersionProto"; option java_package = "com.google.appengine.v1"; - // A Version resource is a specific set of source code and configuration files // that are deployed into a service. message Version { @@ -138,7 +137,8 @@ message Version { repeated Library libraries = 102; // Serving configuration for - // [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). + // [Google Cloud + // Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). // // Only returned in `GET` requests if `view=FULL` is set. ApiConfigHandler api_config = 103; @@ -249,7 +249,8 @@ message BasicScaling { message ManualScaling { // Number of instances to assign to the service at the start. This number // can later be altered by using the - // [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions) + // [Modules + // API](https://cloud.google.com/appengine/docs/python/modules/functions) // `set_num_instances()` function. int32 instances = 1; } diff --git a/google/artman_core.yaml b/google/artman_core.yaml index 9af5f9981..1ae4967ae 100644 --- a/google/artman_core.yaml +++ b/google/artman_core.yaml @@ -11,27 +11,12 @@ common: # Exclusions - -api/servicemanagement - -api/servicecontrol + - -api/expr artifacts: - name: java_grpc type: GRPC language: JAVA release_level: GA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/java/grpc-google-common-protos - - name: proto - dest: generated/java/proto-google-common-protos - name: php_grpc type: GRPC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/php/google-common-protos diff --git a/google/artman_logging_external_types.yaml b/google/artman_logging_external_types.yaml index 49e00755c..875708275 100644 --- a/google/artman_logging_external_types.yaml +++ b/google/artman_logging_external_types.yaml @@ -10,27 +10,13 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 - name: google-appengine-v1 + proto_path: google/appengine/v1 artifacts: - name: java_grpc type: GRPC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: proto - dest: generated/java/proto-google-logging-external-types - - name: grpc - dest: generated/java/grpc-google-logging-external-types - name: php_grpc type: GRPC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/php/google-logging-external-types diff --git a/google/assistant/embedded/v1alpha1/embedded_assistant.proto b/google/assistant/embedded/v1alpha1/embedded_assistant.proto index 361c326da..79aa6cbca 100644 --- a/google/assistant/embedded/v1alpha1/embedded_assistant.proto +++ b/google/assistant/embedded/v1alpha1/embedded_assistant.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "AssistantProto"; option java_package = "com.google.assistant.embedded.v1alpha1"; - // Service that implements Google Assistant API. service EmbeddedAssistant { // Initiates or continues a conversation with the embedded assistant service. @@ -85,7 +84,8 @@ message ConverseConfig { // Specifies how to process the `audio_in` data that will be provided in // subsequent requests. For recommended settings, see the Google Assistant SDK -// [best practices](https://developers.google.com/assistant/sdk/develop/grpc/best-practices/audio). +// [best +// practices](https://developers.google.com/assistant/sdk/develop/grpc/best-practices/audio). message AudioInConfig { // Audio encoding of the data sent in the audio message. // Audio must be one-channel (mono). The only language supported is "en-US". @@ -263,10 +263,10 @@ message ConverseResponse { // Exactly one of these fields will be populated in each `ConverseResponse`. oneof converse_response { - // *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] message that - // specifies the error for the operation. - // If an error occurs during processing, this message will be set and there - // will be no further messages sent. + // *Output-only* If set, returns a [google.rpc.Status][google.rpc.Status] + // message that specifies the error for the operation. If an error occurs + // during processing, this message will be set and there will be no further + // messages sent. google.rpc.Status error = 1; // *Output-only* Indicates the type of event. diff --git a/google/assistant/embedded/v1alpha2/embedded_assistant.proto b/google/assistant/embedded/v1alpha2/embedded_assistant.proto index b5787e1a9..eccd17611 100755 --- a/google/assistant/embedded/v1alpha2/embedded_assistant.proto +++ b/google/assistant/embedded/v1alpha2/embedded_assistant.proto @@ -25,7 +25,6 @@ option java_outer_classname = "AssistantProto"; option java_package = "com.google.assistant.embedded.v1alpha2"; option objc_class_prefix = "ASTSDK"; - // Service that implements the Google Assistant API. service EmbeddedAssistant { // Initiates or continues a conversation with the embedded Assistant Service. @@ -161,7 +160,8 @@ message DebugInfo { message AssistConfig { oneof type { // Specifies how to process the subsequent incoming audio. Required if - // [AssistRequest.audio_in][google.assistant.embedded.v1alpha2.AssistRequest.audio_in] bytes will be provided in subsequent requests. + // [AssistRequest.audio_in][google.assistant.embedded.v1alpha2.AssistRequest.audio_in] + // bytes will be provided in subsequent requests. AudioInConfig audio_in_config = 1; // The text input to be sent to the Assistant. This can be populated from a @@ -188,7 +188,8 @@ message AssistConfig { // Specifies how to process the `audio_in` data that will be provided in // subsequent requests. For recommended settings, see the Google Assistant SDK -// [best practices](https://developers.google.com/assistant/sdk/guides/service/python/best-practices/audio). +// [best +// practices](https://developers.google.com/assistant/sdk/guides/service/python/best-practices/audio). message AudioInConfig { // Audio encoding of the data sent in the audio message. // Audio must be one-channel (mono). @@ -282,17 +283,20 @@ message ScreenOutConfig { // Provides information about the current dialog state. message DialogStateIn { // *Required* This field must always be set to the - // [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state] value that was returned in the prior - // `Assist` RPC. It should only be omitted (field not set) if there was no - // prior `Assist` RPC because this is the first `Assist` RPC made by this - // device after it was first setup and/or a factory-default reset. + // [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state] + // value that was returned in the prior `Assist` RPC. It should only be + // omitted (field not set) if there was no prior `Assist` RPC because this is + // the first `Assist` RPC made by this device after it was first setup and/or + // a factory-default reset. bytes conversation_state = 1; // *Required* Language of the request in // [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example, - // "en-US"). See [Language Support](https://developers.google.com/assistant/sdk/reference/rpc/languages) + // "en-US"). See [Language + // Support](https://developers.google.com/assistant/sdk/reference/rpc/languages) // for more information. If you have selected a language for this `device_id` - // using the [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings) + // using the + // [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings) // menu in your phone's Google Assistant app, that selection will override // this value. string language_code = 2; diff --git a/google/bigtable/BUILD.bazel b/google/bigtable/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/bigtable/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/bigtable/admin/BUILD.bazel b/google/bigtable/admin/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/bigtable/admin/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/bigtable/admin/artman_bigtableadmin.yaml b/google/bigtable/admin/artman_bigtableadmin.yaml index e5a9c4c32..abb1304d8 100644 --- a/google/bigtable/admin/artman_bigtableadmin.yaml +++ b/google/bigtable/admin/artman_bigtableadmin.yaml @@ -9,93 +9,31 @@ common: 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: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-bigtable-admin-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-bigtable-admin-v2 - - name: proto - dest: generated/java/proto-google-cloud-bigtable-admin-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-bigtable-admin - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-bigtable-admin-v2 - - name: grpc - dest: generated/python/proto-google-cloud-bigtable-admin-v2 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-bigtable-admin-v2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-bigtable-admin - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/bigtable-admin/v2 - dest: google-cloud-bigtable-admin/lib/google/cloud/bigtable-admin/v2 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-bigtable-admin-v2/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: bigtable-admin/apiv2 - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v2 - dest: packages/bigtable-admin/src/v2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/bigtable-admin - name: gapic_config type: GAPIC_CONFIG diff --git a/google/bigtable/admin/bigtableadmin.yaml b/google/bigtable/admin/bigtableadmin.yaml index 498bb05ca..5e6b8075d 100644 --- a/google/bigtable/admin/bigtableadmin.yaml +++ b/google/bigtable/admin/bigtableadmin.yaml @@ -26,6 +26,8 @@ backend: 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 diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto index ca3b663d8..0ce39959e 100644 --- a/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto +++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableClusterDataProto"; option java_package = "com.google.bigtable.admin.cluster.v1"; - // A physical location in which a particular project can allocate Cloud BigTable // resources. message Zone { diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto index 038fcc463..a95fdb1fa 100644 --- a/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto +++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto @@ -27,23 +27,28 @@ option java_multiple_files = true; option java_outer_classname = "BigtableClusterServicesProto"; option java_package = "com.google.bigtable.admin.cluster.v1"; - // Service for managing zonal Cloud Bigtable resources. service BigtableClusterService { // Lists the supported zones for the given project. rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*}/zones" }; + option (google.api.http) = { + get: "/v1/{name=projects/*}/zones" + }; } // Gets information about a particular cluster. rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { get: "/v1/{name=projects/*/zones/*/clusters/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/zones/*/clusters/*}" + }; } // Lists all clusters in the given project, along with any zones for which // cluster information could not be retrieved. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*}/aggregated/clusters" }; + option (google.api.http) = { + get: "/v1/{name=projects/*}/aggregated/clusters" + }; } // Creates a cluster and begins preparing it to begin serving. The returned @@ -62,10 +67,14 @@ service BigtableClusterService { // * New tables can be created in the cluster. // * The cluster's allocated resource levels will be readable via the API. // The embedded operation's "metadata" field type is - // [CreateClusterMetadata][google.bigtable.admin.cluster.v1.CreateClusterMetadata] The embedded operation's "response" field type is + // [CreateClusterMetadata][google.bigtable.admin.cluster.v1.CreateClusterMetadata] + // The embedded operation's "response" field type is // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful. rpc CreateCluster(CreateClusterRequest) returns (Cluster) { - option (google.api.http) = { post: "/v1/{name=projects/*/zones/*}/clusters" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/zones/*}/clusters" + body: "*" + }; } // Updates a cluster, and begins allocating or releasing resources as @@ -89,10 +98,14 @@ service BigtableClusterService { // * All newly-reserved resources will be available for serving the cluster's // tables. // * The cluster's new resource levels will be readable via the API. - // [UpdateClusterMetadata][google.bigtable.admin.cluster.v1.UpdateClusterMetadata] The embedded operation's "response" field type is + // [UpdateClusterMetadata][google.bigtable.admin.cluster.v1.UpdateClusterMetadata] + // The embedded operation's "response" field type is // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful. rpc UpdateCluster(Cluster) returns (Cluster) { - option (google.api.http) = { put: "/v1/{name=projects/*/zones/*/clusters/*}" body: "*" }; + option (google.api.http) = { + put: "/v1/{name=projects/*/zones/*/clusters/*}" + body: "*" + }; } // Marks a cluster and all of its tables for permanent deletion in 7 days. @@ -108,7 +121,9 @@ service BigtableClusterService { // * The cluster and *all of its tables* will immediately and irrevocably // disappear from the API, and their data will be permanently deleted. rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/zones/*/clusters/*}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/zones/*/clusters/*}" + }; } // Cancels the scheduled deletion of an cluster and begins preparing it to @@ -122,9 +137,14 @@ service BigtableClusterService { // Upon completion of the returned operation: // * Billing for the cluster's resources will resume. // * All tables within the cluster will be available. - // [UndeleteClusterMetadata][google.bigtable.admin.cluster.v1.UndeleteClusterMetadata] The embedded operation's "response" field type is + // [UndeleteClusterMetadata][google.bigtable.admin.cluster.v1.UndeleteClusterMetadata] + // The embedded operation's "response" field type is // [Cluster][google.bigtable.admin.cluster.v1.Cluster], if successful. - rpc UndeleteCluster(UndeleteClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/{name=projects/*/zones/*/clusters/*}:undelete" body: "" }; + rpc UndeleteCluster(UndeleteClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/zones/*/clusters/*}:undelete" + body: "" + }; } } diff --git a/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto b/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto index 518d14dac..48ea157f9 100644 --- a/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto +++ b/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableClusterServiceMessagesProto"; option java_package = "com.google.bigtable.admin.cluster.v1"; - // Request message for BigtableClusterService.ListZones. message ListZonesRequest { // The unique name of the project for which a list of supported zones is @@ -136,6 +135,4 @@ message UndeleteClusterMetadata { // Metadata type for operations initiated by the V2 BigtableAdmin service. // More complete information for such operations is available via the V2 API. -message V2OperationMetadata { - -} +message V2OperationMetadata {} diff --git a/google/bigtable/admin/table/v1/bigtable_table_data.proto b/google/bigtable/admin/table/v1/bigtable_table_data.proto index e4efb74f5..c4ba2a591 100644 --- a/google/bigtable/admin/table/v1/bigtable_table_data.proto +++ b/google/bigtable/admin/table/v1/bigtable_table_data.proto @@ -24,13 +24,10 @@ option java_multiple_files = true; option java_outer_classname = "BigtableTableDataProto"; option java_package = "com.google.bigtable.admin.table.v1"; - // A collection of user data indexed by row, column, and timestamp. // Each table is served using the resources of its parent cluster. message Table { - enum TimestampGranularity { - MILLIS = 0; - } + enum TimestampGranularity { MILLIS = 0; } // A unique identifier of the form // /tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]* diff --git a/google/bigtable/admin/table/v1/bigtable_table_service.proto b/google/bigtable/admin/table/v1/bigtable_table_service.proto index 6e968fee1..f94b8845f 100644 --- a/google/bigtable/admin/table/v1/bigtable_table_service.proto +++ b/google/bigtable/admin/table/v1/bigtable_table_service.proto @@ -26,55 +26,79 @@ option java_multiple_files = true; option java_outer_classname = "BigtableTableServicesProto"; option java_package = "com.google.bigtable.admin.table.v1"; - // Service for creating, configuring, and deleting Cloud Bigtable tables. -// Provides access to the table schemas only, not the data stored within the tables. +// Provides access to the table schemas only, not the data stored within the +// tables. service BigtableTableService { // Creates a new table, to be served from a specified cluster. // The table can be created with a full set of initial column families, // specified in the request. rpc CreateTable(CreateTableRequest) returns (Table) { - option (google.api.http) = { post: "/v1/{name=projects/*/zones/*/clusters/*}/tables" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/zones/*/clusters/*}/tables" + body: "*" + }; } // Lists the names of all tables served from a specified cluster. rpc ListTables(ListTablesRequest) returns (ListTablesResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*/zones/*/clusters/*}/tables" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/zones/*/clusters/*}/tables" + }; } // Gets the schema of the specified table, including its column families. rpc GetTable(GetTableRequest) returns (Table) { - option (google.api.http) = { get: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}" + }; } // Permanently deletes a specified table and all of its data. rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}" + }; } // Changes the name of a specified table. // Cannot be used to move tables between clusters, zones, or projects. rpc RenameTable(RenameTableRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}:rename" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}:rename" + body: "*" + }; } // Creates a new column family within a specified table. rpc CreateColumnFamily(CreateColumnFamilyRequest) returns (ColumnFamily) { - option (google.api.http) = { post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}/columnFamilies" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/zones/*/clusters/*/tables/*}/columnFamilies" + body: "*" + }; } // Changes the configuration of a specified column family. rpc UpdateColumnFamily(ColumnFamily) returns (ColumnFamily) { - option (google.api.http) = { put: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}" body: "*" }; + option (google.api.http) = { + put: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}" + body: "*" + }; } // Permanently deletes a specified column family and all of its data. - rpc DeleteColumnFamily(DeleteColumnFamilyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}" }; + rpc DeleteColumnFamily(DeleteColumnFamilyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/zones/*/clusters/*/tables/*/columnFamilies/*}" + }; } // Delete all rows in a table corresponding to a particular prefix rpc BulkDeleteRows(BulkDeleteRowsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}:bulkDeleteRows" body: "*" }; + option (google.api.http) = { + post: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}:bulkDeleteRows" + body: "*" + }; } } diff --git a/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto b/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto index 617ede655..683e5c050 100644 --- a/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto +++ b/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableTableServiceMessagesProto"; option java_package = "com.google.bigtable.admin.table.v1"; - message CreateTableRequest { // The unique name of the cluster in which to create the new table. string name = 1; diff --git a/google/bigtable/admin/v2/BUILD.bazel b/google/bigtable/admin/v2/BUILD.bazel new file mode 100644 index 000000000..03cfa6018 --- /dev/null +++ b/google/bigtable/admin/v2/BUILD.bazel @@ -0,0 +1,161 @@ +# 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 = "bigtableadmin_proto", + srcs = [ + "bigtable_instance_admin.proto", + "bigtable_table_admin.proto", + "common.proto", + "instance.proto", + "table.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "bigtableadmin_proto_with_info", + deps = [":bigtableadmin_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +java_proto_library( + name = "bigtableadmin_java_proto", + deps = [":bigtableadmin_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"], +) + +java_gapic_library( + name = "bigtableadmin_java_gapic", + src = ":bigtableadmin_proto_with_info", + gapic_yaml = "bigtableadmin_gapic.yaml", + service_yaml = "//google/bigtable/admin:bigtableadmin.yaml", + test_deps = [":bigtableadmin_java_grpc"], + deps = [ + ":bigtableadmin_java_proto", + ":bigtableadmin_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[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", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "bigtableadmin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/bigtable/admin/v2", + protos = [":bigtableadmin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":bigtableadmin_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", + ], +) + +go_test( + name = "bigtableadmin_go_gapic_test", + srcs = [":bigtableadmin_go_gapic_srcjar_test"], + embed = [":bigtableadmin_go_gapic"], + importpath = "cloud.google.com/go/bigtable/admin/apiv2", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigtableadmin-v2-go", + deps = [ + ":bigtableadmin_go_gapic", + ":bigtableadmin_go_gapic_srcjar-smoke-test.srcjar", + ":bigtableadmin_go_gapic_srcjar-test.srcjar", + ":bigtableadmin_go_proto", + ], +) diff --git a/google/bigtable/admin/v2/bigtable_instance_admin.proto b/google/bigtable/admin/v2/bigtable_instance_admin.proto index 25d2c0991..80ce42470 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 Inc. +// 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. @@ -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"; @@ -32,13 +33,13 @@ option java_outer_classname = "BigtableInstanceAdminProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; - // Service for creating, configuring, and deleting Cloud Bigtable Instances and // Clusters. Provides access to the Instance and Cluster schemas only, not the // tables' metadata or data stored in those tables. service BigtableInstanceAdmin { // 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: "*" @@ -68,7 +69,8 @@ service BigtableInstanceAdmin { } // Partially updates an instance within a project. - rpc PartialUpdateInstance(PartialUpdateInstanceRequest) returns (google.longrunning.Operation) { + rpc PartialUpdateInstance(PartialUpdateInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2/{instance.name=projects/*/instances/*}" body: "instance" @@ -83,7 +85,8 @@ service BigtableInstanceAdmin { } // 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" @@ -135,14 +138,16 @@ service BigtableInstanceAdmin { } // 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" }; } // 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" @@ -150,7 +155,8 @@ service BigtableInstanceAdmin { } // 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/*}" }; @@ -158,7 +164,8 @@ service BigtableInstanceAdmin { // 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: "*" @@ -167,7 +174,8 @@ service BigtableInstanceAdmin { // 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: "*" @@ -175,7 +183,8 @@ service BigtableInstanceAdmin { } // 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: "*" @@ -202,7 +211,7 @@ message CreateInstanceRequest { // cluster ID, e.g., just `mycluster` rather than // `projects/myproject/instances/myinstance/clusters/mycluster`. // Fields marked `OutputOnly` must be left blank. - // Currently exactly one cluster must be specified. + // Currently, at most two clusters can be specified. map clusters = 4; } @@ -219,7 +228,7 @@ message ListInstancesRequest { // Values are of the form `projects/`. string parent = 1; - // The value of `next_page_token` returned by a previous call. + // DEPRECATED: This field is unused and ignored. string page_token = 2; } @@ -233,11 +242,10 @@ message ListInstancesResponse { // Instances whose Clusters are all in one of the failed locations // may be missing from `instances`, and Instances with at least one // Cluster in a failed location may only have partial information returned. + // Values are of the form `projects//locations/` repeated string failed_locations = 2; - // Set if not all instances could be returned in a single response. - // Pass this value to `page_token` in another request to get the next - // page of results. + // DEPRECATED: This field is unused and ignored. string next_page_token = 3; } @@ -290,7 +298,7 @@ message ListClustersRequest { // e.g., `projects/myproject/instances/-`. string parent = 1; - // The value of `next_page_token` returned by a previous call. + // DEPRECATED: This field is unused and ignored. string page_token = 2; } @@ -303,11 +311,10 @@ message ListClustersResponse { // due to an outage or some other transient condition. // Clusters from these locations may be missing from `clusters`, // or may only have partial information returned. + // Values are of the form `projects//locations/` repeated string failed_locations = 2; - // Set if not all clusters could be returned in a single response. - // Pass this value to `page_token` in another request to get the next - // page of results. + // DEPRECATED: This field is unused and ignored. string next_page_token = 3; } @@ -398,8 +405,14 @@ message ListAppProfilesRequest { // 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, + // e.g., `projects/myproject/instances/-`. string parent = 1; + // Maximum number of results per page. + // CURRENTLY UNIMPLEMENTED AND IGNORED. + int32 page_size = 3; + // The value of `next_page_token` returned by a previous call. string page_token = 2; } @@ -413,6 +426,12 @@ message ListAppProfilesResponse { // Pass this value to `page_token` in another request to get the next // page of results. string next_page_token = 2; + + // Locations from which AppProfile information could not be retrieved, + // due to an outage or some other transient condition. + // AppProfiles from these locations may be missing from `app_profiles`. + // Values are of the form `projects//locations/` + repeated string failed_locations = 3; } // Request message for BigtableInstanceAdmin.UpdateAppProfile. @@ -428,7 +447,6 @@ message UpdateAppProfileRequest { bool ignore_warnings = 3; } - // Request message for BigtableInstanceAdmin.DeleteAppProfile. message DeleteAppProfileRequest { // The unique name of the app profile to be deleted. Values are of the form @@ -440,6 +458,4 @@ message DeleteAppProfileRequest { } // The metadata for the Operation returned by UpdateAppProfile. -message UpdateAppProfileMetadata { - -} +message UpdateAppProfileMetadata {} diff --git a/google/bigtable/admin/v2/bigtable_table_admin.proto b/google/bigtable/admin/v2/bigtable_table_admin.proto index 650c5b866..79c461e05 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 Inc. +// 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. @@ -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"; @@ -30,7 +31,6 @@ option java_outer_classname = "BigtableTableAdminProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; - // Service for creating, configuring, and deleting Cloud Bigtable tables. // // @@ -55,7 +55,8 @@ service BigtableTableAdmin { // 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. - rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest) returns (google.longrunning.Operation) { + rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot" body: "*" @@ -108,7 +109,8 @@ service BigtableTableAdmin { // CheckConsistency to check whether mutations to the table that finished // before this call started have been replicated. The tokens will be available // for 90 days. - rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest) returns (GenerateConsistencyTokenResponse) { + rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest) + returns (GenerateConsistencyTokenResponse) { option (google.api.http) = { post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken" body: "*" @@ -118,7 +120,8 @@ service BigtableTableAdmin { // Checks replication consistency based on a consistency token, that is, if // replication has caught up based on the conditions specified in the token // and the check request. - rpc CheckConsistency(CheckConsistencyRequest) returns (CheckConsistencyResponse) { + rpc CheckConsistency(CheckConsistencyRequest) + returns (CheckConsistencyResponse) { option (google.api.http) = { post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency" body: "*" @@ -133,7 +136,8 @@ service BigtableTableAdmin { // 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. - rpc SnapshotTable(SnapshotTableRequest) returns (google.longrunning.Operation) { + rpc SnapshotTable(SnapshotTableRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot" body: "*" @@ -272,6 +276,10 @@ message ListTablesRequest { // Defaults to `NAME_ONLY` if unspecified; no others are currently supported. Table.View view = 2; + // Maximum number of results per page. + // CURRENTLY UNIMPLEMENTED AND IGNORED. + int32 page_size = 4; + // The value of `next_page_token` returned by a previous call. string page_token = 3; } @@ -445,7 +453,8 @@ message ListSnapshotsRequest { // e.g., `projects//instances//clusters/-`. string parent = 1; - // The maximum number of snapshots to return. + // The maximum number of snapshots to return per page. + // CURRENTLY UNIMPLEMENTED AND IGNORED. int32 page_size = 2; // The value of `next_page_token` returned by a previous call. diff --git a/google/bigtable/admin/v2/bigtableadmin_gapic.yaml b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml index 5b412db71..521f43ec2 100644 --- a/google/bigtable/admin/v2/bigtableadmin_gapic.yaml +++ b/google/bigtable/admin/v2/bigtableadmin_gapic.yaml @@ -3,6 +3,9 @@ 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: @@ -11,13 +14,11 @@ language_settings: package_name: Google.Cloud.Bigtable.Admin.V2 ruby: package_name: Google::Cloud::Bigtable::Admin::V2 + release_level: BETA php: package_name: Google\Cloud\Bigtable\Admin\V2 nodejs: package_name: admin.v2 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.bigtable.admin.v2.BigtableInstanceAdmin collections: @@ -65,7 +66,6 @@ interfaces: - instance_id - instance - clusters - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -88,13 +88,12 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default field_name_patterns: name: instance - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: ListInstances @@ -104,13 +103,12 @@ interfaces: - parent required_fields: - parent - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: parent: project resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - parent - name: UpdateInstance @@ -119,7 +117,6 @@ interfaces: - display_name - type - labels - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -128,7 +125,7 @@ interfaces: timeout_millis: 60000 # Should use PartialUpdateInstance instead surface_treatments: - - include_languages: [ java, csharp ] + - include_languages: [java, csharp] visibility: DISABLED header_request_params: - name @@ -141,7 +138,6 @@ interfaces: required_fields: - instance - update_mask - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -164,13 +160,12 @@ interfaces: - name required_fields: - name - request_object_method: false - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 150000 header_request_params: - name - name: CreateCluster @@ -184,7 +179,6 @@ interfaces: - parent - cluster_id - cluster - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -207,13 +201,12 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: name: cluster resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: ListClusters @@ -223,21 +216,18 @@ interfaces: - parent required_fields: - parent - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: parent: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - parent - name: UpdateCluster required_fields: - name - - location - serve_nodes - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -260,13 +250,12 @@ interfaces: - name required_fields: - name - request_object_method: false - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: cluster resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: CreateAppProfile @@ -280,13 +269,12 @@ interfaces: - parent - app_profile_id - app_profile - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: parent: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - parent - name: GetAppProfile @@ -296,13 +284,12 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: name: app_profile resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: ListAppProfiles @@ -312,7 +299,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: token_field: page_token @@ -324,7 +310,7 @@ interfaces: field_name_patterns: parent: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - parent - name: UpdateAppProfile @@ -336,13 +322,12 @@ interfaces: required_fields: - app_profile - update_mask - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: app_profile.name: app_profile resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 long_running: return_type: google.bigtable.admin.v2.AppProfile metadata_type: google.bigtable.admin.v2.UpdateAppProfileMetadata @@ -360,13 +345,12 @@ interfaces: required_fields: - name - ignore_warnings - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: app_profile resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: GetIamPolicy @@ -376,12 +360,11 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: resource: instance - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - resource - name: SetIamPolicy @@ -393,12 +376,11 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: resource: instance - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - resource - name: TestIamPermissions @@ -410,12 +392,11 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: resource: instance - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - resource - name: google.bigtable.admin.v2.BigtableTableAdmin @@ -447,22 +428,6 @@ interfaces: rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 - - name: create_table - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 130000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 130000 - total_timeout_millis: 3600000 - - name: drop_row_range - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 900000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 900000 - total_timeout_millis: 3600000 methods: - name: CreateTable flattening: @@ -475,13 +440,12 @@ interfaces: - parent - table_id - table - request_object_method: true retry_codes_name: non_idempotent - retry_params_name: create_table + retry_params_name: default field_name_patterns: parent: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 130000 + timeout_millis: 900000 header_request_params: - parent - name: CreateTableFromSnapshot @@ -495,7 +459,6 @@ interfaces: - parent - table_id - source_snapshot - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -509,6 +472,10 @@ interfaces: max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 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 @@ -518,7 +485,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: token_field: page_token @@ -530,7 +496,7 @@ interfaces: field_name_patterns: parent: instance resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - parent - name: GetTable @@ -540,13 +506,12 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: name: table resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: DeleteTable @@ -556,13 +521,12 @@ interfaces: - name required_fields: - name - request_object_method: false - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: table resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 120000 header_request_params: - name - name: ModifyColumnFamilies @@ -574,21 +538,19 @@ interfaces: required_fields: - name - modifications - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: table resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 900000 header_request_params: - name - name: DropRowRange required_fields: - name - request_object_method: true retry_codes_name: non_idempotent - retry_params_name: drop_row_range + retry_params_name: default field_name_patterns: name: table resource_name_treatment: STATIC_TYPES @@ -602,7 +564,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -620,7 +581,6 @@ interfaces: required_fields: - name - consistency_token - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -642,7 +602,6 @@ interfaces: - cluster - snapshot_id - description - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -656,6 +615,10 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 total_poll_timeout_millis: 300000 + # Snapshots are Alpha-only and not supported in C# + surface_treatments: + - include_languages: [csharp] + visibility: DISABLED header_request_params: - name - name: GetSnapshot @@ -665,13 +628,16 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default 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 @@ -681,7 +647,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -695,6 +660,10 @@ interfaces: 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 @@ -704,13 +673,16 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default 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 diff --git a/google/bigtable/admin/v2/common.proto b/google/bigtable/admin/v2/common.proto index d4c1795b5..ad4d73599 100644 --- a/google/bigtable/admin/v2/common.proto +++ b/google/bigtable/admin/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -26,7 +27,6 @@ option java_outer_classname = "CommonProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; - // Storage media types for persisting Bigtable data. enum StorageType { // The user did not specify a storage type. diff --git a/google/bigtable/admin/v2/instance.proto b/google/bigtable/admin/v2/instance.proto index 1ee649b02..ef8599bfe 100644 --- a/google/bigtable/admin/v2/instance.proto +++ b/google/bigtable/admin/v2/instance.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -26,7 +27,6 @@ option java_outer_classname = "InstanceProto"; option java_package = "com.google.bigtable.admin.v2"; 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 @@ -160,9 +160,7 @@ message AppProfile { // fail over to another cluster in the event of transient errors or delays. // Choosing this option sacrifices read-your-writes consistency to improve // availability. - message MultiClusterRoutingUseAny { - - } + message MultiClusterRoutingUseAny {} // Unconditionally routes all read/write requests to a specific cluster. // This option preserves read-your-writes consistency, but does not improve diff --git a/google/bigtable/admin/v2/table.proto b/google/bigtable/admin/v2/table.proto index 95827c217..5019d8b86 100644 --- a/google/bigtable/admin/v2/table.proto +++ b/google/bigtable/admin/v2/table.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -27,7 +28,6 @@ option java_outer_classname = "TableProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; - // A collection of user data indexed by row, column, and timestamp. // Each table is served using the resources of its parent cluster. message Table { diff --git a/google/bigtable/artman_bigtable.yaml b/google/bigtable/artman_bigtable.yaml index cad16e37e..5b4aa0258 100644 --- a/google/bigtable/artman_bigtable.yaml +++ b/google/bigtable/artman_bigtable.yaml @@ -12,98 +12,23 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-bigtable - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-bigtable-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-bigtable-v2 - - name: proto - dest: generated/java/proto-google-cloud-bigtable-v2 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/bigtable_v2 - dest: bigtable/google/cloud/bigtable_v2 - - src: tests/unit/gapic/v1 - dest: bigtable/tests/gapic - - name: grpc - src: google/cloud/proto - dest: bigtable/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-bigtable-v2 - - name: grpc - dest: generated/python/proto-google-cloud-bigtable-v2 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-bigtable-v2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-bigtable - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/bigtable/v2 - dest: google-cloud-bigtable/lib/google/cloud/bigtable/v2 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-bigtable-v2/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: bigtable/apiv2 - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v2 - dest: packages/bigtable/src/v2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/bigtable - name: gapic_config type: GAPIC_CONFIG diff --git a/google/bigtable/v1/bigtable_data.proto b/google/bigtable/v1/bigtable_data.proto index bd063a925..bc6a63307 100644 --- a/google/bigtable/v1/bigtable_data.proto +++ b/google/bigtable/v1/bigtable_data.proto @@ -21,7 +21,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableDataProto"; option java_package = "com.google.bigtable.v1"; - // Specifies the complete (requested) contents of a single row of a table. // Rows which exceed 256MiB in size cannot be read in full. message Row { @@ -467,9 +466,7 @@ 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/bigtable/v1/bigtable_service.proto b/google/bigtable/v1/bigtable_service.proto index b1f729517..dcd1933bc 100644 --- a/google/bigtable/v1/bigtable_service.proto +++ b/google/bigtable/v1/bigtable_service.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableServicesProto"; option java_package = "com.google.bigtable.v1"; - // Service for reading from and writing to existing Bigtables. service BigtableService { // Streams back the contents of all requested rows, optionally applying @@ -45,7 +44,8 @@ service BigtableService { // 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: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows:sampleKeys" }; @@ -71,7 +71,8 @@ service BigtableService { } // 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: "/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows/{row_key}:checkAndMutate" body: "*" diff --git a/google/bigtable/v1/bigtable_service_messages.proto b/google/bigtable/v1/bigtable_service_messages.proto index d734ececa..107f15cd6 100644 --- a/google/bigtable/v1/bigtable_service_messages.proto +++ b/google/bigtable/v1/bigtable_service_messages.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "BigtableServiceMessagesProto"; option java_package = "com.google.bigtable.v1"; - // Request message for BigtableServer.ReadRows. message ReadRowsRequest { // The unique name of the table from which to read. diff --git a/google/bigtable/v2/BUILD.bazel b/google/bigtable/v2/BUILD.bazel new file mode 100644 index 000000000..a1d7fc108 --- /dev/null +++ b/google/bigtable/v2/BUILD.bazel @@ -0,0 +1,144 @@ +# 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 = "bigtable_proto", + srcs = [ + "bigtable.proto", + "data.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "bigtable_proto_with_info", + deps = [":bigtable_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 = "bigtable_java_proto", + deps = [":bigtable_proto"], +) + +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"], +) + +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"], + deps = [ + ":bigtable_java_proto", + ":bigtable_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":bigtable_java_gapic_test"], +) for test_name in [ + "com.google.cloud.bigtable.data.v2.BaseBigtableDataClientTest", +]] + +# Opensource 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 = [ + ":bigtable_java_proto", + ":bigtable_proto", + ":bigtable_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 = "bigtable_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/bigtable/v2", + protos = [":bigtable_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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"], +) + +go_test( + name = "bigtable_go_gapic_test", + srcs = [":bigtable_go_gapic_srcjar_test"], + embed = [":bigtable_go_gapic"], + importpath = "cloud.google.com/go/bigtable/apiv2", +) + +# Opensource 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", + ], +) diff --git a/google/bigtable/v2/bigtable.proto b/google/bigtable/v2/bigtable.proto index d800c2c97..0ab763ba6 100644 --- a/google/bigtable/v2/bigtable.proto +++ b/google/bigtable/v2/bigtable.proto @@ -28,7 +28,6 @@ option java_outer_classname = "BigtableProto"; option java_package = "com.google.bigtable.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\V2"; - // Service for reading from and writing to existing Bigtable tables. service Bigtable { // Streams back the contents of all requested rows in key order, optionally @@ -47,7 +46,8 @@ service Bigtable { // 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" }; @@ -73,7 +73,8 @@ service Bigtable { } // 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: "*" @@ -85,7 +86,8 @@ 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: "*" @@ -244,9 +246,7 @@ message MutateRowRequest { } // Response message for Bigtable.MutateRow. -message MutateRowResponse { - -} +message MutateRowResponse {} // Request message for BigtableService.MutateRows. message MutateRowsRequest { diff --git a/google/bigtable/v2/bigtable_gapic.yaml b/google/bigtable/v2/bigtable_gapic.yaml index 95bbe0b48..c34fe42b3 100644 --- a/google/bigtable/v2/bigtable_gapic.yaml +++ b/google/bigtable/v2/bigtable_gapic.yaml @@ -15,14 +15,12 @@ language_settings: google.bigtable.v2.Bigtable: BigtableServiceApi ruby: package_name: Google::Cloud::Bigtable::V2 + release_level: BETA php: package_name: Google\Cloud\Bigtable\V2 nodejs: package_name: bigtable.v2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.bigtable.v2.Bigtable collections: @@ -47,6 +45,14 @@ interfaces: 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 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 3600000 methods: - name: ReadRows flattening: @@ -55,13 +61,12 @@ interfaces: - table_name required_fields: - table_name - request_object_method: true - retry_codes_name: non_idempotent - retry_params_name: default + retry_codes_name: idempotent + retry_params_name: streaming field_name_patterns: table_name: table resource_name_treatment: STATIC_TYPES - timeout_millis: 60000 + timeout_millis: 3600000 header_request_params: - table_name - name: SampleRowKeys @@ -71,7 +76,6 @@ interfaces: - table_name required_fields: - table_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -91,7 +95,6 @@ interfaces: - table_name - row_key - mutations - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -109,7 +112,6 @@ interfaces: required_fields: - table_name - entries - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -132,7 +134,6 @@ interfaces: required_fields: - table_name - row_key - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -152,7 +153,6 @@ interfaces: - table_name - row_key - rules - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/bigtable/v2/data.proto b/google/bigtable/v2/data.proto index 7400197e7..d0aab0b63 100644 --- a/google/bigtable/v2/data.proto +++ b/google/bigtable/v2/data.proto @@ -23,7 +23,6 @@ option java_outer_classname = "DataProto"; option java_package = "com.google.bigtable.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\V2"; - // Specifies the complete (requested) contents of a single row of a table. // Rows which exceed 256MiB in size cannot be read in full. message Row { @@ -486,9 +485,7 @@ 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/bytestream/bytestream.proto b/google/bytestream/bytestream.proto index 85e386fc2..baf95deee 100644 --- a/google/bytestream/bytestream.proto +++ b/google/bytestream/bytestream.proto @@ -23,7 +23,6 @@ option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream option java_outer_classname = "ByteStreamProto"; option java_package = "com.google.bytestream"; - // #### Introduction // // The Byte Stream API enables a client to read and write a stream of bytes to @@ -91,7 +90,8 @@ service ByteStream { // evicted. For any sequence of `QueryWriteStatus()` calls for a given // resource name, the sequence of returned `committed_size` values will be // non-decreasing. - rpc QueryWriteStatus(QueryWriteStatusRequest) returns (QueryWriteStatusResponse); + rpc QueryWriteStatus(QueryWriteStatusRequest) + returns (QueryWriteStatusResponse); } // Request object for ByteStream.Read. diff --git a/google/cloud/asset/BUILD.bazel b/google/cloud/asset/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/asset/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/asset/artman_cloudasset_v1.yaml b/google/cloud/asset/artman_cloudasset_v1.yaml new file mode 100644 index 000000000..53429a5d8 --- /dev/null +++ b/google/cloud/asset/artman_cloudasset_v1.yaml @@ -0,0 +1,35 @@ +common: + # Keep the api_name asset, otherwise Java code gen will be broken. + api_name: asset + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: asset_v1.yaml + gapic_yaml: v1/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/artman_cloudasset_v1beta1.yaml b/google/cloud/asset/artman_cloudasset_v1beta1.yaml new file mode 100644 index 000000000..c3278c500 --- /dev/null +++ b/google/cloud/asset/artman_cloudasset_v1beta1.yaml @@ -0,0 +1,35 @@ +common: + # Keep the api_name asset, otherwise Java code gen will be broken. + api_name: asset + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: asset_v1beta1.yaml + gapic_yaml: v1beta1/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_v1.yaml b/google/cloud/asset/asset_v1.yaml new file mode 100644 index 000000000..71c62ee8d --- /dev/null +++ b/google/cloud/asset/asset_v1.yaml @@ -0,0 +1,50 @@ +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/resource-manager/docs/cloud-asset-inventory/overview + +backend: + rules: + - selector: google.longrunning.Operations.GetOperation + deadline: 60.0 + - selector: google.cloud.asset.v1.AssetService.ExportAssets + deadline: 600.0 + - selector: google.cloud.asset.v1.AssetService.BatchGetAssetsHistory + deadline: 600.0 + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + 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: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/asset_v1beta1.yaml b/google/cloud/asset/asset_v1beta1.yaml new file mode 100644 index 000000000..d1edc78b9 --- /dev/null +++ b/google/cloud/asset/asset_v1beta1.yaml @@ -0,0 +1,56 @@ +type: google.api.Service +config_version: 3 +name: cloudasset.googleapis.com +title: Cloud Asset API + +apis: +- name: google.cloud.asset.v1beta1.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.longrunning.Operations.GetOperation + deadline: 60.0 + - selector: google.cloud.asset.v1beta1.AssetService.ExportAssets + deadline: 600.0 + - selector: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistory + deadline: 600.0 + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1alpha1/{name=projects/*/operations/*/*}' + additional_bindings: + - get: '/v1alpha1/{name=organizations/*/operations/*/*}' + + - get: '/v1alpha2/{name=projects/*/operations/*/*}' + + - get: '/v1alpha2/{name=organizations/*/operations/*/*}' + + - get: '/v1beta1/{name=projects/*/operations/*/*}' + + - get: '/v1beta1/{name=folders/*/operations/*/*}' + + - get: '/v1beta1/{name=organizations/*/operations/*/*}' + + - get: '/v1/{name=*/*/operations/*/*}' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/asset/v1/asset_service.proto b/google/cloud/asset/v1/asset_service.proto new file mode 100644 index 000000000..0dfc2898b --- /dev/null +++ b/google/cloud/asset/v1/asset_service.proto @@ -0,0 +1,171 @@ +// 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.v1; + +import "google/api/annotations.proto"; +import "google/cloud/asset/v1/assets.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; +option java_multiple_files = true; +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 { + // 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. + rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=*/*}:exportAssets" + body: "*" + }; + } + + // Batch gets the update history of assets that overlap a time window. + // For RESOURCE content, this API outputs history with asset in both + // 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) = { + get: "/v1/{parent=*/*}:batchGetAssetsHistory" + }; + } +} + +// Export asset request. +message ExportAssetsRequest { + // Required. The relative name of the root asset. This 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"), + // or a folder number (such as "folders/123"). + string parent = 1; + + // 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. + 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) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will be + // returned. + ContentType content_type = 4; + + // Required. Output configuration indicating where the results will be output + // to. All results will be in newline delimited JSON format. + OutputConfig output_config = 5; +} + +// 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. +message ExportAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Output configuration indicating where the results were output to. + // All results are in JSON format. + OutputConfig output_config = 2; +} + +// Batch get assets history request. +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; + + // 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) + // 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 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; +} + +// Batch get assets history response. +message BatchGetAssetsHistoryResponse { + // A list of assets with valid time windows. + repeated TemporalAsset assets = 1; +} + +// 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; + } +} + +// 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/v1/assets.proto b/google/cloud/asset/v1/assets.proto new file mode 100644 index 000000000..f6a8108c0 --- /dev/null +++ b/google/cloud/asset/v1/assets.proto @@ -0,0 +1,118 @@ +// 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.v1; + +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 csharp_namespace = "Google.Cloud.Asset.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; +option java_multiple_files = true; +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. +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; +} + +// 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/v1/cloudasset_gapic.yaml b/google/cloud/asset/v1/cloudasset_gapic.yaml new file mode 100644 index 000000000..9d60f1042 --- /dev/null +++ b/google/cloud/asset/v1/cloudasset_gapic.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.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 + # 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 + 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/v1beta1/BUILD.bazel b/google/cloud/asset/v1beta1/BUILD.bazel new file mode 100644 index 000000000..6b2b2ac92 --- /dev/null +++ b/google/cloud/asset/v1beta1/BUILD.bazel @@ -0,0 +1,150 @@ +# 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 = "asset_proto", + srcs = [ + "asset_service.proto", + "assets.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "asset_proto_with_info", + deps = [":asset_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +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_GRPC_DEPS, +) + +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, +) + +# TODO: 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_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 = [ + ":asset_java_proto", + ":asset_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 = "asset_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1", + 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", + 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", + deps = [ + ":asset_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "asset_go_gapic_test", + srcs = [":asset_go_gapic_srcjar_test"], + embed = [":asset_go_gapic"], + importpath = "cloud.google.com/go/asset/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/asset/v1beta1/asset_service.proto b/google/cloud/asset/v1beta1/asset_service.proto new file mode 100644 index 000000000..8e2d1b0a3 --- /dev/null +++ b/google/cloud/asset/v1beta1/asset_service.proto @@ -0,0 +1,182 @@ +// 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.cloud.asset.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/asset/v1beta1/assets.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; + +// Asset service definition. +service AssetService { + // 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. + rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}:exportAssets" + body: "*" + additional_bindings { + post: "/v1beta1/{parent=folders/*}:exportAssets" + body: "*" + } + additional_bindings { + post: "/v1beta1/{parent=organizations/*}:exportAssets" + body: "*" + } + }; + } + + // Batch gets the update history of assets that overlap a time window. + // For RESOURCE content, this API outputs history with asset in both + // 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. + rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) + returns (BatchGetAssetsHistoryResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}:batchGetAssetsHistory" + additional_bindings { + get: "/v1beta1/{parent=organizations/*}:batchGetAssetsHistory" + } + }; + } +} + +// Export asset request. +message ExportAssetsRequest { + // Required. The relative name of the root asset. This can only be an + // 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; + + // 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. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types of which to take a snapshot for. For example: + // "google.compute.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) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will be + // returned. + ContentType content_type = 4; + + // Required. Output configuration indicating where the results will be output + // to. All results will be in newline delimited JSON format. + OutputConfig output_config = 5; +} + +// 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. +message ExportAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Output configuration indicating where the results were output to. + // All results are in JSON format. + OutputConfig output_config = 2; +} + +// Batch get assets history request. +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; + + // 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) + // 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 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; +} + +// Batch get assets history response. +message BatchGetAssetsHistoryResponse { + // A list of assets with valid time windows. + repeated TemporalAsset assets = 1; +} + +// 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; + } +} + +// 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/v1beta1/assets.proto b/google/cloud/asset/v1beta1/assets.proto new file mode 100644 index 000000000..84db977b9 --- /dev/null +++ b/google/cloud/asset/v1beta1/assets.proto @@ -0,0 +1,117 @@ +// 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.cloud.asset.v1beta1; + +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 csharp_namespace = "Google.Cloud.Asset.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; + +// 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: "google.compute.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; +} + +// 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/v1beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml new file mode 100644 index 000000000..d88a59238 --- /dev/null +++ b/google/cloud/asset/v1beta1/cloudasset_gapic.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/audit/audit_log.proto b/google/cloud/audit/audit_log.proto index eab66a1f9..d76d2865c 100644 --- a/google/cloud/audit/audit_log.proto +++ b/google/cloud/audit/audit_log.proto @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "AuditLogProto"; option java_package = "com.google.cloud.audit"; - // Common audit log format for Google Cloud Platform API operations. message AuditLog { // The name of the API service performing the operation. For example, @@ -122,7 +121,8 @@ message RequestMetadata { // The request was made by the Google API client for Python. // + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: // The request was made by the Google Cloud SDK CLI (gcloud). - // + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: + // + `AppEngine-Google; (+http://code.google.com/appengine; appid: + // s~my-project`: // The request was made from the `my-project` App Engine app. string caller_supplied_user_agent = 2; } diff --git a/google/cloud/automl/BUILD.bazel b/google/cloud/automl/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/automl/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/automl/artman_automl_v1beta1.yaml b/google/cloud/automl/artman_automl_v1beta1.yaml new file mode 100644 index 000000000..a98243bd6 --- /dev/null +++ b/google/cloud/automl/artman_automl_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: automl + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: automl_v1beta1.yaml + gapic_yaml: v1beta1/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_v1beta1.yaml b/google/cloud/automl/automl_v1beta1.yaml new file mode 100644 index 000000000..ce17fb353 --- /dev/null +++ b/google/cloud/automl/automl_v1beta1.yaml @@ -0,0 +1,129 @@ +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.OperationMetadata +- name: google.cloud.automl.v1beta1.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.v1beta1.PredictionService.Predict + deadline: 60.0 + - selector: google.cloud.automl.v1beta1.PredictionService.BatchPredict + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.AutoMl.CreateDataset + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetDataset + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListDatasets + deadline: 50.0 + - selector: google.cloud.automl.v1beta1.AutoMl.UpdateDataset + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.DeleteDataset + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ImportData + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ExportData + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetTableSpec + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListTableSpecs + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetColumnSpec + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.CreateModel + deadline: 20.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetModel + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ListModels + deadline: 50.0 + - selector: google.cloud.automl.v1beta1.AutoMl.DeleteModel + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.DeployModel + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.UndeployModel + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ExportModel + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation + deadline: 5.0 + - selector: google.cloud.automl.v1beta1.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: '/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: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/automl/v1beta1/BUILD.bazel b/google/cloud/automl/v1beta1/BUILD.bazel new file mode 100644 index 000000000..320e14835 --- /dev/null +++ b/google/cloud/automl/v1beta1/BUILD.bazel @@ -0,0 +1,186 @@ +# 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 = "automl_proto", + srcs = [ + "annotation_payload.proto", + "annotation_spec.proto", + "classification.proto", + "column_spec.proto", + "data_items.proto", + "data_stats.proto", + "data_types.proto", + "dataset.proto", + "detection.proto", + "geometry.proto", + "image.proto", + "io.proto", + "model.proto", + "model_evaluation.proto", + "operations.proto", + "prediction_service.proto", + "ranges.proto", + "regression.proto", + "service.proto", + "table_spec.proto", + "tables.proto", + "temporal.proto", + "text.proto", + "text_extraction.proto", + "text_segment.proto", + "text_sentiment.proto", + "translation.proto", + "video.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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"], +) + +############################################################################## +# 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 = "automl_java_proto", + deps = [":automl_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.automl.v1beta1.AutoMlClientTest", + "com.google.cloud.automl.v1beta1.PredictionServiceClientTest", +]] + +# Opensource 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 = [ + ":automl_java_proto", + ":automl_proto", + ":automl_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 = "automl_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1", + 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", + 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", + deps = [ + ":automl_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +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", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/automl/v1beta1/annotation_payload.proto b/google/cloud/automl/v1beta1/annotation_payload.proto new file mode 100644 index 000000000..7cc2860f1 --- /dev/null +++ b/google/cloud/automl/v1beta1/annotation_payload.proto @@ -0,0 +1,78 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/cloud/automl/v1beta1/detection.proto"; +import "google/cloud/automl/v1beta1/tables.proto"; +import "google/cloud/automl/v1beta1/text_extraction.proto"; +import "google/cloud/automl/v1beta1/text_sentiment.proto"; +import "google/cloud/automl/v1beta1/translation.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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 video classification. + // Returned for Video Classification predictions. + VideoClassificationAnnotation video_classification = 9; + + // Annotation details for video object tracking. + VideoObjectTrackingAnnotation video_object_tracking = 8; + + // Annotation details for text extraction. + TextExtractionAnnotation text_extraction = 6; + + // Annotation details for text sentiment. + TextSentimentAnnotation text_sentiment = 7; + + // Annotation details for Tables. + TablesAnnotation tables = 10; + } + + // 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.v1beta1.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/v1beta1/annotation_spec.proto b/google/cloud/automl/v1beta1/annotation_spec.proto new file mode 100644 index 000000000..483792b66 --- /dev/null +++ b/google/cloud/automl/v1beta1/annotation_spec.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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// A definition of an annotation spec. +message AnnotationSpec { + // 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_]+`. + // (_), and ASCII digits 0-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/v1beta1/automl_gapic.yaml b/google/cloud/automl/v1beta1/automl_gapic.yaml new file mode 100644 index 000000000..2895ae1be --- /dev/null +++ b/google/cloud/automl/v1beta1/automl_gapic.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: 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: + # + # 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: 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/classification.proto b/google/cloud/automl/v1beta1/classification.proto new file mode 100644 index 000000000..9d588c152 --- /dev/null +++ b/google/cloud/automl/v1beta1/classification.proto @@ -0,0 +1,208 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/temporal.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_outer_classname = "ClassificationProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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; +} + +// Contains annotation details specific to video classification. +message VideoClassificationAnnotation { + // Output only. Expresses the type of video classification. Possible values: + // + // * `segment` - Classification done on a specified by user + // time segment of a video. AnnotationSpec is answered to be present + // in that time segment, if it is present in any part of it. The video + // ML model evaluations are done only for this type of classification. + // + // * `shot`- 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. + // 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` - 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. + // 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. + string type = 1; + + // Output only . The classification details of this annotation. + ClassificationAnnotation classification_annotation = 2; + + // Output only . The time segment of the video to which the + // annotation applies. + TimeSegment time_segment = 3; +} + +// 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.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.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.v1beta1.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.v1beta1.TablesModelMetadata.prediction_type] + // only list of [annotation_spec_display_name-s][] is populated. + repeated string annotation_spec_id = 1; + + // 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. + 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 Precision-Recall Curve metric based on priors. + // Micro-averaged for the overall evaluation. + // Deprecated. + float base_au_prc = 2 [deprecated = true]; + + // 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/v1beta1/column_spec.proto b/google/cloud/automl/v1beta1/column_spec.proto new file mode 100644 index 000000000..8a3b52110 --- /dev/null +++ b/google/cloud/automl/v1beta1/column_spec.proto @@ -0,0 +1,78 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/data_stats.proto"; +import "google/cloud/automl/v1beta1/data_types.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were +// given on import . +// Used by: +// * Tables +message ColumnSpec { + // Identifies the table's column, and its correlation with the column this + // ColumnSpec describes. + message CorrelatedColumn { + // The column_spec_id of the correlated column, which belongs to the same + // table as the in-context column. + string column_spec_id = 1; + + // Correlation between this and the in-context column. + CorrelationStats correlation_stats = 2; + } + + // Output only. The resource name of the column specs. + // Form: + // + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` + string name = 1; + + // The data type of elements stored in the column. + DataType data_type = 2; + + // Output only. The name of the column to show in the interface. The name can + // be up to 100 characters long and can consist only of ASCII Latin letters + // A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and + // must start with a letter or a digit. + string display_name = 3; + + // Output only. Stats of the series of values in the column. + // 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. + 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. + repeated CorrelatedColumn top_correlated_columns = 5; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 6; +} diff --git a/google/cloud/automl/v1beta1/data_items.proto b/google/cloud/automl/v1beta1/data_items.proto new file mode 100644 index 000000000..a1ad57214 --- /dev/null +++ b/google/cloud/automl/v1beta1/data_items.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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/io.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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][] 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. + 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; + + // An input config specifying the content of the image. + InputConfig input_config = 6; + } + + // 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; + + // 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. + string mime_type = 2; + + // Output only. HTTP URI where you can download the content. + string content_uri = 4; +} + +// A structured text document e.g. a PDF. +message Document { + // An input config specifying the content of the document. + DocumentInputConfig input_config = 1; +} + +// 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 + // + // [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // of the Model this row is being passed to. + // Note: The below `values` field must match order of this field, if this + // 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 + // + // [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // of the Model this row is being passed to. + repeated google.protobuf.Value values = 3; +} + +// Example data used for training or prediction. +message ExamplePayload { + // Required. Input only. The example data. + oneof payload { + // Example image. + Image image = 1; + + // Example text. + TextSnippet text_snippet = 2; + + // Example document. + Document document = 4; + + // Example relational table row. + Row row = 3; + } +} diff --git a/google/cloud/automl/v1beta1/data_stats.proto b/google/cloud/automl/v1beta1/data_stats.proto new file mode 100644 index 000000000..5d941a5ba --- /dev/null +++ b/google/cloud/automl/v1beta1/data_stats.proto @@ -0,0 +1,167 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// The data statistics of a series of values that share the same DataType. +message DataStats { + // The data statistics specific to a DataType. + oneof stats { + // The statistics for FLOAT64 DataType. + Float64Stats float64_stats = 3; + + // The statistics for STRING DataType. + StringStats string_stats = 4; + + // The statistics for TIMESTAMP DataType. + TimestampStats timestamp_stats = 5; + + // The statistics for ARRAY DataType. + ArrayStats array_stats = 6; + + // The statistics for STRUCT DataType. + StructStats struct_stats = 7; + + // The statistics for CATEGORY DataType. + CategoryStats category_stats = 8; + } + + // The number of distinct values. + int64 distinct_value_count = 1; + + // The number of values that are null. + int64 null_value_count = 2; + + // The number of values that are valid. + int64 valid_value_count = 9; +} + +// The data statistics of a series of FLOAT64 values. +message Float64Stats { + // A bucket of a histogram. + message HistogramBucket { + // The minimum value of the bucket, inclusive. + double min = 1; + + // The maximum value of the bucket, exclusive unless max = `"Infinity"`, in + // which case it's inclusive. + double max = 2; + + // The number of data values that are in the bucket, i.e. are between + // min and max values. + int64 count = 3; + } + + // The mean of the series. + double mean = 1; + + // The standard deviation of the series. + double standard_deviation = 2; + + // Ordered from 0 to k k-quantile values of the data series of n values. + // The value at index i is, approximately, the i*n/k-th smallest value in the + // series; for i = 0 and i = k these are, respectively, the min and max + // values. + repeated double quantiles = 3; + + // Histogram buckets of the data series. Sorted by the min value of the + // bucket, ascendingly, and the number of the buckets is dynamically + // generated. The buckets are non-overlapping and completely cover whole + // FLOAT64 range with min of first bucket being `"-Infinity"`, and max of + // the last one being `"Infinity"`. + repeated HistogramBucket histogram_buckets = 4; +} + +// The data statistics of a series of STRING values. +message StringStats { + // The statistics of a unigram. + message UnigramStats { + // The unigram. + string value = 1; + + // The number of occurrences of this unigram in the series. + int64 count = 2; + } + + // The statistics of the top 20 unigrams, ordered by + // [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count]. + repeated UnigramStats top_unigram_stats = 1; +} + +// The data statistics of a series of TIMESTAMP values. +message TimestampStats { + // Stats split by a defined in context granularity. + message GranularStats { + // A map from granularity key to example count for that key. + // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). + map buckets = 1; + } + + // The string key is the pre-defined granularity. Currently supported: + // hour_of_day, day_of_week, month_of_year. + // Granularities finer that the granularity of timestamp data are not + // populated (e.g. if timestamps are at day granularity, then hour_of_day + // is not populated). + map granular_stats = 1; +} + +// The data statistics of a series of ARRAY values. +message ArrayStats { + // Stats of all the values of all arrays, as if they were a single long + // series of data. The type depends on the element type of the array. + DataStats member_stats = 2; +} + +// The data statistics of a series of STRUCT values. +message StructStats { + // Map from a field name of the struct to data stats aggregated over series + // of all data in that field across all the structs. + map field_stats = 1; +} + +// The data statistics of a series of CATEGORY values. +message CategoryStats { + // The statistics of a single CATEGORY value. + message SingleCategoryStats { + // The CATEGORY value. + string value = 1; + + // The number of occurrences of this value in the series. + int64 count = 2; + } + + // The statistics of the top 20 CATEGORY values, ordered by + // + // [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count]. + repeated SingleCategoryStats top_category_stats = 1; +} + +// A correlation statistics between two series of DataType values. The series +// may have differing DataType-s, but within a single series the DataType must +// be the same. +message CorrelationStats { + // The correlation value using the Cramer's V measure. + double cramers_v = 1; +} diff --git a/google/cloud/automl/v1beta1/data_types.proto b/google/cloud/automl/v1beta1/data_types.proto new file mode 100644 index 000000000..e97314508 --- /dev/null +++ b/google/cloud/automl/v1beta1/data_types.proto @@ -0,0 +1,114 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +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; + + // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + // `"-Infinity"`. + FLOAT64 = 3; + + // Must be between 0AD and 9999AD. Encoded as `string` according to + // [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if + // that format is not set, then in RFC 3339 `date-time` format, where + // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). + TIMESTAMP = 4; + + // Encoded as `string`. + STRING = 6; + + // Encoded as `list`, where the list elements are represented according to + // + // [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type]. + ARRAY = 8; + + // Encoded as `struct`, where field values are represented according to + // [struct_type][google.cloud.automl.v1beta1.DataType.struct_type]. + STRUCT = 9; + + // Values of this type are not further understood by AutoML, + // e.g. AutoML is unable to tell the order of values (as it could with + // FLOAT64), or is unable to say if one value contains another (as it + // could with STRING). + // Encoded as `string` (bytes should be base64-encoded, as described in RFC + // 4648, section 4). + CATEGORY = 10; +} + +// Indicated the type of data that can be stored in a structured data entity +// (e.g. a table). +message DataType { + // Details of DataType-s that need additional specification. + oneof details { + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY], + // then `list_element_type` is the type of the elements. + DataType list_element_type = 2; + + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type` + // provides type information for the struct's fields. + StructType struct_type = 3; + + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP] + // then `time_format` provides the format in which that time field is + // expressed. The time_format must either be one of: + // * `UNIX_SECONDS` + // * `UNIX_MILLISECONDS` + // * `UNIX_MICROSECONDS` + // * `UNIX_NANOSECONDS` + // (for respectively number of seconds, milliseconds, microseconds and + // nanoseconds since start of the Unix epoch); + // or be written in `strftime` syntax. If time_format is not set, then the + // default format as described on the type_code is used. + string time_format = 5; + } + + // Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type. + TypeCode type_code = 1; + + // If true, this DataType can also be `NULL`. In .CSV files `NULL` value is + // expressed as an empty string. + bool nullable = 4; +} + +// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type. +message StructType { + // Unordered map of struct field names to their data types. + // Fields cannot be added or removed via Update. Their names and + // data types are still mutable. + map fields = 1; +} diff --git a/google/cloud/automl/v1beta1/dataset.proto b/google/cloud/automl/v1beta1/dataset.proto new file mode 100644 index 000000000..e07b17841 --- /dev/null +++ b/google/cloud/automl/v1beta1/dataset.proto @@ -0,0 +1,91 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/image.proto"; +import "google/cloud/automl/v1beta1/tables.proto"; +import "google/cloud/automl/v1beta1/text.proto"; +import "google/cloud/automl/v1beta1/translation.proto"; +import "google/cloud/automl/v1beta1/video.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +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 { + // 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 video classification. + VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; + + // Metadata for a dataset used for video object tracking. + VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; + + // 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; + + // Metadata for a dataset used for Tables. + TablesDatasetMetadata tables_dataset_metadata = 33; + } + + // 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; +} diff --git a/google/cloud/automl/v1beta1/detection.proto b/google/cloud/automl/v1beta1/detection.proto new file mode 100644 index 000000000..66f0b2fc1 --- /dev/null +++ b/google/cloud/automl/v1beta1/detection.proto @@ -0,0 +1,140 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/geometry.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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; +} + +// Annotation details for video object tracking. +message VideoObjectTrackingAnnotation { + // 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 + // is done as best effort. Especially in cases when an entity goes + // off-screen for a longer time (minutes), when it comes back it may be given + // a new instance ID. + string instance_id = 1; + + // Required. A time (frame) of a video to which this annotation pertains. + // Represented as the duration since the video's start. + google.protobuf.Duration time_offset = 2; + + // Required. The rectangle representing the object location on the frame (i.e. + // at the time_offset of the video). + BoundingPoly bounding_box = 3; + + // 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 + // changed to 1). + float score = 4; +} + +// 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; +} + +// Model evaluation metrics for video object tracking problems. +// Evaluates prediction quality of both labeled bounding boxes and labeled +// tracks (i.e. series of bounding boxes sharing same label and instance ID). +message VideoObjectTrackingEvaluationMetrics { + // Output only. The number of video frames used to create this evaluation. + int32 evaluated_frame_count = 1; + + // Output only. The total number of bounding boxes (i.e. summed over all + // frames) the ground truth used to create this evaluation had. + int32 evaluated_bounding_box_count = 2; + + // 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 = 4; + + // 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 = 6; +} diff --git a/google/cloud/automl/v1beta1/geometry.proto b/google/cloud/automl/v1beta1/geometry.proto new file mode 100644 index 000000000..e5379ab14 --- /dev/null +++ b/google/cloud/automl/v1beta1/geometry.proto @@ -0,0 +1,47 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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/v1beta1/image.proto b/google/cloud/automl/v1beta1/image.proto new file mode 100644 index 000000000..c1596c634 --- /dev/null +++ b/google/cloud/automl/v1beta1/image.proto @@ -0,0 +1,151 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/annotation_spec.proto"; +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_outer_classname = "ImageProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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; + + // Required. The train budget of creating this model, expressed in hours. The + // actual `train_cost` will be equal or less than this value. + int64 train_budget = 2; + + // Output only. The actual train cost of creating this model, expressed in + // hours. If this model is created from a `base` model, the train cost used + // to create the `base` model are not included. + int64 train_cost = 3; + + // 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.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. + // * `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.v1beta1.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.v1beta1.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.v1beta1.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; +} + +// 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. + 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. 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. + 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 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.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. + // Must be between 1 and 100, inclusive on both ends. + int64 node_count = 1; +} diff --git a/google/cloud/automl/v1beta1/io.proto b/google/cloud/automl/v1beta1/io.proto new file mode 100644 index 000000000..cab08b3b7 --- /dev/null +++ b/google/cloud/automl/v1beta1/io.proto @@ -0,0 +1,998 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// Input configuration for 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.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 +// (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: +// +// * For Image Classification: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH,LABEL,LABEL,... +// GCS_FILE_PATH leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO +// For 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 +// +// * For Image Object Detection: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) +// GCS_FILE_PATH leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. +// Each image is assumed to be exhaustively labeled. The minimum +// allowed BOUNDING_BOX edge length is 0.01, and no more than 500 +// 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. +// 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,,,,,,,,, +// +// * For Video Classification: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH +// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH +// should lead to another .csv file which describes examples that have +// 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 end has to be after the start. 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 shuold 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,,, +// +// * For Video Object Tracking: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH +// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH +// should lead to another .csv file which describes examples that have +// given ML_USE, using one of 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_IDs 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,,,,,,,,,,, +// * 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. +// 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. +// Three sample CSV rows: +// TRAIN,gs://folder/file1.jsonl +// VALIDATE,gs://folder/file2.jsonl +// TEST,gs://folder/file3.jsonl +// Sample in-line JSON Lines file for entity extraction (presented here +// 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} +// } +// }, +// { +// "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} +// } +// }, +// ], +// }\n +// { +// "text_snippet": { +// "content": "This dog is good." +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 5, "end_offset": 8} +// } +// } +// ] +// } +// Sample document JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is 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.pdf" ] +// } +// } +// } +// } +// +// * For Text Classification: +// CSV file(s) with each line in format: +// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... +// 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 +// as a text snippet. In TEXT_SNIPPET case, the column content +// excluding quotes will be 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 +// +// * 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 +// 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 +// 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 +// +// * 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 +// +// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] +// 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. +// +// 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 = A path to file on GCS, e.g. "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 +// an 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 = A content of a text snippet, UTF-8 encoded, enclosed within +// double quotes (""). +// 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 +// huge. +// +// 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, will be listed in +// Operation.metadata.partial_failures. +// +message InputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for the input content. + // In ImportData, the gcs_source points to a csv with structure described in + // the comment. + GcsSource gcs_source = 1; + + // The BigQuery location for the input content. + BigQuerySource bigquery_source = 3; + } + + // Additional domain-specific parameters describing the semantic of the + // imported data, any string must be up to 25000 + // characters long. + // + // * For Tables: + // `schema_inference_version` - (integer) Required. The version of the + // algorithm that should be used for the initial inference of the + // schema (columns' DataTypes) of the table the data is being imported + // into. 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.v1beta1.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: +// * For Video Classification: +// CSV file(s) with each line in format: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// GCS_FILE_PATH leads to 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 end has to be after the start. +// Three sample rows: +// gs://folder/video1.mp4,10,40 +// gs://folder/video1.mp4,20,60 +// gs://folder/vid2.mov,0,inf +// +// * For Video Object Tracking: +// CSV file(s) with each line in format: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// GCS_FILE_PATH leads to 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 end has to be after the start. +// Three sample rows: +// gs://folder/video1.mp4,10,240 +// gs://folder/video1.mp4,300,360 +// gs://folder/vid2.mov,0,inf +// * 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 +// formats may be used). +// The in-line .JSONL file(s) contain 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. +// The document .JSONL file(s) contain, per line, a proto that wraps a +// Document proto with input_config set. Only PDF documents are +// supported now, and each document must be up to 2MB large. +// Any given .JSONL file must be 100MB or smaller, and no more than 20 +// files may be given. +// Sample in-line JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is 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": "An elaborate content", +// "mime_type": "text/plain" +// } +// } +// Sample document JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is 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.pdf" ] +// } +// } +// } +// } +// +// * For Tables: +// Either +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or +// +// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]. +// GCS case: +// 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. For all +// CLASSIFICATION and REGRESSION +// +// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// 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: +// "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 +// +// [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 +// +// [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 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. +// +// Definitions: +// GCS_FILE_PATH = A path to file on GCS, e.g. "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 +// an 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 { + // Required. The source of the input. + oneof source { + // The Google Cloud Storage location for the input content. + GcsSource gcs_source = 1; + + // The BigQuery location for the input content. + BigQuerySource bigquery_source = 2; + } +} + +// Input configuration of a [Document][google.cloud.automl.v1beta1.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 GCS or +// BigQuery. +// GCS case: +// +// [gcs_destination][google.cloud.automl.v1beta1.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.v1beta1.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 { + // Required. The destination of the output. + oneof destination { + // 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; + + // The BigQuery location where the output is to be written to. + BigQueryDestination bigquery_destination = 2; + } +} + +// Output configuration for BatchPredict Action. +// +// As destination the +// +// [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 +// 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 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 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" : "" followed by 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.v1beta1.BatchPredictOutputConfig.gcs_destination] +// or +// +// [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination] +// is set (either is allowed). +// GCS 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.v1beta1.TablesModelMetadata.prediction_type]: +// Each .csv file will contain a header, listing all columns' +// +// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] +// given on input followed by M target column names in the format of +// +// "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.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.v1beta1.TablesAnnotation.score]. +// For REGRESSION and FORECASTING +// +// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// Each .csv file will contain a header, listing all columns' +// [display_name-s][google.cloud.automl.v1beta1.display_name] given +// on input followed by the predicted target column with name in the +// format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.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.v1beta1.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.v1beta1.ColumnSpec.display_name] +// followed by the target column with name in the format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.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.v1beta1.AnnotationPayload], +// represented as STRUCT-s, containing +// [TablesAnnotation][google.cloud.automl.v1beta1.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.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.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 { + // Required. The destination of the output. + oneof destination { + // The Google Cloud Storage location of the directory where the output is to + // be written to. + GcsDestination gcs_destination = 1; + + // The BigQuery location where the output is to be written to. + BigQueryDestination bigquery_destination = 2; + } +} + +// Output configuration for ModelExport Action. +message ModelExportOutputConfig { + // Required. The destination of the output. + 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". + // + // 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; + + // The GCR location where model image is to be pushed to. This location + // may only be set for the following model formats: + // "docker". + // + // The model image will be created under the given URI. + GcrDestination gcr_destination = 3; + } + + // 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", "docker". + // + // * For Image Classification mobile-core-ml-low-latency-1, + // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + // "core_ml" (default). + // 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. + // * 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; +} + +// Output configuration for ExportEvaluatedExamples Action. Note that this call +// is available only for 30 days since the moment the model was evaluated. +// The output depends on the domain, as follows (note that only examples from +// the TEST set are exported): +// +// * For Tables: +// +// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// +// `export_evaluated_examples__` +// 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 an `evaluated_examples` table will be +// created. It will have all the same columns as the +// +// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id] +// of the +// [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which +// the model was created, as they were at the moment of model's +// evaluation (this includes the target column with its ground +// truth), followed by a column called "predicted_". That +// last column will contain the model's prediction result for each +// respective row, given as ARRAY of +// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload], +// represented as STRUCT-s, containing +// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation]. +message ExportEvaluatedExamplesOutputConfig { + // Required. The destination of the output. + oneof destination { + // The BigQuery location where the output is to be written to. + BigQueryDestination bigquery_destination = 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; +} + +// The BigQuery location for the input content. +message BigQuerySource { + // Required. BigQuery URI to a table, up to 2000 characters long. + // Accepted forms: + // * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId + string input_uri = 1; +} + +// 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; +} + +// The BigQuery location for the output content. +message BigQueryDestination { + // Required. BigQuery URI to a project, up to 2000 characters long. + // Accepted forms: + // * BigQuery path e.g. bq://projectId + string output_uri = 1; +} + +// The GCR location where the image must be pushed to. +message GcrDestination { + // Required. Google Contained Registry URI of the new image, up to 2000 + // characters long. See + // + // https: + // //cloud.google.com/container-registry/do + // // cs/pushing-and-pulling#pushing_an_image_to_a_registry + // Accepted forms: + // * [HOSTNAME]/[PROJECT-ID]/[IMAGE] + // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] + // + // The requesting user must have permission to push images the project. + string output_uri = 1; +} diff --git a/google/cloud/automl/v1beta1/model.proto b/google/cloud/automl/v1beta1/model.proto new file mode 100644 index 000000000..ecac533e1 --- /dev/null +++ b/google/cloud/automl/v1beta1/model.proto @@ -0,0 +1,107 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/image.proto"; +import "google/cloud/automl/v1beta1/tables.proto"; +import "google/cloud/automl/v1beta1/text.proto"; +import "google/cloud/automl/v1beta1/translation.proto"; +import "google/cloud/automl/v1beta1/video.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// API proto representing a trained machine learning model. +message 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 video classification models. + VideoClassificationModelMetadata video_classification_model_metadata = 23; + + // Metadata for video object tracking models. + VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; + + // Metadata for text extraction models. + TextExtractionModelMetadata text_extraction_model_metadata = 19; + + // Metadata for Tables models. + TablesModelMetadata tables_model_metadata = 24; + + // 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; +} diff --git a/google/cloud/automl/v1beta1/model_evaluation.proto b/google/cloud/automl/v1beta1/model_evaluation.proto new file mode 100644 index 000000000..f84ae62f6 --- /dev/null +++ b/google/cloud/automl/v1beta1/model_evaluation.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.cloud.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/cloud/automl/v1beta1/detection.proto"; +import "google/cloud/automl/v1beta1/regression.proto"; +import "google/cloud/automl/v1beta1/tables.proto"; +import "google/cloud/automl/v1beta1/text_extraction.proto"; +import "google/cloud/automl/v1beta1/text_sentiment.proto"; +import "google/cloud/automl/v1beta1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// Evaluation results of a model. +message ModelEvaluation { + // 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 Tables regression. + // Tables problem is considered a regression when the target column + // has FLOAT64 DataType. + RegressionEvaluationMetrics regression_evaluation_metrics = 24; + + // Model evaluation metrics for translation. + TranslationEvaluationMetrics translation_evaluation_metrics = 9; + + // Model evaluation metrics for image object detection. + ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; + + // Model evaluation metrics for video object tracking. + VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; + + // 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.v1beta1.TablesModelMetadata.prediction_type] + // the + // [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name] + // field is used. + string annotation_spec_id = 2; + + // Output only. The value of + // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.dispay_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.v1beta1.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.v1beta1.ModelEvaluation.annotation_spec_id]. + int32 evaluated_example_count = 6; +} diff --git a/google/cloud/automl/v1beta1/operations.proto b/google/cloud/automl/v1beta1/operations.proto new file mode 100644 index 000000000..aba18cd67 --- /dev/null +++ b/google/cloud/automl/v1beta1/operations.proto @@ -0,0 +1,190 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/io.proto"; +import "google/cloud/automl/v1beta1/model.proto"; +import "google/cloud/automl/v1beta1/model_evaluation.proto"; +import "google/protobuf/empty.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/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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 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; + + // Details of ExportEvaluatedExamples operation. + ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; + } + + // 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 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.v1beta1.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; + + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the exported data is written. + string bigquery_output_dataset = 2; + } + } + + // 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.v1beta1.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; + + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the prediction output is written. + string bigquery_output_dataset = 2; + } + } + + // 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.v1beta1.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; +} + +// Details of EvaluatedExamples operation. +message ExportEvaluatedExamplesOperationMetadata { + // Further describes the output of the evaluated examples export. + // Supplements + // + // [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig]. + message ExportEvaluatedExamplesOutputInfo { + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the output of export evaluated examples is written. + string bigquery_output_dataset = 2; + } + + // Output only. Information further describing the output of this evaluated + // examples export. + ExportEvaluatedExamplesOutputInfo output_info = 2; +} diff --git a/google/cloud/automl/v1beta1/prediction_service.proto b/google/cloud/automl/v1beta1/prediction_service.proto new file mode 100644 index 000000000..b45f35316 --- /dev/null +++ b/google/cloud/automl/v1beta1/prediction_service.proto @@ -0,0 +1,201 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.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; +option java_outer_classname = "PredictionServiceProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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 will be directly + // returned in the response. + // Available for following ML problems, and their expected request payloads: + // * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // * Text Classification - TextSnippet, content up to 60,000 characters, + // UTF-8 encoded. + // * Text Extraction - TextSnippet, content up to 30,000 characters, + // UTF-8 NFC encoded. + // * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + // encoded. + // * Tables - Row, with column values matching the columns of the model, + // up to 5MB. Not available for FORECASTING + // + // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + rpc Predict(PredictRequest) returns (PredictResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict" + body: "*" + }; + } + + // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.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.v1beta1.BatchPredictResult] is returned in + // the [response][google.longrunning.Operation.response] field. + // Available for following ML problems: + // * Video Classification + // * 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: "*" + }; + } +} + +// 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. + // Payload to perform a prediction on. The payload must match the + // problem type that the model was trained to solve. + ExamplePayload payload = 2; + + // Additional domain-specific parameters, any string must be up to 25000 + // characters long. + // + // * 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 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]. + // The default is false. + map params = 3; +} + +// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. +message PredictResponse { + // Prediction result. + // Translation and Text Sentiment will return precisely one payload. + repeated AnnotationPayload payload = 1; + + // 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 Text Sentiment: + // `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 will be also positive (though + // the least). + // The sentiment_score shouldn't be confused with "score" or "magnitude" + // from the previous Natural Language Sentiment Analysis API. + map metadata = 2; +} + +// 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. The input configuration for batch prediction. + BatchPredictInputConfig input_config = 3; + + // Required. The Configuration specifying where output predictions should + // be written. + BatchPredictOutputConfig output_config = 4; + + // Additional domain-specific parameters for the predictions, any string must + // be up to 25000 characters long. + // + // * 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. + // `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. + // 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. The default is "false". + // `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. + // 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. 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. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be returned per frame. Default is 100, the requested + // value may be limited by server. + // `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; +} + +// 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 { + +} diff --git a/google/api/experimental/experimental.proto b/google/cloud/automl/v1beta1/ranges.proto similarity index 54% rename from google/api/experimental/experimental.proto rename to google/cloud/automl/v1beta1/ranges.proto index a839cee57..6a1d66fa0 100644 --- a/google/api/experimental/experimental.proto +++ b/google/cloud/automl/v1beta1/ranges.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,24 +11,26 @@ // WITHOUT WARRANTIES OR CONDITIONS OF 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; +package google.cloud.automl.v1beta1; import "google/api/annotations.proto"; -import "google/api/experimental/authorization_config.proto"; -option go_package = "google.golang.org/genproto/googleapis/api;api"; +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; option java_multiple_files = true; -option java_outer_classname = "ExperimentalProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; +option java_outer_classname = "RangesProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; +// A range between two double numbers. +message DoubleRange { + // Start of the range, inclusive. + double start = 1; -// Experimental service configuration. These configuration options can -// only be used by whitelisted users. -message Experimental { - // Authorization configuration. - AuthorizationConfig authorization = 8; + // End of the range, exclusive. + double end = 2; } diff --git a/google/cloud/automl/v1beta1/regression.proto b/google/cloud/automl/v1beta1/regression.proto new file mode 100644 index 000000000..d2b96af13 --- /dev/null +++ b/google/cloud/automl/v1beta1/regression.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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_outer_classname = "RegressionProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// Metrics for regression problems. +message RegressionEvaluationMetrics { + // Output only. Root Mean Squared Error (RMSE). + float root_mean_squared_error = 1; + + // Output only. Mean Absolute Error (MAE). + float mean_absolute_error = 2; + + // Output only. Mean absolute percentage error. Only set if all ground truth + // values are are positive. + float mean_absolute_percentage_error = 3; + + // Output only. R squared. + float r_squared = 4; + + // Output only. Root mean squared log error. + float root_mean_squared_log_error = 5; +} diff --git a/google/cloud/automl/v1beta1/service.proto b/google/cloud/automl/v1beta1/service.proto new file mode 100644 index 000000000..323bf0626 --- /dev/null +++ b/google/cloud/automl/v1beta1/service.proto @@ -0,0 +1,646 @@ +// 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.automl.v1beta1; + +import "google/api/annotations.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"; +import "google/cloud/automl/v1beta1/dataset.proto"; +import "google/cloud/automl/v1beta1/image.proto"; +import "google/cloud/automl/v1beta1/io.proto"; +import "google/cloud/automl/v1beta1/model.proto"; +import "google/cloud/automl/v1beta1/model_evaluation.proto"; +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; +option java_outer_classname = "AutoMlProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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 (Dataset) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/datasets" + body: "dataset" + }; + } + + // Gets a dataset. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/datasets/*}" + }; + } + + // Lists datasets in a project. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/datasets" + }; + } + + // Updates a dataset. + rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { + option (google.api.http) = { + patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}" + body: "dataset" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/datasets/*}" + }; + } + + // 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.v1beta1.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: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData" + body: "*" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData" + body: "*" + }; + } + + // Gets an annotation spec. + rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" + }; + } + + // Gets a table spec. + rpc GetTableSpec(GetTableSpecRequest) returns (TableSpec) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}" + }; + } + + // Lists table specs in a dataset. + rpc ListTableSpecs(ListTableSpecsRequest) returns (ListTableSpecsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs" + }; + } + + // Updates a table spec. + rpc UpdateTableSpec(UpdateTableSpecRequest) returns (TableSpec) { + option (google.api.http) = { + patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}" + body: "table_spec" + }; + } + + // Gets a column spec. + rpc GetColumnSpec(GetColumnSpecRequest) returns (ColumnSpec) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" + }; + } + + // Lists column specs in a table spec. + rpc ListColumnSpecs(ListColumnSpecsRequest) returns (ListColumnSpecsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs" + }; + } + + // Updates a column spec. + rpc UpdateColumnSpec(UpdateColumnSpecRequest) returns (ColumnSpec) { + option (google.api.http) = { + patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" + body: "column_spec" + }; + } + + // 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: "/v1beta1/{parent=projects/*/locations/*}/models" + body: "model" + }; + } + + // Gets a model. + rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/models/*}" + }; + } + + // Lists models. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/models" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/models/*}" + }; + } + + // 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.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. + // + // 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: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy" + body: "*" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy" + body: "*" + }; + } + + // 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.v1beta1.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: "/v1beta1/{name=projects/*/locations/*/models/*}:export" + body: "*" + }; + } + + // Exports examples on which the model was evaluated (i.e. which were in the + // TEST set of the dataset the model was created from), together with their + // ground truth annotations and the annotations created (predicted) by the + // model. + // The examples, ground truth and predictions are exported in the state + // they were at the moment the model was evaluated. + // + // This export is available only for 30 days since the model evaluation is + // created. + // + // Currently only available for Tables. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc ExportEvaluatedExamples(ExportEvaluatedExamplesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples" + body: "*" + }; + } + + // Gets a model evaluation. + rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" + }; + } + + // Lists model evaluations. + rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations" + }; + } +} + +// 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; +} + +// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset]. +message GetDatasetRequest { + // The resource name of the dataset to retrieve. + string name = 1; +} + +// 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; + + // 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.v1beta1.ListDatasetsResponse.next_page_token] of the previous + // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.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.v1beta1.ListDatasetsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// 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; + + // 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; +} + +// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset]. +message DeleteDatasetRequest { + // The resource name of the dataset to delete. + string name = 1; +} + +// 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; + + // Required. The desired input location and its domain specific semantics, + // if any. + InputConfig input_config = 3; +} + +// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData]. +message ExportDataRequest { + // Required. The resource name of the dataset. + string name = 1; + + // Required. The desired output location. + OutputConfig output_config = 3; +} + +// 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; +} + +// 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; + + // Mask specifying which fields to read. + google.protobuf.FieldMask field_mask = 2; +} + +// 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; + + // Mask specifying which fields to read. + google.protobuf.FieldMask field_mask = 2; + + // Filter expression, see go/filtering. + string filter = 3; + + // Requested page size. The server can return fewer results than requested. + // If unspecified, the server will pick a default size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return. + // Typically obtained from the + // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous + // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. +message ListTableSpecsResponse { + // The table specs read. + repeated TableSpec table_specs = 1; + + // A token to retrieve next page of results. + // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// 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; + + // 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; +} + +// 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; + + // Mask specifying which fields to read. + google.protobuf.FieldMask field_mask = 2; +} + +// 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; + + // Mask specifying which fields to read. + google.protobuf.FieldMask field_mask = 2; + + // Filter expression, see go/filtering. + string filter = 3; + + // Requested page size. The server can return fewer results than requested. + // If unspecified, the server will pick a default size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return. + // Typically obtained from the + // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous + // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. +message ListColumnSpecsResponse { + // The column specs read. + repeated ColumnSpec column_specs = 1; + + // A token to retrieve next page of results. + // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// 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; + + // 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; +} + +// 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; +} + +// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel]. +message GetModelRequest { + // Resource name of the model. + string name = 1; +} + +// 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; + + // 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.v1beta1.ListModelsResponse.next_page_token] of the previous + // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.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.v1beta1.ListModelsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel]. +message DeleteModelRequest { + // Resource name of the model being deleted. + string name = 1; +} + +// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.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; + } + + // Resource name of the model to deploy. + string name = 1; +} + +// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel]. +message UndeployModelRequest { + // Resource name of the model to undeploy. + string name = 1; +} + +// Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.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; + + // Required. The desired output location and configuration. + ModelExportOutputConfig output_config = 3; +} + +// 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; + + // Required. The desired output location and configuration. + ExportEvaluatedExamplesOutputConfig output_config = 3; +} + +// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation]. +message GetModelEvaluationRequest { + // Resource name for the model evaluation. + string name = 1; +} + +// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. +message ListModelEvaluationsRequest { + // 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; + + // 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; + + // 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.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.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.v1beta1.ListModelEvaluationsRequest.page_token] field of a new + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page. + string next_page_token = 2; +} diff --git a/google/cloud/automl/v1beta1/table_spec.proto b/google/cloud/automl/v1beta1/table_spec.proto new file mode 100644 index 000000000..98f87f122 --- /dev/null +++ b/google/cloud/automl/v1beta1/table_spec.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.cloud.automl.v1beta1; + +import "google/cloud/automl/v1beta1/io.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// A specification of a relational table. +// The table's schema is represented via its child column specs. It is +// pre-populated as part of ImportData by schema inference algorithm, the +// version of which is a required parameter of ImportData InputConfig. +// Note: While working with a table, at times the schema may be +// inconsistent with the data in the table (e.g. string in a FLOAT64 column). +// The consistency validation is done upon creation of a model. +// Used by: +// * Tables +message TableSpec { + // Output only. The resource name of the table spec. + // Form: + // + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` + string name = 1; + + // column_spec_id of the time column. Only used if the parent dataset's + // ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE + // and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and + // those in between to VALIDATE. + // Required type: TIMESTAMP. + // If both this column and ml_use_column are not set, then ML use of all rows + // will be assigned by AutoML. NOTE: Updates of this field will instantly + // affect any other users concurrently working with the dataset. + string time_column_spec_id = 2; + + // Output only. The number of rows (i.e. examples) in the table. + int64 row_count = 3; + + // Output only. The number of columns of the table. That is, the number of + // child ColumnSpec-s. + int64 column_count = 7; + + // Output only. Input configs via which data currently residing in the table + // had been imported. + repeated InputConfig input_configs = 5; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 6; +} diff --git a/google/cloud/automl/v1beta1/tables.proto b/google/cloud/automl/v1beta1/tables.proto new file mode 100644 index 000000000..1cf916367 --- /dev/null +++ b/google/cloud/automl/v1beta1/tables.proto @@ -0,0 +1,278 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +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/temporal.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/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// Metadata for a dataset used for AutoML Tables. +message TablesDatasetMetadata { + // Output only. The table_spec_id of the primary table of this dataset. + string primary_table_spec_id = 1; + + // column_spec_id of the primary table's column that should be used as the + // 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 + // 100 unique values may exist in that column across all rows. + // + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + string target_column_spec_id = 2; + + // column_spec_id of the primary table's column that should be used as the + // weight column, i.e. the higher the value the more important the row will be + // during model training. + // Required type: FLOAT64. + // Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is + // ignored for training. + // If not set all rows are assumed to have equal weight of 1. + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + string weight_column_spec_id = 3; + + // column_spec_id of the primary table column which specifies a possible ML + // use of the row, i.e. the column will be used to split the rows into TRAIN, + // VALIDATE and TEST sets. + // Required type: STRING. + // This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` + // among its values, or only have `TEST`, `UNASSIGNED` values. In the latter + // case the rows with `UNASSIGNED` value will be assigned by AutoML. Note + // that if a given ml use distribution makes it impossible to create a "good" + // model, that call will error describing the issue. + // If both this column_spec_id and primary table's time_column_spec_id are not + // set, then all rows are treated as `UNASSIGNED`. + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + string ml_use_column_spec_id = 4; + + // Output only. Correlations between + // + // [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id], + // and other columns of the + // + // [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]. + // Only set if the target column is set. Mapping from other column spec id to + // its CorrelationStats with the target column. + // This field may be stale, see the stats_update_time field for + // 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. + google.protobuf.Timestamp stats_update_time = 7; +} + +// Model metadata specific to AutoML Tables. +message TablesModelMetadata { + // Column spec of the dataset's primary table's column the model is + // predicting. Snapshotted when model creation started. + // Only 3 fields are used: + // name - May be set on CreateModel, if it's not then the ColumnSpec + // corresponding to the current target_column_spec_id of the dataset + // the model is trained from is used. + // If neither is set, CreateModel will error. + // display_name - Output only. + // data_type - Output only. + ColumnSpec target_column_spec = 2; + + // Column specs of the dataset's primary table's columns, on which + // the model is trained and which are used as the input for predictions. + // The + // + // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // as well as, according to dataset's state upon model creation, + // + // [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id], + // and + // + // [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. + repeated ColumnSpec input_feature_column_specs = 3; + + // Objective function the model is optimizing towards. The training process + // creates a model that maximizes/minimizes the value of the objective + // function over the validation set. + // + // The supported optimization objectives depend on the prediction type. + // If the field is not set, a default objective function is used. + // + // CLASSIFICATION_BINARY: + // "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver + // operating characteristic (ROC) curve. + // "MINIMIZE_LOG_LOSS" - Minimize log loss. + // "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. + // "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified + // recall value. + // "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified + // precision value. + // + // CLASSIFICATION_MULTI_CLASS : + // "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. + // + // + // REGRESSION: + // "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; + + // Required. 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 training cost of the model will not exceed this budget. The final cost + // will be attempted to be close to the budget, though may end up being (even) + // noticeably smaller - at the backend's discretion. This especially may + // happen when further model training ceases to provide any improvements. + // + // If the budget is set to a value known to be insufficient to train a + // model for the given dataset, the training won't be attempted and + // will error. + // + // The train budget must be between 1,000 and 72,000 milli node hours, + // inclusive. + int64 train_budget_milli_node_hours = 6; + + // Output only. The actual training cost of the 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; + + // Use the entire training budget. This disables the early stopping feature. + // By default, the early stopping feature is enabled, which means that AutoML + // Tables might stop training before the entire training budget has been used. + bool disable_early_stopping = 12; +} + +// Contains annotation details specific to Tables. +message TablesAnnotation { + // Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher + // value means greater confidence in the returned value. + // For + // + // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // of FLOAT64 data type the score is not populated. + float score = 1; + + // Output only. Only populated when + // + // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // has FLOAT64 data type. An interval in which the exactly correct target + // value has 95% chance to be in. + DoubleRange prediction_interval = 4; + + // The predicted value of the row's + // + // [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. + google.protobuf.Value value = 2; + + // Output only. Auxiliary information for each of the model's + // + // [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // with respect to this particular prediction. + // If no other fields than + // + // [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name] + // and + // + // [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; +} + +// An information specific to given column and Tables Model, in context +// of the Model and the predictions created by it. +message TablesModelColumnInfo { + // Output only. The name of the ColumnSpec describing the column. Not + // populated when this proto is outputted to BigQuery. + string column_spec_name = 1; + + // Output only. The display name of the column (same as the display_name of + // its ColumnSpec). + string column_display_name = 2; + + // 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 + // columns of a given model they add to 1. + // + // When given back by Predict (populated iff + // [feature_importance + // param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch + // Predict (populated iff + // [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. + float feature_importance = 3; +} diff --git a/google/cloud/automl/v1beta1/temporal.proto b/google/cloud/automl/v1beta1/temporal.proto new file mode 100644 index 000000000..84874d99f --- /dev/null +++ b/google/cloud/automl/v1beta1/temporal.proto @@ -0,0 +1,38 @@ +// 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.automl.v1beta1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// A time period inside of an example that has a time dimension (e.g. video). +message TimeSegment { + // Start of the time segment (inclusive), represented as the duration since + // the example start. + google.protobuf.Duration start_time_offset = 1; + + // End of the time segment (exclusive), represented as the duration since the + // example start. + google.protobuf.Duration end_time_offset = 2; +} diff --git a/google/cloud/automl/v1beta1/text.proto b/google/cloud/automl/v1beta1/text.proto new file mode 100644 index 000000000..15c8368ed --- /dev/null +++ b/google/cloud/automl/v1beta1/text.proto @@ -0,0 +1,67 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TextProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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 { + +} + +// 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/v1beta1/text_extraction.proto b/google/cloud/automl/v1beta1/text_extraction.proto new file mode 100644 index 000000000..07f0dda81 --- /dev/null +++ b/google/cloud/automl/v1beta1/text_extraction.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.cloud.automl.v1beta1; + +import "google/cloud/automl/v1beta1/text_segment.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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/v1beta1/text_segment.proto b/google/cloud/automl/v1beta1/text_segment.proto new file mode 100644 index 000000000..41b8be1cc --- /dev/null +++ b/google/cloud/automl/v1beta1/text_segment.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.automl.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TextSegmentProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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/v1beta1/text_sentiment.proto b/google/cloud/automl/v1beta1/text_sentiment.proto new file mode 100644 index 000000000..978acb0f9 --- /dev/null +++ b/google/cloud/automl/v1beta1/text_sentiment.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.cloud.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_outer_classname = "TextSentimentProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// 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.v1beta1.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; + + // Output only. The annotation spec ids used for this evaluation. + // Deprecated . + repeated string annotation_spec_id = 9 [deprecated = true]; +} diff --git a/google/cloud/automl/v1beta1/translation.proto b/google/cloud/automl/v1beta1/translation.proto new file mode 100644 index 000000000..ed02b2af5 --- /dev/null +++ b/google/cloud/automl/v1beta1/translation.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.cloud.automl.v1beta1; + +import "google/cloud/automl/v1beta1/data_items.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_outer_classname = "TranslationProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +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; + + // Required. The BCP-47 language code of the target language. + string target_language_code = 2; +} + +// 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 languge (The BCP-47 language code) that is used for training. + string source_language_code = 2; + + // Output only. The target languge (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/video.proto b/google/cloud/automl/v1beta1/video.proto new file mode 100644 index 000000000..b7c7325bc --- /dev/null +++ b/google/cloud/automl/v1beta1/video.proto @@ -0,0 +1,49 @@ +// 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.automl.v1beta1; + +import "google/cloud/automl/v1beta1/classification.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; +option java_multiple_files = true; +option java_outer_classname = "VideoProto"; +option java_package = "com.google.cloud.automl.v1beta1"; +option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; +option ruby_package = "Google::Cloud::AutoML::V1beta1"; + +// Dataset metadata specific to video classification. +// All Video Classification datasets are treated as multi label. +message VideoClassificationDatasetMetadata { + +} + +// Dataset metadata specific to video object tracking. +message VideoObjectTrackingDatasetMetadata { + +} + +// Model metadata specific to video classification. +message VideoClassificationModelMetadata { + +} + +// Model metadata specific to video object tracking. +message VideoObjectTrackingModelMetadata { + +} diff --git a/google/cloud/bigquery/artman_bigquery_v2.yaml b/google/cloud/bigquery/artman_bigquery_v2.yaml new file mode 100644 index 000000000..426a197a8 --- /dev/null +++ b/google/cloud/bigquery/artman_bigquery_v2.yaml @@ -0,0 +1,34 @@ +common: + api_name: bigquery + api_version: v2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v2 + service_yaml: bigquery_v2.yaml + gapic_yaml: v2/bigquery_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/bigquery/bigquery_v2.yaml b/google/cloud/bigquery/bigquery_v2.yaml new file mode 100644 index 000000000..f6ffefee7 --- /dev/null +++ b/google/cloud/bigquery/bigquery_v2.yaml @@ -0,0 +1,35 @@ +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/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/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/datatransfer/BUILD.bazel b/google/cloud/bigquery/datatransfer/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/bigquery/datatransfer/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml index 785736416..6e3950d8c 100644 --- a/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml +++ b/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-bigquerydatatransfer-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-bigquerydatatransfer-v1 - - name: proto - dest: generated/java/proto-google-cloud-bigquerydatatransfer-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-bigquerydatatransfer - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-bigquerydatatransfer-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml b/google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml new file mode 100644 index 000000000..886f5e7e3 --- /dev/null +++ b/google/cloud/bigquery/datatransfer/bigquerydatatransfer.yaml @@ -0,0 +1,19 @@ +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: |- + Schedule queries or transfer external data from SaaS applications to Google + BigQuery on a regular basis. + +authentication: + rules: + - selector: 'google.cloud.bigquery.datatransfer.v1.DataTransferService.*' + 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 new file mode 100644 index 000000000..a26bb5e1c --- /dev/null +++ b/google/cloud/bigquery/datatransfer/v1/BUILD.bazel @@ -0,0 +1,156 @@ +# 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 = "bigquerydatatransfer_proto", + srcs = [ + ":datatransfer.proto", + ":transfer.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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", + ], +) + +proto_library_with_info( + name = "bigquerydatatransfer_proto_with_info", + deps = [":bigquerydatatransfer_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 = "bigquerydatatransfer_java_proto", + deps = [":bigquerydatatransfer_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"], +) + +java_gapic_library( + name = "bigquerydatatransfer_java_gapic", + src = ":bigquerydatatransfer_proto_with_info", + gapic_yaml = "bigquerydatatransfer_gapic.yaml", + service_yaml = "//google/cloud/bigquery/datatransfer:datatransfer.yaml", + test_deps = [":bigquerydatatransfer_java_grpc"], + deps = [ + ":bigquerydatatransfer_java_proto", + ":bigquerydatatransfer_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":bigquerydatatransfer_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClientTest", +]] + +# Opensource 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", + ], + 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "bigquerydatatransfer_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1", + protos = [":bigquerydatatransfer_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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"], +) + +go_test( + name = "bigquerydatatransfer_go_gapic_test", + srcs = [":bigquerydatatransfer_go_gapic_srcjar_test"], + embed = [":bigquerydatatransfer_go_gapic"], + importpath = "cloud.google.com/go/bigquery/datatransfer/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquerydatatransfer-v1-go", + deps = [ + ":bigquerydatatransfer_go_gapic", + ":bigquerydatatransfer_go_gapic_srcjar-smoke-test.srcjar", + ":bigquerydatatransfer_go_gapic_srcjar-test.srcjar", + ":bigquerydatatransfer_go_proto", + ], +) diff --git a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml index ddce69eb7..82ea62ff5 100644 --- a/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml +++ b/google/cloud/bigquery/datatransfer/v1/bigquerydatatransfer_gapic.yaml @@ -18,12 +18,6 @@ language_settings: nodejs: package_name: bigquery-data-transfer.v1 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 collection_oneofs: - oneof_name: parent_oneof collection_names: @@ -75,6 +69,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: + - name_pattern: projects/{project}/locations/{location} + entity_name: location # Definition for smoke test. smoke_test: method: ListDataSources @@ -112,9 +109,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # 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. @@ -157,13 +152,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -171,7 +167,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -185,6 +180,8 @@ interfaces: parent: parent_oneof timeout_millis: 20000 resource_name_treatment: STATIC_TYPES + header_request_params: + - parent - name: CreateTransferConfig flattening: groups: @@ -194,13 +191,14 @@ interfaces: required_fields: - parent - transfer_config - request_object_method: true 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: @@ -210,13 +208,14 @@ interfaces: required_fields: - transfer_config - update_mask - request_object_method: true 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: @@ -224,13 +223,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -238,13 +238,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -252,7 +253,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -266,6 +266,8 @@ interfaces: parent: parent_oneof timeout_millis: 30000 resource_name_treatment: STATIC_TYPES + header_request_params: + - parent - name: ScheduleTransferRuns flattening: groups: @@ -277,13 +279,14 @@ interfaces: - parent - start_time - end_time - request_object_method: true 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: @@ -291,13 +294,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -305,13 +309,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -319,7 +324,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -333,6 +337,8 @@ interfaces: parent: transfer_config_oneof timeout_millis: 30000 resource_name_treatment: STATIC_TYPES + header_request_params: + - parent - name: ListTransferLogs flattening: groups: @@ -340,7 +346,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -354,6 +359,8 @@ interfaces: parent: run_oneof timeout_millis: 30000 resource_name_treatment: STATIC_TYPES + header_request_params: + - parent - name: CheckValidCreds flattening: groups: @@ -361,13 +368,14 @@ interfaces: - name required_fields: - name - request_object_method: false 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: diff --git a/google/cloud/bigquery/datatransfer/v1/datasource.proto b/google/cloud/bigquery/datatransfer/v1/datasource.proto new file mode 100644 index 000000000..d7400a559 --- /dev/null +++ b/google/cloud/bigquery/datatransfer/v1/datasource.proto @@ -0,0 +1,542 @@ +// 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 548256110..e9a396834 100644 --- a/google/cloud/bigquery/datatransfer/v1/datatransfer.proto +++ b/google/cloud/bigquery/datatransfer/v1/datatransfer.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"; @@ -23,6 +24,7 @@ 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"; @@ -31,12 +33,14 @@ option java_outer_classname = "DataTransferProto"; option java_package = "com.google.cloud.bigquery.datatransfer.v1"; option php_namespace = "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 BigQuery. -// This service contains methods that are end user exposed. It backs up the -// frontend. +// configure the transfer of their data from other Google Products into +// BigQuery. This service contains methods that are end user exposed. It backs +// up the frontend. service DataTransferService { + option (google.api.default_host) = "bigquerydatatransfer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Retrieves a supported data source and returns its settings, // which can be used for UI rendering. rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { @@ -119,7 +123,9 @@ service DataTransferService { // For each date - or whatever granularity the data source supports - in the // range, one transfer run is created. // Note that runs are created per UTC time in the time range. + // DEPRECATED: use StartManualTransferRuns instead. rpc ScheduleTransferRuns(ScheduleTransferRunsRequest) returns (ScheduleTransferRunsResponse) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns" body: "*" @@ -130,6 +136,21 @@ service DataTransferService { }; } + // Start manual transfer runs to be executed now with schedule_time equal to + // current time. The transfer runs can be created for a time range where the + // run_time is between start_time (inclusive) and end_time (exclusive), or for + // a specific run_time. + rpc StartManualTransferRuns(StartManualTransferRunsRequest) returns (StartManualTransferRunsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/transferConfigs/*}:startManualRuns" + body: "*" + } + }; + } + // Returns information about the particular transfer run. rpc GetTransferRun(GetTransferRunRequest) returns (TransferRun) { option (google.api.http) = { @@ -213,7 +234,7 @@ message DataSourceParameter { // Boolean parameter. BOOLEAN = 4; - // Record parameter. + // Deprecated. This field has no effect. RECORD = 5; // Page ID for a Google+ Page. @@ -235,7 +256,7 @@ message DataSourceParameter { // Is parameter required. bool required = 5; - // Can parameter have multiple values. + // Deprecated. This field has no effect. bool repeated = 6; // Regular expression which can be used for parameter validation. @@ -250,7 +271,7 @@ message DataSourceParameter { // For integer and double values specifies maxminum allowed value. google.protobuf.DoubleValue max_value = 10; - // When parameter is a record, describes child fields. + // Deprecated. This field has no effect. repeated DataSourceParameter fields = 11; // Description of the requirements for this field, in case the user input does @@ -263,9 +284,12 @@ message DataSourceParameter { // Cannot be changed after initial creation. bool immutable = 14; - // If set to true, schema should be taken from the parent with the same - // parameter_id. Only applicable when parameter type is RECORD. + // Deprecated. This field has no effect. bool recurse = 15; + + // If true, it should not be used in new transfers, and it should not be + // visible to users. + bool deprecated = 20; } // Represents data source metadata. Metadata is sufficient to @@ -314,24 +338,21 @@ message DataSource { string description = 4; // Data source client id which should be used to receive refresh token. - // When not supplied, no offline credentials are populated for data transfer. string client_id = 5; - // Api auth scopes for which refresh token needs to be obtained. Only valid - // when `client_id` is specified. Ignored otherwise. These are scopes needed - // by a data source to prepare data and ingest them into BigQuery, - // e.g., https://www.googleapis.com/auth/bigquery + // Api auth scopes for which refresh token needs to be obtained. These are + // scopes needed by a data source to prepare data and ingest them into + // BigQuery, e.g., https://www.googleapis.com/auth/bigquery repeated string scopes = 6; // Deprecated. This field has no effect. - TransferType transfer_type = 7; + TransferType transfer_type = 7 [deprecated = true]; - // Indicates whether the data source supports multiple transfers - // to different BigQuery targets. - bool supports_multiple_transfers = 8; + // Deprecated. This field has no effect. + bool supports_multiple_transfers = 8 [deprecated = true]; // The number of seconds to wait for an update from the data source - // before BigQuery marks the transfer as failed. + // before the Data Transfer Service marks the transfer as FAILED. int32 update_deadline_seconds = 9; // Default data transfer schedule. @@ -417,7 +438,7 @@ message ListDataSourcesResponse { // 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} + // 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; @@ -442,6 +463,14 @@ message CreateTransferConfigRequest { // returned in the title bar of the browser, with the page text prompting // the user to copy the code and paste it in the application. string authorization_code = 3; + + // Optional version info. If users want to find a very recent access token, + // that is, immediately after approving access, users have to set the + // version_info claim in the token request. To obtain the version_info, users + // must use the "none+gsession" response type. which be return a + // version_info back in the authorization response which be be put in a JWT + // claim in the token request. + string version_info = 5; } // A request to update a transfer configuration. To update the user id of the @@ -470,6 +499,14 @@ message UpdateTransferConfigRequest { // Required list of fields to be updated in this request. google.protobuf.FieldMask update_mask = 4; + + // Optional version info. If users want to find a very recent access token, + // that is, immediately after approving access, users have to set the + // version_info claim in the token request. To obtain the version_info, users + // must use the "none+gsession" response type. which be return a + // version_info back in the authorization response which be be put in a JWT + // claim in the token request. + string version_info = 5; } // A request to get data transfer information. @@ -651,3 +688,43 @@ message ScheduleTransferRunsResponse { // The transfer runs that were scheduled. repeated TransferRun runs = 1; } + +// A request to start manual transfer runs. +message StartManualTransferRunsRequest { + // A specification for a time range, this will request transfer runs with + // run_time between start_time (inclusive) and end_time (exclusive). + message TimeRange { + // Start time of the range of transfer runs. For example, + // `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + // the end_time. Creates transfer runs where run_time is in the range betwen + // start_time (inclusive) and end_time (exlusive). + google.protobuf.Timestamp start_time = 1; + + // End time of the range of transfer runs. For example, + // `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + // Creates transfer runs where run_time is in the range betwen start_time + // (inclusive) and end_time (exlusive). + google.protobuf.Timestamp end_time = 2; + } + + // Transfer configuration name in the form: + // `projects/{project_id}/transferConfigs/{config_id}`. + string parent = 1; + + // The requested time specification - this can be a time range or a specific + // run_time. + oneof time { + // Time range for the transfer runs that should be started. + TimeRange requested_time_range = 3; + + // Specific run_time for a transfer run to be started. The + // requested_run_time must not be in the future. + google.protobuf.Timestamp requested_run_time = 4; + } +} + +// A response to start manual transfer runs. +message StartManualTransferRunsResponse { + // The transfer runs that were created. + repeated TransferRun runs = 1; +} diff --git a/google/cloud/bigquery/datatransfer/v1/transfer.proto b/google/cloud/bigquery/datatransfer/v1/transfer.proto index 0cadeed5b..9501ea3cc 100644 --- a/google/cloud/bigquery/datatransfer/v1/transfer.proto +++ b/google/cloud/bigquery/datatransfer/v1/transfer.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"; @@ -29,6 +30,64 @@ option java_package = "com.google.cloud.bigquery.datatransfer.v1"; option objc_class_prefix = "GCBDT"; option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; +// DEPRECATED. Represents data transfer type. +enum TransferType { + option deprecated = true; + + // Invalid or Unknown transfer type placeholder. + TRANSFER_TYPE_UNSPECIFIED = 0; + + // Batch data transfer. + BATCH = 1; + + // Streaming data transfer. Streaming data source currently doesn't + // support multiple transfer configs per project. + STREAMING = 2; +} + +// Represents data transfer run state. +enum TransferState { + // State placeholder. + TRANSFER_STATE_UNSPECIFIED = 0; + + // Data transfer is scheduled and is waiting to be picked up by + // data transfer backend. + PENDING = 2; + + // Data transfer is in progress. + RUNNING = 3; + + // Data transfer completed successfully. + SUCCEEDED = 4; + + // Data transfer failed. + FAILED = 5; + + // Data transfer is cancelled. + CANCELLED = 6; +} + +// Options customizing the data transfer schedule. +message ScheduleOptions { + // If true, automatic scheduling of data transfer runs for this configuration + // will be disabled. The runs can be started on ad-hoc basis using + // StartManualTransferRuns API. When automatic scheduling is disabled, the + // TransferConfig.schedule field will be ignored. + bool disable_auto_scheduling = 3; + + // Specifies time to start scheduling transfer runs. The first run will be + // scheduled at or after the start time according to a recurrence pattern + // defined in the schedule string. The start time can be changed at any + // moment. The time when a data transfer can be trigerred manually is not + // limited by this option. + google.protobuf.Timestamp start_time = 1; + + // Defines time to stop scheduling transfer runs. A transfer run cannot be + // scheduled at or after the end time. The end time can be changed at any + // moment. The time when a data transfer can be trigerred manually is not + // limited by this option. + google.protobuf.Timestamp end_time = 2; +} // Represents a data transfer configuration. A transfer configuration // contains all metadata needed to perform a data transfer. For example, @@ -38,11 +97,12 @@ option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1"; // appropriate data source service account. message TransferConfig { // The resource name of the transfer config. - // Transfer config names have the form - // `projects/{project_id}/transferConfigs/{config_id}`. - // Where `config_id` is usually a uuid, even though it is not - // guaranteed or required. The name is ignored when creating a transfer - // config. + // Transfer config names have the form of + // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. + // The name is automatically generated based on the config_id specified in + // CreateTransferConfigRequest along with project_id and region. If config_id + // is not provided, usually a uuid, even though it is not guaranteed or + // required, will be generated for config_id. string name = 1; // The BigQuery target dataset id. @@ -71,6 +131,9 @@ message TransferConfig { // NOTE: the granularity should be at least 8 hours, or less frequent. string schedule = 7; + // Options customizing the data transfer schedule. + ScheduleOptions schedule_options = 24; + // The number of days to look back to automatically refresh the data. // For example, if `data_refresh_window_days = 10`, then every day // BigQuery reingests data for [today-10, today-1], rather than ingesting data @@ -92,11 +155,7 @@ message TransferConfig { // Output only. State of the most recently updated transfer run. TransferState state = 10; - // Output only. Unique ID of the user on whose behalf transfer is done. - // Applicable only to data sources that do not support service accounts. - // When set to 0, the data source service account credentials are used. - // May be negative. Note, that this identifier is not stable. - // It may change over time even for the same user. + // 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. @@ -114,8 +173,8 @@ message TransferRun { // Minimum time after which a transfer run can be started. google.protobuf.Timestamp schedule_time = 3; - // For batch transfer runs, specifies the date and time that - // data should be ingested. + // For batch transfer runs, specifies the date and time of the data should be + // ingested. google.protobuf.Timestamp run_time = 10; // Status of the transfer run. @@ -144,18 +203,14 @@ message TransferRun { // Data transfer run state. Ignored for input requests. TransferState state = 8; - // Output only. Unique ID of the user on whose behalf transfer is done. - // Applicable only to data sources that do not support service accounts. - // When set to 0, the data source service account credentials are used. - // May be negative. Note, that this identifier is not stable. - // It may change over time even for the same user. + // Deprecated. Unique ID of the user on whose behalf transfer is done. int64 user_id = 11; // Output only. Describes the schedule of this transfer run if it was // created as part of a regular schedule. For batch transfer runs that are // 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 matches this. + // current load, so `schedule_time` doesn't always match this. string schedule = 12; } @@ -185,38 +240,3 @@ message TransferMessage { // Message text. string message_text = 3; } - -// DEPRECATED. Represents data transfer type. -enum TransferType { - // Invalid or Unknown transfer type placeholder. - TRANSFER_TYPE_UNSPECIFIED = 0; - - // Batch data transfer. - BATCH = 1; - - // Streaming data transfer. Streaming data source currently doesn't - // support multiple transfer configs per project. - STREAMING = 2; -} - -// Represents data transfer run state. -enum TransferState { - // State placeholder. - TRANSFER_STATE_UNSPECIFIED = 0; - - // Data transfer is scheduled and is waiting to be picked up by - // data transfer backend. - PENDING = 2; - - // Data transfer is in progress. - RUNNING = 3; - - // Data transfer completed successsfully. - SUCCEEDED = 4; - - // Data transfer failed. - FAILED = 5; - - // Data transfer is cancelled. - CANCELLED = 6; -} diff --git a/google/cloud/bigquery/logging/v1/audit_data.proto b/google/cloud/bigquery/logging/v1/audit_data.proto index 2d474106f..0031521c9 100644 --- a/google/cloud/bigquery/logging/v1/audit_data.proto +++ b/google/cloud/bigquery/logging/v1/audit_data.proto @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "AuditDataProto"; option java_package = "com.google.cloud.bigquery.logging.v1"; - // BigQuery request and response messages for audit log. // Note: `Table.schema` has been deprecated in favor of `Table.schemaJson`. // `Table.schema` may continue to be present in your logs during this diff --git a/google/cloud/bigquery/storage/BUILD.bazel b/google/cloud/bigquery/storage/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/bigquery/storage/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml new file mode 100644 index 000000000..49e837efd --- /dev/null +++ b/google/cloud/bigquery/storage/artman_bigquerystorage_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: bigquerystorage + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: storage_v1beta1.yaml + gapic_yaml: v1beta1/bigquerystorage_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/bigquery/storage/storage_v1beta1.yaml b/google/cloud/bigquery/storage/storage_v1beta1.yaml new file mode 100644 index 000000000..bcb700d62 --- /dev/null +++ b/google/cloud/bigquery/storage/storage_v1beta1.yaml @@ -0,0 +1,15 @@ +type: google.api.Service +config_version: 3 +name: bigquerystorage.googleapis.com +title: BigQuery Storage API + +apis: +- name: google.cloud.bigquery.storage.v1beta1.BigQueryStorage + +authentication: + rules: + - selector: 'google.cloud.bigquery.storage.v1beta1.BigQueryStorage.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/bigquery, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/bigquery/storage/v1beta1/BUILD.bazel b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel new file mode 100644 index 000000000..1772fa579 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/BUILD.bazel @@ -0,0 +1,148 @@ +# 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 = "bigquerystorage_proto", + srcs = [ + "avro.proto", + "read_options.proto", + "storage.proto", + "table_reference.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "bigquerystorage_proto_with_info", + deps = [":bigquerystorage_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 = "bigquerystorage_java_proto", + deps = [":bigquerystorage_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"], +) + +java_gapic_library( + name = "bigquerystorage_java_gapic", + src = ":bigquerystorage_proto_with_info", + gapic_yaml = "bigquerystorage_gapic.yaml", + service_yaml = "//google/cloud/bigquery/storage:storage_v1beta1.yaml", + test_deps = [":bigquerystorage_java_grpc"], + deps = [ + ":bigquerystorage_java_proto", + ":bigquerystorage_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":bigquerystorage_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.bigquery.storage.v1beta1.BaseBigQueryStorageClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "bigquerystorage_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1", + protos = [":bigquerystorage_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"], +) + +go_test( + name = "bigquerystorage_go_gapic_test", + srcs = [":bigquerystorage_go_gapic_srcjar_test"], + embed = [":bigquerystorage_go_gapic"], + importpath = "cloud.google.com/go/bigquery/storage/apiv1beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-bigquerystorage-v1-go", + deps = [ + ":bigquerystorage_go_gapic", + ":bigquerystorage_go_gapic_srcjar-smoke-test.srcjar", + ":bigquerystorage_go_gapic_srcjar-test.srcjar", + ":bigquerystorage_go_proto", + ], +) diff --git a/google/cloud/bigquery/storage/v1beta1/arrow.proto b/google/cloud/bigquery/storage/v1beta1/arrow.proto new file mode 100644 index 000000000..3003de444 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/arrow.proto @@ -0,0 +1,37 @@ +// 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.v1beta1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_outer_classname = "ArrowProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + +// Arrow schema. +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 the returning block. + int64 row_count = 2; +} diff --git a/google/cloud/bigquery/storage/v1beta1/avro.proto b/google/cloud/bigquery/storage/v1beta1/avro.proto new file mode 100644 index 000000000..021d8e44f --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/avro.proto @@ -0,0 +1,38 @@ +// 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.v1beta1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_outer_classname = "AvroProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + +// 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/v1beta1/bigquerystorage_gapic.yaml b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml new file mode 100644 index 000000000..3843dbc4f --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/bigquerystorage_gapic.yaml @@ -0,0 +1,202 @@ +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.v1beta1 + interface_names: + google.cloud.bigquery.storage.v1beta1.BigQueryStorage: BaseBigQueryStorage + python: + package_name: google.cloud.bigquery_storage_v1beta1.gapic + go: + package_name: cloud.google.com/go/bigquery/storage/apiv1beta1 + csharp: + package_name: Google.Cloud.Bigquery.Storage.V1beta1 + ruby: + package_name: Google::Cloud::Bigquery::Storage::V1beta1 + php: + package_name: Google\Cloud\Bigquery\Storage\V1beta1 + nodejs: + package_name: storage.v1beta1 +# A list of API interface configurations. +interfaces: + # 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. + # 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: unary_streaming + retry_codes: + - 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 + # CreateReadSession performs some heavyweight table resolution work before + # returning to the caller, and can have DEADLINE_EXCEEDED issues for large + # (> 10TB) tables with the default retry settings. + - 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 + # ReadRows is a unary streaming RPC for which the concept of a deadline + # doesn't necessarily make sense -- the server will keep sending back data + # as long as the end of the table hasn't been reached. We set a deadline + # here of 86400000 milliseconds, or one day, but in practice we should use + # some other mechanism here (gRPC keepalive?) and disallow client-side + # deadlines entirely. + - 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 + # 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: CreateReadSession + flattening: + groups: + - parameters: + - table_reference + - parent + - requested_streams + required_fields: + - table_reference + - parent + retry_codes_name: idempotent + retry_params_name: create_read_session + timeout_millis: 60000 + header_request_params: + - table_reference.project_id + - table_reference.dataset_id + - name: ReadRows + flattening: + groups: + - parameters: + - read_position + required_fields: + - read_position + retry_codes_name: unary_streaming + retry_params_name: read_rows + timeout_millis: 86400000 + header_request_params: + - read_position.stream.name + - name: BatchCreateReadSessionStreams + flattening: + groups: + - parameters: + - session + - requested_streams + required_fields: + - session + - requested_streams + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + header_request_params: + - session.name + - name: FinalizeStream + flattening: + groups: + - parameters: + - stream + required_fields: + - stream + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + header_request_params: + - stream.name + - name: SplitReadStream + flattening: + groups: + - parameters: + - original_stream + required_fields: + - original_stream + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + header_request_params: + - original_stream.name diff --git a/google/cloud/bigquery/storage/v1beta1/read_options.proto b/google/cloud/bigquery/storage/v1beta1/read_options.proto new file mode 100644 index 000000000..9591deba7 --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/read_options.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.v1beta1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + +// Options dictating how we read a table. +message TableReadOptions { + // Optional. 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; + + // 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. + // + // 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; +} diff --git a/google/cloud/bigquery/storage/v1beta1/storage.proto b/google/cloud/bigquery/storage/v1beta1/storage.proto new file mode 100644 index 000000000..fa2de616d --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/storage.proto @@ -0,0 +1,362 @@ +// 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.v1beta1; + +import "google/api/annotations.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"; + +// BigQuery storage API. +// +// The BigQuery storage API can be used to read data stored in BigQuery. +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/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. + // + // 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: "/v1beta1/{table_reference.project_id=projects/*}" + body: "*" + additional_bindings { + post: "/v1beta1/{table_reference.dataset_id=projects/*/datasets/*}" + body: "*" + } + }; + } + + // Reads rows from the table in the format prescribed by the read session. + // Each response contains one or more table rows, up to a maximum of 10 MiB + // per response; read requests which attempt to read individual rows larger + // than this will fail. + // + // Each request also returns a set of stream statistics reflecting the + // estimated total number of rows in the read stream. This number is computed + // based on the total table size and the number of active streams in the read + // session, and may change as other streams continue to read data. + rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) { + option (google.api.http) = { + get: "/v1beta1/{read_position.stream.name=projects/*/streams/*}" + }; + } + + // Creates additional streams for a ReadSession. This API can be used to + // dynamically adjust the parallelism of a batch processing task upwards by + // adding additional workers. + rpc BatchCreateReadSessionStreams(BatchCreateReadSessionStreamsRequest) returns (BatchCreateReadSessionStreamsResponse) { + option (google.api.http) = { + post: "/v1beta1/{session.name=projects/*/sessions/*}" + body: "*" + }; + } + + // Triggers the graceful termination of a single stream in a ReadSession. This + // API can be used to dynamically adjust the parallelism of a batch processing + // task downwards without losing data. + // + // This API does not delete the stream -- it remains visible in the + // ReadSession, and any data processed by the stream is not released to other + // streams. However, no additional data will be assigned to the stream once + // this call completes. Callers must continue reading data on the stream until + // the end of the stream is reached so that data which has already been + // assigned to the stream will be processed. + // + // This method will return an error if there are no other live streams + // in the Session, or if SplitReadStream() has been called on the given + // Stream. + rpc FinalizeStream(FinalizeStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{stream.name=projects/*/streams/*}" + body: "*" + }; + } + + // Splits a given read stream into two Streams. These streams are referred to + // as the primary and the residual of the split. The original stream can still + // be read from in the same manner as before. Both of the returned streams can + // also be read from, and the total rows return 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 Stream. 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. + // + // This method is guaranteed to be idempotent. + rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) { + option (google.api.http) = { + get: "/v1beta1/{original_stream.name=projects/*/streams/*}" + }; + } +} + +// Information about a single data stream within a read session. +message Stream { + // Name of the stream, in the form + // `projects/{project_id}/locations/{location}/streams/{stream_id}`. + string name = 1; +} + +// Expresses a point within a given stream using an offset position. +message StreamPosition { + // Identifier for a given Stream. + Stream stream = 1; + + // Position in the stream. + int64 offset = 2; +} + +// Information returned from a `CreateReadSession` request. +message ReadSession { + // Unique identifier for the session, in the form + // `projects/{project_id}/locations/{location}/sessions/{session_id}`. + string name = 1; + + // Time at which the session becomes invalid. After this time, subsequent + // requests to read this Session will return errors. + google.protobuf.Timestamp expire_time = 2; + + // 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 { + // Avro schema. + AvroSchema avro_schema = 5; + + // Arrow schema. + ArrowSchema arrow_schema = 6; + } + + // Streams associated with this session. + repeated Stream streams = 4; + + // Table that this ReadSession is reading from. + TableReference table_reference = 7; + + // Any modifiers which are applied when reading from the specified table. + TableModifiers table_modifiers = 8; + + // The strategy to use for distributing data among the streams. + ShardingStrategy sharding_strategy = 9; +} + +// Creates a new read session, which may include additional options such as +// requested parallelism, projection filters and constraints. +message CreateReadSessionRequest { + // Required. Reference to the table to read. + TableReference table_reference = 1; + + // 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). + TableModifiers table_modifiers = 2; + + // Optional. 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 + // the maximum amount of parallelism allowed by the system. + // + // Streams must be read starting from offset 0. + int32 requested_streams = 3; + + // Optional. Read options for this session (e.g. column selection, filters). + TableReadOptions read_options = 4; + + // Data output format. Currently default to Avro. + DataFormat format = 5; + + // The strategy to use for distributing data among multiple streams. Currently + // defaults to liquid sharding. + ShardingStrategy sharding_strategy = 7; +} + +// Data format for input or output data. +enum DataFormat { + // Data format is unspecified. + 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 = 3; +} + +// Strategy for distributing data among multiple streams in a read session. +enum ShardingStrategy { + // Same as LIQUID. + SHARDING_STRATEGY_UNSPECIFIED = 0; + + // Assigns data to each stream based on the client's read rate. The faster the + // client reads from a stream, the more data is assigned to the stream. In + // this strategy, it's possible to read all data from a single stream even if + // there are other streams present. + LIQUID = 1; + + // Assigns data 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-filtering rows, so some filters can lead to lopsided + // assignments. + BALANCED = 2; +} + +// Requesting row data via `ReadRows` must provide Stream position information. +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; +} + +// Progress information for a given Stream. +message StreamStatus { + // Number of estimated rows in the current stream. May change over time as + // different readers in the stream progress at rates which are relatively fast + // or slow. + int64 estimated_row_count = 1; + + // A value in the range [0.0, 1.0] that represents the fraction of rows + // assigned to this stream that have been processed by the server. In the + // presence of read filters, the server may process more rows than it returns, + // so this value reflects progress through the pre-filtering rows. + // + // This value is only populated for sessions created through the BALANCED + // sharding strategy. + float fraction_consumed = 2; + + // 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 + // at that point or beyond. For small tables or streams that are the result of + // a chain of splits, this value may never be true. + bool is_splittable = 3; +} + +// Information on if the current connection is being throttled. +message ThrottleStatus { + // How much this connection is being throttled. + // 0 is no throttling, 100 is completely throttled. + int32 throttle_percent = 1; +} + +// 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. This value is recorded here, + // in addition to the row_count values in the output-specific messages in + // `rows`, so that code which needs to record progress through the stream can + // do so in an output format-independent way. + int64 row_count = 6; + + // Estimated stream statistics. + StreamStatus status = 2; + + // Throttling status. If unset, the latest response still describes + // the current throttling status. + ThrottleStatus throttle_status = 5; +} + +// Information needed to request additional streams for an established read +// session. +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; + + // 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; +} + +// The response from `BatchCreateReadSessionStreams` returns the stream +// identifiers for the newly created streams. +message BatchCreateReadSessionStreamsResponse { + // Newly added streams. + repeated Stream streams = 1; +} + +// Request information for invoking `FinalizeStream`. +message FinalizeStreamRequest { + // Stream to finalize. + Stream stream = 2; +} + +// Request information for `SplitReadStream`. +message SplitReadStreamRequest { + // Stream to split. + Stream original_stream = 1; + + // 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 to a data storage boundary on the server side. + float fraction = 2; +} + +// Response from `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. + Stream 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. + Stream remainder_stream = 2; +} diff --git a/google/cloud/bigquery/storage/v1beta1/table_reference.proto b/google/cloud/bigquery/storage/v1beta1/table_reference.proto new file mode 100644 index 000000000..fb74bbf6c --- /dev/null +++ b/google/cloud/bigquery/storage/v1beta1/table_reference.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.bigquery.storage.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_outer_classname = "TableReferenceProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + +// Table reference that includes just the 3 strings needed to identify a table. +message TableReference { + // The assigned project ID of the project. + string project_id = 1; + + // The ID of the dataset in the above project. + string dataset_id = 2; + + // The ID of the table in the above dataset. + string table_id = 3; +} + +// All fields in this message optional. +message TableModifiers { + // The snapshot time of the table. If not set, interpreted as now. + google.protobuf.Timestamp snapshot_time = 1; +} diff --git a/google/cloud/bigquery/v2/bigquery_gapic.yaml b/google/cloud/bigquery/v2/bigquery_gapic.yaml new file mode 100644 index 000000000..de614d248 --- /dev/null +++ b/google/cloud/bigquery/v2/bigquery_gapic.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/model.proto b/google/cloud/bigquery/v2/model.proto new file mode 100644 index 000000000..2b5b6894d --- /dev/null +++ b/google/cloud/bigquery/v2/model.proto @@ -0,0 +1,555 @@ +// 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/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"; +option java_package = "com.google.cloud.bigquery.v2"; + +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/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Gets the specified model resource by model ID. + rpc GetModel(GetModelRequest) returns (Model) { + } + + // Lists all models in the specified dataset. Requires the READER dataset + // role. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + } + + // Patch specific fields in the specified model. + rpc PatchModel(PatchModelRequest) returns (Model) { + } + + // Deletes the model specified by modelId from the dataset. + rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) { + } +} + +message Model { + // Evaluation metrics for regression models. + message RegressionMetrics { + // Mean absolute error. + google.protobuf.DoubleValue mean_absolute_error = 1; + + // Mean squared error. + google.protobuf.DoubleValue mean_squared_error = 2; + + // Mean squared log error. + google.protobuf.DoubleValue mean_squared_log_error = 3; + + // Median absolute error. + google.protobuf.DoubleValue median_absolute_error = 4; + + // R^2 score. + google.protobuf.DoubleValue r_squared = 5; + } + + // Aggregate metrics for classification/classifier models. For multi-class + // models, the metrics are either macro-averaged or micro-averaged. When + // macro-averaged, the metrics are calculated for each label and then an + // unweighted average is taken of those values. When micro-averaged, the + // metric is calculated globally by counting the total number of correctly + // predicted rows. + message AggregateClassificationMetrics { + // Precision is the fraction of actual positive predictions that had + // positive actual labels. For multiclass this is a macro-averaged + // metric treating each class as a binary classifier. + google.protobuf.DoubleValue precision = 1; + + // Recall is the fraction of actual positive labels that were given a + // positive prediction. For multiclass this is a macro-averaged metric. + google.protobuf.DoubleValue recall = 2; + + // Accuracy is the fraction of predictions given the correct label. For + // multiclass this is a micro-averaged metric. + google.protobuf.DoubleValue accuracy = 3; + + // Threshold at which the metrics are computed. For binary + // classification models this is the positive class threshold. + // For multi-class classfication models this is the confidence + // threshold. + google.protobuf.DoubleValue threshold = 4; + + // The F1 score is an average of recall and precision. For multiclass + // this is a macro-averaged metric. + google.protobuf.DoubleValue f1_score = 5; + + // Logarithmic Loss. For multiclass this is a macro-averaged metric. + google.protobuf.DoubleValue log_loss = 6; + + // Area Under a ROC Curve. For multiclass this is a macro-averaged + // metric. + google.protobuf.DoubleValue roc_auc = 7; + } + + // Evaluation metrics for binary classification/classifier models. + message BinaryClassificationMetrics { + // Confusion matrix for binary classification models. + message BinaryConfusionMatrix { + // Threshold value used when computing each of the following metric. + google.protobuf.DoubleValue positive_class_threshold = 1; + + // Number of true samples predicted as true. + google.protobuf.Int64Value true_positives = 2; + + // Number of false samples predicted as true. + google.protobuf.Int64Value false_positives = 3; + + // Number of true samples predicted as false. + google.protobuf.Int64Value true_negatives = 4; + + // Number of false samples predicted as false. + google.protobuf.Int64Value false_negatives = 5; + + // The fraction of actual positive predictions that had positive actual + // labels. + google.protobuf.DoubleValue precision = 6; + + // The fraction of actual positive labels that were given a positive + // prediction. + google.protobuf.DoubleValue recall = 7; + + // The equally weighted average of recall and precision. + google.protobuf.DoubleValue f1_score = 8; + + // The fraction of predictions given the correct label. + google.protobuf.DoubleValue accuracy = 9; + } + + // Aggregate classification metrics. + AggregateClassificationMetrics aggregate_classification_metrics = 1; + + // Binary confusion matrix at multiple thresholds. + repeated BinaryConfusionMatrix binary_confusion_matrix_list = 2; + + // Label representing the positive class. + string positive_label = 3; + + // Label representing the negative class. + string negative_label = 4; + } + + // Evaluation metrics for multi-class classification/classifier models. + message MultiClassClassificationMetrics { + // Confusion matrix for multi-class classification models. + message ConfusionMatrix { + // A single entry in the confusion matrix. + message Entry { + // The predicted label. For confidence_threshold > 0, we will + // also add an entry indicating the number of items under the + // confidence threshold. + string predicted_label = 1; + + // Number of items being predicted as this label. + google.protobuf.Int64Value item_count = 2; + } + + // A single row in the confusion matrix. + message Row { + // The original label of this row. + string actual_label = 1; + + // Info describing predicted label distribution. + repeated Entry entries = 2; + } + + // Confidence threshold used when computing the entries of the + // confusion matrix. + google.protobuf.DoubleValue confidence_threshold = 1; + + // One row per actual label. + repeated Row rows = 2; + } + + // Aggregate classification metrics. + AggregateClassificationMetrics aggregate_classification_metrics = 1; + + // Confusion matrix at different thresholds. + repeated ConfusionMatrix confusion_matrix_list = 2; + } + + // Evaluation metrics for clustering models. + message ClusteringMetrics { + // 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; + } + + // Evaluation metrics of a model. These are either computed on all training + // data or just the eval data based on whether eval data was used during + // training. These are not present for imported models. + message EvaluationMetrics { + oneof metrics { + // Populated for regression models. + RegressionMetrics regression_metrics = 1; + + // Populated for binary classification/classifier models. + BinaryClassificationMetrics binary_classification_metrics = 2; + + // Populated for multi-class classification/classifier models. + MultiClassClassificationMetrics multi_class_classification_metrics = 3; + + // [Beta] Populated for clustering models. + ClusteringMetrics clustering_metrics = 4; + } + } + + // Information about a single training query run for the model. + message TrainingRun { + message TrainingOptions { + // The maximum number of iterations in training. Used only for iterative + // training algorithms. + int64 max_iterations = 1; + + // Type of loss function used during training run. + LossType loss_type = 2; + + // Learning rate in training. Used only for iterative training algorithms. + double learn_rate = 3; + + // L1 regularization coefficient. + google.protobuf.DoubleValue l1_regularization = 4; + + // L2 regularization coefficient. + google.protobuf.DoubleValue l2_regularization = 5; + + // When early_stop is true, stops training when accuracy improvement is + // less than 'min_relative_progress'. Used only for iterative training + // algorithms. + google.protobuf.DoubleValue min_relative_progress = 6; + + // Whether to train a model from the last checkpoint. + google.protobuf.BoolValue warm_start = 7; + + // Whether to stop early when the loss doesn't improve significantly + // any more (compared to min_relative_progress). Used only for iterative + // training algorithms. + google.protobuf.BoolValue early_stop = 8; + + // Name of input label columns in training data. + repeated string input_label_columns = 9; + + // The data split type for training and evaluation, e.g. RANDOM. + DataSplitMethod data_split_method = 10; + + // The fraction of evaluation data over the whole input data. The rest + // of data will be used as training data. The format should be double. + // Accurate to two decimal places. + // Default value is 0.2. + double data_split_eval_fraction = 11; + + // The column to split data with. This column won't be used as a + // feature. + // 1. When data_split_method is CUSTOM, the corresponding column should + // be boolean. The rows with true value tag are eval data, and the false + // are training data. + // 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION + // rows (from smallest to largest) in the corresponding column are used + // as training data, and the rest are eval data. It respects the order + // in Orderable data types: + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties + string data_split_column = 12; + + // The strategy to determine learn rate for the current iteration. + LearnRateStrategy learn_rate_strategy = 13; + + // Specifies the initial learning rate for the line search learn rate + // strategy. + double initial_learn_rate = 16; + + // Weights associated with each label class, for rebalancing the + // training data. Only applicable for classification models. + map label_class_weights = 17; + + // [Beta] Distance type for clustering models. + DistanceType distance_type = 20; + + // [Beta] Number of clusters for clustering models. + int64 num_clusters = 21; + + // [Beta] Google Cloud Storage URI from which the model was imported. Only + // applicable for imported models. + string model_uri = 22; + + // Optimization strategy for training linear regression models. + OptimizationStrategy optimization_strategy = 23; + } + + // Information about a single iteration of the training run. + message IterationResult { + // Information about a single cluster for clustering model. + message ClusterInfo { + // Centroid id. + int64 centroid_id = 1; + + // Cluster radius, the average distance from centroid + // to each point assigned to the cluster. + google.protobuf.DoubleValue cluster_radius = 2; + + // Cluster size, the total number of points assigned to the cluster. + google.protobuf.Int64Value cluster_size = 3; + } + + // Index of the iteration, 0 based. + google.protobuf.Int32Value index = 1; + + // Time taken to run the iteration in milliseconds. + google.protobuf.Int64Value duration_ms = 4; + + // Loss computed on the training data at the end of iteration. + google.protobuf.DoubleValue training_loss = 5; + + // Loss computed on the eval data at the end of iteration. + google.protobuf.DoubleValue eval_loss = 6; + + // Learn rate used for this iteration. + double learn_rate = 7; + + // [Beta] Information about top clusters for clustering models. + repeated ClusterInfo cluster_infos = 8; + } + + // Options that were used for this training run, includes + // user specified and default options that were used. + TrainingOptions training_options = 1; + + // The start time of this training run. + google.protobuf.Timestamp start_time = 8; + + // Output of each iteration run, results.size() <= max_iterations. + repeated IterationResult results = 6; + + // The evaluation metrics over training/eval data that were computed at the + // end of training. + EvaluationMetrics evaluation_metrics = 7; + } + + // Indicates the type of the Model. + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0; + + // Linear regression model. + LINEAR_REGRESSION = 1; + + // Logistic regression based classification model. + LOGISTIC_REGRESSION = 2; + + // [Beta] K-means clustering model. + KMEANS = 3; + + // [Beta] An imported TensorFlow model. + TENSORFLOW = 6; + } + + // Loss metric to evaluate model training performance. + enum LossType { + LOSS_TYPE_UNSPECIFIED = 0; + + // Mean squared loss, used for linear regression. + MEAN_SQUARED_LOSS = 1; + + // Mean log loss, used for logistic regression. + MEAN_LOG_LOSS = 2; + } + + // Distance metric used to compute the distance between two points. + enum DistanceType { + DISTANCE_TYPE_UNSPECIFIED = 0; + + // Eculidean distance. + EUCLIDEAN = 1; + + // Cosine distance. + COSINE = 2; + } + + // Indicates the method to split input data into multiple tables. + enum DataSplitMethod { + DATA_SPLIT_METHOD_UNSPECIFIED = 0; + + // Splits data randomly. + RANDOM = 1; + + // Splits data with the user provided tags. + CUSTOM = 2; + + // Splits data sequentially. + SEQUENTIAL = 3; + + // Data split will be skipped. + NO_SPLIT = 4; + + // Splits data automatically: Uses NO_SPLIT if the data size is small. + // Otherwise uses RANDOM. + AUTO_SPLIT = 5; + } + + // Indicates the learning rate optimization strategy to use. + enum LearnRateStrategy { + LEARN_RATE_STRATEGY_UNSPECIFIED = 0; + + // Use line search to determine learning rate. + LINE_SEARCH = 1; + + // Use a constant learning rate. + CONSTANT = 2; + } + + // Indicates the optimization strategy used for training. + enum OptimizationStrategy { + OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + + // Uses an iterative batch gradient descent algorithm. + BATCH_GRADIENT_DESCENT = 1; + + // Uses a normal equation to solve linear regression problem. + NORMAL_EQUATION = 2; + } + + // Output only. A hash of this resource. + string etag = 1; + + // Required. Unique identifier for this model. + ModelReference model_reference = 2; + + // 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 last modified, in millisecs + // since the epoch. + int64 last_modified_time = 6; + + // [Optional] A user-friendly description of this model. + string description = 12; + + // [Optional] A descriptive name for this model. + string friendly_name = 14; + + // [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 + // 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 + // 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; + + // Output only. The geographic location where the model resides. This value + // is inherited from the dataset. + string location = 13; + + // Output only. Type of the model resource. + ModelType model_type = 7; + + // Output only. Information for all training runs in increasing order of + // start_time. + repeated TrainingRun training_runs = 9; + + // Output only. Input feature columns that were used to train this model. + repeated StandardSqlField feature_columns = 10; + + // 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; +} + +message GetModelRequest { + // Project ID of the requested model. + string project_id = 1; + + // Dataset ID of the requested model. + string dataset_id = 2; + + // Model ID of the requested model. + string model_id = 3; +} + +message PatchModelRequest { + // Project ID of the model to patch. + string project_id = 1; + + // Dataset ID of the model to patch. + string dataset_id = 2; + + // Model ID of the model to patch. + string model_id = 3; + + // Patched model. + // Follows patch semantics. Missing fields are not updated. To clear a field, + // explicitly set to default value. + Model model = 4; +} + +message DeleteModelRequest { + // Project ID of the model to delete. + string project_id = 1; + + // Dataset ID of the model to delete. + string dataset_id = 2; + + // Model ID of the model to delete. + string model_id = 3; +} + +message ListModelsRequest { + // Project ID of the models to list. + string project_id = 1; + + // Dataset ID of the models to list. + string dataset_id = 2; + + // The maximum number of results per page. + google.protobuf.UInt32Value max_results = 3; + + // Page token, returned by a previous call to request the next page of + // results + string page_token = 4; +} + +message ListModelsResponse { + // Models in the requested dataset. Only the following fields are populated: + // model_reference, model_type, creation_time, last_modified_time and + // labels. + repeated Model models = 1; + + // A token to request the next page of results. + string next_page_token = 2; +} diff --git a/google/cloud/bigquery/v2/model_reference.proto b/google/cloud/bigquery/v2/model_reference.proto new file mode 100644 index 000000000..f436659ab --- /dev/null +++ b/google/cloud/bigquery/v2/model_reference.proto @@ -0,0 +1,38 @@ +// 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/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; +option java_outer_classname = "ModelReferenceProto"; +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 dataset containing this model. + string dataset_id = 2; + + // [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; +} diff --git a/google/cloud/bigquery/v2/standard_sql.proto b/google/cloud/bigquery/v2/standard_sql.proto new file mode 100644 index 000000000..98173092f --- /dev/null +++ b/google/cloud/bigquery/v2/standard_sql.proto @@ -0,0 +1,109 @@ +// 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/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery"; +option java_outer_classname = "StandardSqlProto"; +option java_package = "com.google.cloud.bigquery.v2"; + +// The type of a variable, e.g., a function argument. +// Examples: +// INT64: {type_kind="INT64"} +// ARRAY: {type_kind="ARRAY", array_element_type="STRING"} +// STRUCT>: +// {type_kind="STRUCT", +// struct_type={fields=[ +// {name="x", type={type_kind="STRING"}}, +// {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} +// ]}} +message StandardSqlDataType { + enum TypeKind { + // Invalid type. + TYPE_KIND_UNSPECIFIED = 0; + + // Encoded as a string in decimal format. + INT64 = 2; + + // Encoded as a boolean "false" or "true". + BOOL = 5; + + // Encoded as a number, or string "NaN", "Infinity" or "-Infinity". + FLOAT64 = 7; + + // Encoded as a string value. + STRING = 8; + + // Encoded as a base64 string per RFC 4648, section 4. + BYTES = 9; + + // Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string: + // 1985-04-12T23:20:50.52Z + TIMESTAMP = 19; + + // Encoded as RFC 3339 full-date format string: 1985-04-12 + DATE = 10; + + // Encoded as RFC 3339 partial-time format string: 23:20:50.52 + TIME = 20; + + // Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52 + DATETIME = 21; + + // Encoded as WKT + GEOGRAPHY = 22; + + // Encoded as a decimal string. + NUMERIC = 23; + + // Encoded as a list with types matching Type.array_type. + ARRAY = 16; + + // Encoded as a list with fields of type Type.struct_type[i]. List is used + // because a JSON object cannot have duplicate field names. + STRUCT = 17; + } + + // Required. The top level type of this field. + // Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). + TypeKind type_kind = 1; + + oneof sub_type { + // The type of the array's elements, if type_kind = "ARRAY". + StandardSqlDataType array_element_type = 2; + + // The fields of this struct, in order, if type_kind = "STRUCT". + StandardSqlStructType struct_type = 3; + } +} + +// A field or a column. +message StandardSqlField { + // Optional. The name of this field. Can be absent for struct fields. + string name = 1; + + // 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; +} + +message StandardSqlStructType { + repeated StandardSqlField fields = 1; +} diff --git a/google/cloud/billing/v1/cloud_billing.proto b/google/cloud/billing/v1/cloud_billing.proto index 9ce199863..2985d4515 100644 --- a/google/cloud/billing/v1/cloud_billing.proto +++ b/google/cloud/billing/v1/cloud_billing.proto @@ -23,7 +23,6 @@ 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. service CloudBilling { @@ -31,28 +30,39 @@ service CloudBilling { // must be an [owner of the billing // account](https://support.google.com/cloud/answer/4430947). rpc GetBillingAccount(GetBillingAccountRequest) returns (BillingAccount) { - option (google.api.http) = { get: "/v1/{name=billingAccounts/*}" }; + option (google.api.http) = { + get: "/v1/{name=billingAccounts/*}" + }; } // Lists the billing accounts that the current authenticated user // [owns](https://support.google.com/cloud/answer/4430947). - rpc ListBillingAccounts(ListBillingAccountsRequest) returns (ListBillingAccountsResponse) { - option (google.api.http) = { get: "/v1/billingAccounts" }; + rpc ListBillingAccounts(ListBillingAccountsRequest) + returns (ListBillingAccountsResponse) { + option (google.api.http) = { + get: "/v1/billingAccounts" + }; } // 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) { - option (google.api.http) = { get: "/v1/{name=billingAccounts/*}/projects" }; + rpc ListProjectBillingInfo(ListProjectBillingInfoRequest) + returns (ListProjectBillingInfoResponse) { + option (google.api.http) = { + get: "/v1/{name=billingAccounts/*}/projects" + }; } // 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) { - option (google.api.http) = { get: "/v1/{name=projects/*}/billingInfo" }; + rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) + returns (ProjectBillingInfo) { + option (google.api.http) = { + get: "/v1/{name=projects/*}/billingInfo" + }; } // Sets or updates the billing account associated with a project. You specify @@ -86,8 +96,12 @@ 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) { - option (google.api.http) = { put: "/v1/{name=projects/*}/billingInfo" body: "project_billing_info" }; + rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest) + returns (ProjectBillingInfo) { + option (google.api.http) = { + put: "/v1/{name=projects/*}/billingInfo" + body: "project_billing_info" + }; } } diff --git a/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml b/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml new file mode 100644 index 000000000..036c547ff --- /dev/null +++ b/google/cloud/binaryauthorization/artman_binaryauthorization_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: binaryauthorization + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: binaryauthorization_v1beta1.yaml + gapic_yaml: v1beta1/binaryauthorization_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/binaryauthorization/binaryauthorization_v1beta1.yaml b/google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml new file mode 100644 index 000000000..d2143b3e2 --- /dev/null +++ b/google/cloud/binaryauthorization/binaryauthorization_v1beta1.yaml @@ -0,0 +1,62 @@ +type: google.api.Service +config_version: 3 +name: binaryauthorization.googleapis.com +title: Binary Authorization API + +apis: +- name: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1 + +documentation: + summary: |- + The management interface for Binary Authorization, a system providing + policy control for images deployed to Kubernetes Engine clusters. + 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 + 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.*' + 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/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml new file mode 100644 index 000000000..16dbce7ea --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/binaryauthorization_gapic.yaml @@ -0,0 +1,198 @@ +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: +# 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/resources.proto b/google/cloud/binaryauthorization/v1beta1/resources.proto new file mode 100644 index 000000000..909ba9551 --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/resources.proto @@ -0,0 +1,296 @@ +// 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.binaryauthorization.v1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.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 { + enum GlobalPolicyEvaluationMode { + // Not specified: DISABLE is assumed. + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + + // Enables global policy evaluation. + ENABLE = 1; + + // Disables global policy evaluation. + DISABLE = 2; + } + + // Output only. The resource name, in the format `projects/*/policy`. There is + // at most one policy per project. + string name = 1; + + // Optional. A descriptive comment. + string description = 6; + + // 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; + + // 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; + + // Optional. Per-cluster admission rules. Cluster spec format: + // `location.clusterId`. There can be at most one admission rule per cluster + // spec. + // A `location` is either a compute zone (e.g. us-central1-a) or a region + // (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; + + // 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; + + // Output only. Time when the policy was last updated. + google.protobuf.Timestamp update_time = 5; +} + +// An [admission whitelist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images +// from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. +message AdmissionWhitelistPattern { + // An image name pattern to whitelist, in the form `registry/path/to/image`. + // This supports a trailing `*` as a wildcard, but this is allowed only in + // text after the `registry/` part. + string name_pattern = 1; +} + +// An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images +// used in a pod creation request must be attested to by one or more +// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all +// pod creations will be denied. +// +// Images matching an [admission whitelist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] +// are exempted from admission rules and will never block a pod creation. +message AdmissionRule { + enum EvaluationMode { + // Do not use. + EVALUATION_MODE_UNSPECIFIED = 0; + + // This rule allows all all pod creations. + ALWAYS_ALLOW = 1; + + // This rule allows a pod creation if all the attestors listed in + // 'require_attestations_by' have valid attestations for all of the + // images in the pod spec. + REQUIRE_ATTESTATION = 2; + + // This rule denies all pod creations. + ALWAYS_DENY = 3; + } + + // Defines the possible actions when a pod creation is denied by an admission + // rule. + enum EnforcementMode { + // Do not use. + ENFORCEMENT_MODE_UNSPECIFIED = 0; + + // Enforce the admission rule by blocking the pod creation. + ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + + // Dryrun mode: Audit logging only. This will allow the pod creation as if + // the admission request had specified break-glass. + DRYRUN_AUDIT_LOG_ONLY = 2; + } + + // Required. How this admission rule will be evaluated. + EvaluationMode evaluation_mode = 1; + + // Optional. The resource names of the attestors that must attest to + // a container image, in the format `projects/*/attestors/*`. Each + // attestor must exist before a policy can reference it. To add an attestor + // to a policy the principal issuing the policy change request must be able + // to read the attestor resource. + // + // 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; + + // Required. The action when a pod creation is denied by the admission rule. + EnforcementMode enforcement_mode = 3; +} + +// An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image +// artifacts. An existing attestor cannot be modified except where +// indicated. +message Attestor { + // Required. The resource name, in the format: + // `projects/*/attestors/*`. This field may not be updated. + string name = 1; + + // Optional. A descriptive comment. This field may be updated. + // The field may be displayed in chooser dialogs. + string description = 6; + + // Required. Identifies an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to a + // container image artifact. This determines how an attestation will + // be stored, and how it will be used during policy + // enforcement. Updates may not change the attestor type, but individual + // attestor fields may be updated + oneof attestor_type { + // A Drydock ATTESTATION_AUTHORITY Note, created by the user. + UserOwnedDrydockNote user_owned_drydock_note = 3; + } + + // Output only. Time when the attestor was last updated. + google.protobuf.Timestamp update_time = 4; +} + +// An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock +// ATTESTATION_AUTHORITY Note created by the user. +message UserOwnedDrydockNote { + // Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, + // created by the user, in the format: `projects/*/notes/*` (or the legacy + // `providers/*/notes/*`). This field may not be updated. + // + // 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; + + // Optional. Public keys that verify attestations signed by this + // attestor. This field may be updated. + // + // If this field is non-empty, one of the specified public keys must + // verify that an attestation was signed by this attestor for the + // image specified in the admission request. + // + // If this field is empty, this attestor always returns that no + // valid attestations exist. + repeated AttestorPublicKey public_keys = 2; + + // Output only. This field will contain the service account email address + // that this Attestor will use as the principal when querying Container + // Analysis. Attestor administrators must grant this service account the + // IAM role needed to read attestations from the [note_reference][Note] in + // Container Analysis (`containeranalysis.notes.occurrences.viewer`). + // + // 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; +} + +// A public key in the PkixPublicKey format (see +// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). +// Public keys of this type are typically textually encoded using the PEM +// format. +message PkixPublicKey { + // Represents a signature algorithm and other information necessary to verify + // signatures with a given public key. + // This is based primarily on the public key types supported by Tink's + // PemKeyType, which is in turn based on KMS's supported signing algorithms. + // See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz + // might support additional public key types independently of Tink and/or KMS. + enum SignatureAlgorithm { + // Not specified. + SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_PSS_2048_SHA256 = 1; + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_PSS_3072_SHA256 = 2; + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_PSS_4096_SHA256 = 3; + + // RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_PSS_4096_SHA512 = 4; + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5; + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 8; + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + ECDSA_P256_SHA256 = 9; + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + ECDSA_P384_SHA384 = 10; + + // ECDSA on the NIST P-521 curve with a SHA512 digest. + ECDSA_P521_SHA512 = 11; + } + + // A PEM-encoded public key, as described in + // https://tools.ietf.org/html/rfc7468#section-13 + string public_key_pem = 1; + + // The signature algorithm used to verify a message against a signature using + // this key. + // These signature algorithm must match the structure and any object + // identifiers encoded in `public_key_pem` (i.e. this algorithm must match + // that of the public key). + SignatureAlgorithm signature_algorithm = 2; +} + +// An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify +// attestations signed by this attestor. +message AttestorPublicKey { + // Optional. A descriptive comment. This field may be updated. + string comment = 1; + + // The ID of this public key. + // Signatures verified by BinAuthz must include the ID of the public key that + // can be used to verify them, and that ID must match the contents of this + // field exactly. + // Additional restrictions on this field can be imposed based on which public + // key type is encapsulated. See the documentation on `public_key` cases below + // for details. + string id = 2; + + // Required. A public key reference or serialized instance. This field may be + // updated. + oneof public_key { + // ASCII-armored representation of a PGP public key, as the entire output by + // the command `gpg --export --armor foo@example.com` (either LF or CRLF + // line endings). + // When using this field, `id` should be left blank. The BinAuthz API + // handlers will calculate the ID and fill it in automatically. BinAuthz + // computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + // upper-case hex. If `id` is provided by the caller, it will be + // overwritten by the API-calculated ID. + string ascii_armored_pgp_public_key = 3; + + // A raw PKIX SubjectPublicKeyInfo format public key. + // + // NOTE: `id` may be explicitly provided by the caller when using this + // type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + // blank, a default one will be computed based on the digest of the DER + // encoding of the public key. + PkixPublicKey pkix_public_key = 5; + } +} diff --git a/google/cloud/binaryauthorization/v1beta1/service.proto b/google/cloud/binaryauthorization/v1beta1/service.proto new file mode 100644 index 000000000..33bef1db8 --- /dev/null +++ b/google/cloud/binaryauthorization/v1beta1/service.proto @@ -0,0 +1,183 @@ +// 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.binaryauthorization.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/binaryauthorization/v1beta1/resources.proto"; +import "google/protobuf/empty.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization"; + +// Customer-facing API for Cloud Binary Authorization. + +// Google Cloud Management Service for Binary Authorization admission policies +// and attestation authorities. +// +// This API implements a REST model with the following objects: +// +// * [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 { + // 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}" + }; + } + + // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the + // new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race + // conditions with concurrent policy enforcement (or management!) + // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + // if the request is malformed. + rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) { + option (google.api.http) = { + put: "/v1beta1/{policy.name=projects/*/policy}" + body: "policy" + }; + } + + // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, + // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. + rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/attestors" + body: "attestor" + }; + } + + // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc GetAttestor(GetAttestorRequest) returns (Attestor) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/attestors/*}" + }; + } + + // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) { + option (google.api.http) = { + put: "/v1beta1/{attestor.name=projects/*/attestors/*}" + body: "attestor" + }; + } + + // Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns INVALID_ARGUMENT if the project does not exist. + rpc ListAttestors(ListAttestorsRequest) returns (ListAttestorsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/attestors" + }; + } + + // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/attestors/*}" + }; + } +} + +// Request message for [BinauthzManagementService.GetPolicy][]. +message GetPolicyRequest { + // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, + // in the format `projects/*/policy`. + string name = 1; +} + +// Request message for [BinauthzManagementService.UpdatePolicy][]. +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; +} + +// Request message for [BinauthzManagementService.CreateAttestor][]. +message CreateAttestorRequest { + // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + string parent = 1; + + // Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. + string attestor_id = 2; + + // 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; +} + +// 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; +} + +// Request message for [BinauthzManagementService.UpdateAttestor][]. +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; +} + +// 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; + + // Requested page size. The server may return fewer results than requested. If + // unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. Typically, + // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned + // from the previous call to the `ListAttestors` method. + string page_token = 3; +} + +// Response message for [BinauthzManagementService.ListAttestors][]. +message ListAttestorsResponse { + // The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + repeated Attestor attestors = 1; + + // A token to retrieve the next page of results. Pass this value in the + // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the + // `ListAttestors` method to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for [BinauthzManagementService.DeleteAttestor][]. +message DeleteAttestorRequest { + // Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format + // `projects/*/attestors/*`. + string name = 1; +} diff --git a/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml b/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml new file mode 100644 index 000000000..e3fdc8ca3 --- /dev/null +++ b/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: datacatalog + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: datacatalog_v1beta1.yaml + gapic_yaml: v1beta1/datacatalog_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/datacatalog/datacatalog_v1beta1.yaml b/google/cloud/datacatalog/datacatalog_v1beta1.yaml new file mode 100644 index 000000000..5e18b6f2f --- /dev/null +++ b/google/cloud/datacatalog/datacatalog_v1beta1.yaml @@ -0,0 +1,48 @@ +type: google.api.Service +config_version: 3 +name: datacatalog.googleapis.com +title: Google Cloud Data Catalog API + +apis: +- name: google.cloud.datacatalog.v1beta1.DataCatalog + +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. + + - 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.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/datacatalog/v1beta1/datacatalog.proto b/google/cloud/datacatalog/v1beta1/datacatalog.proto new file mode 100644 index 000000000..e89e7ad62 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -0,0 +1,634 @@ +// 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.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datacatalog/v1beta1/schema.proto"; +import "google/cloud/datacatalog/v1beta1/search.proto"; +import "google/cloud/datacatalog/v1beta1/table_spec.proto"; +import "google/cloud/datacatalog/v1beta1/tags.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"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// 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 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. + // + // See [Data Catalog Search + // Syntax](/data-catalog/docs/how-to/search-reference) for more information. + rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { + option (google.api.http) = { + post: "/v1beta1/catalog:search" + body: "*" + }; + } + + // Updates an existing entry. + rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { + option (google.api.http) = { + patch: "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" + body: "entry" + }; + } + + // Gets an entry. + rpc GetEntry(GetEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + } + + // 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: "/v1beta1/entries:lookup" + }; + } + + // Creates a tag template. + rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/tagTemplates" + body: "tag_template" + }; + } + + // Gets a tag template. + rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" + }; + } + + // 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. + rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + patch: "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" + body: "tag_template" + }; + } + + // Deletes a tag template and all tags using the template. + rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" + }; + } + + // Creates a field in a tag template. + rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields" + body: "tag_template_field" + }; + } + + // Updates a field in a tag template. This method cannot be used to update the + // field type. + rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + body: "tag_template_field" + }; + } + + // Renames a field in a tag template. + rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" + body: "*" + }; + } + + // Deletes a field in a tag template and all uses of that field. + rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + }; + } + + // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + body: "tag" + }; + } + + // Updates an existing tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + body: "tag" + }; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + }; + } + + // 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" + }; + } + + // 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. + // + // Callers must have following Google IAM permission + // `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" + body: "*" + }; + } + + // 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. + // 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. + // + // Callers must have following Google IAM permission + // `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" + body: "*" + }; + } + + // 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. + // + // 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: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" + body: "*" + }; + } +} + +// Request message for +// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. +message SearchCatalogRequest { + 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 + repeated string include_org_ids = 2; + + // 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; + } + + // Required. The scope of this search request. + Scope scope = 6; + + // 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](/data-catalog/docs/how-to/search-reference) for more information. + string query = 1; + + // 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]; + // 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; + + // 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.
  • + //
+ string order_by = 5; +} + +// Response message for +// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. +message SearchCatalogResponse { + // Search results in descending order of relevance. + repeated SearchCatalogResult results = 1; + + // The token that can be used to retrieve the next page of results. + string next_page_token = 3; +} + +// Request message for +// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. +message UpdateEntryRequest { + // Required. The updated Entry. + Entry entry = 1; + + // Optional. The fields to update on the entry. If absent or empty, all + // modifiable fields are updated. + // + // Modifiable fields in synced entries: + // + // 1. schema (Pub/Sub topics only) + // + // Modifiable fields in native entries: + // + // 1. display_name + // 2. description + // 3. schema + google.protobuf.FieldMask update_mask = 2; +} + +// 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; +} + +// Request message for +// [LookupEntry][google.cloud.datacatalog.v1beta1.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: + //
    + //
  • 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 + 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. +// +// 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}". + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string name = 1; + + // 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 + // + // Data Catalog supports resources from select Google Cloud Platform systems. + // `linked_resource` is the full name of the Google Cloud Platform resource. + // For example, the `linked_resource` for a table resource from BigQuery is: + // + // "//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId". + string linked_resource = 9; + + // Required. Type of entry. + EntryType type = 2; + + // Optional. Type specification information. + oneof type_spec { + // 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; + } + + // 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. + 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. + string description = 4; + + // Optional. 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; +} + +// 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 id of the tag template to create. + string tag_template_id = 3; + + // Required. The tag template to create. + TagTemplate tag_template = 2; +} + +// 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; +} + +// Request message for +// [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. +message UpdateTagTemplateRequest { + // Required. The template to update. + TagTemplate tag_template = 1; + + // Optional. The field mask specifies the parts of the template to overwrite. + // + // Allowed fields: + // + // * display_name + // + // If update_mask is omitted, 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. + // This confirms the deletion of any possible tags using this template. + // force = false will be supported in the future. + bool force = 2; +} + +// 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}"). + // Note that this Tag and its child resources may not actually be stored in + // the location in this name. + string parent = 1; + + // Required. The tag to create. + Tag tag = 2; +} + +// Request message for +// [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. +message UpdateTagRequest { + // Required. The updated tag. + Tag tag = 1; + + // 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`. + 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; +} + +// 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. + // 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; + + // Required. The tag template field to create. + TagTemplateField tag_template_field = 3; +} + +// 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 template to update. + TagTemplateField tag_template_field = 2; + + // Optional. The field mask specifies the parts of the template to overwrite. + // Allowed fields: + // + // * display_name + // * type.enum_type + // + // If update_mask is omitted, 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; +} + +// 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; +} + +// 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. + // This confirms the deletion of this field from any tags using this field. + // force = false will be supported in the future. + bool force = 2; +} + +// 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. + int32 page_size = 2; + + // Optional. 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.v1beta1.DataCatalog.ListTags]. +message ListTagsResponse { + // [Tag][google.cloud.datacatalog.v1beta1.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; +} diff --git a/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml new file mode 100644 index 000000000..5ceffbaef --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/datacatalog_gapic.yaml @@ -0,0 +1,370 @@ +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}/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 + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: entry + timeout_millis: 60000 + - name: LookupEntry + 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: 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/schema.proto b/google/cloud/datacatalog/v1beta1/schema.proto new file mode 100644 index 000000000..839ef1d8c --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/schema.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.cloud.datacatalog.v1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// 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; +} + +// Representation of a column within a schema. Columns could be nested inside +// other columns. +message ColumnSchema { + // Required. Name of the column. + string column = 6; + + // Required. Type of the column. + string type = 1; + + // Optional. Description of the column. Default value is an empty string. + string description = 2; + + // 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. Schema of sub-columns. A column can have zero or more + // sub-columns. + repeated ColumnSchema subcolumns = 7; +} diff --git a/google/cloud/datacatalog/v1beta1/search.proto b/google/cloud/datacatalog/v1beta1/search.proto new file mode 100644 index 000000000..2a31dd945 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/search.proto @@ -0,0 +1,67 @@ +// 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.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// 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 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.v1beta1.Entry]. + ENTRY = 1; + + // A [TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate]. + TAG_TEMPLATE = 2; + + // An [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. + ENTRY_GROUP = 3; +} diff --git a/google/cloud/datacatalog/v1beta1/table_spec.proto b/google/cloud/datacatalog/v1beta1/table_spec.proto new file mode 100644 index 000000000..8e9547fea --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/table_spec.proto @@ -0,0 +1,88 @@ +// 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.datacatalog.v1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Describes a BigQuery table. +message BigQueryTableSpec { + // Output only. The table source type. + TableSourceType table_source_type = 1; + + // 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; +} + +// 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; +} + +// 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 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. Total number of shards. + int64 shard_count = 3; +} diff --git a/google/cloud/datacatalog/v1beta1/tags.proto b/google/cloud/datacatalog/v1beta1/tags.proto new file mode 100644 index 000000000..f01843c20 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/tags.proto @@ -0,0 +1,177 @@ +// 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.datacatalog.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Tags are used to attach custom metadata to Data Catalog resources. Tags +// conform to the specifications within their tag template. +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. + 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}. + // This field cannot be modified after creation. + string template = 2; + + // Output only. The display name of the tag template. + string template_display_name = 5; + + // 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. + // 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". + 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; +} + +// Contains the value and supporting information for a field within +// a [Tag][google.cloud.datacatalog.v1beta1.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; + + // 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; + } +} + +// 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. +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}. + // 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. + 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; +} + +// 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. + string display_name = 1; + + // Required. The type of value this tag field can contain. + FieldType type = 2; +} + +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 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/v1beta1/timestamps.proto b/google/cloud/datacatalog/v1beta1/timestamps.proto new file mode 100644 index 000000000..bb048b915 --- /dev/null +++ b/google/cloud/datacatalog/v1beta1/timestamps.proto @@ -0,0 +1,38 @@ +// 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.datacatalog.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog"; + +// Timestamps about this resource according to a particular system. +message SystemTimestamps { + // Output only. 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. + google.protobuf.Timestamp update_time = 2; + + // Output only. The expiration time of the resource within the given system. + google.protobuf.Timestamp expire_time = 3; +} diff --git a/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml new file mode 100644 index 000000000..2d81d3c57 --- /dev/null +++ b/google/cloud/datalabeling/artman_datalabeling_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: datalabeling + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: datalabeling_v1beta1.yaml + gapic_yaml: v1beta1/datalabeling_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/datalabeling/datalabeling_v1beta1.yaml b/google/cloud/datalabeling/datalabeling_v1beta1.yaml new file mode 100644 index 000000000..80f481c23 --- /dev/null +++ b/google/cloud/datalabeling/datalabeling_v1beta1.yaml @@ -0,0 +1,74 @@ +type: google.api.Service +config_version: 3 +name: datalabeling.googleapis.com +title: Data Labeling API + +apis: +- name: google.cloud.datalabeling.v1beta1.DataLabelingService + +types: +- name: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata +- name: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata +- name: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse +- name: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata +- name: google.cloud.datalabeling.v1beta1.ImportDataOperationResponse +- name: google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata +- name: google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + +documentation: + summary: Public API for Google Cloud AI Data Labeling Service. + 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. + +backend: + rules: + - selector: 'google.cloud.datalabeling.v1beta1.DataLabelingService.*' + deadline: 60.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.datalabeling.v1beta1.DataLabelingService.*' + 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/datalabeling/v1beta1/annotation.proto b/google/cloud/datalabeling/v1beta1/annotation.proto new file mode 100644 index 000000000..b71e45980 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/annotation.proto @@ -0,0 +1,342 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.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. +enum AnnotationSource { + ANNOTATION_SOURCE_UNSPECIFIED = 0; + + // Answer is provided by a human contributor. + OPERATOR = 3; +} + +// Annotation for Example. Each example may have one or more annotations. For +// example in image classification problem, each image might have one or more +// labels. We call labels binded with this image an Annotation. +message Annotation { + // Output only. Unique name of this annotation, format is: + // + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id} + string name = 1; + + // Output only. The source of the annotation. + AnnotationSource annotation_source = 2; + + // Output only. This is the actual annotation value, e.g classification, + // bounding box values are stored here. + AnnotationValue annotation_value = 3; + + // Output only. Annotation metadata, including information like votes + // for labels. + AnnotationMetadata annotation_metadata = 4; + + // Output only. Sentiment for this annotation. + AnnotationSentiment annotation_sentiment = 6; +} + +enum AnnotationSentiment { + ANNOTATION_SENTIMENT_UNSPECIFIED = 0; + + // This annotation describes negatively about the data. + NEGATIVE = 1; + + // This label describes positively about the data. + POSITIVE = 2; +} + +enum AnnotationType { + ANNOTATION_TYPE_UNSPECIFIED = 0; + + // Classification annotations in an image. + IMAGE_CLASSIFICATION_ANNOTATION = 1; + + // Bounding box annotations in an image. + IMAGE_BOUNDING_BOX_ANNOTATION = 2; + + // Oriented bounding box. The box does not have to be parallel to horizontal + // line. + IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13; + + // Bounding poly annotations in an image. + IMAGE_BOUNDING_POLY_ANNOTATION = 10; + + // Polyline annotations in an image. + IMAGE_POLYLINE_ANNOTATION = 11; + + // Segmentation annotations in an image. + IMAGE_SEGMENTATION_ANNOTATION = 12; + + // Classification annotations in video shots. + VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3; + + // Video object tracking annotation. + VIDEO_OBJECT_TRACKING_ANNOTATION = 4; + + // Video object detection annotation. + VIDEO_OBJECT_DETECTION_ANNOTATION = 5; + + // Video event annotation. + VIDEO_EVENT_ANNOTATION = 6; + + // Classification for text. + TEXT_CLASSIFICATION_ANNOTATION = 8; + + // Entity extraction for text. + TEXT_ENTITY_EXTRACTION_ANNOTATION = 9; + + // General classification. + GENERAL_CLASSIFICATION_ANNOTATION = 14; +} + +// Annotation value for an example. +message AnnotationValue { + oneof value_type { + // Annotation value for image classification case. + ImageClassificationAnnotation image_classification_annotation = 1; + + // Annotation value for image bounding box, oriented bounding box + // and polygon cases. + ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + + // Annotation value for image polyline cases. + // Polyline here is different from BoundingPoly. It is formed by + // line segments connected to each other but not closed form(Bounding Poly). + // The line segments can cross each other. + ImagePolylineAnnotation image_polyline_annotation = 8; + + // Annotation value for image segmentation. + ImageSegmentationAnnotation image_segmentation_annotation = 9; + + // Annotation value for text classification case. + TextClassificationAnnotation text_classification_annotation = 3; + + // Annotation value for text entity extraction case. + TextEntityExtractionAnnotation text_entity_extraction_annotation = 10; + + // Annotation value for video classification case. + VideoClassificationAnnotation video_classification_annotation = 4; + + // Annotation value for video object detection and tracking case. + VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + + // Annotation value for video event case. + VideoEventAnnotation video_event_annotation = 6; + } +} + +// Image classification annotation definition. +message ImageClassificationAnnotation { + // Label of image. + AnnotationSpec annotation_spec = 1; +} + +// 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 in the image. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; +} + +// Normalized bounding polygon. +message NormalizedBoundingPoly { + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 1; +} + +// Image bounding poly annotation. It represents a polygon including +// bounding box in the image. +message ImageBoundingPolyAnnotation { + // The region of the polygon. If it is a bounding box, it is guaranteed to be + // four points. + oneof bounded_area { + BoundingPoly bounding_poly = 2; + + NormalizedBoundingPoly normalized_bounding_poly = 3; + } + + // Label of object in this bounding polygon. + AnnotationSpec annotation_spec = 1; +} + +// A line with multiple line segments. +message Polyline { + // The polyline vertices. + repeated Vertex vertices = 1; +} + +// Normalized polyline. +message NormalizedPolyline { + // The normalized polyline vertices. + repeated NormalizedVertex normalized_vertices = 1; +} + +// A polyline for the image annotation. +message ImagePolylineAnnotation { + oneof poly { + Polyline polyline = 2; + + NormalizedPolyline normalized_polyline = 3; + } + + // Label of this polyline. + AnnotationSpec annotation_spec = 1; +} + +// Image segmentation annotation. +message ImageSegmentationAnnotation { + // The mapping between rgb color and annotation spec. The key is the rgb + // color represented in format of rgb(0, 0, 0). The value is the + // AnnotationSpec. + map annotation_colors = 1; + + // Image format. + string mime_type = 2; + + // A byte string of a full image's color map. + bytes image_bytes = 3; +} + +// Text classification annotation. +message TextClassificationAnnotation { + // Label of the text. + AnnotationSpec annotation_spec = 1; +} + +// Text entity extraction annotation. +message TextEntityExtractionAnnotation { + // Label of the text entities. + AnnotationSpec annotation_spec = 1; + + // Position of the entity. + SequentialSegment sequential_segment = 2; +} + +// Start and end position in a sequence (e.g. text segment). +message SequentialSegment { + // Start position (inclusive). + int32 start = 1; + + // End position (exclusive). + int32 end = 2; +} + +// A time period inside of an example that has a time dimension (e.g. video). +message TimeSegment { + // Start of the time segment (inclusive), represented as the duration since + // the example start. + google.protobuf.Duration start_time_offset = 1; + + // End of the time segment (exclusive), represented as the duration since the + // example start. + google.protobuf.Duration end_time_offset = 2; +} + +// Video classification annotation. +message VideoClassificationAnnotation { + // The time segment of the video to which the annotation applies. + TimeSegment time_segment = 1; + + // Label of the segment specified by time_segment. + AnnotationSpec annotation_spec = 2; +} + +// Video frame level annotation for object detection and tracking. +message ObjectTrackingFrame { + // The bounding box location of this object track for the frame. + oneof bounded_area { + BoundingPoly bounding_poly = 1; + + NormalizedBoundingPoly normalized_bounding_poly = 2; + } + + // The time offset of this frame relative to the beginning of the video. + google.protobuf.Duration time_offset = 3; +} + +// Video object tracking annotation. +message VideoObjectTrackingAnnotation { + // Label of the object tracked in this annotation. + AnnotationSpec annotation_spec = 1; + + // The time segment of the video to which object tracking applies. + TimeSegment time_segment = 2; + + // The list of frames where this object track appears. + repeated ObjectTrackingFrame object_tracking_frames = 3; +} + +// Video event annotation. +message VideoEventAnnotation { + // Label of the event in this annotation. + AnnotationSpec annotation_spec = 1; + + // The time segment of the video to which the annotation applies. + TimeSegment time_segment = 2; +} + +// Additional information associated with the annotation. +message AnnotationMetadata { + // Metadata related to human labeling. + OperatorMetadata operator_metadata = 2; +} + +// General information useful for labels coming from contributors. +message OperatorMetadata { + // Confidence score corresponding to a label. For examle, if 3 contributors + // have answered the question and 2 of them agree on the final label, the + // confidence score will be 0.67 (2/3). + float score = 1; + + // The total number of contributors that answer this question. + int32 total_votes = 2; + + // The total number of contributors that choose this label. + int32 label_votes = 3; + + // Comments from contributors. + repeated string comments = 4; +} diff --git a/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto b/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto new file mode 100644 index 000000000..bd5413dc7 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/annotation_spec_set.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.datalabeling.v1beta1; + +import "google/api/annotations.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. +message AnnotationSpecSet { + // Output only. AnnotationSpecSet resource name, 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. + string display_name = 2; + + // Optional. User-provided description of the annotation specification set. + // The description can be up to 10000 characters long. + string description = 3; + + // Required. The actual spec set defined by the users. + repeated AnnotationSpec annotation_specs = 4; + + // Output only. The names of any related resources that are blocking changes + // to the annotation spec set. + repeated string blocking_resources = 5; +} + +// Container of information related to one annotation spec. +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. + string description = 2; +} diff --git a/google/cloud/datalabeling/v1beta1/data_labeling_service.proto b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto new file mode 100644 index 000000000..8395206d9 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/data_labeling_service.proto @@ -0,0 +1,966 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/datalabeling/v1beta1/annotation.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"; + +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"; + +service DataLabelingService { + option (google.api.default_host) = "datalabeling.googleapis.com"; + 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) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/datasets" + body: "*" + }; + } + + // Gets dataset by resource name. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*}" + }; + } + + // Lists datasets under a project. Pagination is supported. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/datasets" + }; + } + + // Deletes a dataset by resource name. + rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/datasets/*}" + }; + } + + // Imports data into dataset based on source locations defined in request. + // It can be called multiple times for the same dataset. Each dataset can + // only have one long running operation running on it. For example, no + // labeling task (also long running operation) can be started while + // importing is still ongoing. Vice versa. + rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/datasets/*}:importData" + body: "*" + }; + } + + // Exports data and annotations from dataset. + rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/datasets/*}:exportData" + body: "*" + }; + } + + // Gets a data item in a dataset by resource name. This API can be + // called after data are imported into dataset. + rpc GetDataItem(GetDataItemRequest) returns (DataItem) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/dataItems/*}" + }; + } + + // Lists data items in a dataset. This API can be called after data + // are imported into dataset. Pagination is supported. + rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*}/dataItems" + }; + } + + // Gets an annotated dataset by resource name. + rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) + returns (AnnotatedDataset) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" + }; + } + + // Lists annotated datasets for a dataset. Pagination is supported. + rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) + returns (ListAnnotatedDatasetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*}/annotatedDatasets" + }; + } + + // Deletes an annotated dataset by resource name. + rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" + }; + } + + // Starts a labeling task for image. The type of image labeling task is + // configured by feature in the request. + rpc LabelImage(LabelImageRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/image:label" + body: "*" + }; + } + + // Starts a labeling task for video. The type of video labeling task is + // configured by feature in the request. + rpc LabelVideo(LabelVideoRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/video:label" + body: "*" + }; + } + + // Starts a labeling task for text. The type of text labeling task is + // configured by feature in the request. + rpc LabelText(LabelTextRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/text:label" + body: "*" + }; + } + + // Gets an example by resource name, including both data and annotation. + rpc GetExample(GetExampleRequest) returns (Example) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*/examples/*}" + }; + } + + // Lists examples in an annotated dataset. Pagination is supported. + rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*/annotatedDatasets/*}/examples" + }; + } + + // Creates an annotation spec set by providing a set of labels. + rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) + returns (AnnotationSpecSet) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/annotationSpecSets" + body: "*" + }; + } + + // Gets an annotation spec set by resource name. + rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) + returns (AnnotationSpecSet) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/annotationSpecSets/*}" + }; + } + + // Lists annotation spec sets for a project. Pagination is supported. + rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) + returns (ListAnnotationSpecSetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/annotationSpecSets" + }; + } + + // Deletes an annotation spec set by resource name. + rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/annotationSpecSets/*}" + }; + } + + // Creates an instruction for how data should be labeled. + rpc CreateInstruction(CreateInstructionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/instructions" + body: "*" + }; + } + + // Gets an instruction by resource name. + rpc GetInstruction(GetInstructionRequest) returns (Instruction) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/instructions/*}" + }; + } + + // Lists instructions for a project. Pagination is supported. + rpc ListInstructions(ListInstructionsRequest) + returns (ListInstructionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/instructions" + }; + } + + // Deletes an instruction object by resource name. + rpc DeleteInstruction(DeleteInstructionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/instructions/*}" + }; + } + + // Gets an evaluation by resource name. + rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/evaluations/*}" + }; + } + + // Searchs evaluations within a project. Supported filter: evaluation_job, + // evaluation_time. + rpc SearchEvaluations(SearchEvaluationsRequest) + returns (SearchEvaluationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/evaluations:search" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*/evaluations/*}/exampleComparisons:search" + body: "*" + }; + } + + // Creates an evaluation job. + rpc CreateEvaluationJob(CreateEvaluationJobRequest) returns (EvaluationJob) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/evaluationJobs" + body: "*" + }; + } + + // Updates an evaluation job. + rpc UpdateEvaluationJob(UpdateEvaluationJobRequest) returns (EvaluationJob) { + option (google.api.http) = { + patch: "/v1beta1/{evaluation_job.name=projects/*/evaluationJobs/*}" + body: "evaluation_job" + }; + } + + // Gets an evaluation job by resource name. + rpc GetEvaluationJob(GetEvaluationJobRequest) returns (EvaluationJob) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/evaluationJobs/*}" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/evaluationJobs/*}:pause" + body: "*" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/evaluationJobs/*}:resume" + body: "*" + }; + } + + // Stops and deletes an evaluation job. + rpc DeleteEvaluationJob(DeleteEvaluationJobRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/evaluationJobs/*}" + }; + } + + // Lists all evaluation jobs within a project with possible filters. + // Pagination is supported. + rpc ListEvaluationJobs(ListEvaluationJobsRequest) + returns (ListEvaluationJobsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/evaluationJobs" + }; + } +} + +// Request message for CreateDataset. +message CreateDatasetRequest { + // Required. Dataset resource parent, format: + // projects/{project_id} + string parent = 1; + + // Required. The dataset to be created. + Dataset dataset = 2; +} + +// Request message for GetDataSet. +message GetDatasetRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; +} + +// Request message for ListDataset. +message ListDatasetsRequest { + // Required. Dataset resource parent, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter on dataset is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing datasets within a project. +message ListDatasetsResponse { + // The list of datasets to return. + repeated Dataset datasets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for DeleteDataset. +message DeleteDatasetRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; +} + +// Request message for ImportData API. +message ImportDataRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // Required. Specify the input source of the data. + InputConfig input_config = 2; + + // Email of the user who started the import task and should be notified by + // email. If empty no notification will be sent. + string user_email_address = 3; +} + +// Request message for ExportData API. +message ExportDataRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // 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; + + // Optional. Filter is not supported at this moment. + string filter = 3; + + // Required. Specify the output destination. + OutputConfig output_config = 4; + + // Email of the user who started the export task and should be notified by + // email. If empty no notification will be sent. + string user_email_address = 5; +} + +// Request message for GetDataItem. +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; +} + +// 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; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing data items in a dataset. +message ListDataItemsResponse { + // The list of data items to return. + repeated DataItem data_items = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for GetAnnotatedDataset. +message GetAnnotatedDatasetRequest { + // Required. Name of the annotated dataset to get, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; +} + +// 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; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing annotated datasets for a dataset. +message ListAnnotatedDatasetsResponse { + // The list of annotated datasets to return. + repeated AnnotatedDataset annotated_datasets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for DeleteAnnotatedDataset. +message DeleteAnnotatedDatasetRequest { + // Required. Name of the annotated dataset to delete, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; +} + +// Request message for starting an image labeling task. +message LabelImageRequest { + // Image labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label whole image with one or more of labels. + CLASSIFICATION = 1; + + // Label image with bounding boxes for labels. + BOUNDING_BOX = 2; + + // Label oriented bounding box. The box does not have to be parallel to + // horizontal line. + ORIENTED_BOUNDING_BOX = 6; + + // Label images with bounding poly. A bounding poly is a plane figure that + // is bounded by a finite chain of straight line segments closing in a loop. + BOUNDING_POLY = 3; + + // Label images with polyline. Polyline is formed by connected line segments + // which are not in closed form. + POLYLINE = 4; + + // Label images with segmentation. Segmentation is different from bounding + // poly since it is more fine-grained, pixel level annotation. + SEGMENTATION = 5; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for image classification task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + ImageClassificationConfig image_classification_config = 4; + + // Configuration for bounding box and bounding poly task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + BoundingPolyConfig bounding_poly_config = 5; + + // Configuration for polyline task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + PolylineConfig polyline_config = 6; + + // Configuration for segmentation task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + SegmentationConfig segmentation_config = 7; + } + + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of image labeling task. + Feature feature = 3; +} + +// Request message for LabelVideo. +message LabelVideoRequest { + // Video labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label whole video or video segment with one or more labels. + CLASSIFICATION = 1; + + // Label objects with bounding box on image frames extracted from the video. + OBJECT_DETECTION = 2; + + // Label and track objects in video. + OBJECT_TRACKING = 3; + + // Label the range of video for the specified events. + EVENT = 4; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for video classification task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + VideoClassificationConfig video_classification_config = 4; + + // Configuration for video object detection task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectDetectionConfig object_detection_config = 5; + + // Configuration for video object tracking task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectTrackingConfig object_tracking_config = 6; + + // Configuration for video event task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + EventConfig event_config = 7; + } + + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of video labeling task. + Feature feature = 3; +} + +// Request message for LabelText. +message LabelTextRequest { + // Text labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label text content to one of more labels. + TEXT_CLASSIFICATION = 1; + + // Label entities and their span in text. + TEXT_ENTITY_EXTRACTION = 2; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for text classification task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextClassificationConfig text_classification_config = 4; + + // Configuration for entity extraction task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextEntityExtractionConfig text_entity_extraction_config = 5; + } + + // Required. Name of the data set to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of text labeling task. + Feature feature = 6; +} + +// Request message for GetExample +message GetExampleRequest { + // Required. Name of example, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + string name = 1; + + // Optional. An expression for filtering Examples. Filter by + // annotation_spec.display_name is supported. Format + // "annotation_spec.display_name = {display_name}" + string filter = 2; +} + +// Request message for ListExamples. +message ListExamplesRequest { + // Required. Example resource parent. + string parent = 1; + + // 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; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing Examples in and annotated dataset. +message ListExamplesResponse { + // The list of examples to return. + repeated Example examples = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for CreateAnnotationSpecSet. +message CreateAnnotationSpecSetRequest { + // Required. AnnotationSpecSet resource parent, format: + // projects/{project_id} + string parent = 1; + + // 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; +} + +// Request message for GetAnnotationSpecSet. +message GetAnnotationSpecSetRequest { + // Required. AnnotationSpecSet resource name, format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + string name = 1; +} + +// Request message for ListAnnotationSpecSets. +message ListAnnotationSpecSetsRequest { + // Required. Parent of AnnotationSpecSet resource, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing annotation spec set under a project. +message ListAnnotationSpecSetsResponse { + // The list of annotation spec sets. + repeated AnnotationSpecSet annotation_spec_sets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for DeleteAnnotationSpecSet. +message DeleteAnnotationSpecSetRequest { + // Required. AnnotationSpec resource name, format: + // `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. + string name = 1; +} + +// Request message for CreateInstruction. +message CreateInstructionRequest { + // Required. Instruction resource parent, format: + // projects/{project_id} + string parent = 1; + + // Required. Instruction of how to perform the labeling task. + Instruction instruction = 2; +} + +// Request message for GetInstruction. +message GetInstructionRequest { + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; +} + +// Request message for DeleteInstruction. +message DeleteInstructionRequest { + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; +} + +// Request message for ListInstructions. +message ListInstructionsRequest { + // Required. Instruction resource parent, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of listing instructions under a project. +message ListInstructionsResponse { + // The list of Instructions to return. + repeated Instruction instructions = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for GetEvaluation. +message GetEvaluationRequest { + // Required. Name of the evaluation. Format: + // 'projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + string name = 1; +} + +// 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; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results of searching evaluations. +message SearchEvaluationsResponse { + // The list of evaluations to return. + repeated Evaluation evaluations = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// 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; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 2; + + // 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; +} + +// Results of searching example comparisons. +message SearchExampleComparisonsResponse { + // Example comparisons containing annotation comparison between groundtruth + // and predictions. + message ExampleComparison { + Example ground_truth_example = 1; + + repeated Example model_created_examples = 2; + } + + repeated ExampleComparison example_comparisons = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for CreateEvaluationJob. +message CreateEvaluationJobRequest { + // Required. Evaluation job resource parent, format: + // projects/{project_id}. + string parent = 1; + + // Required. The evaluation job to create. + EvaluationJob job = 2; +} + +// 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; +} + +// Request message for GetEvaluationJob. +message GetEvaluationJobRequest { + // Required. Name of the evaluation job. Format: + // 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' + string name = 1; +} + +// 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; +} + +// 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; +} + +// 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; +} + +// 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; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // 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; +} + +// Results for listing evaluation jobs. +message ListEvaluationJobsResponse { + // The list of evaluation jobs to return. + repeated EvaluationJob evaluation_jobs = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} diff --git a/google/cloud/datalabeling/v1beta1/data_payloads.proto b/google/cloud/datalabeling/v1beta1/data_payloads.proto new file mode 100644 index 000000000..721e20019 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/data_payloads.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.cloud.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.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"; + +// Container of information about an image. +message ImagePayload { + // Image format. + string mime_type = 1; + + // A byte string of a thumbnail image. + bytes image_thumbnail = 2; + + // Image uri from the user bucket. + string image_uri = 3; + + // Signed uri of the image file in the service bucket. + string signed_uri = 4; +} + +// Container of information about a piece of text. +message TextPayload { + // Text content. + string text_content = 1; +} + +// Container of information of a video thumbnail. +message VideoThumbnail { + // A byte string of the video frame. + bytes thumbnail = 1; + + // Time offset relative to the beginning of the video, corresponding to the + // video frame where the thumbnail has been extracted from. + google.protobuf.Duration time_offset = 2; +} + +// Container of information of a video. +message VideoPayload { + // Video format. + string mime_type = 1; + + // Video uri from the user bucket. + string video_uri = 2; + + // The list of video thumbnails. + repeated VideoThumbnail video_thumbnails = 3; + + // FPS of the video. + float frame_rate = 4; + + // Signed uri of the video file in the service bucket. + string signed_uri = 5; +} diff --git a/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.yaml new file mode 100644 index 000000000..82caa70e0 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/datalabeling_gapic.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/dataset.proto b/google/cloud/datalabeling/v1beta1/dataset.proto new file mode 100644 index 000000000..5289abcc9 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/dataset.proto @@ -0,0 +1,304 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/annotation.proto"; +import "google/cloud/datalabeling/v1beta1/data_payloads.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/protobuf/timestamp.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"; + +enum DataType { + DATA_TYPE_UNSPECIFIED = 0; + + IMAGE = 1; + + VIDEO = 2; + + TEXT = 4; + + 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 { + // Output only. Dataset resource name, format is: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // Required. The display name of the dataset. 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. + string description = 3; + + // Output only. Time the dataset is created. + google.protobuf.Timestamp create_time = 4; + + // Output only. This is populated with the original input configs + // where ImportData is called. It is available only after the clients + // import data to this dataset. + repeated InputConfig input_configs = 5; + + // Output only. The names of any related resources that are blocking changes + // to the dataset. + repeated string blocking_resources = 6; + + // Output only. The number of data items in the dataset. + int64 data_item_count = 7; +} + +// The configuration of input data, including data type, location, etc. +message InputConfig { + // Optional. The metadata associated with each data type. + oneof data_type_metadata { + // Required for text import, as language code must be specified. + TextMetadata text_metadata = 6; + } + + // Required. Where the data is from. + oneof source { + // Source located in Cloud Storage. + GcsSource gcs_source = 2; + + 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. + AnnotationType annotation_type = 3; + + // Optional. Metadata about annotations in the input. Each annotation type may + // have different metadata. + // Metadata for classification problem. + ClassificationMetadata classification_metadata = 4; +} + +// Metadata for the text. +message TextMetadata { + // The language of this text, as a + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Default value is en-US. + string language_code = 1; +} + +// Metadata for classification annotations. +message ClassificationMetadata { + // Whether the classification task is multi-label or not. + bool is_multi_label = 1; +} + +// Source of the Cloud Storage file to be imported. +message GcsSource { + // Required. The input URI of source file. This must be a Cloud Storage path + // (`gs://...`). + string input_uri = 1; + + // Required. The format of the source file. Only "text/csv" is supported. + string mime_type = 2; +} + +// The BigQuery location for the input content. +message BigQuerySource { + // Required. BigQuery URI to a table, up to 2000 characters long. + // Accepted forms: BigQuery gs path e.g. bq://projectId.bqDatasetId.bqTableId + string input_uri = 1; +} + +// The configuration of output data. +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. + GcsDestination gcs_destination = 1; + + // Output to a folder in Cloud Storage. Should be used for image + // segmentation labeling output. + GcsFolderDestination gcs_folder_destination = 2; + } +} + +// Export destination of the data.Only gcs path is allowed in +// output_uri. +message GcsDestination { + // Required. The output uri of destination file. + string output_uri = 1; + + // Required. The format of the gcs destination. Only "text/csv" and + // "application/json" + // are supported. + string mime_type = 2; +} + +// Export folder destination of the data. +message GcsFolderDestination { + // Required. Cloud Storage directory to export data to. + string output_folder_uri = 1; +} + +// DataItem is a piece of data, without annotation. For example, an image. +message DataItem { + // Output only. + oneof payload { + // The image payload, a container of the image bytes/uri. + ImagePayload image_payload = 2; + + // The text payload, a container of text content. + TextPayload text_payload = 3; + + // The video payload, a container of the video uri. + VideoPayload video_payload = 4; + } + + // Output only. Name of the data item, in format of: + // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + string name = 1; +} + +// AnnotatedDataset is a set holding annotations for data in a Dataset. Each +// labeling task will generate an AnnotatedDataset under the Dataset that the +// task is requested for. +message AnnotatedDataset { + // Output only. AnnotatedDataset resource name in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; + + // Output only. The display name of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 64 + // characters. + string display_name = 2; + + // Output only. The description of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 + // characters. + string description = 9; + + // Output only. Source of the annotation. + AnnotationSource annotation_source = 3; + + // Output only. Type of the annotation. It is specified when starting labeling + // task. + AnnotationType annotation_type = 8; + + // Output only. Number of examples in the annotated dataset. + int64 example_count = 4; + + // Output only. Number of examples that have annotation in the annotated + // dataset. + int64 completed_example_count = 5; + + // Output only. Per label statistics. + LabelStats label_stats = 6; + + // Output only. Time the AnnotatedDataset was created. + google.protobuf.Timestamp create_time = 7; + + // Output only. Additional information about AnnotatedDataset. + AnnotatedDatasetMetadata metadata = 10; + + // Output only. The names of any related resources that are blocking changes + // to the annotated dataset. + repeated string blocking_resources = 11; +} + +// Statistics about annotation specs. +message LabelStats { + // Map of each annotation spec's example count. Key is the annotation spec + // name and value is the number of examples for that annotation spec. + // If the annotated dataset does not have annotation spec, the map will return + // a pair where the key is empty string and value is the total number of + // annotations. + map example_count = 1; +} + +// Metadata on AnnotatedDataset. +message AnnotatedDatasetMetadata { + // Specific request configuration used when requesting the labeling task. + oneof annotation_request_config { + // Configuration for image classification task. + ImageClassificationConfig image_classification_config = 2; + + // Configuration for image bounding box and bounding poly task. + BoundingPolyConfig bounding_poly_config = 3; + + // Configuration for image polyline task. + PolylineConfig polyline_config = 4; + + // Configuration for image segmentation task. + SegmentationConfig segmentation_config = 5; + + // Configuration for video classification task. + VideoClassificationConfig video_classification_config = 6; + + // Configuration for video object detection task. + ObjectDetectionConfig object_detection_config = 7; + + // Configuration for video object tracking task. + ObjectTrackingConfig object_tracking_config = 8; + + // Configuration for video event labeling task. + EventConfig event_config = 9; + + // Configuration for text classification task. + TextClassificationConfig text_classification_config = 10; + + // Configuration for text entity extraction task. + TextEntityExtractionConfig text_entity_extraction_config = 11; + } + + // HumanAnnotationConfig used when requesting the human labeling task for this + // AnnotatedDataset. + HumanAnnotationConfig human_annotation_config = 1; +} + +// An Example is a piece of data and its annotation. For example, an image with +// label "house". +message Example { + // Output only. The data part of Example. + oneof payload { + // The image payload, a container of the image bytes/uri. + ImagePayload image_payload = 2; + + // The text payload, a container of the text content. + TextPayload text_payload = 6; + + // The video payload, a container of the video uri. + VideoPayload video_payload = 7; + } + + // Output only. Name of the example, in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + string name = 1; + + // Output only. Annotations for the piece of data in Example. + // One piece of data can have multiple annotations. + repeated Annotation annotations = 5; +} diff --git a/google/cloud/datalabeling/v1beta1/evaluation.proto b/google/cloud/datalabeling/v1beta1/evaluation.proto new file mode 100644 index 000000000..ad1e975a3 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/evaluation.proto @@ -0,0 +1,167 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/annotation.proto"; +import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; +import "google/protobuf/timestamp.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"; + +// Describes an evaluation between 2 annotated datasets. Created by an +// evaluation plan. +message Evaluation { + // Resource name of an evaluation. + // Format: + // 'projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + string name = 1; + + // Options used in evaluation plan for creating the evaluation. + EvaluationConfig config = 2; + + // Output only. Timestamp when the evaluation plan triggered this evaluation + // flow. + google.protobuf.Timestamp evaluation_job_run_time = 3; + + // Output only. Timestamp when this model evaluation was created. + google.protobuf.Timestamp create_time = 4; + + // Output only. Metrics of the evaluation. + EvaluationMetrics evaluation_metrics = 5; + + // Type of the annotation to compute metrics for in the groundtruth and + // annotation labeled dataset. Required for creation. + 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. + int64 evaluated_item_count = 7; +} + +message EvaluationConfig { + // Vertical specific options for general metrics. + oneof vertical_option { + BoundingBoxEvaluationOptions bounding_box_evaluation_options = 1; + } +} + +// Options regarding evaluation between bounding boxes. +message BoundingBoxEvaluationOptions { + // Minimize IoU required to consider 2 bounding boxes are matched. + float iou_threshold = 1; +} + +message EvaluationMetrics { + // Common metrics covering most genernal cases. + oneof metrics { + ClassificationMetrics classification_metrics = 1; + + ObjectDetectionMetrics object_detection_metrics = 2; + } +} + +message ClassificationMetrics { + // Precision-recall curve. + PrCurve pr_curve = 1; + + ConfusionMatrix confusion_matrix = 2; +} + +message ObjectDetectionMetrics { + // Precision-recall curve. + PrCurve pr_curve = 1; +} + +message PrCurve { + message ConfidenceMetricsEntry { + // Threshold used for this entry, for example, IoU threshold for bounding + // box problem, or detection threshold for classification. + float confidence_threshold = 1; + + // Recall value. + float recall = 2; + + // Precision value. + float precision = 3; + + // Harmonic mean of recall and precision. + float f1_score = 4; + + // Recall value for entries with label that has highest score. + float recall_at1 = 5; + + // 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]. + float f1_score_at1 = 7; + + // Recall value for entries with label that has highest 5 scores. + float recall_at5 = 8; + + // 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]. + float f1_score_at5 = 10; + } + + // PR curve against which annotation spec. Could be empty. + AnnotationSpec annotation_spec = 1; + + // Area under precision recall curve. + float area_under_curve = 2; + + // entries to draw PR graph. + repeated ConfidenceMetricsEntry confidence_metrics_entries = 3; + + // 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. +message ConfusionMatrix { + message ConfusionMatrixEntry { + // The predicted annotation spec. + AnnotationSpec annotation_spec = 1; + + // Number of items being predicted as this label. + int32 item_count = 2; + } + + // A row in the confusion matrix. + message Row { + // the original annotation spec of this row. + AnnotationSpec annotation_spec = 1; + + // Info describing predicted label distribution. + repeated ConfusionMatrixEntry entries = 2; + } + + repeated Row row = 1; +} diff --git a/google/cloud/datalabeling/v1beta1/evaluation_job.proto b/google/cloud/datalabeling/v1beta1/evaluation_job.proto new file mode 100644 index 000000000..ad6424643 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/evaluation_job.proto @@ -0,0 +1,151 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/cloud/datalabeling/v1beta1/evaluation.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.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"; + +// Defines an evaluation job that is triggered periodically to generate +// evaluations. +message EvaluationJob { + // State of the job. + enum State { + STATE_UNSPECIFIED = 0; + + SCHEDULED = 1; + + RUNNING = 2; + + PAUSED = 3; + + STOPPED = 4; + } + + // Format: 'projects/{project_id}/evaluationJobs/{evaluation_job_id}' + string name = 1; + + // Description of the job. The description can be up to + // 25000 characters long. + string description = 2; + + State state = 3; + + // Describes the schedule on which the job will be executed. Minimum schedule + // unit is 1 day. + // + // The schedule can be either of the following types: + // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + // * English-like + // + // [schedule](https: + // //cloud.google.com/scheduler/docs/configuring/cron-job-schedules) + string schedule = 4; + + // The versioned model that is being evaluated here. + // Only one job is allowed for each model name. + // Format: 'projects/*/models/*/versions/*' + string model_version = 5; + + // Detailed config for running this eval job. + EvaluationJobConfig evaluation_job_config = 6; + + // Name of the AnnotationSpecSet. + string annotation_spec_set = 7; + + // If a human annotation should be requested when some data don't have ground + // truth. + bool label_missing_ground_truth = 8; + + // Output only. Any attempts with errors happening in evaluation job runs each + // time will be recorded here incrementally. + repeated Attempt attempts = 9; + + // Timestamp when this evaluation job was created. + google.protobuf.Timestamp create_time = 10; +} + +message EvaluationJobConfig { + // config specific to different supported human annotation use cases. + oneof human_annotation_request_config { + ImageClassificationConfig image_classification_config = 4; + + BoundingPolyConfig bounding_poly_config = 5; + + VideoClassificationConfig video_classification_config = 6; + + ObjectDetectionConfig object_detection_config = 7; + + 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. + InputConfig input_config = 1; + + // Config used to create evaluation. + EvaluationConfig evaluation_config = 2; + + 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: + // + // https: + // //docs.google.com/document/d/1bg1meMIBGY + // // 9I5QEoFoHSX6u9LsZQYBSmPt6E9SxqHZc/edit#heading=h.tfyjhxhvsqem + map bigquery_import_keys = 9; + + // Max number of examples to collect in each period. + 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. + double example_sample_percentage = 11; + + // Alert config for the evaluation job. The alert will be triggered when its + // criteria is met. + EvaluationJobAlertConfig evaluation_job_alert_config = 13; +} + +message EvaluationJobAlertConfig { + // Required. Email of the user who will be receiving the alert. + string email = 1; + + // If a single evaluation run's aggregate mean average precision is + // lower than this threshold, the alert will be triggered. + double min_acceptable_mean_average_precision = 2; +} + +// Records a failed attempt. +message Attempt { + google.protobuf.Timestamp attempt_time = 1; + + 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 new file mode 100644 index 000000000..d392aca70 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/human_annotation_config.proto @@ -0,0 +1,208 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.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"; + +enum StringAggregationType { + STRING_AGGREGATION_TYPE_UNSPECIFIED = 0; + + // Majority vote to aggregate answers. + MAJORITY_VOTE = 1; + + // Unanimous answers will be adopted. + UNANIMOUS_VOTE = 2; + + // Preserve all answers by crowd compute. + NO_AGGREGATION = 3; +} + +// Configuration for how human labeling task should be done. +message HumanAnnotationConfig { + // Required except for LabelAudio case. Instruction resource name. + string instruction = 1; + + // Required. A human-readable name for AnnotatedDataset defined by + // users. Maximum of 64 characters + // . + string annotated_dataset_display_name = 2; + + // Optional. A human-readable description for AnnotatedDataset. + // The description can be up to 10000 characters long. + string annotated_dataset_description = 3; + + // 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; + + // 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; + + // 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; + + // Optional. Maximum duration for contributors to answer a question. Default + // is 1800 seconds. + google.protobuf.Duration question_duration = 7; + + // 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; + + // Email of the user who started the labeling task and should be notified by + // email. If empty no notification will be sent. + string user_email_address = 10; +} + +// Config for image classification human labeling task. +message ImageClassificationConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. If allow_multi_label is true, contributors are able to choose + // multiple labels for one image. + bool allow_multi_label = 2; + + // Optional. The type of how to aggregate answers. + StringAggregationType answer_aggregation_type = 3; +} + +// Config for image bounding poly (and bounding box) human labeling task. +message BoundingPolyConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. Instruction message showed on contributors UI. + string instruction_message = 2; +} + +// Config for image polyline human labeling task. +message PolylineConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. Instruction message showed on contributors UI. + string instruction_message = 2; +} + +// 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; + + // Instruction message showed on labelers UI. + string instruction_message = 2; +} + +// Config for video classification human labeling task. +// Currently two types of video classification are supported: +// 1. Assign labels on the entire video. +// 2. Split the video into multiple video clips based on camera shot, and +// assign labels on each video clip. +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; + + // Optional. If allow_multi_label is true, contributors are able to + // choose multiple labels from one annotation spec set. + bool allow_multi_label = 2; + } + + // Required. The list of annotation spec set configs. + // Since watching a video clip takes much longer time than an image, we + // support label with multiple AnnotationSpecSet at the same time. Labels + // 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; + + // Optional. Option to apply shot detection on the video. + bool apply_shot_detection = 2; +} + +// Config for video object detection human labeling task. +// Object detection will be conducted on the images extracted from the video, +// and those objects will be labeled with bounding boxes. +// User need to specify the number of images to be extracted per second as the +// extraction frame rate. +message ObjectDetectionConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Required. Number of frames per second to be extracted from the video. + double extraction_frame_rate = 3; +} + +// Config for video object tracking human labeling task. +message ObjectTrackingConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; +} + +// Config for video event human labeling task. +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; +} + +// 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; + + // Required. Annotation spec set resource name. + string annotation_spec_set = 2; + + // Optional. Configs for sentiment selection. + SentimentConfig sentiment_config = 3; +} + +// Config for setting up sentiments. +message SentimentConfig { + // If set to true, contributors will have the option to select sentiment of + // the label they selected, to mark it as negative or positive label. Default + // is false. + bool enable_label_sentiment_selection = 1; +} + +// Config for text entity extraction human labeling task. +message TextEntityExtractionConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; +} diff --git a/google/cloud/datalabeling/v1beta1/instruction.proto b/google/cloud/datalabeling/v1beta1/instruction.proto new file mode 100644 index 000000000..6cb7b50f3 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/instruction.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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/protobuf/timestamp.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"; + +// 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. +message Instruction { + // Output only. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; + + // Required. The display name of the instruction. Maximum of 64 characters. + string display_name = 2; + + // Optional. User-provided description of the instruction. + // The description can be up to 10000 characters long. + string description = 3; + + // Output only. Creation time of instruction. + google.protobuf.Timestamp create_time = 4; + + // Output only. Last update time of instruction. + google.protobuf.Timestamp update_time = 5; + + // Required. The data type of this instruction. + DataType data_type = 6; + + // One of CSV or PDF instruction is required. + // 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; + + // 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; + + // Output only. The names of any related resources that are blocking changes + // to the instruction. + repeated string blocking_resources = 10; +} + +// Instruction from a CSV file. +message CsvInstruction { + // CSV file for the instruction. Only gcs path is allowed. + string gcs_file_uri = 1; +} + +// Instruction from a PDF file. +message PdfInstruction { + // PDF file for the instruction. Only gcs path is allowed. + string gcs_file_uri = 1; +} diff --git a/google/cloud/datalabeling/v1beta1/operations.proto b/google/cloud/datalabeling/v1beta1/operations.proto new file mode 100644 index 000000000..80371d0e2 --- /dev/null +++ b/google/cloud/datalabeling/v1beta1/operations.proto @@ -0,0 +1,233 @@ +// 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.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.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"; + +// Response used for ImportData longrunning operation. +message ImportDataOperationResponse { + // Ouptut only. The name of imported dataset. + string dataset = 1; + + // Output only. Total number of examples requested to import + int32 total_count = 2; + + // Output only. Number of examples imported successfully. + int32 import_count = 3; +} + +// Response used for ExportDataset longrunning operation. +message ExportDataOperationResponse { + // Ouptut only. The name of dataset. + // "projects/*/datasets/*/Datasets/*" + string dataset = 1; + + // Output only. Total number of examples requested to export + int32 total_count = 2; + + // Output only. Number of examples exported successfully. + int32 export_count = 3; + + // Output only. Statistic infos of labels in the exported dataset. + LabelStats label_stats = 4; + + // Output only. output_config in the ExportData request. + OutputConfig output_config = 5; +} + +// Metadata of an ImportData operation. +message ImportDataOperationMetadata { + // Ouptut only. The name of imported dataset. + // "projects/*/datasets/*" + string dataset = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Output only. Timestamp when import dataset request was created. + google.protobuf.Timestamp create_time = 3; +} + +// Metadata of an ExportData operation. +message ExportDataOperationMetadata { + // Output only. The name of dataset to be exported. + // "projects/*/datasets/*/Datasets/*" + string dataset = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Output only. Timestamp when export dataset request was created. + google.protobuf.Timestamp create_time = 3; +} + +// Metadata of a labeling operation, such as LabelImage or LabelVideo. +// Next tag: 18 +message LabelOperationMetadata { + // Ouptut only. Details of specific label operation. + oneof details { + // Details of label image classification operation. + LabelImageClassificationOperationMetadata image_classification_details = 3; + + // Details of label image bounding box operation. + LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + + // Details of label image bounding poly operation. + LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + + // Details of label image oriented bounding box operation. + LabelImageOrientedBoundingBoxOperationMetadata + image_oriented_bounding_box_details = 14; + + // Details of label image polyline operation. + LabelImagePolylineOperationMetadata image_polyline_details = 12; + + // Details of label image segmentation operation. + LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + + // Details of label video classification operation. + LabelVideoClassificationOperationMetadata video_classification_details = 5; + + // Details of label video object detection operation. + LabelVideoObjectDetectionOperationMetadata video_object_detection_details = + 6; + + // Details of label video object tracking operation. + LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + + // Details of label video event operation. + LabelVideoEventOperationMetadata video_event_details = 8; + + // Details of label text classification operation. + LabelTextClassificationOperationMetadata text_classification_details = 9; + + // Details of label text entity extraction operation. + LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = + 13; + } + + // Output only. Progress of label operation. Range: [0, 100]. + int32 progress_percent = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Output only. Timestamp when labeling request was created. + google.protobuf.Timestamp create_time = 16; +} + +// Metadata of a LabelImageClassification operation. +message LabelImageClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageBoundingBox operation metadata. +message LabelImageBoundingBoxOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageOrientedBoundingBox operation metadata. +message LabelImageOrientedBoundingBoxOperationMetadata { + // Basic human annotation config. + HumanAnnotationConfig basic_config = 1; +} + +// Details of LabelImageBoundingPoly operation metadata. +message LabelImageBoundingPolyOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of LabelImagePolyline operation metadata. +message LabelImagePolylineOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageSegmentation operation metadata. +message LabelImageSegmentationOperationMetadata { + // Basic human annotation config. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoClassification operation metadata. +message LabelVideoClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoObjectDetection operation metadata. +message LabelVideoObjectDetectionOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoObjectTracking operation metadata. +message LabelVideoObjectTrackingOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoEvent operation metadata. +message LabelVideoEventOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelTextClassification operation metadata. +message LabelTextClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelTextEntityExtraction operation metadata. +message LabelTextEntityExtractionOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Metadata of a CreateInstruction operation. +message CreateInstructionMetadata { + // The name of the created Instruction. + // projects/{project_id}/instructions/{instruction_id} + string instruction = 1; + + // Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Timestamp when create instruction request was created. + google.protobuf.Timestamp create_time = 3; +} diff --git a/google/cloud/dataproc/BUILD.bazel b/google/cloud/dataproc/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/google/cloud/dataproc/artman_dataproc_v1.yaml b/google/cloud/dataproc/artman_dataproc_v1.yaml index b3832c544..211938f79 100644 --- a/google/cloud/dataproc/artman_dataproc_v1.yaml +++ b/google/cloud/dataproc/artman_dataproc_v1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-dataproc-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-dataproc-v1 - - name: proto - dest: generated/java/proto-google-cloud-dataproc-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-dataproc - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-dataproc-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/dataproc/artman_dataproc_v1beta2.yaml b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml index 77450508b..e56bd8e9c 100644 --- a/google/cloud/dataproc/artman_dataproc_v1beta2.yaml +++ b/google/cloud/dataproc/artman_dataproc_v1beta2.yaml @@ -3,7 +3,7 @@ common: api_version: v1beta2 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1beta2 service_yaml: v1beta2/dataproc.yaml @@ -23,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-dataproc-v1beta2 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/dataproc/dataproc.yaml b/google/cloud/dataproc/dataproc.yaml index c13e830aa..86831d635 100644 --- a/google/cloud/dataproc/dataproc.yaml +++ b/google/cloud/dataproc/dataproc.yaml @@ -4,57 +4,180 @@ name: dataproc.googleapis.com title: Cloud Dataproc API apis: +- name: google.cloud.dataproc.v1.ClusterController +- name: google.cloud.dataproc.v1.JobController +- name: google.cloud.dataproc.v1.WorkflowTemplateService +- 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.v1.DiagnoseClusterResults - name: google.cloud.dataproc.v1.ClusterOperationMetadata +- name: google.cloud.dataproc.v1.DiagnoseClusterResults +- name: google.cloud.dataproc.v1.WorkflowMetadata - name: google.cloud.dataproc.v1beta2.DiagnoseClusterResults - name: google.cloud.dataproc.v1beta2.ClusterOperationMetadata - 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. + + - 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.iam.v1.IAMPolicy.GetIamPolicy + post: '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy' + body: '*' additional_bindings: - - get: '/v1beta2/{name=projects/*/regions/*/operations}' - - - selector: google.longrunning.Operations.GetOperation - get: '/v1/{name=projects/*/regions/*/operations/*}' + - post: '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/jobs/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/operations/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy' + body: '*' + - get: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/regions/*/jobs/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/regions/*/operations/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy' + - get: '/v1beta2/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy' + body: '*' additional_bindings: - - get: '/v1beta2/{name=projects/*/regions/*/operations/*}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/{name=projects/*/regions/*/operations/*}' + - post: '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/jobs/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/operations/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions' + body: '*' additional_bindings: - - delete: '/v1beta2/{name=projects/*/regions/*/operations/*}' - + - post: '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions' + body: '*' + - post: '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/clusters/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/jobs/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/operations/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions' + body: '*' + - post: '/v1beta2/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions' + body: '*' - selector: google.longrunning.Operations.CancelOperation post: '/v1/{name=projects/*/regions/*/operations/*}:cancel' additional_bindings: - 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: '*' - + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/regions/*/operations/*}' + additional_bindings: + - delete: '/v1beta2/{name=projects/*/regions/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/regions/*/operations/*}' + additional_bindings: + - get: '/v1beta2/{name=projects/*/regions/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/regions/*/operations}' + additional_bindings: + - get: '/v1beta2/{name=projects/*/regions/*/operations}' authentication: rules: - - selector: '*' + - 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/BUILD.bazel b/google/cloud/dataproc/v1/BUILD.bazel new file mode 100644 index 000000000..391aaf6f2 --- /dev/null +++ b/google/cloud/dataproc/v1/BUILD.bazel @@ -0,0 +1,159 @@ +# 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 = "dataproc_proto", + srcs = [ + "clusters.proto", + "jobs.proto", + "operations.proto", + "shared.proto", + "workflow_templates.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "dataproc_proto_with_info", + deps = [":dataproc_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 = "dataproc_java_proto", + deps = [":dataproc_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.dataproc.v1.ClusterControllerClientTest", + "com.google.cloud.dataproc.v1.JobControllerClientTest", + "com.google.cloud.dataproc.v1.WorkflowTemplateServiceClientTest", +]] + +# Opensource 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 = [ + ":dataproc_java_proto", + ":dataproc_proto", + ":dataproc_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 = "dataproc_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/dataproc/v1", + protos = [":dataproc_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":dataproc_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "dataproc_go_gapic_test", + srcs = [":dataproc_go_gapic_srcjar_test"], + embed = [":dataproc_go_gapic"], + importpath = "cloud.google.com/go/dataproc/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/dataproc/v1/clusters.proto b/google/cloud/dataproc/v1/clusters.proto index 721ed9bca..ab2cc2d02 100644 --- a/google/cloud/dataproc/v1/clusters.proto +++ b/google/cloud/dataproc/v1/clusters.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,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,6 +19,7 @@ package google.cloud.dataproc.v1; import "google/api/annotations.proto"; import "google/cloud/dataproc/v1/operations.proto"; +import "google/cloud/dataproc/v1/shared.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; @@ -28,45 +30,59 @@ option java_multiple_files = true; option java_outer_classname = "ClustersProto"; option java_package = "com.google.cloud.dataproc.v1"; - // The ClusterControllerService provides methods to manage clusters -// of Google Compute Engine instances. +// of Compute Engine instances. service ClusterController { // Creates a cluster in a project. rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/clusters" body: "cluster" }; + option (google.api.http) = { + post: "/v1/projects/{project_id}/regions/{region}/clusters" + body: "cluster" + }; } // Updates a cluster in a project. 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.http) = { + patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" + body: "cluster" + }; } // Deletes a cluster in a project. rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.http) = { + delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" + }; } // Gets the resource representation for a cluster in a project. rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; + option (google.api.http) = { + get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" + }; } // Lists all regions/{region}/clusters in a project. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/clusters" }; + option (google.api.http) = { + get: "/v1/projects/{project_id}/regions/{region}/clusters" + }; } // Gets cluster diagnostic information. // After the operation completes, the Operation.response field // contains `DiagnoseClusterOutputLocation`. 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.http) = { + post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose" + body: "*" + }; } } // Describes the identifying information, config, and status of -// a cluster of Google Compute Engine instances. +// a cluster of Compute Engine instances. message Cluster { // Required. The Google Cloud Platform project ID that the cluster belongs to. string project_id = 1; @@ -83,50 +99,54 @@ message Cluster { // Label **keys** must contain 1 to 63 characters, and must conform to // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // Label **values** may be empty, but, if present, must contain 1 to 63 - // 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. + // 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; - // Output-only. Cluster status. + // Output only. Cluster status. ClusterStatus status = 4; - // Output-only. The previous cluster status. + // Output only. The previous cluster status. repeated ClusterStatus status_history = 7; - // Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc + // Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc // generates this value when it creates the cluster. string cluster_uuid = 6; // 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. + // **Beta Feature**: This report is available for testing purposes only. It + // may be changed before final release. ClusterMetrics metrics = 9; } // The cluster config. message ClusterConfig { - // Optional. A Google Cloud Storage staging bucket used for sharing generated - // SSH keys and config. If you do not specify a staging bucket, Cloud - // Dataproc will determine an appropriate Cloud Storage location (US, + // Optional. A Google 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 - // Compute Engine zone where your cluster is deployed, and then it will create - // and manage this project-level, per-location bucket for you. + // 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; - // Required. The shared Google Compute Engine config settings for + // Optional. The shared Compute Engine config settings for // all instances in a cluster. GceClusterConfig gce_cluster_config = 8; - // Optional. The Google Compute Engine config settings for + // Optional. The Compute Engine config settings for // the master instance in a cluster. InstanceGroupConfig master_config = 9; - // Optional. The Google Compute Engine config settings for + // Optional. The Compute Engine config settings for // worker instances in a cluster. InstanceGroupConfig worker_config = 10; - // Optional. The Google Compute Engine config settings for + // Optional. The Compute Engine config settings for // additional worker instances in a cluster. InstanceGroupConfig secondary_worker_config = 12; @@ -136,21 +156,33 @@ message ClusterConfig { // Optional. Commands to execute on each node after config is // completed. By default, executables are run on master and all worker nodes. // You can test a node's `role` metadata to run an executable on - // a master or worker node, as shown below using `curl` (you can also use `wget`): + // a master or worker node, as shown below using `curl` (you can also use + // `wget`): // - // ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) + // ROLE=$(curl -H Metadata-Flavor:Google + // http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) // if [[ "${ROLE}" == 'Master' ]]; then // ... master specific actions ... // else // ... worker specific actions ... // fi repeated NodeInitializationAction initialization_actions = 11; + + // Optional. Encryption settings for the cluster. + EncryptionConfig encryption_config = 15; } -// Common config settings for resources of Google Compute Engine cluster +// 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; +} + +// Common config settings for resources of Compute Engine cluster // instances, applicable to all instances in the cluster. message GceClusterConfig { - // Optional. The zone where the Google Compute Engine cluster will be located. + // 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 // corresponding Compute Engine region. On a get request, zone will @@ -163,7 +195,7 @@ message GceClusterConfig { // * `us-central1-f` string zone_uri = 1; - // Optional. The Google Compute Engine network to be used for machine + // 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 @@ -176,37 +208,38 @@ message GceClusterConfig { // * `default` string network_uri = 2; - // Optional. The Google Compute Engine subnetwork to be used for machine + // Optional. The Compute Engine subnetwork to be used for machine // communications. Cannot be specified with network_uri. // // A full URL, partial URI, or short name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0` - // * `projects/[project_id]/regions/us-east1/sub0` + // * `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; // Optional. If true, all instances in the cluster will only have internal IP - // addresses. By default, clusters are not restricted to internal IP addresses, - // and will have ephemeral external IP addresses assigned to each 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. + // addresses. By default, clusters are not restricted to internal IP + // addresses, and will have ephemeral external IP addresses assigned to each + // 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; // Optional. The service account of the instances. Defaults to the default - // Google Compute Engine service account. Custom service accounts need - // permissions equivalent to the folloing IAM roles: + // Compute Engine service account. Custom service accounts need + // permissions equivalent to the following IAM roles: // // * roles/logging.logWriter // * roles/storage.objectAdmin // - // (see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts + // (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; - // Optional. The URIs of service account scopes to be included in Google + // Optional. The URIs of service account scopes to be included in // Compute Engine instances. The following base set of scopes is always // included: // @@ -222,52 +255,60 @@ message GceClusterConfig { // * https://www.googleapis.com/auth/devstorage.full_control repeated string service_account_scopes = 3; - // The Google Compute Engine tags to add to all instances (see + // The Compute Engine tags to add to all instances (see // [Tagging instances](/compute/docs/label-or-tag-resources#tags)). repeated string tags = 4; - // The Google 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)). + // 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. The config settings for Google Compute Engine resources in +// Optional. 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; - // Optional. The list of instance names. Cloud Dataproc derives the names from - // `cluster_name`, `num_instances`, and the instance group if not set by user - // (recommended practice is to let Cloud Dataproc derive the name). + // Output only. The list of instance names. Cloud Dataproc derives the names + // from `cluster_name`, `num_instances`, and the instance group. repeated string instance_names = 2; - // Output-only. The Google Compute Engine image resource used for cluster - // instances. Inferred from `SoftwareConfig.image_version`. + // 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 Google Compute Engine machine type used for cluster instances. + // Optional. The Compute Engine machine type used for cluster instances. // // A full URL, partial URI, or short name are valid. Examples: // // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` // * `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 + // Placement](/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; // Optional. Disk option config settings. DiskConfig disk_config = 5; - // Optional. Specifies that this instance group contains preemptible instances. + // Optional. Specifies that this instance group contains preemptible + // instances. bool is_preemptible = 6; - // Output-only. The config for Google Compute Engine Instance Group + // 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; - // Optional. The Google Compute Engine accelerator configuration for these + // Optional. The Compute Engine accelerator configuration for these // instances. // // **Beta Feature**: This feature is still under development. It may be @@ -277,25 +318,33 @@ message InstanceGroupConfig { // Specifies the resources used to actively manage an instance group. message ManagedGroupConfig { - // Output-only. The name of the Instance Template used for the Managed + // Output only. The name of the Instance Template used for the Managed // Instance Group. string instance_template_name = 1; - // Output-only. The name of the Instance Group Manager for this group. + // Output only. The name of the Instance Group Manager for this group. string instance_group_manager_name = 2; } // 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. See [GPUs on Compute Engine](/compute/docs/gpus/). message AcceleratorConfig { // Full URL, partial URI, or short name of the accelerator type resource to - // expose to this instance. See [Google Compute Engine AcceleratorTypes]( - // /compute/docs/reference/beta/acceleratorTypes) + // expose to this instance. See + // [Compute Engine + // AcceleratorTypes](/compute/docs/reference/beta/acceleratorTypes). + // + // Examples: // - // 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 + // Placement](/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; // The number of the accelerator cards of this type exposed to this instance. @@ -304,6 +353,11 @@ message AcceleratorConfig { // Specifies the config of disk options for a group of VM instances. 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; + // Optional. Size in GB of the boot disk (default is 500GB). int32 boot_disk_size_gb = 1; @@ -319,7 +373,7 @@ message DiskConfig { // Specifies an executable to run on a fully configured node and a // timeout period for executable completion. message NodeInitializationAction { - // Required. Google Cloud Storage URI of executable file. + // Required. Cloud Storage URI of executable file. string executable_file = 1; // Optional. Amount of time executable has to complete. Default is @@ -352,7 +406,9 @@ message ClusterStatus { UPDATING = 5; } + // The cluster substate. enum Substate { + // The cluster substate is unknown. UNSPECIFIED = 0; // The cluster is known to be in an unhealthy state @@ -369,31 +425,35 @@ message ClusterStatus { STALE_STATUS = 2; } - // Output-only. The cluster's state. + // Output only. The cluster's state. State state = 1; - // Output-only. Optional details of cluster's state. + // Output only. Optional details of cluster's state. string detail = 2; - // Output-only. Time when this state was entered. + // Output only. Time when this state was entered. google.protobuf.Timestamp state_start_time = 3; - // Output-only. Additional state information that includes + // Output only. Additional state information that includes // status reported by the agent. Substate substate = 4; } // Specifies the selection and config of software inside the cluster. message SoftwareConfig { - // Optional. The version of software inside the cluster. It must match the - // regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the - // latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)). + // 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), + // 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). + // If unspecified, it defaults to the latest Debian version. string image_version = 1; // Optional. The properties to set on daemon config files. // - // Property keys are specified in `prefix:property` format, such as - // `core:fs.defaultFS`. The following are supported prefixes + // Property keys are specified in `prefix:property` format, for example + // `core:hadoop.tmp.dir`. The following are supported prefixes // and their mappings: // // * capacity-scheduler: `capacity-scheduler.xml` @@ -409,6 +469,9 @@ message SoftwareConfig { // For more information, see // [Cluster properties](/dataproc/docs/concepts/cluster-properties). map properties = 2; + + // The set of optional components to activate on the cluster. + repeated Component optional_components = 3; } // Contains cluster daemon metrics, such as HDFS and YARN stats. @@ -434,6 +497,19 @@ message CreateClusterRequest { // Required. The cluster to create. Cluster cluster = 2; + + // Optional. A unique id used to identify the request. If the server + // receives two [CreateClusterRequest][google.cloud.dataproc.v1.CreateClusterRequest] requests with the same + // id, then the second request will be ignored and the + // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend + // is returned. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; } // A request to update a cluster. @@ -451,6 +527,16 @@ message UpdateClusterRequest { // Required. The changes to the cluster. Cluster cluster = 3; + // 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. + // + // Only supported on Dataproc image versions 1.2 and higher. + google.protobuf.Duration graceful_decommission_timeout = 6; + // Required. Specifies the path, relative to `Cluster`, of // the field to update. For example, to change the number of workers // in a cluster to 5, the `update_mask` parameter would be @@ -499,6 +585,19 @@ message UpdateClusterRequest { // // google.protobuf.FieldMask update_mask = 4; + + // Optional. A unique id used to identify the request. If the server + // receives two [UpdateClusterRequest][google.cloud.dataproc.v1.UpdateClusterRequest] requests with the same + // id, then the second request will be ignored and the + // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the + // backend is returned. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; } // A request to delete a cluster. @@ -512,6 +611,23 @@ message DeleteClusterRequest { // Required. The cluster name. string cluster_name = 2; + + // 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; + + // Optional. A unique id used to identify the request. If the server + // receives two [DeleteClusterRequest][google.cloud.dataproc.v1.DeleteClusterRequest] requests with the same + // id, then the second request will be ignored and the + // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the + // backend is returned. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; } // Request to get the resource representation for a cluster in a project. @@ -566,10 +682,10 @@ message ListClustersRequest { // The list of all clusters in a project. message ListClustersResponse { - // Output-only. The clusters in the project. + // Output only. The clusters in the project. repeated Cluster clusters = 1; - // Output-only. This token is included in the response if there are more + // 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; @@ -590,7 +706,7 @@ message DiagnoseClusterRequest { // The location of diagnostic output. message DiagnoseClusterResults { - // Output-only. The Google Cloud Storage URI of the diagnostic output. + // 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; diff --git a/google/cloud/dataproc/v1/dataproc.yaml b/google/cloud/dataproc/v1/dataproc.yaml index 2966bad2a..e6d36de27 100644 --- a/google/cloud/dataproc/v1/dataproc.yaml +++ b/google/cloud/dataproc/v1/dataproc.yaml @@ -6,10 +6,12 @@ title: Google Cloud Dataproc API apis: - name: google.cloud.dataproc.v1.ClusterController - name: google.cloud.dataproc.v1.JobController +- name: google.cloud.dataproc.v1.WorkflowTemplateService types: - name: google.cloud.dataproc.v1.DiagnoseClusterResults - name: google.cloud.dataproc.v1.ClusterOperationMetadata +- name: google.cloud.dataproc.v1.WorkflowMetadata documentation: summary: 'Manages Hadoop-based clusters and jobs on Google Cloud Platform.' diff --git a/google/cloud/dataproc/v1/dataproc_gapic.yaml b/google/cloud/dataproc/v1/dataproc_gapic.yaml index 2bac93118..870972830 100644 --- a/google/cloud/dataproc/v1/dataproc_gapic.yaml +++ b/google/cloud/dataproc/v1/dataproc_gapic.yaml @@ -12,21 +12,14 @@ language_settings: package_name: Google.Cloud.Dataproc.V1 ruby: package_name: Google::Cloud::Dataproc::V1 - release_level: BETA php: package_name: Google\Cloud\Dataproc\V1 nodejs: package_name: dataproc.v1 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. +# The fully qualified name of the API interface. - name: google.cloud.dataproc.v1.ClusterController # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -49,10 +42,12 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE + - INTERNAL - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent - retry_codes: [] + retry_codes: + - UNAVAILABLE # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -79,19 +74,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # - # 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. @@ -133,39 +115,45 @@ interfaces: - project_id - region - cluster - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 90000 + timeout_millis: 30000 long_running: return_type: google.cloud.dataproc.v1.Cluster metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata - implements_delete: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + 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 - request_object_method: true 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: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + total_poll_timeout_millis: 900000 - name: DeleteCluster flattening: groups: @@ -177,19 +165,18 @@ interfaces: - project_id - region - cluster_name - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 15000 + timeout_millis: 30000 long_running: return_type: google.protobuf.Empty metadata_type: google.cloud.dataproc.v1.ClusterOperationMetadata - implements_delete: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + total_poll_timeout_millis: 900000 - name: GetCluster flattening: groups: @@ -201,20 +188,22 @@ interfaces: - project_id - region - cluster_name - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 60000 - name: ListClusters flattening: groups: - parameters: - project_id - region + - parameters: + - project_id + - region + - filter required_fields: - project_id - region - request_object_method: true page_streaming: request: page_size_field: page_size @@ -224,7 +213,7 @@ interfaces: resources_field: clusters retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 60000 - name: DiagnoseCluster flattening: groups: @@ -236,14 +225,13 @@ interfaces: - project_id - region - cluster_name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 60000 long_running: return_type: google.protobuf.Empty metadata_type: google.cloud.dataproc.v1.DiagnoseClusterResults - implements_delete: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 @@ -266,10 +254,12 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE - name: non_idempotent - retry_codes: [] + retry_codes: + - UNAVAILABLE # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -279,7 +269,7 @@ interfaces: initial_rpc_timeout_millis: 30000 rpc_timeout_multiplier: 1 max_rpc_timeout_millis: 30000 - total_timeout_millis: 600000 + total_timeout_millis: 900000 # A list of method configurations. # Common properties: # @@ -296,19 +286,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # - # 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. @@ -350,7 +327,6 @@ interfaces: - project_id - region - job - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 @@ -365,20 +341,22 @@ interfaces: - project_id - region - job_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 30000 - name: ListJobs flattening: groups: - - parameters: - - project_id - - region + - parameters: + - project_id + - region + - parameters: + - project_id + - region + - filter required_fields: - project_id - region - request_object_method: true page_streaming: request: page_size_field: page_size @@ -396,7 +374,6 @@ interfaces: - job_id - job - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 @@ -411,8 +388,7 @@ interfaces: - project_id - region - job_id - request_object_method: true - retry_codes_name: non_idempotent + retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 - name: DeleteJob @@ -426,7 +402,228 @@ interfaces: - project_id - region - job_id - request_object_method: true + 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/jobs.proto b/google/cloud/dataproc/v1/jobs.proto index 0eadc0847..7ead7bb95 100644 --- a/google/cloud/dataproc/v1/jobs.proto +++ b/google/cloud/dataproc/v1/jobs.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,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"; @@ -26,41 +27,56 @@ option java_multiple_files = true; option java_outer_classname = "JobsProto"; option java_package = "com.google.cloud.dataproc.v1"; - // The JobController provides methods to manage jobs. service JobController { // 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.http) = { + post: "/v1/projects/{project_id}/regions/{region}/jobs:submit" + body: "*" + }; } // Gets the resource representation for a job in a project. rpc GetJob(GetJobRequest) returns (Job) { - option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.http) = { + get: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" + }; } // Lists regions/{region}/jobs in a project. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { get: "/v1/projects/{project_id}/regions/{region}/jobs" }; + option (google.api.http) = { + get: "/v1/projects/{project_id}/regions/{region}/jobs" + }; } // Updates a job in a project. rpc UpdateJob(UpdateJobRequest) returns (Job) { - option (google.api.http) = { patch: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" body: "job" }; + option (google.api.http) = { + patch: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" + body: "job" + }; } // 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) or + // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) + // or // [regions/{region}/jobs.get](/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.http) = { + post: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel" + body: "*" + }; } // Deletes the job from the project. If the job is active, the delete fails, // and the response returns `FAILED_PRECONDITION`. rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" }; + option (google.api.http) = { + delete: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" + }; } } @@ -106,8 +122,10 @@ message LoggingConfig { } // A Cloud 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 YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). +// [Apache Hadoop +// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) +// jobs on [Apache Hadoop +// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). message HadoopJob { // Required. Indicates the location of the driver's main class. Specify // either the jar file that contains the main class or the main class name. @@ -127,8 +145,8 @@ message HadoopJob { } // Optional. The arguments to pass to the driver. Do not - // 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 + // 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; @@ -162,7 +180,8 @@ 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`. + // `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; @@ -201,7 +220,8 @@ message SparkJob { } // A Cloud Dataproc job for running -// [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) +// [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 @@ -272,8 +292,8 @@ 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. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. bool continue_on_failure = 3; // Optional. Mapping of query variable names to values (equivalent to the @@ -292,8 +312,8 @@ message HiveJob { repeated string jar_file_uris = 6; } -// A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/) -// queries. +// A Cloud 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 // either an HCFS file URI or as a list of queries. @@ -335,8 +355,8 @@ 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. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. bool continue_on_failure = 3; // Optional. Mapping of query variable names to values (equivalent to the Pig @@ -362,7 +382,7 @@ message JobPlacement { // Required. The name of the cluster where the job will be submitted. string cluster_name = 1; - // Output-only. A cluster UUID generated by the Cloud Dataproc service when + // Output only. A cluster UUID generated by the Cloud Dataproc service when // the job is submitted. string cluster_uuid = 2; } @@ -407,7 +427,9 @@ message JobStatus { ATTEMPT_FAILURE = 9; } + // The job substate. enum Substate { + // The job substate is unknown. UNSPECIFIED = 0; // The Job is submitted to the agent. @@ -430,17 +452,17 @@ message JobStatus { STALE_STATUS = 3; } - // Output-only. A state message specifying the overall job state. + // Output only. A state message specifying the overall job state. State state = 1; - // 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; - // Output-only. The time when this state was entered. + // Output only. The time when this state was entered. google.protobuf.Timestamp state_start_time = 6; - // Output-only. Additional state information, which includes + // Output only. Additional state information, which includes // status reported by the agent. Substate substate = 7; } @@ -451,11 +473,12 @@ message JobReference { // belongs to. string project_id = 1; - // Optional. The job ID, which must be unique within the project. The job ID - // is generated by the server upon job submission or provided by the user as a - // means to perform retries without creating duplicate jobs. The ID must - // contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or - // hyphens (-). The maximum length is 100 characters. + // 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; } @@ -545,25 +568,25 @@ message Job { SparkSqlJob spark_sql_job = 12; } - // Output-only. The job status. Additional application-specific + // Output only. The job status. Additional application-specific // status information may be contained in the type_job // and yarn_applications fields. JobStatus status = 8; - // Output-only. The previous job status. + // Output only. The previous job status. repeated JobStatus status_history = 13; - // Output-only. The collection of YARN applications spun up by this job. + // 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. + // **Beta** Feature: This report is available for testing purposes only. It + // may be changed before final release. repeated YarnApplication yarn_applications = 9; - // Output-only. A URI pointing to the location of the stdout of the job's + // Output only. A URI pointing to the location of the stdout of the job's // driver program. string driver_output_resource_uri = 17; - // Output-only. If present, the location of miscellaneous control files + // 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; @@ -572,18 +595,21 @@ message Job { // Label **keys** must contain 1 to 63 characters, and must conform to // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // Label **values** may be empty, but, if present, must contain 1 to 63 - // 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. + // 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; // Optional. Job scheduling configuration. JobScheduling scheduling = 20; + + // 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; } // Job scheduling options. -// -// **Beta Feature**: These options are available for testing purposes only. -// They may be changed before final release. message JobScheduling { // Optional. Maximum number of times per hour a driver may be restarted as // a result of driver terminating with non-zero code before job is @@ -607,6 +633,19 @@ message SubmitJobRequest { // Required. The job resource. Job job = 2; + + // Optional. A unique id used to identify the request. If the server + // receives two [SubmitJobRequest][google.cloud.dataproc.v1.SubmitJobRequest] requests with the same + // id, then the second request will be ignored and the + // first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend + // is returned. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; } // A request to get the resource representation for a job in a project. @@ -704,7 +743,7 @@ message UpdateJobRequest { // A list of jobs in a project. message ListJobsResponse { - // Output-only. Jobs list. + // Output only. Jobs list. repeated Job jobs = 1; // Optional. This token is included in the response if there are more results diff --git a/google/cloud/dataproc/v1/operations.proto b/google/cloud/dataproc/v1/operations.proto index aeca8c8b9..c820cd8e6 100644 --- a/google/cloud/dataproc/v1/operations.proto +++ b/google/cloud/dataproc/v1/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,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.v1; import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; @@ -26,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "OperationsProto"; option java_package = "com.google.cloud.dataproc.v1"; - // The status of the operation. message ClusterOperationStatus { // The operation state. @@ -44,42 +42,42 @@ message ClusterOperationStatus { DONE = 3; } - // Output-only. A message containing the operation state. + // Output only. A message containing the operation state. State state = 1; - // Output-only. A message containing the detailed operation state. + // Output only. A message containing the detailed operation state. string inner_state = 2; - // Output-only.A message containing any operation metadata details. + // Output only. A message containing any operation metadata details. string details = 3; - // Output-only. The time this state was entered. + // Output only. The time this state was entered. google.protobuf.Timestamp state_start_time = 4; } // Metadata describing the operation. message ClusterOperationMetadata { - // Output-only. Name of the cluster for the operation. + // Output only. Name of the cluster for the operation. string cluster_name = 7; - // Output-only. Cluster UUID for the operation. + // Output only. Cluster UUID for the operation. string cluster_uuid = 8; - // Output-only. Current operation status. + // Output only. Current operation status. ClusterOperationStatus status = 9; - // Output-only. The previous operation status. + // Output only. The previous operation status. repeated ClusterOperationStatus status_history = 10; - // Output-only. The operation type. + // Output only. The operation type. string operation_type = 11; - // Output-only. Short description of operation. + // Output only. Short description of operation. string description = 12; - // Output-only. Labels associated with the operation + // Output only. Labels associated with the operation map labels = 13; - // Output-only. Errors encountered during operation execution. + // Output only. Errors encountered during operation execution. repeated string warnings = 14; } diff --git a/google/cloud/dataproc/v1/shared.proto b/google/cloud/dataproc/v1/shared.proto new file mode 100644 index 000000000..74bd56a80 --- /dev/null +++ b/google/cloud/dataproc/v1/shared.proto @@ -0,0 +1,43 @@ +// 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.dataproc.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; +option java_multiple_files = true; +option java_outer_classname = "SharedProto"; +option java_package = "com.google.cloud.dataproc.v1"; + +// Cluster components that can be activated. +enum Component { + // Unspecified component. + COMPONENT_UNSPECIFIED = 0; + + // The Anaconda python distribution. + ANACONDA = 5; + + // The Hive Web HCatalog (the REST service for accessing HCatalog). + HIVE_WEBHCAT = 3; + + // The Jupyter Notebook. + JUPYTER = 1; + + // The Zeppelin notebook. + ZEPPELIN = 4; +} diff --git a/google/cloud/dataproc/v1/workflow_templates.proto b/google/cloud/dataproc/v1/workflow_templates.proto new file mode 100644 index 000000000..61295a550 --- /dev/null +++ b/google/cloud/dataproc/v1/workflow_templates.proto @@ -0,0 +1,661 @@ +// 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.dataproc.v1; + +import "google/api/annotations.proto"; +import "google/cloud/dataproc/v1/clusters.proto"; +import "google/cloud/dataproc/v1/jobs.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; +option java_multiple_files = true; +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. +service WorkflowTemplateService { + // Creates new workflow template. + rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/workflowTemplates" + body: "template" + additional_bindings { + post: "/v1/{parent=projects/*/regions/*}/workflowTemplates" + body: "template" + } + }; + } + + // Retrieves the latest workflow template. + // + // Can retrieve previously instantiated template by specifying optional + // version parameter. + rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) returns (WorkflowTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" + additional_bindings { + get: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" + } + }; + } + + // Instantiates a template and begins execution. + // + // The returned Operation can be used to track execution of + // workflow by polling + // [operations.get][google.longrunning.Operations.GetOperation]. + // The Operation will complete when entire workflow is finished. + // + // The running workflow can be aborted via + // [operations.cancel][google.longrunning.Operations.CancelOperation]. + // This will cause any inflight jobs to be cancelled and workflow-owned + // clusters to be deleted. + // + // The [Operation.metadata][google.longrunning.Operation.metadata] will be + // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata]. + // + // On successful completion, + // [Operation.response][google.longrunning.Operation.response] will be + // [Empty][google.protobuf.Empty]. + rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/workflowTemplates/*}:instantiate" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/regions/*/workflowTemplates/*}:instantiate" + body: "*" + } + }; + } + + // Instantiates a template and begins execution. + // + // This method is equivalent to executing the sequence + // [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], + // [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. + // + // The returned Operation can be used to track execution of + // workflow by polling + // [operations.get][google.longrunning.Operations.GetOperation]. + // The Operation will complete when entire workflow is finished. + // + // The running workflow can be aborted via + // [operations.cancel][google.longrunning.Operations.CancelOperation]. + // This will cause any inflight jobs to be cancelled and workflow-owned + // clusters to be deleted. + // + // The [Operation.metadata][google.longrunning.Operation.metadata] will be + // [WorkflowMetadata][google.cloud.dataproc.v1.WorkflowMetadata]. + // + // On successful completion, + // [Operation.response][google.longrunning.Operation.response] will be + // [Empty][google.protobuf.Empty]. + rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" + body: "template" + additional_bindings { + post: "/v1/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline" + body: "template" + } + }; + } + + // Updates (replaces) workflow template. The updated template + // must contain version that matches the current server version. + rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) returns (WorkflowTemplate) { + option (google.api.http) = { + put: "/v1/{template.name=projects/*/locations/*/workflowTemplates/*}" + body: "template" + additional_bindings { + put: "/v1/{template.name=projects/*/regions/*/workflowTemplates/*}" + body: "template" + } + }; + } + + // Lists workflows that match the specified filter in the request. + rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/workflowTemplates" + additional_bindings { + get: "/v1/{parent=projects/*/regions/*}/workflowTemplates" + } + }; + } + + // Deletes a workflow template. It does not cancel in-progress workflows. + rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" + additional_bindings { + delete: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" + } + }; + } +} + +// A Cloud 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; + + // 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; + + // Optional. Used to perform a consistent read-modify-write. + // + // This field should be left blank for a `CreateWorkflowTemplate` request. It + // is required for an `UpdateWorkflowTemplate` request, and must match the + // current server version. A typical update template flow would fetch the + // current template with a `GetWorkflowTemplate` request, which will return + // 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; + + // Output only. The time template was created. + google.protobuf.Timestamp create_time = 4; + + // Output only. The time template was last updated. + google.protobuf.Timestamp update_time = 5; + + // Optional. The labels to associate with this template. These labels + // will be propagated to all jobs and clusters created by the workflow + // instance. + // + // Label **keys** must contain 1 to 63 characters, and must conform to + // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + // + // Label **values** may be empty, but, if present, must contain 1 to 63 + // characters, and must conform to + // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + // + // No more than 32 labels can be associated with a template. + map labels = 6; + + // Required. WorkflowTemplate scheduling information. + WorkflowTemplatePlacement placement = 7; + + // Required. The Directed Acyclic Graph of Jobs to submit. + repeated OrderedJob jobs = 8; + + // 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; +} + +// Specifies workflow execution target. +// +// Either `managed_cluster` or `cluster_selector` is required. +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. + ManagedCluster managed_cluster = 1; + + // Optional. A selector that chooses target cluster for jobs based + // on metadata. + // + // The selector is evaluated at the time each job is submitted. + ClusterSelector cluster_selector = 2; + } +} + +// Cluster that is managed by the workflow. +message ManagedCluster { + // Required. The cluster name prefix. A unique cluster name will be formed by + // appending a random suffix. + // + // 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; + + // Required. The cluster configuration. + ClusterConfig config = 3; + + // Optional. The labels to associate with this cluster. + // + // Label keys must be between 1 and 63 characters long, 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 1 and 63 characters long, and must conform to + // 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; +} + +// A selector that chooses target cluster for jobs based on metadata. +message ClusterSelector { + // Optional. The zone where workflow process executes. This parameter does not + // affect the selection of the cluster. + // + // If unspecified, the zone of the first cluster matching the selector + // is used. + string zone = 1; + + // Required. The cluster labels. Cluster must have all labels + // to match. + map cluster_labels = 2; +} + +// A job executed by the workflow. +message OrderedJob { + // Required. The step id. The id must be unique among all jobs + // within the template. + // + // The step id is used as prefix for job id, as job + // `goog-dataproc-workflow-step-id` label, and in + // [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other + // steps. + // + // 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; + + // 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. + SparkSqlJob spark_sql_job = 7; + } + + // Optional. The labels to associate with this job. + // + // Label keys must be between 1 and 63 characters long, and must conform to + // the following regular expression: + // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // + // Label values must be between 1 and 63 characters long, and must conform to + // 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; + + // Optional. Job scheduling configuration. + JobScheduling scheduling = 9; + + // 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; +} + +// A configurable parameter that replaces one or more fields in the template. +// Parameterizable fields: +// - Labels +// - File uris +// - Job properties +// - Job arguments +// - Script variables +// - Main class (in HadoopJob and SparkJob) +// - Zone (in ClusterSelector) +message TemplateParameter { + // 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; + + // Required. Paths to all fields that the parameter replaces. + // A field is allowed to appear in at most one parameter's list of field + // paths. + // + // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. + // For example, a field path that references the zone field of a workflow + // template's cluster selector would be specified as + // `placement.clusterSelector.zone`. + // + // Also, field paths can reference fields using the following syntax: + // + // * Values in maps can be referenced by key: + // * labels['key'] + // * placement.clusterSelector.clusterLabels['key'] + // * placement.managedCluster.labels['key'] + // * placement.clusterSelector.clusterLabels['key'] + // * jobs['step-id'].labels['key'] + // + // * Jobs in the jobs list can be referenced by step-id: + // * jobs['step-id'].hadoopJob.mainJarFileUri + // * jobs['step-id'].hiveJob.queryFileUri + // * jobs['step-id'].pySparkJob.mainPythonFileUri + // * jobs['step-id'].hadoopJob.jarFileUris[0] + // * jobs['step-id'].hadoopJob.archiveUris[0] + // * jobs['step-id'].hadoopJob.fileUris[0] + // * jobs['step-id'].pySparkJob.pythonFileUris[0] + // + // * Items in repeated fields can be referenced by a zero-based index: + // * jobs['step-id'].sparkJob.args[0] + // + // * Other examples: + // * jobs['step-id'].hadoopJob.properties['key'] + // * jobs['step-id'].hadoopJob.args[0] + // * jobs['step-id'].hiveJob.scriptVariables['key'] + // * jobs['step-id'].hadoopJob.mainJarFileUri + // * placement.clusterSelector.zone + // + // It may not be possible to parameterize maps and repeated fields in their + // entirety since only individual map values and individual items in repeated + // fields can be referenced. For example, the following field paths are + // invalid: + // + // - placement.clusterSelector.clusterLabels + // - jobs['step-id'].sparkJob.args + repeated string fields = 2; + + // Optional. Brief description of the parameter. + // Must not exceed 1024 characters. + string description = 3; + + // Optional. Validation rules to be applied to this parameter's value. + ParameterValidation validation = 4; +} + +// Configuration for parameter validation. +message ParameterValidation { + // Required. The type of validation to be performed. + oneof validation_type { + // Validation based on regular expressions. + RegexValidation regex = 1; + + // Validation based on a list of allowed values. + ValueValidation values = 2; + } +} + +// Validation based on regular expressions. +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; +} + +// Validation based on a list of allowed values. +message ValueValidation { + // Required. List of allowed values for the parameter. + repeated string values = 1; +} + +// A Cloud Dataproc workflow template resource. +message WorkflowMetadata { + // The operation state. + enum State { + // Unused. + UNKNOWN = 0; + + // The operation has been created. + PENDING = 1; + + // The operation is running. + RUNNING = 2; + + // The operation is done; either cancelled or completed. + DONE = 3; + } + + // Output only. The "resource name" of the template. + string template = 1; + + // Output only. The version of template at the time of + // workflow instantiation. + int32 version = 2; + + // Output only. The create cluster operation metadata. + ClusterOperation create_cluster = 3; + + // Output only. The workflow graph. + WorkflowGraph graph = 4; + + // Output only. The delete cluster operation metadata. + ClusterOperation delete_cluster = 5; + + // Output only. The workflow state. + State state = 6; + + // Output only. The name of the target cluster. + string cluster_name = 7; + + // 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; + + // Output only. Workflow end time. + google.protobuf.Timestamp end_time = 10; + + // Output only. The UUID of target cluster. + string cluster_uuid = 11; +} + +// The cluster operation triggered by a workflow. +message ClusterOperation { + // Output only. The id of the cluster operation. + string operation_id = 1; + + // Output only. Error, if operation failed. + string error = 2; + + // Output only. Indicates the operation is done. + bool done = 3; +} + +// The workflow graph. +message WorkflowGraph { + // Output only. The workflow nodes. + repeated WorkflowNode nodes = 1; +} + +// The workflow node. +message WorkflowNode { + // The workflow node state. + enum NodeState { + // State is unspecified. + NODE_STATE_UNSPECIFIED = 0; + + // The node is awaiting prerequisite node to finish. + BLOCKED = 1; + + // The node is runnable but not running. + RUNNABLE = 2; + + // The node is running. + RUNNING = 3; + + // The node completed successfully. + COMPLETED = 4; + + // The node failed. A node can be marked FAILED because + // its ancestor or peer failed. + FAILED = 5; + } + + // Output only. The name of the node. + string step_id = 1; + + // Output only. Node's prerequisite nodes. + repeated string prerequisite_step_ids = 2; + + // Output only. The job id; populated after the node enters RUNNING state. + string job_id = 3; + + // Output only. The node state. + NodeState state = 5; + + // Output only. The error detail. + string error = 6; +} + +// 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 Dataproc workflow template to create. + WorkflowTemplate template = 2; +} + +// 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; + + // Optional. The version of workflow template to retrieve. Only previously + // instatiated versions can be retrieved. + // + // If unspecified, retrieves the current version. + int32 version = 2; +} + +// 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; + + // Optional. The version of workflow template to instantiate. If specified, + // the workflow will be instantiated only if the current version of + // the workflow template has the supplied version. + // + // This option cannot be used to instantiate a previous version of + // workflow template. + int32 version = 2; + + // Optional. A tag that prevents multiple concurrent workflow + // instances with the same tag from running. This mitigates risk of + // concurrent instances started due to retries. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; + + // Optional. Map from parameter names to values that should be used for those + // parameters. Values may not exceed 100 characters. + map parameters = 6; +} + +// 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 workflow template to instantiate. + WorkflowTemplate template = 2; + + // Optional. A tag that prevents multiple concurrent workflow + // instances with the same tag from running. This mitigates risk of + // concurrent instances started due to retries. + // + // It is recommended to always set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // 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; +} + +// A request to update a workflow template. +message UpdateWorkflowTemplateRequest { + // Required. The updated workflow template. + // + // The `template.version` field must match the current version. + WorkflowTemplate template = 1; +} + +// 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; + + // Optional. The maximum number of results to return in each response. + int32 page_size = 2; + + // Optional. The page token, returned by a previous call, to request the + // next page of results. + string page_token = 3; +} + +// A response to a request to list workflow templates in a project. +message ListWorkflowTemplatesResponse { + // Output only. WorkflowTemplates list. + repeated WorkflowTemplate templates = 1; + + // 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; +} + +// 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; + + // 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; +} diff --git a/google/cloud/dataproc/v1beta2/BUILD.bazel b/google/cloud/dataproc/v1beta2/BUILD.bazel new file mode 100644 index 000000000..9c73c96c8 --- /dev/null +++ b/google/cloud/dataproc/v1beta2/BUILD.bazel @@ -0,0 +1,160 @@ +# 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 = "dataproc_proto", + srcs = [ + "autoscaling_policies.proto", + "clusters.proto", + "jobs.proto", + "operations.proto", + "shared.proto", + "workflow_templates.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "dataproc_proto_with_info", + deps = [":dataproc_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 = "dataproc_java_proto", + deps = [":dataproc_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.dataproc.v1beta2.ClusterControllerClientTest", + "com.google.cloud.dataproc.v1beta2.JobControllerClientTest", + "com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClientTest", +]] + +# Opensource 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 = [ + ":dataproc_java_proto", + ":dataproc_proto", + ":dataproc_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 = "dataproc_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2", + protos = [":dataproc_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":dataproc_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "dataproc_go_gapic_test", + srcs = [":dataproc_go_gapic_srcjar_test"], + embed = [":dataproc_go_gapic"], + importpath = "cloud.google.com/go/dataproc/apiv1beta2", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/dataproc/v1beta2/autoscaling_policies.proto b/google/cloud/dataproc/v1beta2/autoscaling_policies.proto new file mode 100644 index 000000000..0c3efbd06 --- /dev/null +++ b/google/cloud/dataproc/v1beta2/autoscaling_policies.proto @@ -0,0 +1,276 @@ +// 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.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/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"; + +// The API interface for managing autoscaling policies in the +// Google Cloud Dataproc API. +service AutoscalingPolicyService { + // Creates new autoscaling policy. + rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + option (google.api.http) = { + post: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" + body: "policy" + additional_bindings { + post: "/v1beta2/{parent=projects/*/regions/*}/autoscalingPolicies" + body: "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: "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" + body: "policy" + additional_bindings { + put: "/v1beta2/{policy.name=projects/*/regions/*/autoscalingPolicies/*}" + body: "policy" + } + }; + } + + // Retrieves autoscaling policy. + rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" + additional_bindings { + get: "/v1beta2/{name=projects/*/regions/*/autoscalingPolicies/*}" + } + }; + } + + // Lists autoscaling policies in the project. + rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" + additional_bindings { + get: "/v1beta2/{parent=projects/*/regions/*}/autoscalingPolicies" + } + }; + } + + // 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: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" + additional_bindings { + delete: "/v1beta2/{name=projects/*/regions/*/autoscalingPolicies/*}" + } + }; + } +} + +// Describes an autoscaling policy for Dataproc cluster autoscaler. +message AutoscalingPolicy { + // 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 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; + + // Required. Autoscaling algorithm for policy. + oneof algorithm { + BasicAutoscalingAlgorithm basic_algorithm = 3; + } + + // Required. Describes how the autoscaler will operate for primary workers. + InstanceGroupAutoscalingPolicyConfig worker_config = 4; + + // Optional. Describes how the autoscaler will operate for secondary workers. + InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5; +} + +// Basic algorithm for autoscaling. +message BasicAutoscalingAlgorithm { + // Required. YARN autoscaling configuration. + BasicYarnAutoscalingConfig yarn_config = 1; + + // 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; +} + +// 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; + + // 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; + + // 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; + + // 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; + + // 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; +} + +// 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; + + // Optional. 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, ). Required. + // Secondary workers - Bounds: [min_instances, ). Default: 0. + int32 max_instances = 2; + + // 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; +} + +// 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; +} + +// 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; +} + +// A request to update an autoscaling policy. +message UpdateAutoscalingPolicyRequest { + // Required. The updated autoscaling policy. + AutoscalingPolicy policy = 1; +} + +// 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 of the form + // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`. + string name = 1; +} + +// 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; + + // Optional. The maximum number of results to return in each response. + int32 page_size = 2; + + // Optional. The page token, returned by a previous call, to request the + // next page of results. + string page_token = 3; +} + +// A response to a request to list autoscaling policies in a project. +message ListAutoscalingPoliciesResponse { + // Output only. Autoscaling policies list. + repeated AutoscalingPolicy policies = 1; + + // Output only. This token is included in the response if there are more + // results to fetch. + string next_page_token = 2; +} diff --git a/google/cloud/dataproc/v1beta2/clusters.proto b/google/cloud/dataproc/v1beta2/clusters.proto index 0fb03e3f7..d3bed6b3f 100644 --- a/google/cloud/dataproc/v1beta2/clusters.proto +++ b/google/cloud/dataproc/v1beta2/clusters.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.dataproc.v1beta2; import "google/api/annotations.proto"; +import "google/cloud/dataproc/v1beta2/operations.proto"; import "google/cloud/dataproc/v1beta2/shared.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; @@ -28,7 +30,6 @@ option java_multiple_files = true; option java_outer_classname = "ClustersProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; - // The ClusterControllerService provides methods to manage clusters // of Compute Engine instances. service ClusterController { @@ -98,8 +99,9 @@ message Cluster { // Label **keys** must contain 1 to 63 characters, and must conform to // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // Label **values** may be empty, but, if present, must contain 1 to 63 - // 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. + // 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; // Output only. Cluster status. @@ -112,24 +114,27 @@ message Cluster { // generates this value when it creates the cluster. string cluster_uuid = 6; - // 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. + // **Beta Feature**: This report is available for testing purposes only. It + // may be changed before final release. ClusterMetrics metrics = 9; } // The cluster config. message ClusterConfig { - // Optional. A Cloud Storage staging bucket used for sharing generated - // SSH keys and config. If you do not specify a staging bucket, Cloud - // Dataproc will determine an appropriate Cloud Storage location (US, + // Optional. A Google 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 - // Compute Engine zone where your cluster is deployed, and then it will create - // and manage this project-level, per-location bucket for you. + // 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; - // Required. The shared Compute Engine config settings for + // Optional. The shared Compute Engine config settings for // all instances in a cluster. GceClusterConfig gce_cluster_config = 8; @@ -154,15 +159,62 @@ message ClusterConfig { // Optional. Commands to execute on each node after config is // completed. By default, executables are run on master and all worker nodes. // You can test a node's role metadata to run an executable on - // a master or worker node, as shown below using `curl` (you can also use `wget`): + // a master or worker node, as shown below using `curl` (you can also use + // `wget`): // - // ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) + // ROLE=$(curl -H Metadata-Flavor:Google + // http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) // if [[ "${ROLE}" == 'Master' ]]; then // ... master specific actions ... // else // ... worker specific actions ... // fi repeated NodeInitializationAction initialization_actions = 11; + + // Optional. Encryption settings for the cluster. + EncryptionConfig encryption_config = 15; + + // Optional. Autoscaling config for the policy associated with the cluster. + // Cluster does not autoscale if this field is unset. + AutoscalingConfig autoscaling_config = 16; + + // Optional. Port/endpoint configuration for this cluster + EndpointConfig endpoint_config = 17; + + // Optional. Security related configuration. + SecurityConfig security_config = 18; +} + +// 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; + + // Optional. If true, enable http access to specific ports on the cluster + // from external sources. Defaults to false. + bool enable_http_port_access = 2; +} + +// 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 Cloud Dataproc region. + string policy_uri = 1; +} + +// 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; } // Common config settings for resources of Compute Engine cluster @@ -199,17 +251,17 @@ message GceClusterConfig { // // A full URL, partial URI, or short name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0` - // * `projects/[project_id]/regions/us-east1/sub0` + // * `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; // Optional. If true, all instances in the cluster will only have internal IP - // addresses. By default, clusters are not restricted to internal IP addresses, - // and will have ephemeral external IP addresses assigned to each 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. + // addresses. By default, clusters are not restricted to internal IP + // addresses, and will have ephemeral external IP addresses assigned to each + // 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; // Optional. The service account of the instances. Defaults to the default @@ -219,7 +271,8 @@ message GceClusterConfig { // * roles/logging.logWriter // * roles/storage.objectAdmin // - // (see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts + // (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; @@ -245,8 +298,12 @@ message GceClusterConfig { 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)). + // [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; } // Optional. The config settings for Compute Engine resources in @@ -260,8 +317,9 @@ message InstanceGroupConfig { // from `cluster_name`, `num_instances`, and the instance group. repeated string instance_names = 2; - // Output only. The Compute Engine image resource used for cluster - // instances. Inferred from `SoftwareConfig.image_version`. + // 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 machine type used for cluster instances. @@ -273,7 +331,8 @@ message InstanceGroupConfig { // * `n1-standard-2` // // **Auto Zone Exception**: If you are using the Cloud Dataproc - // [Auto Zone Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // [Auto Zone + // Placement](/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; @@ -281,7 +340,8 @@ message InstanceGroupConfig { // Optional. Disk option config settings. DiskConfig disk_config = 5; - // Optional. Specifies that this instance group contains preemptible instances. + // Optional. Specifies that this instance group contains preemptible + // instances. bool is_preemptible = 6; // Output only. The config for Compute Engine Instance Group @@ -316,8 +376,9 @@ message ManagedGroupConfig { // of an instance group (see [GPUs on Compute Engine](/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) + // expose to this instance. See + // [Compute Engine + // AcceleratorTypes](/compute/docs/reference/beta/acceleratorTypes) // // Examples // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` @@ -325,7 +386,8 @@ message AcceleratorConfig { // * `nvidia-tesla-k80` // // **Auto Zone Exception**: If you are using the Cloud Dataproc - // [Auto Zone Placement](/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) + // [Auto Zone + // Placement](/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; @@ -353,10 +415,14 @@ message DiskConfig { int32 num_local_ssds = 2; } -// Specifies the cluster auto delete related schedule configuration. +// Specifies the cluster auto-delete schedule configuration. message LifecycleConfig { - // Optional. The longest duration that cluster would keep alive while staying - // idle; passing this threshold will cause cluster to be auto-deleted. + // 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 @@ -365,12 +431,85 @@ message LifecycleConfig { // Optional. The time when cluster will be auto-deleted. google.protobuf.Timestamp auto_delete_time = 2; - // Optional. The life duration of cluster, the cluster will be auto-deleted - // at the end of this duration. + // 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; } } +// Security related configuration, including encryption, Kerberos, etc. +message SecurityConfig { + // Kerberos related configuration. + KerberosConfig kerberos_config = 1; +} + +// Specifies Kerberos related configuration. +message KerberosConfig { + // Optional. Flag to indicate whether to Kerberize the cluster. + bool enable_kerberos = 1; + + // Required. The Cloud Storage URI of a KMS encrypted file containing the root + // principal password. + string root_principal_password_uri = 2; + + // Required. The uri of the KMS key used to encrypt various sensitive + // files. + string kms_key_uri = 3; + + // 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; + + // 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; + + // 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; + + // 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; + + // 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; + + // Optional. The remote realm the Dataproc on-cluster KDC will trust, should + // the user enable cross realm trust. + string cross_realm_trust_realm = 9; + + // Optional. The KDC (IP or hostname) for the remote trusted realm in a cross + // realm trust relationship. + string cross_realm_trust_kdc = 10; + + // 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; + + // 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; + + // Optional. The Cloud Storage URI of a KMS encrypted file containing the + // master key of the KDC database. + string kdc_db_key_uri = 13; + + // 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; +} + // Specifies an executable to run on a fully configured node and a // timeout period for executable completion. message NodeInitializationAction { @@ -442,17 +581,19 @@ message ClusterStatus { // 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), + // 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), // 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). - // If unspecified, it defaults to the latest version. + // ["preview" + // version](/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). + // If unspecified, it defaults to the latest Debian version. string image_version = 1; // Optional. The properties to set on daemon config files. // - // Property keys are specified in `prefix:property` format, such as - // `core:fs.defaultFS`. The following are supported prefixes + // Property keys are specified in `prefix:property` format, for example + // `core:hadoop.tmp.dir`. The following are supported prefixes // and their mappings: // // * capacity-scheduler: `capacity-scheduler.xml` @@ -468,6 +609,9 @@ message SoftwareConfig { // For more information, see // [Cluster properties](/dataproc/docs/concepts/cluster-properties). map properties = 2; + + // The set of optional components to activate on the cluster. + repeated Component optional_components = 3; } // Contains cluster daemon metrics, such as HDFS and YARN stats. @@ -547,9 +691,10 @@ message UpdateClusterRequest { // } // } // - // Similarly, to change the number of preemptible workers in a cluster to 5, the - // `update_mask` parameter would be `config.secondary_worker_config.num_instances`, - // and the `PATCH` request body would be set as follows: + // Similarly, to change the number of preemptible workers in a cluster to 5, + // the `update_mask` parameter would be + // `config.secondary_worker_config.num_instances`, and the `PATCH` request + // body would be set as follows: // // { // "config":{ @@ -568,19 +713,28 @@ message UpdateClusterRequest { // labelsUpdates labels // // - // config.worker_config.num_instancesResize primary worker group + // config.worker_config.num_instancesResize primary worker + // group + // + // + // config.secondary_worker_config.num_instancesResize secondary + // worker group // // - // config.secondary_worker_config.num_instancesResize secondary worker group + // config.lifecycle_config.auto_delete_ttlReset MAX TTL + // duration // // - // config.lifecycle_config.auto_delete_ttlReset MAX TTL duration + // config.lifecycle_config.auto_delete_timeUpdate MAX TTL + // deletion timestamp // // - // config.lifecycle_config.auto_delete_timeUpdate MAX TTL deletion timestamp + // config.lifecycle_config.idle_delete_ttlUpdate Idle TTL + // duration // // - // config.lifecycle_config.idle_delete_ttlUpdate Idle TTL duration + // config.autoscaling_config.policy_uriUse, stop using, or change + // autoscaling policies // // google.protobuf.FieldMask update_mask = 4; @@ -710,3 +864,30 @@ message DiagnoseClusterResults { // diagnostics. string output_uri = 1; } + +// 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; + + // Optional. Corresponds to the label key of reservation resource. + string key = 2; + + // Optional. Corresponds to the label values of reservation resource. + repeated string values = 3; +} diff --git a/google/cloud/dataproc/v1beta2/dataproc.yaml b/google/cloud/dataproc/v1beta2/dataproc.yaml index 67a40809a..af68853d5 100644 --- a/google/cloud/dataproc/v1beta2/dataproc.yaml +++ b/google/cloud/dataproc/v1beta2/dataproc.yaml @@ -4,6 +4,7 @@ name: dataproc.googleapis.com title: Google 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 diff --git a/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml index 2aecbd8c0..576bfc8e2 100644 --- a/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml +++ b/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml @@ -17,15 +17,159 @@ language_settings: nodejs: package_name: dataproc.v1beta2 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. +# 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. + 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. @@ -48,10 +192,12 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE + - INTERNAL - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent - retry_codes: [] + retry_codes: + - UNAVAILABLE # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -78,19 +224,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # - # 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. @@ -132,39 +265,45 @@ interfaces: - project_id - region - cluster - request_object_method: true 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: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + 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 - request_object_method: true 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: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + total_poll_timeout_millis: 900000 - name: DeleteCluster flattening: groups: @@ -176,19 +315,18 @@ interfaces: - project_id - region - cluster_name - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 30000 long_running: return_type: google.protobuf.Empty metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata - implements_delete: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 max_poll_delay_millis: 10000 - total_poll_timeout_millis: 300000 + total_poll_timeout_millis: 900000 - name: GetCluster flattening: groups: @@ -200,7 +338,6 @@ interfaces: - project_id - region - cluster_name - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -210,10 +347,13 @@ interfaces: - parameters: - project_id - region + - parameters: + - project_id + - region + - filter required_fields: - project_id - region - request_object_method: true page_streaming: request: page_size_field: page_size @@ -235,14 +375,13 @@ interfaces: - project_id - region - cluster_name - request_object_method: true 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: true + implements_delete: false implements_cancel: false initial_poll_delay_millis: 1000 poll_delay_multiplier: 2 @@ -265,10 +404,12 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE - name: non_idempotent - retry_codes: [] + retry_codes: + - UNAVAILABLE # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -295,19 +436,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # - # 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. @@ -349,7 +477,6 @@ interfaces: - project_id - region - job - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 @@ -364,20 +491,22 @@ interfaces: - project_id - region - job_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 30000 - name: ListJobs flattening: groups: - parameters: - project_id - region + - parameters: + - project_id + - region + - filter required_fields: - project_id - region - request_object_method: true page_streaming: request: page_size_field: page_size @@ -395,7 +524,6 @@ interfaces: - job_id - job - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 @@ -410,8 +538,7 @@ interfaces: - project_id - region - job_id - request_object_method: true - retry_codes_name: non_idempotent + retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 - name: DeleteJob @@ -425,8 +552,7 @@ interfaces: - project_id - region - job_id - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 # The fully qualified name of the API interface. @@ -450,10 +576,12 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - INTERNAL + - UNAVAILABLE - name: non_idempotent - retry_codes: [] + retry_codes: + - UNAVAILABLE # Definition for retry/backoff parameters. retry_params_def: - name: default @@ -480,19 +608,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # - # 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. @@ -532,13 +647,11 @@ interfaces: required_fields: - parent - template - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - resource_name_treatment: STATIC_TYPES field_name_patterns: parent: region - timeout_millis: 60000 + timeout_millis: 30000 - name: GetWorkflowTemplate flattening: groups: @@ -546,10 +659,8 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default - resource_name_treatment: STATIC_TYPES field_name_patterns: name: workflow_template timeout_millis: 60000 @@ -558,21 +669,44 @@ interfaces: groups: - parameters: - name - - instance_id + - parameters: + - name + - parameters required_fields: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - resource_name_treatment: STATIC_TYPES 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: true - implements_cancel: true + 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 @@ -584,9 +718,10 @@ interfaces: - template required_fields: - template - request_object_method: false - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default + field_name_patterns: + template.name: workflow_template timeout_millis: 60000 - name: ListWorkflowTemplates flattening: @@ -595,7 +730,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -605,7 +739,6 @@ interfaces: resources_field: templates retry_codes_name: idempotent retry_params_name: default - resource_name_treatment: STATIC_TYPES field_name_patterns: parent: region timeout_millis: 60000 @@ -616,14 +749,27 @@ interfaces: - name required_fields: - name - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default - resource_name_treatment: STATIC_TYPES 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 @@ -636,6 +782,9 @@ resource_name_generation: - 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 diff --git a/google/cloud/dataproc/v1beta2/jobs.proto b/google/cloud/dataproc/v1beta2/jobs.proto index d5635583e..4d888dafc 100644 --- a/google/cloud/dataproc/v1beta2/jobs.proto +++ b/google/cloud/dataproc/v1beta2/jobs.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"; @@ -26,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "JobsProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; - // The JobController provides methods to manage jobs. service JobController { // Submits a job to a cluster. @@ -61,7 +61,8 @@ 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) or + // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) + // or // [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). rpc CancelJob(CancelJobRequest) returns (Job) { option (google.api.http) = { @@ -121,8 +122,10 @@ message LoggingConfig { } // A Cloud 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 YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). +// [Apache Hadoop +// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) +// jobs on [Apache Hadoop +// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). message HadoopJob { // Required. Indicates the location of the driver's main class. Specify // either the jar file that contains the main class or the main class name. @@ -142,8 +145,8 @@ message HadoopJob { } // Optional. The arguments to pass to the driver. Do not - // 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 + // 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; @@ -177,7 +180,8 @@ 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`. + // `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; @@ -216,7 +220,8 @@ message SparkJob { } // A Cloud Dataproc job for running -// [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) +// [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 @@ -287,8 +292,8 @@ 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. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. bool continue_on_failure = 3; // Optional. Mapping of query variable names to values (equivalent to the @@ -307,8 +312,8 @@ message HiveJob { repeated string jar_file_uris = 6; } -// A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/) -// queries. +// A Cloud 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 // either an HCFS file URI or as a list of queries. @@ -350,8 +355,8 @@ 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. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. bool continue_on_failure = 3; // Optional. Mapping of query variable names to values (equivalent to the Pig @@ -372,6 +377,38 @@ message PigJob { LoggingConfig logging_config = 7; } +// A Cloud 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; + + // 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; + + // 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; + + // 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; + + // 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 + // overwritten. Can include properties set in + // /etc/spark/conf/spark-defaults.conf and classes in user code. + map properties = 5; + + // Optional. The runtime log config for job execution. + LoggingConfig logging_config = 6; +} + // Cloud Dataproc job config. message JobPlacement { // Required. The name of the cluster where the job will be submitted. @@ -468,11 +505,12 @@ message JobReference { // belongs to. string project_id = 1; - // Optional. The job ID, which must be unique within the project. The job ID - // is generated by the server upon job submission or provided by the user as a - // means to perform retries without creating duplicate jobs. The ID must - // contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or - // hyphens (-). The maximum length is 100 characters. + // 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; } @@ -558,6 +596,9 @@ message Job { // Job is a Pig job. PigJob pig_job = 7; + // Job is a SparkR job. + SparkRJob spark_r_job = 21; + // Job is a SparkSql job. SparkSqlJob spark_sql_job = 12; } @@ -572,10 +613,14 @@ message Job { // 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. + // **Beta** Feature: This report is available for testing purposes only. It + // may be changed before final release. repeated YarnApplication yarn_applications = 9; + // 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; + // Output only. A URI pointing to the location of the stdout of the job's // driver program. string driver_output_resource_uri = 17; @@ -589,12 +634,18 @@ message Job { // Label **keys** must contain 1 to 63 characters, and must conform to // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). // Label **values** may be empty, but, if present, must contain 1 to 63 - // 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. + // 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; // Optional. Job scheduling configuration. JobScheduling scheduling = 20; + + // 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; } // Job scheduling options. diff --git a/google/cloud/dataproc/v1beta2/operations.proto b/google/cloud/dataproc/v1beta2/operations.proto index 8c428dae2..8f9252a46 100644 --- a/google/cloud/dataproc/v1beta2/operations.proto +++ b/google/cloud/dataproc/v1beta2/operations.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"; @@ -24,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "OperationsProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; - // The status of the operation. message ClusterOperationStatus { // The operation state. diff --git a/google/cloud/dataproc/v1beta2/shared.proto b/google/cloud/dataproc/v1beta2/shared.proto index 801708a52..de1130d9c 100644 --- a/google/cloud/dataproc/v1beta2/shared.proto +++ b/google/cloud/dataproc/v1beta2/shared.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"; @@ -23,3 +24,32 @@ option java_multiple_files = true; option java_outer_classname = "SharedProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; +// Cluster components that can be activated. +enum Component { + // Unspecified component. + COMPONENT_UNSPECIFIED = 0; + + // The Anaconda python distribution. + ANACONDA = 5; + + // The Druid query engine. + DRUID = 9; + + // The Hive Web HCatalog (the REST service for accessing HCatalog). + HIVE_WEBHCAT = 3; + + // The Jupyter Notebook. + JUPYTER = 1; + + // The Kerberos security feature. + KERBEROS = 7; + + // The Presto query engine. + PRESTO = 6; + + // The Zeppelin notebook. + ZEPPELIN = 4; + + // The Zookeeper service. + ZOOKEEPER = 8; +} diff --git a/google/cloud/dataproc/v1beta2/workflow_templates.proto b/google/cloud/dataproc/v1beta2/workflow_templates.proto index 4db43168c..edaf357cc 100644 --- a/google/cloud/dataproc/v1beta2/workflow_templates.proto +++ b/google/cloud/dataproc/v1beta2/workflow_templates.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"; @@ -28,7 +29,6 @@ option java_multiple_files = true; 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. service WorkflowTemplateService { @@ -110,10 +110,10 @@ service WorkflowTemplateService { // [Empty][google.protobuf.Empty]. rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline" + post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" body: "template" additional_bindings { - post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" + post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline" body: "template" } }; @@ -160,6 +160,8 @@ message WorkflowTemplate { // 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; // Output only. The "resource name" of the template, as described @@ -203,6 +205,11 @@ message WorkflowTemplate { // Required. The Directed Acyclic Graph of Jobs to submit. repeated OrderedJob jobs = 8; + + // 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; } // Specifies workflow execution target. @@ -319,6 +326,105 @@ message OrderedJob { repeated string prerequisite_step_ids = 10; } +// A configurable parameter that replaces one or more fields in the template. +// Parameterizable fields: +// - Labels +// - File uris +// - Job properties +// - Job arguments +// - Script variables +// - Main class (in HadoopJob and SparkJob) +// - Zone (in ClusterSelector) +message TemplateParameter { + // 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; + + // Required. Paths to all fields that the parameter replaces. + // A field is allowed to appear in at most one parameter's list of field + // paths. + // + // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. + // For example, a field path that references the zone field of a workflow + // template's cluster selector would be specified as + // `placement.clusterSelector.zone`. + // + // Also, field paths can reference fields using the following syntax: + // + // * Values in maps can be referenced by key: + // * labels['key'] + // * placement.clusterSelector.clusterLabels['key'] + // * placement.managedCluster.labels['key'] + // * placement.clusterSelector.clusterLabels['key'] + // * jobs['step-id'].labels['key'] + // + // * Jobs in the jobs list can be referenced by step-id: + // * jobs['step-id'].hadoopJob.mainJarFileUri + // * jobs['step-id'].hiveJob.queryFileUri + // * jobs['step-id'].pySparkJob.mainPythonFileUri + // * jobs['step-id'].hadoopJob.jarFileUris[0] + // * jobs['step-id'].hadoopJob.archiveUris[0] + // * jobs['step-id'].hadoopJob.fileUris[0] + // * jobs['step-id'].pySparkJob.pythonFileUris[0] + // + // * Items in repeated fields can be referenced by a zero-based index: + // * jobs['step-id'].sparkJob.args[0] + // + // * Other examples: + // * jobs['step-id'].hadoopJob.properties['key'] + // * jobs['step-id'].hadoopJob.args[0] + // * jobs['step-id'].hiveJob.scriptVariables['key'] + // * jobs['step-id'].hadoopJob.mainJarFileUri + // * placement.clusterSelector.zone + // + // It may not be possible to parameterize maps and repeated fields in their + // entirety since only individual map values and individual items in repeated + // fields can be referenced. For example, the following field paths are + // invalid: + // + // - placement.clusterSelector.clusterLabels + // - jobs['step-id'].sparkJob.args + repeated string fields = 2; + + // Optional. Brief description of the parameter. + // Must not exceed 1024 characters. + string description = 3; + + // Optional. Validation rules to be applied to this parameter's value. + ParameterValidation validation = 4; +} + +// Configuration for parameter validation. +message ParameterValidation { + // Required. The type of validation to be performed. + oneof validation_type { + // Validation based on regular expressions. + RegexValidation regex = 1; + + // Validation based on a list of allowed values. + ValueValidation values = 2; + } +} + +// Validation based on regular expressions. +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; +} + +// Validation based on a list of allowed values. +message ValueValidation { + // Required. List of allowed values for the parameter. + repeated string values = 1; +} + // A Cloud Dataproc workflow template resource. message WorkflowMetadata { // The operation state. @@ -355,11 +461,20 @@ message WorkflowMetadata { // Output only. The workflow state. State state = 6; - // Output only. The name of the managed cluster. + // Output only. The name of the target cluster. string cluster_name = 7; // 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; + + // Output only. Workflow end time. + google.protobuf.Timestamp end_time = 10; + + // Output only. The UUID of target cluster. + string cluster_uuid = 11; } // The cluster operation triggered by a workflow. @@ -460,6 +575,9 @@ message InstantiateWorkflowTemplateRequest { // workflow template. int32 version = 2; + // Deprecated. Please use `request_id` field instead. + string instance_id = 3 [deprecated = true]; + // Optional. A tag that prevents multiple concurrent workflow // instances with the same tag from running. This mitigates risk of // concurrent instances started due to retries. @@ -469,7 +587,11 @@ 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 instance_id = 3; + string request_id = 5; + + // Optional. Map from parameter names to values that should be used for those + // parameters. Values may not exceed 100 characters. + map parameters = 4; } // A request to instantiate an inline workflow template. @@ -482,6 +604,9 @@ message InstantiateInlineWorkflowTemplateRequest { // Required. The workflow template to instantiate. WorkflowTemplate template = 2; + // Deprecated. Please use `request_id` field instead. + string instance_id = 3; + // Optional. A tag that prevents multiple concurrent workflow // instances with the same tag from running. This mitigates risk of // concurrent instances started due to retries. @@ -491,7 +616,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 instance_id = 3; + string request_id = 4; } // A request to update a workflow template. @@ -522,8 +647,8 @@ message ListWorkflowTemplatesResponse { // Output only. WorkflowTemplates list. repeated WorkflowTemplate templates = 1; - // 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 + // 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; } diff --git a/google/cloud/dialogflow/BUILD.bazel b/google/cloud/dialogflow/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/dialogflow/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/dialogflow/artman_dialogflow_v2.yaml b/google/cloud/dialogflow/artman_dialogflow_v2.yaml index edc57fd3a..c3c4c92c1 100644 --- a/google/cloud/dialogflow/artman_dialogflow_v2.yaml +++ b/google/cloud/dialogflow/artman_dialogflow_v2.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-dialogflow-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-dialogflow-v2 - - name: proto - dest: generated/java/proto-google-cloud-dialogflow-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-dialogflow - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-dialogflow-v2 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml b/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml index 455d68a98..9f13a0416 100644 --- a/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml +++ b/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml @@ -13,18 +13,3 @@ artifacts: type: GAPIC language: JAVA release_level: BETA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-dialogflow - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-dialogflow-v2beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-dialogflow-v2beta1 - - name: proto - dest: generated/java/proto-google-cloud-dialogflow-v2beta1 diff --git a/google/cloud/dialogflow/dialogflow_v2.yaml b/google/cloud/dialogflow/dialogflow_v2.yaml index a89267709..2efbd3fef 100644 --- a/google/cloud/dialogflow/dialogflow_v2.yaml +++ b/google/cloud/dialogflow/dialogflow_v2.yaml @@ -12,26 +12,28 @@ apis: - name: google.cloud.dialogflow.v2.Sessions types: -- name: google.cloud.dialogflow.v2.ExportAgentResponse - name: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse - name: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse +- name: google.cloud.dialogflow.v2.ExportAgentResponse - name: google.cloud.dialogflow.v2.OriginalDetectIntentRequest - name: google.cloud.dialogflow.v2.WebhookRequest - name: google.cloud.dialogflow.v2.WebhookResponse documentation: summary: |- - An end-to-end development suite for conversational interfaces (e.g., - chatbots, voice-powered apps and devices). + 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](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. - For information on how Dialogflow agents, intents, entities, and so on work, - see the [Dialogflow getting started + 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. @@ -47,110 +49,80 @@ documentation: 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. + 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 + 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) backend: rules: - - selector: google.longrunning.Operations.GetOperation - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.GetAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.SearchAgents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.TrainAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.ExportAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.ImportAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Agents.RestoreAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.ListContexts - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.GetContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.CreateContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.UpdateContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.DeleteContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Contexts.DeleteAllContexts - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.GetEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.CreateEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.ListIntents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.GetIntent + - selector: 'google.cloud.dialogflow.v2.Agents.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.CreateIntent + - selector: 'google.cloud.dialogflow.v2.Contexts.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.UpdateIntent + - selector: 'google.cloud.dialogflow.v2.EntityTypes.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.DeleteIntent + - selector: 'google.cloud.dialogflow.v2.Intents.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.BatchUpdateIntents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.Intents.BatchDeleteIntents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType + - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*' deadline: 60.0 - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent deadline: 230.0 - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent deadline: 230.0 - -http: - rules: - - selector: google.longrunning.Operations.GetOperation - get: '/v2beta1/{name=projects/*/operations/*}' - additional_bindings: - - get: '/v2/{name=projects/*/operations/*}' - + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 authentication: rules: - - selector: '*' + - selector: 'google.cloud.dialogflow.v2.Agents.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2.Contexts.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2.EntityTypes.*' + 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: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow diff --git a/google/cloud/dialogflow/dialogflow_v2beta1.yaml b/google/cloud/dialogflow/dialogflow_v2beta1.yaml index 7bc65b931..c526f7614 100644 --- a/google/cloud/dialogflow/dialogflow_v2beta1.yaml +++ b/google/cloud/dialogflow/dialogflow_v2beta1.yaml @@ -6,32 +6,37 @@ title: Dialogflow API apis: - name: google.cloud.dialogflow.v2beta1.Agents - name: google.cloud.dialogflow.v2beta1.Contexts +- name: google.cloud.dialogflow.v2beta1.Documents - name: google.cloud.dialogflow.v2beta1.EntityTypes - name: google.cloud.dialogflow.v2beta1.Intents +- name: google.cloud.dialogflow.v2beta1.KnowledgeBases - name: google.cloud.dialogflow.v2beta1.SessionEntityTypes - name: google.cloud.dialogflow.v2beta1.Sessions types: -- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse - name: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - name: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse +- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse +- name: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - name: google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest - name: google.cloud.dialogflow.v2beta1.WebhookRequest - name: google.cloud.dialogflow.v2beta1.WebhookResponse documentation: summary: |- - An end-to-end development suite for conversational interfaces (e.g., - chatbots, voice-powered apps and devices). + 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](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. - For information on how Dialogflow agents, intents, entities, and so on work, - see the [Dialogflow getting started + 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. @@ -47,110 +52,101 @@ documentation: 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. + 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 + 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) backend: rules: - - selector: google.longrunning.Operations.GetOperation - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.GetAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.SearchAgents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.TrainAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.ExportAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.ImportAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Agents.RestoreAgent - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.ListContexts - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.GetContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.CreateContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.UpdateContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.DeleteContext - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.ListIntents + - selector: 'google.cloud.dialogflow.v2beta1.Agents.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.GetIntent + - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.CreateIntent + - selector: 'google.cloud.dialogflow.v2beta1.Documents.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.UpdateIntent + - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.DeleteIntent + - selector: 'google.cloud.dialogflow.v2beta1.Intents.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents + - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*' deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType - deadline: 60.0 - - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType + - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*' deadline: 60.0 - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent deadline: 230.0 - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent deadline: 230.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 http: rules: - selector: google.longrunning.Operations.GetOperation get: '/v2beta1/{name=projects/*/operations/*}' - additional_bindings: - - get: '/v2/{name=projects/*/operations/*}' - + - selector: google.longrunning.Operations.ListOperations + get: '/v2beta1/{name=projects/*}/operations' authentication: rules: - - selector: '*' + - selector: 'google.cloud.dialogflow.v2beta1.Agents.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2beta1.Documents.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*' + 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: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/dialogflow diff --git a/google/cloud/dialogflow/v2/BUILD.bazel b/google/cloud/dialogflow/v2/BUILD.bazel new file mode 100644 index 000000000..dffd1c7b1 --- /dev/null +++ b/google/cloud/dialogflow/v2/BUILD.bazel @@ -0,0 +1,241 @@ +# 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 = "dialogflow_proto", + srcs = [ + "agent.proto", + "audio_config.proto", + "context.proto", + "entity_type.proto", + "intent.proto", + "session.proto", + "session_entity_type.proto", + "webhook.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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", + ], +) + +proto_library_with_info( + name = "dialogflow_proto_with_info", + deps = [":dialogflow_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 = "dialogflow_java_proto", + deps = [":dialogflow_proto"], +) + +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"], +) + +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"], + 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_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 = [ + ":dialogflow_java_proto", + ":dialogflow_proto", + ":dialogflow_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 = "dialogflow_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2", + protos = [":dialogflow_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + "//google/type:latlng_go_proto", + ], +) + +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", + 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", + ], +) + +go_test( + name = "dialogflow_go_gapic_test", + srcs = [":dialogflow_go_gapic_srcjar_test"], + embed = [":dialogflow_go_gapic"], + importpath = "cloud.google.com/go/dialogflow/apiv2", +) + +# Opensource 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", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_proto_library", + "php_grpc_library", + "php_gapic_library", + "php_gapic_assembly_pkg", +) + +php_proto_library( + name = "dialogflow_php_proto", + deps = [":dialogflow_proto"], +) + +php_grpc_library( + name = "dialogflow_php_grpc", + srcs = [":dialogflow_proto"], + deps = [":dialogflow_php_proto"], +) + +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", + deps = [ + ":dialogflow_php_grpc", + ":dialogflow_php_proto", + ], +) + +# Opensource Packages +php_gapic_assembly_pkg( + name = "google-cloud-dialogflow-v2-php", + deps = [ + ":dialogflow_php_gapic", + ":dialogflow_php_grpc", + ":dialogflow_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_library", + "nodejs_gapic_assembly_pkg", +) + +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", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "dialogflow-v2-nodejs", + deps = [ + ":dialogflow_nodejs_gapic", + ":dialogflow_proto", + ], +) diff --git a/google/cloud/dialogflow/v2/agent.proto b/google/cloud/dialogflow/v2/agent.proto index ec2ed6dab..0ec81e436 100644 --- a/google/cloud/dialogflow/v2/agent.proto +++ b/google/cloud/dialogflow/v2/agent.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"; @@ -20,7 +21,7 @@ import "google/api/annotations.proto"; import "google/longrunning/operations.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"; @@ -30,7 +31,6 @@ option java_outer_classname = "AgentProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // Agents are best described as Natural Language Understanding (NLU) modules // that transform user requests into actionable data. You can include agents // in your app, product, or service to determine user intent and respond to the @@ -43,20 +43,28 @@ option objc_class_prefix = "DF"; // // You can create an agent using both Dialogflow Standard Edition and // Dialogflow Enterprise Edition. For details, see -// [Dialogflow Editions](/dialogflow-enterprise/docs/editions). +// [Dialogflow +// Editions](https://cloud.google.com/dialogflow/docs/editions). // // You can save your agent for backup or versioning by exporting the agent by // using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved // agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method. // // Dialogflow provides several -// [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common -// conversation scenarios such as determining a date and time, converting -// currency, and so on. +// [prebuilt +// agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) +// for common conversation scenarios such as determining a date and time, +// converting currency, and so on. // // For more information about agents, see the -// [Dialogflow documentation](https://dialogflow.com/docs/agents). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/agents-overview). service Agents { + 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"; + // Retrieves the specified agent. rpc GetAgent(GetAgentRequest) returns (Agent) { option (google.api.http) = { @@ -64,6 +72,21 @@ service Agents { }; } + // Creates/updates the specified agent. + rpc SetAgent(SetAgentRequest) returns (Agent) { + option (google.api.http) = { + post: "/v2/{agent.parent=projects/*}/agent" + body: "agent" + }; + } + + // Deletes the specified agent. + rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{parent=projects/*}/agent" + }; + } + // Returns the list of agents. // // Since there is at most one conversational agent per project, this method is @@ -79,8 +102,7 @@ service Agents { // Trains the specified agent. // - // Operation + // Operation rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/agent:train" @@ -90,8 +112,7 @@ service Agents { // Exports the specified agent to a ZIP file. // - // Operation + // Operation rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/agent:export" @@ -105,8 +126,7 @@ service Agents { // Intents and entity types with the same name are replaced with the new // versions from ImportAgentRequest. // - // Operation + // Operation rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/agent:import" @@ -119,8 +139,7 @@ service Agents { // Replaces the current agent version with a new one. All the intents and // entity types in the older version are deleted. // - // Operation + // Operation rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/agent:restore" @@ -145,6 +164,36 @@ message Agent { MATCH_MODE_ML_ONLY = 2; } + // API version for the agent. + enum ApiVersion { + // Not specified. + API_VERSION_UNSPECIFIED = 0; + + // Legacy V1 API. + API_VERSION_V1 = 1; + + // V2 API. + API_VERSION_V2 = 2; + + // V2beta1 API. + API_VERSION_V2_BETA_1 = 3; + } + + // Represents the agent tier. + enum Tier { + // Not specified. This value should never be used. + TIER_UNSPECIFIED = 0; + + // Standard tier. + TIER_STANDARD = 1; + + // Enterprise tier (Essentials). + TIER_ENTERPRISE = 2; + + // Enterprise tier (Plus). + TIER_ENTERPRISE_PLUS = 3; + } + // Required. The project of this agent. // Format: `projects/`. string parent = 1; @@ -153,9 +202,10 @@ message Agent { string display_name = 2; // Required. The default language of the agent as a language tag. See - // [Language Support](https://dialogflow.com/docs/reference/language) for a - // list of the currently supported language codes. - // This field cannot be set by the `Update` method. + // [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; // Optional. The list of all languages supported by this agent (except for the @@ -173,7 +223,9 @@ message Agent { // Optional. The URI of the agent's avatar. // Avatars are used throughout the Dialogflow console and in the self-hosted - // [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration. + // [Web + // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + // integration. string avatar_uri = 7; // Optional. Determines whether this agent should log conversation queries. @@ -185,11 +237,20 @@ message Agent { // Optional. To filter out false positive results and still get variety in // matched natural language inputs for your agent, you can tune the machine // learning classification threshold. If the returned score value is less than - // the threshold value, then a fallback intent is be triggered or, if there + // the threshold value, then a fallback intent will be triggered or, if there // 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; + + // 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; + + // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + Tier tier = 15; } // The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. @@ -199,6 +260,22 @@ message GetAgentRequest { string parent = 1; } +// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. +message SetAgentRequest { + // Required. The agent to update. + Agent agent = 1; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2; +} + +// 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; +} + // The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. message SearchAgentsRequest { // Required. The project to list agents from. @@ -237,9 +314,11 @@ message ExportAgentRequest { // Format: `projects/`. string parent = 1; - // Optional. The Google Cloud Storage URI to export the agent to. - // Note: The URI must start with - // "gs://". If left unspecified, the serialized agent is returned inline. + // Optional. 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; } @@ -254,17 +333,17 @@ message ExportAgentResponse { // 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//agent:export'\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
     //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //   -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 > 
+    // | base64 --decode > <agent zip file>
bytes agent_content = 2; } } @@ -284,17 +363,17 @@ message ImportAgentRequest { // The agent to import. // // Example for how to import an agent via the command line: - // - // curl \ - // 'https://dialogflow.googleapis.com/v2/projects//agent:import\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
     //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //    -H 'Authorization: Bearer '$(gcloud auth application-default
+    //    print-access-token) \
     //    -H 'Accept: application/json' \
     //    -H 'Content-Type: application/json' \
     //    --compressed \
     //    --data-binary "{
-    //       'agentContent': '$(cat  | base64 -w 0)'
-    //    }"
+    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+    //    }"
bytes agent_content = 3; } } @@ -314,17 +393,17 @@ message RestoreAgentRequest { // The agent to restore. // // Example for how to restore an agent via the command line: - // - // curl \ - // 'https://dialogflow.googleapis.com/v2/projects//agent:restore\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
     //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //    -H 'Authorization: Bearer '$(gcloud auth application-default
+    //    print-access-token) \
     //    -H 'Accept: application/json' \
     //    -H 'Content-Type: application/json' \
     //    --compressed \
     //    --data-binary "{
-    //        'agentContent': '$(cat  | base64 -w 0)'
-    //    }" \
+    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+    //    }"
bytes agent_content = 3; } } diff --git a/google/cloud/dialogflow/v2/audio_config.proto b/google/cloud/dialogflow/v2/audio_config.proto new file mode 100644 index 000000000..3a1c600c5 --- /dev/null +++ b/google/cloud/dialogflow/v2/audio_config.proto @@ -0,0 +1,262 @@ +// 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.dialogflow.v2; + +import "google/protobuf/duration.proto"; +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 = "AudioConfigProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +enum AudioEncoding { + // Not specified. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AUDIO_ENCODING_LINEAR_16 = 1; + + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AUDIO_ENCODING_FLAC = 2; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_MULAW = 3; + + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AUDIO_ENCODING_AMR = 4; + + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_AMR_WB = 5; + + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_OGG_OPUS = 6; + + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + 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; + + // 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; + + // 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; +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +enum SpeechModelVariant { + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + USE_BEST_AVAILABLE = 1; + + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + USE_STANDARD = 2; + + // Use an enhanced model variant: + // + // * If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // * If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + USE_ENHANCED = 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. + 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; +} + +// 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 + // 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 = 1; + + // 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 = 2; + + // 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. We 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 = 3; + + // Optional. 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 = 5; + + // Optional. The desired voice of the synthesized audio. + 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. + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + + // MP3 audio. + OUTPUT_AUDIO_ENCODING_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. + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; +} diff --git a/google/cloud/dialogflow/v2/context.proto b/google/cloud/dialogflow/v2/context.proto index 2d1798e02..1df6f7695 100644 --- a/google/cloud/dialogflow/v2/context.proto +++ b/google/cloud/dialogflow/v2/context.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"; @@ -20,6 +21,7 @@ import "google/api/annotations.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"; @@ -29,7 +31,6 @@ option java_outer_classname = "ContextProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // A context represents additional information included with user input or with // an intent returned by the Dialogflow API. Contexts are helpful for // differentiating user input which may be vague or have a different meaning @@ -42,12 +43,18 @@ option objc_class_prefix = "DF"; // [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request, // or as output contexts included in the returned intent. // Contexts expire when an intent is matched, after the number of `DetectIntent` -// requests specified by the `lifespan_count` parameter, or after 10 minutes +// requests specified by the `lifespan_count` parameter, or after 20 minutes // if no intents are matched for a `DetectIntent` request. // // For more information about contexts, see the -// [Dialogflow documentation](https://dialogflow.com/docs/contexts). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). service Contexts { + 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 contexts in the specified session. rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) { option (google.api.http) = { @@ -63,6 +70,8 @@ service Contexts { } // Creates a context. + // + // If the specified context already exists, overrides the context. rpc CreateContext(CreateContextRequest) returns (Context) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/sessions/*}/contexts" @@ -97,17 +106,21 @@ service Contexts { message Context { // Required. The unique identifier of the context. Format: // `projects//agent/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; // Optional. The number of conversational query requests after which the // context expires. If set to `0` (the default) the context expires - // immediately. Contexts expire automatically after 10 minutes even if there + // 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://dialogflow.com/docs/actions-and-parameters) for - // syntax. + // Refer to [this + // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) + // for syntax. google.protobuf.Struct parameters = 3; } diff --git a/google/cloud/dialogflow/v2/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml index 6fbfe4873..0c9077039 100644 --- a/google/cloud/dialogflow/v2/dialogflow_gapic.yaml +++ b/google/cloud/dialogflow/v2/dialogflow_gapic.yaml @@ -16,12 +16,7 @@ language_settings: package_name: Google\Cloud\Dialogflow\V2 nodejs: package_name: dialogflow.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 + domain_layer_location: google-cloud # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. @@ -73,9 +68,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -103,6 +96,32 @@ 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: 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: @@ -110,7 +129,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -124,7 +142,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -145,15 +162,16 @@ interfaces: - parent required_fields: - parent - request_object_method: false 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 @@ -166,15 +184,16 @@ interfaces: - parent required_fields: - parent - request_object_method: true 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 @@ -183,15 +202,16 @@ interfaces: - name: ImportAgent required_fields: - parent - request_object_method: true 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 @@ -201,15 +221,16 @@ interfaces: required_fields: - parent - request_object_method: true 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 @@ -263,9 +284,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -300,7 +319,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -321,7 +339,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -337,7 +354,6 @@ interfaces: required_fields: - parent - context - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -351,7 +367,6 @@ interfaces: - context required_fields: - context - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -365,7 +380,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -379,7 +393,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -434,9 +447,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -474,7 +485,6 @@ interfaces: - language_code required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -498,7 +508,6 @@ interfaces: - language_code required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -518,7 +527,6 @@ interfaces: required_fields: - parent - entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -535,7 +543,6 @@ interfaces: - language_code required_fields: - entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -549,7 +556,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -559,15 +565,16 @@ interfaces: - name: BatchUpdateEntityTypes required_fields: - parent - request_object_method: true 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 @@ -582,15 +589,16 @@ interfaces: required_fields: - parent - entity_type_names - request_object_method: true 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 @@ -609,15 +617,16 @@ interfaces: required_fields: - parent - entities - request_object_method: true 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 @@ -636,15 +645,16 @@ interfaces: required_fields: - parent - entities - request_object_method: true 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 @@ -663,15 +673,16 @@ interfaces: required_fields: - parent - entity_values - request_object_method: true 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 @@ -727,9 +738,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -767,7 +776,6 @@ interfaces: - language_code required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -791,7 +799,6 @@ interfaces: - language_code required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -811,7 +818,6 @@ interfaces: required_fields: - parent - intent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -831,7 +837,6 @@ interfaces: required_fields: - intent - language_code - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -845,7 +850,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -856,15 +860,16 @@ interfaces: required_fields: - parent - language_code - request_object_method: true 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 @@ -879,15 +884,16 @@ interfaces: required_fields: - parent - intents - request_object_method: true 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 @@ -941,9 +947,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -978,7 +982,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -999,7 +1002,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -1015,7 +1017,6 @@ interfaces: required_fields: - parent - session_entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1029,7 +1030,6 @@ interfaces: - session_entity_type required_fields: - session_entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1043,7 +1043,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -1096,9 +1095,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -1135,7 +1132,6 @@ interfaces: required_fields: - session - query_input - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1146,11 +1142,16 @@ interfaces: required_fields: - session - query_input - request_object_method: false 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 diff --git a/google/cloud/dialogflow/v2/entity_type.proto b/google/cloud/dialogflow/v2/entity_type.proto index ce36c716b..c694a0c2a 100644 --- a/google/cloud/dialogflow/v2/entity_type.proto +++ b/google/cloud/dialogflow/v2/entity_type.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"; @@ -20,7 +21,7 @@ import "google/api/annotations.proto"; import "google/longrunning/operations.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"; @@ -30,7 +31,6 @@ option java_outer_classname = "EntityTypeProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // Entities are extracted from user input and represent parameters that are // meaningful to your application. For example, a date range, a proper name // such as a geographic location or landmark, and so on. Entities represent @@ -57,8 +57,14 @@ option objc_class_prefix = "DF"; // represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type. // // For more information about entity types, see the -// [Dialogflow documentation](https://dialogflow.com/docs/entities). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). service EntityTypes { + 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 entity types in the specified agent. rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { option (google.api.http) = { @@ -98,8 +104,7 @@ service EntityTypes { // Updates/Creates multiple entity types in the specified agent. // - // Operation + // Operation rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate" @@ -109,8 +114,7 @@ service EntityTypes { // Deletes entity types in the specified agent. // - // Operation + // Operation rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete" @@ -118,8 +122,7 @@ service EntityTypes { }; } - // Creates multiple new entities in the specified entity type (extends the - // existing collection of entries). + // Creates multiple new entities in the specified entity type. // // Operation rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { @@ -129,11 +132,11 @@ service EntityTypes { }; } - // Updates entities in the specified entity type (replaces the existing - // collection of entries). + // 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 + // Operation rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" @@ -143,8 +146,7 @@ service EntityTypes { // Deletes entities in the specified entity type. // - // Operation + // Operation rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" @@ -157,18 +159,29 @@ service EntityTypes { // Entity types serve as a tool for extracting parameter values from natural // language queries. message EntityType { - // Optional. Represents an entity. + // An **entity entry** for an associated entity type. message Entity { - // Required. + // Required. The primary value associated with this entity entry. + // For example, if the entity type is *vegetable*, the value could be + // *scallions*. + // // For `KIND_MAP` entity types: - // A canonical name to be used in place of synonyms. + // + // * A canonical 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). + // + // * A string that can contain references to other entity types (with or + // without aliases). string value = 1; - // Required. A collection of synonyms. For `KIND_LIST` entity types this - // must contain exactly one synonym equal to `value`. + // Required. A collection of value synonyms. For example, if the entity type + // is *vegetable*, and `value` is *scallions*, a synonym could be *green + // onions*. + // + // For `KIND_LIST` entity types: + // + // * This collection must contain exactly one synonym equal to `value`. repeated string synonyms = 2; } @@ -199,13 +212,13 @@ message EntityType { AUTO_EXPANSION_MODE_DEFAULT = 1; } - // Required for all methods except `create` (`create` populates the name - // automatically. - // The unique identifier of the entity type. Format: - // `projects//agent/entityTypes/`. + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and + // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. + // Format: `projects//agent/entityTypes/`. string name = 1; - // Required. The name of the entity. + // Required. The name of the entity type. string display_name = 2; // Required. Indicates the kind of entity type. @@ -215,7 +228,7 @@ message EntityType { // expanded. AutoExpansionMode auto_expansion_mode = 4; - // Optional. The collection of entities associated with the entity type. + // Optional. The collection of entity entries associated with the entity type. repeated Entity entities = 6; } @@ -227,9 +240,10 @@ message ListEntityTypesRequest { // Optional. The language to list entity synonyms for. If not specified, // the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 maximum number of items to return in a single page. By @@ -259,9 +273,10 @@ message GetEntityTypeRequest { // Optional. The language to retrieve entity synonyms for. If not specified, // the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } @@ -276,23 +291,24 @@ message CreateEntityTypeRequest { // Optional. The language of entity synonyms defined in `entity_type`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } // The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. message UpdateEntityTypeRequest { // Required. The entity type to update. - // Format: `projects//agent/entityTypes/`. EntityType entity_type = 1; // Optional. The language of entity synonyms defined in `entity_type`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -315,8 +331,9 @@ message BatchUpdateEntityTypesRequest { // Required. The source of the entity type batch. // // For each entity type in the batch: - // * If `name` is specified, we update an existing entity type. - // * If `name` is not specified, we create a new entity type. + // + // * If `name` is specified, we update an existing entity type. + // * If `name` is not specified, we create a new entity type. oneof entity_type_batch { // The URI to a Google Cloud Storage file containing entity types to update // or create. The file format can either be a serialized proto (of @@ -324,15 +341,16 @@ message BatchUpdateEntityTypesRequest { // "gs://". string entity_type_batch_uri = 2; - // The collection of entity type to update or create. + // The collection of entity types to update or create. 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -362,31 +380,33 @@ message BatchCreateEntitiesRequest { // `projects//agent/entityTypes/`. string parent = 1; - // Required. The collection of entities to create. + // 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } -// The response message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. +// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. message BatchUpdateEntitiesRequest { - // Required. The name of the entity type to update the entities in. Format: - // `projects//agent/entityTypes/`. + // Required. The name of the entity type to update or create entities in. + // Format: `projects//agent/entityTypes/`. string parent = 1; - // Required. The collection of new entities to replace the existing entities. + // 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -406,9 +426,10 @@ message BatchDeleteEntitiesRequest { // Optional. The language of entity synonyms defined in `entities`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } diff --git a/google/cloud/dialogflow/v2/intent.proto b/google/cloud/dialogflow/v2/intent.proto index 7d22280f0..6cdcd73ec 100644 --- a/google/cloud/dialogflow/v2/intent.proto +++ b/google/cloud/dialogflow/v2/intent.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,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.dialogflow.v2; import "google/api/annotations.proto"; +import "google/cloud/dialogflow/v2/audio_config.proto"; import "google/cloud/dialogflow/v2/context.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/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -31,7 +35,6 @@ option java_outer_classname = "IntentProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // An intent represents a mapping between input from a user and an action to // be taken by your application. When you pass user input to the // [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or @@ -46,7 +49,7 @@ option objc_class_prefix = "DF"; // * **Contexts** - provide additional context for intent analysis. For // example, if an intent is related to an object in your application that // plays music, you can provide a context to determine when to match the -// intent if the user input is “turn it off”. You can include a context +// intent if the user input is "turn it off". You can include a context // that matches the intent when there is previous user input of // "play music", and not when there is previous user input of // "turn on the light". @@ -62,8 +65,14 @@ option objc_class_prefix = "DF"; // Dialogflow API agent to better match intents. // // For more information about intents, see the -// [Dialogflow documentation](https://dialogflow.com/docs/intents). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/intents-overview). service Intents { + 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 intents in the specified agent. rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { option (google.api.http) = { @@ -94,7 +103,7 @@ service Intents { }; } - // Deletes the specified intent. + // Deletes the specified intent and its direct or indirect followup intents. rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/agent/intents/*}" @@ -126,26 +135,26 @@ 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 { - // Represents an example or template that the agent is trained on. + // Represents an example that the agent is trained on. message TrainingPhrase { // Represents a part of a training phrase. message Part { - // Required. The text corresponding to the example or template, - // if there are no annotations. For - // annotated examples, it is the text for one of the example's parts. + // Required. The text for this part. string text = 1; - // Optional. The entity type name prefixed with `@`. This field is - // required for the annotated part of the text and applies only to - // examples. + // Optional. The entity type name prefixed with `@`. + // This field is required for annotated parts of the training phrase. string entity_type = 2; // 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; - // Optional. Indicates whether the text was manually annotated by the - // developer. + // 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; } @@ -160,21 +169,41 @@ message Intent { // Templates are not annotated with entity types, but they can contain // @-prefixed entity type names as substrings. - TEMPLATE = 2; + // Template mode has been deprecated. Example mode is the only supported + // way to create new training phrases. If you have existing training + // phrases that you've created in template mode, those will continue to + // work. + TEMPLATE = 2 [deprecated = true]; } - // Required. The unique identifier of this training phrase. + // Output only. The unique identifier of this training phrase. string name = 1; // Required. The type of the training phrase. Type type = 2; - // Required. The collection of training phrase parts (can be annotated). - // Fields: `entity_type`, `alias` and `user_defined` should be populated - // only for the annotated parts of the training phrase. + // Required. The ordered list of training phrase parts. + // The parts are concatenated in order to form the training phrase. + // + // Note: The API does not automatically annotate training phrases like the + // Dialogflow Console does. + // + // Note: Do not forget to include whitespace at part boundaries, + // so the training phrase is well formatted when the parts are concatenated. + // + // If the training phrase does not need to be annotated with parameters, + // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `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; - // Optional. Indicates how many times this example or template was added to + // 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; @@ -213,7 +242,7 @@ message Intent { bool mandatory = 6; // Optional. The collection of prompts that the agent can present to the - // user in order to collect value for the parameter. + // user in order to collect a value for the parameter. repeated string prompts = 7; // Optional. Indicates whether the parameter represents a list of values. @@ -498,6 +527,9 @@ message Intent { // } // } ACTIONS_ON_GOOGLE = 8; + + // Google Hangouts. + GOOGLE_HANGOUTS = 11; } // Required. The rich response message. @@ -548,7 +580,7 @@ message Intent { // Format: `projects//agent/intents/`. string followup_intent_name = 1; - // The unique identifier of the followup intent parent. + // The unique identifier of the followup intent's parent. // Format: `projects//agent/intents/`. string parent_followup_intent_name = 2; } @@ -566,20 +598,23 @@ message Intent { WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; } - // Required for all methods except `create` (`create` populates the name - // automatically. // 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; // Required. The name of this intent. string display_name = 2; - // Required. Indicates whether webhooks are enabled for the 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. Zero or negative numbers mean that the intent is disabled. + // priorities. If this is zero or unspecified, we use the default + // priority 500000. + // + // Negative numbers mean that the intent is disabled. int32 priority = 3; // Optional. Indicates whether this is a fallback intent. @@ -601,11 +636,12 @@ message Intent { // be present in the active user session for an event to trigger this intent. repeated string events = 8; - // Optional. The collection of examples/templates that the agent is + // Optional. The collection of examples that the agent is // trained on. repeated TrainingPhrase training_phrases = 9; // Optional. The name of the action associated with the intent. + // Note: The action name must not contain whitespaces. string action = 10; // Optional. The collection of contexts that are activated when the intent @@ -626,23 +662,28 @@ message Intent { // `Response` field in the Dialogflow console. repeated Message messages = 14; - // Optional. The list of platforms for which the first response will be - // taken from among the messages assigned to the DEFAULT_PLATFORM. + // 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; - // The unique identifier of the root intent in the chain of followup intents. - // It identifies the correct followup intents chain for this intent. + // Read-only. The unique identifier of the root intent in the chain of + // followup intents. It identifies the correct followup intents chain for + // this intent. We populate this field only in the output. + // // Format: `projects//agent/intents/`. string root_followup_intent_name = 16; - // The unique identifier of the parent intent in the chain of followup - // intents. + // 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. + // // It identifies the parent followup intent. // Format: `projects//agent/intents/`. string parent_followup_intent_name = 17; - // Optional. Collection of information about all followup intents that have - // name of this intent as a root_name. + // Read-only. Information about all followup intents that have this intent as + // a direct or indirect parent. We populate this field only in the output. repeated FollowupIntentInfo followup_intent_info = 18; } @@ -654,9 +695,10 @@ message ListIntentsRequest { // Optional. The language to list training phrases, parameters and rich // messages for. If not specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent before they can be 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 resource view to apply to the returned intent. @@ -689,9 +731,10 @@ message GetIntentRequest { // Optional. The language to retrieve training phrases, parameters and rich // messages for. If not specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 resource view to apply to the returned intent. @@ -709,9 +752,10 @@ message CreateIntentRequest { // Optional. The language of training phrases, parameters and rich messages // defined in `intent`. If not specified, the agent's default language is - // used. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 resource view to apply to the returned intent. @@ -721,14 +765,14 @@ message CreateIntentRequest { // The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. message UpdateIntentRequest { // Required. The intent to update. - // Format: `projects//agent/intents/`. 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. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 mask to control which fields get updated. @@ -740,7 +784,8 @@ message UpdateIntentRequest { // The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. message DeleteIntentRequest { - // Required. The name of the intent to delete. + // 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; } @@ -764,9 +809,10 @@ message BatchUpdateIntentsRequest { // Optional. The language of training phrases, parameters and rich messages // defined in `intents`. If not specified, the agent's default language is - // used. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 mask to control which fields get updated. diff --git a/google/cloud/dialogflow/v2/session.proto b/google/cloud/dialogflow/v2/session.proto index 085e3504d..815b40878 100644 --- a/google/cloud/dialogflow/v2/session.proto +++ b/google/cloud/dialogflow/v2/session.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,18 +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.dialogflow.v2; import "google/api/annotations.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/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"; @@ -32,12 +36,16 @@ option java_outer_classname = "SessionProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // 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 // [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine // user intent and respond. service Sessions { + 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"; + // Processes a natural language query and returns structured, actionable data // as a result. This method is not idempotent, because it may cause contexts // and session entity types to be updated, which in turn might affect @@ -52,7 +60,8 @@ service Sessions { // Processes a natural language query in audio format in a streaming fashion // and returns structured, actionable data as a result. This method is only // available via the gRPC API (not REST). - rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse); + rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { + } } // The request to detect user's intent. @@ -77,6 +86,11 @@ 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 + // 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 // 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. @@ -89,12 +103,23 @@ message DetectIntentResponse { // locate a response in the training example set or for reporting issues. string response_id = 1; - // The results of the conversational query or event processing. + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. QueryResult query_result = 2; - // Specifies the status of the webhook request. `webhook_status` - // is never populated in webhook requests. + // Specifies the status of the webhook request. google.rpc.Status webhook_status = 3; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // 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. + bytes output_audio = 4; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; } // Represents the parameters of the conversational query. @@ -116,14 +141,18 @@ message QueryParameters { // before the new ones are activated. bool reset_contexts = 4; - // Optional. The collection of session entity types to replace or extend - // developer entities with for this query only. The entity synonyms apply - // to all languages. + // 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 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. google.protobuf.Struct payload = 6; + + // Optional. Configures the type of sentiment analysis to perform. If not + // provided, sentiment analysis is not performed. + SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; } // Represents the query input. It can contain either: @@ -151,16 +180,19 @@ message QueryInput { // Represents the result of conversational query or event processing. message QueryResult { // The original conversational query text: + // // - If natural language text was provided as input, `query_text` contains // a copy of the input. // - If natural language speech audio was provided as input, `query_text` // contains the speech recognition result. If speech recognizer produced // multiple alternatives, a particular one is picked. - // - If an event was provided as input, `query_text` is not set. + // - If automatic spell correction is enabled, `query_text` will contain the + // corrected user input. string query_text = 1; // The language that was triggered during intent detection. - // See [Language Support](https://dialogflow.com/docs/reference/language) + // See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. string language_code = 15; @@ -169,10 +201,10 @@ message QueryResult { // correct. The default of 0.0 is a sentinel value indicating that confidence // was not set. // - // You should not rely on this field as it isn't guaranteed to be accurate, or - // even set. In particular this field isn't set in Webhook calls and for - // StreamingDetectIntent since the streaming endpoint has separate confidence - // estimates per portion of the audio in StreamingRecognitionResult. + // This field is not guaranteed to be accurate or set. In particular this + // field isn't set for StreamingDetectIntent since the streaming endpoint has + // separate confidence estimates per portion of the audio in + // StreamingRecognitionResult. float speech_recognition_confidence = 2; // The action name from the matched intent. @@ -182,6 +214,7 @@ message QueryResult { google.protobuf.Struct parameters = 4; // This field is set to: + // // - `false` if the matched intent has required parameters and not all of // the required parameter values have been collected. // - `true` if all required parameter values have been collected, or if the @@ -189,6 +222,7 @@ message QueryResult { bool all_required_params_present = 5; // The text to be pronounced to the user or shown on the screen. + // Note: This is a legacy field, `fulfillment_messages` should be preferred. string fulfillment_text = 6; // The collection of rich messages to present to the user. @@ -215,11 +249,22 @@ message QueryResult { // The intent detection confidence. Values range from 0.0 // (completely uncertain) to 1.0 (completely certain). + // This value is for informational purpose only and is only used to + // help match the best intent within the classification threshold. + // This value may change for the same end-user expression at any time due to a + // model retraining or change in implementation. + // If there are `multiple knowledge_answers` messages, this value is set to + // 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 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. google.protobuf.Struct diagnostic_info = 14; + + // The sentiment analysis result, which depends on the + // `sentiment_analysis_request_config` specified in the request. + SentimentAnalysisResult sentiment_analysis_result = 17; } // The top-level message sent by the client to the @@ -228,7 +273,7 @@ message QueryResult { // Multiple request messages should be sent in order: // // 1. The first message must contain `session`, `query_input` plus optionally -// `query_params` and/or `single_utterance`. The message must not contain `input_audio`. +// `query_params`. The message must not contain `input_audio`. // // 2. If `query_input` was set to a streaming input audio config, // all subsequent messages must contain only `input_audio`. @@ -236,8 +281,8 @@ message QueryResult { 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 . It can be a random number or + // `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; @@ -255,15 +300,20 @@ message StreamingDetectIntentRequest { // 3. an event that specifies which intent to trigger. QueryInput query_input = 3; - // 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. + // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. + // 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. // This setting is ignored when `query_input` is a piece of text or an event. - bool single_utterance = 4; + bool single_utterance = 4 [deprecated = true]; + + // Optional. 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 // `query_input` was set to a streaming input audio config. The complete audio @@ -296,6 +346,17 @@ message StreamingDetectIntentResponse { // Specifies the status of the webhook request. google.rpc.Status webhook_status = 4; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // 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. + bytes output_audio = 5; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; } // Contains a speech recognition result corresponding to a portion of the audio @@ -317,7 +378,7 @@ message StreamingDetectIntentResponse { // // 6. transcript: " that is" // -// 7. recognition_event_type: `RECOGNITION_EVENT_END_OF_SINGLE_UTTERANCE` +// 7. message_type: `END_OF_SINGLE_UTTERANCE` // // 8. transcript: " that is the question" // is_final: true @@ -328,9 +389,9 @@ message StreamingDetectIntentResponse { // // In each response we populate: // -// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`. +// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. // -// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `event_type`. +// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. message StreamingRecognitionResult { // Type of the response message. enum MessageType { @@ -341,12 +402,12 @@ message StreamingRecognitionResult { TRANSCRIPT = 1; // 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). The client should stop sending additional audio - // data, half-close the gRPC connection, and wait for any additional results - // until the server closes the gRPC connection. This message is only sent if - // `single_utterance` was set to `true`, and is not used otherwise. + // utterance and expects no additional inputs. + // Therefore, the server will not process additional audio (although it may subsequently return additional results). The + // client should stop sending additional audio data, half-close the gRPC + // connection, and wait for any additional results until the server closes + // the gRPC connection. This message is only sent if `single_utterance` was + // set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 2; } @@ -354,14 +415,13 @@ message StreamingRecognitionResult { MessageType message_type = 1; // Transcript text representing the words that the user spoke. - // Populated if and only if `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + // Populated if and only if `message_type` = `TRANSCRIPT`. string transcript = 2; - // The default of 0.0 is a sentinel value indicating `confidence` was not set. // If `false`, the `StreamingRecognitionResult` represents an // interim result that may change. If `true`, the recognizer will not return // any further hypotheses about this piece of the audio. May only be populated - // for `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + // for `message_type` = `TRANSCRIPT`. bool is_final = 3; // The Speech confidence between 0.0 and 1.0 for the current portion of audio. @@ -374,48 +434,24 @@ message StreamingRecognitionResult { 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](/speech/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://dialogflow.com/docs/languages) 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; - - // Optional. The collection of phrase hints which are used to boost accuracy - // of speech recognition. - // Refer to [Cloud Speech API documentation](/speech/docs/basics#phrase-hints) - // for more details. - repeated string phrase_hints = 4; -} - // 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 bytes. + // Text length must not exceed 256 characters. string text = 1; // Required. The language of this conversational query. See [Language - // Support](https://dialogflow.com/docs/languages) 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. + // 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; } // Events allow for matching intents by event name instead of the natural -// language input. For instance, input `` can trigger a personalized welcome response. +// language input. For instance, input `` can trigger a personalized welcome response. // The parameter `name` may be used by the agent in the response: -// `“Hello #welcome_event.name! What can I do for you today?”`. +// `"Hello #welcome_event.name! What can I do for you today?"`. message EventInput { // Required. The unique identifier of the event. string name = 1; @@ -424,55 +460,35 @@ message EventInput { google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language - // Support](https://dialogflow.com/docs/languages) 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. + // 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; } -// Audio encoding of the audio content sent in the conversational query request. -// Refer to the [Cloud Speech API documentation](/speech/docs/basics) for more -// details. -enum AudioEncoding { - // Not specified. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_LINEAR_16 = 1; - - // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio - // Codec) is the recommended encoding because it is lossless (therefore - // recognition is not compromised) and requires only about half the - // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and - // 24-bit samples, however, not all fields in `STREAMINFO` are supported. - AUDIO_ENCODING_FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - AUDIO_ENCODING_MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AUDIO_ENCODING_AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_AMR_WB = 5; - - // Opus encoded audio frames in Ogg container - // ([OggOpus](https://wiki.xiph.org/OggOpus)). - // `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_OGG_OPUS = 6; - - // Although the use of lossy encodings is not recommended, if a very low - // bitrate encoding is required, `OGG_OPUS` is highly preferred over - // Speex encoding. The [Speex](https://speex.org/) encoding supported by - // Dialogflow API has a header byte in each block, as in MIME type - // `audio/x-speex-with-header-byte`. - // It is a variant of the RTP Speex encoding defined in - // [RFC 5574](https://tools.ietf.org/html/rfc5574). - // The stream is a sequence of blocks, one block per RTP packet. Each block - // starts with a byte containing the length of the block, in bytes, followed - // by one or more frames of Speex data, padded to an integral number of - // bytes (octets) as specified in RFC 5574. In other words, each RTP header - // is replaced with a single byte containing the block length. Only Speex - // wideband is supported. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; +// Configures the types of sentiment analysis to perform. +message SentimentAnalysisRequestConfig { + // Optional. 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; +} + +// The result of sentiment analysis as configured by +// `sentiment_analysis_request_config`. +message SentimentAnalysisResult { + // The sentiment analysis result for `query_text`. + Sentiment query_text_sentiment = 1; +} + +// The sentiment, such as positive/negative feeling or association, for a unit +// of analysis, such as the query text. +message Sentiment { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the absolute + // magnitude of sentiment, regardless of score (positive or negative). + float magnitude = 2; } diff --git a/google/cloud/dialogflow/v2/session_entity_type.proto b/google/cloud/dialogflow/v2/session_entity_type.proto index 89408df6d..8714152aa 100644 --- a/google/cloud/dialogflow/v2/session_entity_type.proto +++ b/google/cloud/dialogflow/v2/session_entity_type.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"; @@ -20,6 +21,7 @@ import "google/api/annotations.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"; @@ -29,7 +31,6 @@ option java_outer_classname = "SessionEntityTypeProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // Entities are extracted from user input and represent parameters that are // meaningful to your application. For example, a date range, a proper name // such as a geographic location or landmark, and so on. Entities represent @@ -41,8 +42,14 @@ option objc_class_prefix = "DF"; // entity type at the session level. // // For more information about entity types, see the -// [Dialogflow documentation](https://dialogflow.com/docs/entities). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). service SessionEntityTypes { + 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 session entity types in the specified session. rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { option (google.api.http) = { @@ -58,6 +65,9 @@ service SessionEntityTypes { } // Creates a session entity type. + // + // If the specified session entity type already exists, overrides the session + // entity type. rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" @@ -100,16 +110,22 @@ message SessionEntityType { // The collection of session entities extends the collection of entities in // the corresponding developer entity type. - // Calls to `ListSessionEntityTypes`, `GetSessionEntityType`, - // `CreateSessionEntityType` and `UpdateSessionEntityType` return the full - // collection of entities from the developer entity type in the agent's - // default language and the session 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 + // and merge. ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; } // Required. The unique identifier of this session entity type. Format: // `projects//agent/sessions//entityTypes/`. + // + // `` must be the display name of an existing entity + // type in the same agent that will be overridden or supplemented. string name = 1; // Required. Indicates whether the additional data should override or diff --git a/google/cloud/dialogflow/v2/webhook.proto b/google/cloud/dialogflow/v2/webhook.proto index 24314f863..056f4615c 100644 --- a/google/cloud/dialogflow/v2/webhook.proto +++ b/google/cloud/dialogflow/v2/webhook.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,16 +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/cloud/dialogflow/v2/context.proto"; import "google/cloud/dialogflow/v2/intent.proto"; import "google/cloud/dialogflow/v2/session.proto"; +import "google/cloud/dialogflow/v2/session_entity_type.proto"; import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; @@ -30,12 +32,13 @@ option java_outer_classname = "WebhookProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; - // The request message for a webhook call. message WebhookRequest { // The unique identifier of detectIntent request session. // Can be used to identify end-user inside webhook implementation. - // Format: `projects//agent/sessions/`. + // Format: `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. string session = 4; // The unique identifier of the response. Contains the same value as @@ -95,6 +98,8 @@ message WebhookResponse { // Optional. Makes the platform immediately invoke another `DetectIntent` call // internally with the specified event as input. + // When this field is set, Dialogflow ignores the `fulfillment_text`, + // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; } @@ -105,7 +110,22 @@ message OriginalDetectIntentRequest { // by Dialogflow-owned servers. string source = 1; - // Optional. This field is set to the value of `QueryParameters.payload` field - // passed in the request. + // Optional. The version of the protocol used for this request. + // This field is AoG-specific. + string version = 2; + + // Optional. This field is set to the value of the `QueryParameters.payload` + // 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: + //
{
+  //  "telephony": {
+  //    "caller_id": "+18558363987"
+  //  }
+  // }
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard + // Edition agents and populated with the caller ID in [E.164 + // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. google.protobuf.Struct payload = 3; } diff --git a/google/cloud/dialogflow/v2beta1/BUILD.bazel b/google/cloud/dialogflow/v2beta1/BUILD.bazel new file mode 100644 index 000000000..336995642 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/BUILD.bazel @@ -0,0 +1,177 @@ +# 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 = "dialogflow_proto", + srcs = [ + "agent.proto", + "audio_config.proto", + "context.proto", + "document.proto", + "entity_type.proto", + "intent.proto", + "knowledge_base.proto", + "session.proto", + "session_entity_type.proto", + "webhook.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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", + ], +) + +proto_library_with_info( + name = "dialogflow_proto_with_info", + deps = [":dialogflow_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 = "dialogflow_java_proto", + deps = [":dialogflow_proto"], +) + +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"], +) + +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"], + 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_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 = [ + ":dialogflow_java_proto", + ":dialogflow_proto", + ":dialogflow_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 = "dialogflow_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1", + protos = [":dialogflow_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + "//google/type:latlng_go_proto", + ], +) + +go_gapic_library( + name = "dialogflow_go_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", + 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", + ], +) + +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", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-dialogflow-v2beta1-go", + deps = [ + ":dialogflow_go_gapic", + ":dialogflow_go_gapic_srcjar-smoke-test.srcjar", + ":dialogflow_go_gapic_srcjar-test.srcjar", + ":dialogflow_go_proto", + ], +) diff --git a/google/cloud/dialogflow/v2beta1/agent.proto b/google/cloud/dialogflow/v2beta1/agent.proto index aca63b2c8..b1a1fb6c2 100644 --- a/google/cloud/dialogflow/v2beta1/agent.proto +++ b/google/cloud/dialogflow/v2beta1/agent.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"; @@ -20,7 +21,7 @@ import "google/api/annotations.proto"; import "google/longrunning/operations.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.V2beta1"; @@ -30,7 +31,6 @@ option java_outer_classname = "AgentProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // Agents are best described as Natural Language Understanding (NLU) modules // that transform user requests into actionable data. You can include agents // in your app, product, or service to determine user intent and respond to the @@ -43,20 +43,28 @@ option objc_class_prefix = "DF"; // // You can create an agent using both Dialogflow Standard Edition and // Dialogflow Enterprise Edition. For details, see -// [Dialogflow Editions](/dialogflow-enterprise/docs/editions). +// [Dialogflow +// Editions](https://cloud.google.com/dialogflow/docs/editions). // // You can save your agent for backup or versioning by exporting the agent by // using the [ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent] method. You can import a saved // agent by using the [ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent] method. // // Dialogflow provides several -// [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common -// conversation scenarios such as determining a date and time, converting -// currency, and so on. +// [prebuilt +// agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) +// for common conversation scenarios such as determining a date and time, +// converting currency, and so on. // // For more information about agents, see the -// [Dialogflow documentation](https://dialogflow.com/docs/agents). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/agents-overview). service Agents { + 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"; + // Retrieves the specified agent. rpc GetAgent(GetAgentRequest) returns (Agent) { option (google.api.http) = { @@ -64,6 +72,21 @@ service Agents { }; } + // Creates/updates the specified agent. + rpc SetAgent(SetAgentRequest) returns (Agent) { + option (google.api.http) = { + post: "/v2beta1/{agent.parent=projects/*}/agent" + body: "agent" + }; + } + + // Deletes the specified agent. + rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{parent=projects/*}/agent" + }; + } + // Returns the list of agents. // // Since there is at most one conversational agent per project, this method is @@ -80,8 +103,7 @@ service Agents { // Trains the specified agent. // // - // Operation + // Operation rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/agent:train" @@ -92,8 +114,7 @@ service Agents { // Exports the specified agent to a ZIP file. // // - // Operation + // Operation rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/agent:export" @@ -108,8 +129,7 @@ service Agents { // versions from ImportAgentRequest. // // - // Operation + // Operation rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/agent:import" @@ -123,8 +143,7 @@ service Agents { // entity types in the older version are deleted. // // - // Operation + // Operation rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/agent:restore" @@ -149,6 +168,36 @@ message Agent { MATCH_MODE_ML_ONLY = 2; } + // API version for the agent. + enum ApiVersion { + // Not specified. + API_VERSION_UNSPECIFIED = 0; + + // Legacy V1 API. + API_VERSION_V1 = 1; + + // V2 API. + API_VERSION_V2 = 2; + + // V2beta1 API. + API_VERSION_V2_BETA_1 = 3; + } + + // Represents the agent tier. + enum Tier { + // Not specified. This value should never be used. + TIER_UNSPECIFIED = 0; + + // Standard tier. + TIER_STANDARD = 1; + + // Enterprise tier (Essentials). + TIER_ENTERPRISE = 2; + + // Enterprise tier (Plus). + TIER_ENTERPRISE_PLUS = 3; + } + // Required. The project of this agent. // Format: `projects/`. string parent = 1; @@ -157,9 +206,10 @@ message Agent { string display_name = 2; // Required. The default language of the agent as a language tag. See - // [Language Support](https://dialogflow.com/docs/reference/language) for a - // list of the currently supported language codes. - // This field cannot be set by the `Update` method. + // [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; // Optional. The list of all languages supported by this agent (except for the @@ -177,7 +227,9 @@ message Agent { // Optional. The URI of the agent's avatar. // Avatars are used throughout the Dialogflow console and in the self-hosted - // [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration. + // [Web + // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + // integration. string avatar_uri = 7; // Optional. Determines whether this agent should log conversation queries. @@ -189,11 +241,20 @@ message Agent { // Optional. To filter out false positive results and still get variety in // matched natural language inputs for your agent, you can tune the machine // learning classification threshold. If the returned score value is less than - // the threshold value, then a fallback intent is be triggered or, if there + // the threshold value, then a fallback intent will be triggered or, if there // 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; + + // 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; + + // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + Tier tier = 15; } // The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent]. @@ -203,6 +264,22 @@ message GetAgentRequest { string parent = 1; } +// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. +message SetAgentRequest { + // Required. The agent to update. + Agent agent = 1; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent]. +message DeleteAgentRequest { + // Required. The project that the agent to delete is associated with. + // Format: `projects/`. + string parent = 1; +} + // The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. message SearchAgentsRequest { // Required. The project to list agents from. @@ -241,9 +318,11 @@ message ExportAgentRequest { // Format: `projects/`. string parent = 1; - // Optional. The Google Cloud Storage URI to export the agent to. - // Note: The URI must start with - // "gs://". If left unspecified, the serialized agent is returned inline. + // Optional. 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; } @@ -258,17 +337,17 @@ message ExportAgentResponse { // 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//agent:export'\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:export'\
     //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //   -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 > 
+    // | base64 --decode > <agent zip file>
bytes agent_content = 2; } } @@ -288,17 +367,17 @@ message ImportAgentRequest { // The agent to import. // // Example for how to import an agent via the command line: - // - // curl \ - // 'https://dialogflow.googleapis.com/v2beta1/projects//agent:import\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\
     //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //    -H 'Authorization: Bearer '$(gcloud auth application-default
+    //    print-access-token) \
     //    -H 'Accept: application/json' \
     //    -H 'Content-Type: application/json' \
     //    --compressed \
     //    --data-binary "{
-    //       'agentContent': '$(cat  | base64 -w 0)'
-    //    }"
+    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+    //    }"
bytes agent_content = 3; } } @@ -318,17 +397,17 @@ message RestoreAgentRequest { // The agent to restore. // // Example for how to restore an agent via the command line: - // - // curl \ - // 'https://dialogflow.googleapis.com/v2beta1/projects//agent:restore\ + //
curl \
+    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:restore\
     //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+    //    -H 'Authorization: Bearer '$(gcloud auth application-default
+    //    print-access-token) \
     //    -H 'Accept: application/json' \
     //    -H 'Content-Type: application/json' \
     //    --compressed \
     //    --data-binary "{
-    //        'agentContent': '$(cat  | base64 -w 0)'
-    //    }" \
+    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+    //    }"
bytes agent_content = 3; } } diff --git a/google/cloud/dialogflow/v2beta1/audio_config.proto b/google/cloud/dialogflow/v2beta1/audio_config.proto new file mode 100644 index 000000000..3de27b941 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -0,0 +1,306 @@ +// 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.dialogflow.v2beta1; + +import "google/protobuf/duration.proto"; +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 = "AudioConfigProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +enum AudioEncoding { + // Not specified. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AUDIO_ENCODING_LINEAR_16 = 1; + + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AUDIO_ENCODING_FLAC = 2; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_MULAW = 3; + + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AUDIO_ENCODING_AMR = 4; + + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_AMR_WB = 5; + + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_OGG_OPUS = 6; + + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + 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. + // + // 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; +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +enum SpeechModelVariant { + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + USE_BEST_AVAILABLE = 1; + + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + USE_STANDARD = 2; + + // Use an enhanced model variant: + // + // * If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // * If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + USE_ENHANCED = 3; +} + +// Instructs the speech recognizer on 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; + + // Optional. 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 + // 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 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; + + // Optional. 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 + // 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; +} + +// 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 { + // 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; +} + +// 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 + // 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 = 1; + + // 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 = 2; + + // 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. We 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 = 3; + + // Optional. 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 = 5; + + // Optional. The desired voice of the synthesized audio. + 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. + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + + // MP3 audio. + OUTPUT_AUDIO_ENCODING_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. + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; +} diff --git a/google/cloud/dialogflow/v2beta1/context.proto b/google/cloud/dialogflow/v2beta1/context.proto index a777ef4f9..97db7c0fe 100644 --- a/google/cloud/dialogflow/v2beta1/context.proto +++ b/google/cloud/dialogflow/v2beta1/context.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"; @@ -20,6 +21,7 @@ import "google/api/annotations.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.V2beta1"; @@ -29,7 +31,6 @@ option java_outer_classname = "ContextProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // A context represents additional information included with user input or with // an intent returned by the Dialogflow API. Contexts are helpful for // differentiating user input which may be vague or have a different meaning @@ -42,12 +43,18 @@ option objc_class_prefix = "DF"; // [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) request, // or as output contexts included in the returned intent. // Contexts expire when an intent is matched, after the number of `DetectIntent` -// requests specified by the `lifespan_count` parameter, or after 10 minutes +// requests specified by the `lifespan_count` parameter, or after 20 minutes // if no intents are matched for a `DetectIntent` request. // // For more information about contexts, see the -// [Dialogflow documentation](https://dialogflow.com/docs/contexts). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). service Contexts { + 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 contexts in the specified session. rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) { option (google.api.http) = { @@ -69,6 +76,8 @@ service Contexts { } // Creates a context. + // + // If the specified context already exists, overrides the context. rpc CreateContext(CreateContextRequest) returns (Context) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" @@ -117,24 +126,26 @@ service Contexts { message Context { // Required. The unique identifier of the context. Format: // `projects//agent/sessions//contexts/`, - // or - // `projects//agent/environments//users//sessions//contexts/`. Note: Environments and - // users are under construction and will be available soon. The Context ID is - // always converted to lowercase. If is not specified, we - // assume default 'draft' environment. If is not specified, we - // assume default '-' user. + // 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. + // + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. string name = 1; // Optional. The number of conversational query requests after which the // context expires. If set to `0` (the default) the context expires - // immediately. Contexts expire automatically after 10 minutes even if there + // 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://dialogflow.com/docs/actions-and-parameters) for - // syntax. + // Refer to [this + // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) + // for syntax. google.protobuf.Struct parameters = 3; } @@ -143,10 +154,9 @@ message ListContextsRequest { // Required. The session to list all contexts from. // Format: `projects//agent/sessions/` or // `projects//agent/environments//users//sessions/`. Note: Environments and users are under - // construction and will be available soon. If is not - // specified, we assume default 'draft' environment. If is not - // specified, we assume default '-' user. + // ID>/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; // Optional. The maximum number of items to return in a single page. By @@ -173,10 +183,9 @@ message GetContextRequest { // Required. The name of the context. Format: // `projects//agent/sessions//contexts/` // or `projects//agent/environments//users//sessions//contexts/`. Note: Environments and - // users are under construction and will be available soon. If is not specified, we assume default 'draft' environment. If - // is not specified, we assume default '-' user. + // ID>/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; } @@ -185,10 +194,9 @@ message CreateContextRequest { // Required. The session to create a context for. // Format: `projects//agent/sessions/` or // `projects//agent/environments//users//sessions/`. Note: Environments and users are under - // construction and will be available soon. If is not - // specified, we assume default 'draft' environment. If is not - // specified, we assume default '-' user. + // ID>/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; // Required. The context to create. @@ -209,11 +217,9 @@ message DeleteContextRequest { // Required. The name of the context to delete. Format: // `projects//agent/sessions//contexts/` // or `projects//agent/environments//users//sessions//contexts/`. Note: Environments and - // users are under construction and will be available soon. If is not specified, we assume default 'draft' environment. If - // is not specified, we assume default - // '-' user. + // ID>/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; } @@ -222,9 +228,7 @@ message DeleteAllContextsRequest { // Required. The name of the session to delete all contexts from. Format: // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. Note: Environments and users are under construction and will be - // available soon. If is not specified we assume default - // 'draft' environment. If is not specified, we assume default - // '-' user. + // ID>`. If `Environment ID` is not specified we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. string parent = 1; } diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml index bd9bc19ac..ae0f269b1 100644 --- a/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml +++ b/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml @@ -4,6 +4,7 @@ config_schema_version: 1.0.0 language_settings: java: package_name: com.google.cloud.dialogflow.v2beta1 + release_level: BETA python: package_name: google.cloud.dialogflow_v2beta1.gapic go: @@ -16,12 +17,7 @@ language_settings: package_name: Google\Cloud\Dialogflow\V2beta1 nodejs: package_name: dialogflow.v2beta1 -# 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 + domain_layer_location: google-cloud # A list of API interface configurations. interfaces: # The fully qualified name of the API interface. @@ -70,9 +66,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -100,6 +94,32 @@ 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: 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: @@ -107,7 +127,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -121,7 +140,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -142,15 +160,16 @@ interfaces: - parent required_fields: - parent - request_object_method: false 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 @@ -163,15 +182,16 @@ interfaces: - parent required_fields: - parent - request_object_method: true 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.v2beta1.ExportAgentResponse metadata_type: google.protobuf.Struct + # LINT.ThenChange() initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 @@ -180,33 +200,34 @@ interfaces: - name: ImportAgent required_fields: - parent - request_object_method: true 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 - request_object_method: true 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 @@ -264,9 +285,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -301,7 +320,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -322,7 +340,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -338,7 +355,6 @@ interfaces: required_fields: - parent - context - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -352,7 +368,6 @@ interfaces: - context required_fields: - context - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -366,7 +381,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -380,7 +394,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -435,9 +448,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -475,7 +486,6 @@ interfaces: - language_code required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -499,7 +509,6 @@ interfaces: - language_code required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -519,7 +528,6 @@ interfaces: required_fields: - parent - entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -536,7 +544,6 @@ interfaces: - language_code required_fields: - entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -550,7 +557,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -560,15 +566,16 @@ interfaces: - name: BatchUpdateEntityTypes required_fields: - parent - request_object_method: true 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.v2beta1.BatchUpdateEntityTypesResponse metadata_type: google.protobuf.Struct + # LINT.ThenChange() initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 @@ -583,15 +590,16 @@ interfaces: required_fields: - parent - entity_type_names - request_object_method: true 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 @@ -610,15 +618,16 @@ interfaces: required_fields: - parent - entities - request_object_method: true 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 @@ -637,15 +646,16 @@ interfaces: required_fields: - parent - entities - request_object_method: true 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 @@ -664,15 +674,16 @@ interfaces: required_fields: - parent - entity_values - request_object_method: true 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 @@ -695,8 +706,6 @@ interfaces: 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 @@ -728,9 +737,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -768,7 +775,6 @@ interfaces: - language_code required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -792,7 +798,6 @@ interfaces: - language_code required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -812,7 +817,6 @@ interfaces: required_fields: - parent - intent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -832,7 +836,6 @@ interfaces: required_fields: - intent - language_code - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -846,7 +849,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -857,15 +859,16 @@ interfaces: required_fields: - parent - language_code - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - parent: agent + parent: project_agent timeout_millis: 60000 long_running: + # LINT.IfChange(batch_update_intents_long_running_operation) return_type: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse metadata_type: google.protobuf.Struct + # LINT.ThenChange() initial_poll_delay_millis: 500 poll_delay_multiplier: 1.5 max_poll_delay_millis: 5000 @@ -880,15 +883,16 @@ interfaces: required_fields: - parent - intents - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: - parent: project + 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 @@ -946,9 +950,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -983,7 +985,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -1004,7 +1005,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -1020,7 +1020,6 @@ interfaces: required_fields: - parent - session_entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1034,7 +1033,6 @@ interfaces: - session_entity_type required_fields: - session_entity_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1048,7 +1046,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -1103,9 +1100,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -1142,7 +1137,6 @@ interfaces: required_fields: - session - query_input - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -1153,11 +1147,371 @@ interfaces: required_fields: - session - query_input - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 220000 + # 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. + # 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}/knowledgeBases/{knowledge_base} + entity_name: knowledge_base + # 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: ListKnowledgeBases + 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: knowledge_bases + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetKnowledgeBase + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: knowledge_base + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateKnowledgeBase + flattening: + groups: + - parameters: + - parent + - knowledge_base + required_fields: + - parent + - knowledge_base + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: DeleteKnowledgeBase + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: knowledge_base + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: UpdateKnowledgeBase + flattening: + groups: + - parameters: + - knowledge_base + required_fields: + - knowledge_base + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + knowledge_base.name: knowledge_base + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + # 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. + # 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}/knowledgeBases/{knowledge_base} + entity_name: knowledge_base + - name_pattern: projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + entity_name: document + # 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: ListDocuments + 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: documents + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: knowledge_base + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: GetDocument + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: document + timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES + - name: CreateDocument + flattening: + groups: + - parameters: + - parent + - document + required_fields: + - parent + - document + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: knowledge_base + timeout_millis: 60000 + long_running: + # LINT.IfChange(create_document_long_running_operation) + return_type: google.cloud.dialogflow.v2beta1.Document + metadata_type: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata + # 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: DeleteDocument + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: document + timeout_millis: 60000 + long_running: + # LINT.IfChange(delete_document_long_running_operation) + return_type: google.protobuf.Empty + metadata_type: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata + # 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: UpdateDocument + flattening: + groups: + - parameters: + - document + required_fields: + - document + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + document.name: document + timeout_millis: 60000 + long_running: + # LINT.IfChange(create_document_long_running_operation) + return_type: google.cloud.dialogflow.v2beta1.Document + metadata_type: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata + # 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 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 @@ -1176,6 +1530,12 @@ resource_name_generation: - message_name: RestoreAgentRequest field_entity_map: parent: project +- message_name: CreateAogVersionRequest + field_entity_map: + parent: project +- message_name: WarmUpAogVersionRequest + field_entity_map: + parent: project - message_name: ListContextsRequest field_entity_map: parent: session @@ -1241,10 +1601,10 @@ resource_name_generation: name: intent - message_name: BatchUpdateIntentsRequest field_entity_map: - parent: agent + parent: project_agent - message_name: BatchDeleteIntentsRequest field_entity_map: - parent: project + parent: project_agent - message_name: ListSessionEntityTypesRequest field_entity_map: parent: session @@ -1263,3 +1623,33 @@ resource_name_generation: - message_name: DetectIntentRequest field_entity_map: session: session +- message_name: ListKnowledgeBasesRequest + field_entity_map: + parent: project +- message_name: GetKnowledgeBaseRequest + field_entity_map: + name: knowledge_base +- message_name: CreateKnowledgeBaseRequest + field_entity_map: + parent: project +- message_name: KnowledgeBase + field_entity_map: + name: knowledge_base +- message_name: DeleteKnowledgeBaseRequest + field_entity_map: + name: knowledge_base +- message_name: ListDocumentsRequest + field_entity_map: + parent: knowledge_base +- message_name: GetDocumentRequest + field_entity_map: + name: document +- message_name: CreateDocumentRequest + field_entity_map: + parent: knowledge_base +- message_name: Document + field_entity_map: + name: document +- message_name: DeleteDocumentRequest + field_entity_map: + name: document diff --git a/google/cloud/dialogflow/v2beta1/document.proto b/google/cloud/dialogflow/v2beta1/document.proto new file mode 100644 index 000000000..5daf85593 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/document.proto @@ -0,0 +1,296 @@ +// 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.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.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 = "DocumentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Manages documents of a knowledge base. +service Documents { + 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 documents of the knowledge base. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" + } + }; + } + + // Retrieves the specified document. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc GetDocument(GetDocumentRequest) returns (Document) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + }; + } + + // Creates a new document. + // + // 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" + body: "document" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" + body: "document" + } + }; + } + + // 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/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + }; + } + + // 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/*}" + body: "document" + additional_bindings { + patch: "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}" + body: "document" + } + }; + } + + // Reloads the specified document from its specified source, content_uri or + // content. The previously loaded content of the document will be deleted. + // Note: Even when the content of the document has not changed, there still + // may be side effects because of internal implementation changes. + // + // 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" + body: "*" + additional_bindings { + post: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload" + body: "*" + } + }; + } +} + +// A document resource. +// +// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; +// only use `projects.knowledgeBases.documents`. +message Document { + // The knowledge type of document content. + enum KnowledgeType { + // The type is unspecified or arbitrary. + KNOWLEDGE_TYPE_UNSPECIFIED = 0; + + // The document content contains question and answer pairs as either HTML or + // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats + // may fail to be parsed. + // + // CSV must have questions in the first column and answers in the second, + // with no header. Because of this explicit format, they are always parsed + // accurately. + FAQ = 1; + + // Documents for which unstructured text is extracted and used for + // question answering. + EXTRACTIVE_QA = 2; + } + + // The document resource name. + // The name must be empty when creating a document. + // Format: `projects//knowledgeBases//documents/`. + string name = 1; + + // Required. The display name of the document. The name must be 1024 bytes or + // less; otherwise, the creation request fails. + string display_name = 2; + + // Required. The MIME type of this document. + string mime_type = 3; + + // Required. The knowledge type of document content. + repeated KnowledgeType knowledge_types = 4; + + // Required. The source of this document. + oneof source { + // The URI where the file content is located. + // + // For documents stored in Google Cloud Storage, these URIs must have + // the form `gs:///`. + // + // NOTE: External URLs must correspond to public webpages, i.e., they must + // be indexed by Google Search. In particular, URLs for showing documents in + // Google Cloud Storage (i.e. the URL in your browser) are not supported. + // Instead use the `gs://` format URI described above. + string content_uri = 5; + + // The raw content of the document. This field is only permitted for + // EXTRACTIVE_QA and FAQ knowledge types. + // Note: This field is in the process of being deprecated, please use + // raw_content instead. + string content = 6 [deprecated = true]; + + // The raw content of the document. This field is only permitted for + // EXTRACTIVE_QA and FAQ knowledge types. + bytes raw_content = 9; + } +} + +// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. +message ListDocumentsRequest { + // Required. The knowledge base to list all documents for. + // Format: `projects//knowledgeBases/`. + string parent = 1; + + // Optional. The maximum number of items to return in a single page. By + // default 10 and at most 100. + int32 page_size = 2; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. +message ListDocumentsResponse { + // The list of documents. + repeated Document documents = 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 message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. +message GetDocumentRequest { + // Required. The name of the document to retrieve. + // Format `projects//knowledgeBases//documents/`. + string name = 1; +} + +// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument]. +message CreateDocumentRequest { + // Required. The knoweldge base to create a document for. + // Format: `projects//knowledgeBases/`. + string parent = 1; + + // Required. The document to create. + Document document = 2; +} + +// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. +message DeleteDocumentRequest { + // The name of the document to delete. + // Format: `projects//knowledgeBases//documents/`. + string name = 1; +} + +// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. +message UpdateDocumentRequest { + // Required. The document to update. + Document document = 1; + + // Optional. Not specified means `update all`. + // Currently, only `display_name` can be updated, an InvalidArgument will be + // returned for attempting to update other fields. + google.protobuf.FieldMask update_mask = 2; +} + +// Metadata in google::longrunning::Operation for Knowledge operations. +message KnowledgeOperationMetadata { + // States of the operation. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The operation has been created. + PENDING = 1; + + // The operation is currently running. + RUNNING = 2; + + // The operation is done, either cancelled or completed. + DONE = 3; + } + + // Required. The current state of this operation. + State state = 1; +} + +// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. +message ReloadDocumentRequest { + // The name of the document to reload. + // Format: `projects//knowledgeBases//documents/` + string name = 1; +} diff --git a/google/cloud/dialogflow/v2beta1/entity_type.proto b/google/cloud/dialogflow/v2beta1/entity_type.proto index eb44197e7..0ef132062 100644 --- a/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/google/cloud/dialogflow/v2beta1/entity_type.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"; @@ -20,7 +21,7 @@ import "google/api/annotations.proto"; import "google/longrunning/operations.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.V2beta1"; @@ -30,7 +31,6 @@ option java_outer_classname = "EntityTypeProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // Entities are extracted from user input and represent parameters that are // meaningful to your application. For example, a date range, a proper name // such as a geographic location or landmark, and so on. Entities represent @@ -57,8 +57,14 @@ option objc_class_prefix = "DF"; // represented by the [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] type. // // For more information about entity types, see the -// [Dialogflow documentation](https://dialogflow.com/docs/entities). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). service EntityTypes { + 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 entity types in the specified agent. rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { option (google.api.http) = { @@ -98,8 +104,7 @@ service EntityTypes { // Updates/Creates multiple entity types in the specified agent. // - // Operation + // Operation rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate" @@ -109,8 +114,7 @@ service EntityTypes { // Deletes entity types in the specified agent. // - // Operation + // Operation rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete" @@ -118,8 +122,7 @@ service EntityTypes { }; } - // Creates multiple new entities in the specified entity type (extends the - // existing collection of entries). + // Creates multiple new entities in the specified entity type. // // Operation rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { @@ -129,11 +132,11 @@ service EntityTypes { }; } - // Updates entities in the specified entity type (replaces the existing - // collection of entries). + // 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 + // Operation rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" @@ -143,8 +146,7 @@ service EntityTypes { // Deletes entities in the specified entity type. // - // Operation + // Operation rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" @@ -157,18 +159,29 @@ service EntityTypes { // Entity types serve as a tool for extracting parameter values from natural // language queries. message EntityType { - // Optional. Represents an entity. + // An **entity entry** for an associated entity type. message Entity { - // Required. + // Required. The primary value associated with this entity entry. + // For example, if the entity type is *vegetable*, the value could be + // *scallions*. + // // For `KIND_MAP` entity types: - // A canonical name to be used in place of synonyms. + // + // * A canonical 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). + // + // * A string that can contain references to other entity types (with or + // without aliases). string value = 1; - // Required. A collection of synonyms. For `KIND_LIST` entity types this - // must contain exactly one synonym equal to `value`. + // Required. A collection of value synonyms. For example, if the entity type + // is *vegetable*, and `value` is *scallions*, a synonym could be *green + // onions*. + // + // For `KIND_LIST` entity types: + // + // * This collection must contain exactly one synonym equal to `value`. repeated string synonyms = 2; } @@ -199,13 +212,13 @@ message EntityType { AUTO_EXPANSION_MODE_DEFAULT = 1; } - // Required for all methods except `create` (`create` populates the name - // automatically. - // The unique identifier of the entity type. Format: - // `projects//agent/entityTypes/`. + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType] and + // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes] methods. + // Format: `projects//agent/entityTypes/`. string name = 1; - // Required. The name of the entity. + // Required. The name of the entity type. string display_name = 2; // Required. Indicates the kind of entity type. @@ -215,7 +228,7 @@ message EntityType { // expanded. AutoExpansionMode auto_expansion_mode = 4; - // Optional. The collection of entities associated with the entity type. + // Optional. The collection of entity entries associated with the entity type. repeated Entity entities = 6; } @@ -227,9 +240,10 @@ message ListEntityTypesRequest { // Optional. The language to list entity synonyms for. If not specified, // the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 maximum number of items to return in a single page. By @@ -259,9 +273,10 @@ message GetEntityTypeRequest { // Optional. The language to retrieve entity synonyms for. If not specified, // the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } @@ -276,23 +291,24 @@ message CreateEntityTypeRequest { // Optional. The language of entity synonyms defined in `entity_type`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } // The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. message UpdateEntityTypeRequest { // Required. The entity type to update. - // Format: `projects//agent/entityTypes/`. EntityType entity_type = 1; // Optional. The language of entity synonyms defined in `entity_type`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -315,8 +331,9 @@ message BatchUpdateEntityTypesRequest { // Required. The source of the entity type batch. // // For each entity type in the batch: - // * If `name` is specified, we update an existing entity type. - // * If `name` is not specified, we create a new entity type. + // + // * If `name` is specified, we update an existing entity type. + // * If `name` is not specified, we create a new entity type. oneof entity_type_batch { // The URI to a Google Cloud Storage file containing entity types to update // or create. The file format can either be a serialized proto (of @@ -324,15 +341,16 @@ message BatchUpdateEntityTypesRequest { // "gs://". string entity_type_batch_uri = 2; - // The collection of entity type to update or create. + // The collection of entity types to update or create. 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -362,31 +380,33 @@ message BatchCreateEntitiesRequest { // `projects//agent/entityTypes/`. string parent = 1; - // Required. The collection of entities to create. + // 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } -// The response message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. +// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. message BatchUpdateEntitiesRequest { - // Required. The name of the entity type to update the entities in. Format: - // `projects//agent/entityTypes/`. + // Required. The name of the entity type to update or create entities in. + // Format: `projects//agent/entityTypes/`. string parent = 1; - // Required. The collection of new entities to replace the existing entities. + // 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. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 mask to control which fields get updated. @@ -406,9 +426,10 @@ message BatchDeleteEntitiesRequest { // Optional. The language of entity synonyms defined in `entities`. If not // specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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; } diff --git a/google/cloud/dialogflow/v2beta1/intent.proto b/google/cloud/dialogflow/v2beta1/intent.proto index c03095224..ddd1234b1 100644 --- a/google/cloud/dialogflow/v2beta1/intent.proto +++ b/google/cloud/dialogflow/v2beta1/intent.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,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.dialogflow.v2beta1; import "google/api/annotations.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/context.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/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; @@ -31,7 +35,6 @@ option java_outer_classname = "IntentProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // An intent represents a mapping between input from a user and an action to // be taken by your application. When you pass user input to the // [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or @@ -46,7 +49,7 @@ option objc_class_prefix = "DF"; // * **Contexts** - provide additional context for intent analysis. For // example, if an intent is related to an object in your application that // plays music, you can provide a context to determine when to match the -// intent if the user input is “turn it off”. You can include a context +// intent if the user input is "turn it off". You can include a context // that matches the intent when there is previous user input of // "play music", and not when there is previous user input of // "turn on the light". @@ -62,8 +65,14 @@ option objc_class_prefix = "DF"; // Dialogflow API agent to better match intents. // // For more information about intents, see the -// [Dialogflow documentation](https://dialogflow.com/docs/intents). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/intents-overview). service Intents { + 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 intents in the specified agent. rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { option (google.api.http) = { @@ -94,7 +103,7 @@ service Intents { }; } - // Deletes the specified intent. + // Deletes the specified intent and its direct or indirect followup intents. rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/agent/intents/*}" @@ -126,26 +135,26 @@ 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 { - // Represents an example or template that the agent is trained on. + // Represents an example that the agent is trained on. message TrainingPhrase { // Represents a part of a training phrase. message Part { - // Required. The text corresponding to the example or template, - // if there are no annotations. For - // annotated examples, it is the text for one of the example's parts. + // Required. The text for this part. string text = 1; - // Optional. The entity type name prefixed with `@`. This field is - // required for the annotated part of the text and applies only to - // examples. + // Optional. The entity type name prefixed with `@`. + // This field is required for annotated parts of the training phrase. string entity_type = 2; // 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; - // Optional. Indicates whether the text was manually annotated by the - // developer. + // 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; } @@ -160,21 +169,41 @@ message Intent { // Templates are not annotated with entity types, but they can contain // @-prefixed entity type names as substrings. - TEMPLATE = 2; + // Template mode has been deprecated. Example mode is the only supported + // way to create new training phrases. If you have existing training + // phrases that you've created in template mode, those will continue to + // work. + TEMPLATE = 2 [deprecated = true]; } - // Required. The unique identifier of this training phrase. + // Output only. The unique identifier of this training phrase. string name = 1; // Required. The type of the training phrase. Type type = 2; - // Required. The collection of training phrase parts (can be annotated). - // Fields: `entity_type`, `alias` and `user_defined` should be populated - // only for the annotated parts of the training phrase. + // Required. The ordered list of training phrase parts. + // The parts are concatenated in order to form the training phrase. + // + // Note: The API does not automatically annotate training phrases like the + // Dialogflow Console does. + // + // Note: Do not forget to include whitespace at part boundaries, + // so the training phrase is well formatted when the parts are concatenated. + // + // If the training phrase does not need to be annotated with parameters, + // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `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; - // Optional. Indicates how many times this example or template was added to + // 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; @@ -213,7 +242,7 @@ message Intent { bool mandatory = 6; // Optional. The collection of prompts that the agent can present to the - // user in order to collect value for the parameter. + // user in order to collect a value for the parameter. repeated string prompts = 7; // Optional. Indicates whether the parameter represents a list of values. @@ -233,8 +262,8 @@ message Intent { // Optional. The public URI to an image file. string image_uri = 1; - // Optional. A text description of the image to be used for accessibility, - // e.g., screen readers. + // A text description of the image to be used for accessibility, + // e.g., screen readers. Required if image_uri is set for CarouselSelect. string accessibility_text = 2; } @@ -410,6 +439,286 @@ message Intent { repeated string synonyms = 2; } + // Plays audio from a file in Telephony Gateway. + message TelephonyPlayAudio { + // Required. URI to a Google Cloud Storage object containing the audio to + // play, e.g., "gs://bucket/object". The object must contain a single + // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. + // + // This object must be readable by the `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account + // where is the number of the Telephony Gateway project + // (usually the same as the Dialogflow agent project). If the Google Cloud + // Storage bucket is in the Telephony Gateway project, this permission is + // added by default when enabling the Dialogflow V2 API. + // + // For audio from other sources, consider using the + // `TelephonySynthesizeSpeech` message with SSML. + string audio_uri = 1; + } + + // Synthesizes speech and plays back the synthesized audio to the caller in + // Telephony Gateway. + // + // Telephony Gateway takes the synthesizer settings from + // `DetectIntentResponse.output_audio_config` which can either be set + // at request-level or can come from the agent-level synthesizer config. + message TelephonySynthesizeSpeech { + // Required. The source to be synthesized. + oneof source { + // The raw text to be synthesized. + string text = 1; + + // The SSML to be synthesized. For more information, see + // [SSML](https://developers.google.com/actions/reference/ssml). + string ssml = 2; + } + } + + // Transfers the call in Telephony Gateway. + message TelephonyTransferCall { + // Required. The phone number to transfer the call to + // in [E.164 format](https://en.wikipedia.org/wiki/E.164). + // + // We currently only allow transferring to US numbers (+1xxxyyyzzzz). + string phone_number = 1; + } + + // Rich Business Messaging (RBM) text response with suggestions. + message RbmText { + // Required. Text sent and displayed to the user. + string text = 1; + + // Optional. One or more suggestions to show to the user. + repeated RbmSuggestion rbm_suggestion = 2; + } + + // Carousel Rich Business Messaging (RBM) rich card. + // + // Rich cards allow you to respond to users with more vivid content, e.g. + // with media and suggestions. + // + // For more details about RBM rich cards, please see: + // https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. + // If you want to show a single card with more control over the layout, + // please use [RbmStandaloneCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard] instead. + message RbmCarouselCard { + // The width of the cards in the carousel. + enum CardWidth { + // Not specified. + CARD_WIDTH_UNSPECIFIED = 0; + + // 120 DP. Note that tall media cannot be used. + SMALL = 1; + + // 232 DP. + MEDIUM = 2; + } + + // Required. The width of the cards in the carousel. + CardWidth card_width = 1; + + // Required. The cards in the carousel. A carousel must have at least + // 2 cards and at most 10. + repeated RbmCardContent card_contents = 2; + } + + // Standalone Rich Business Messaging (RBM) rich card. + // + // Rich cards allow you to respond to users with more vivid content, e.g. + // with media and suggestions. + // + // For more details about RBM rich cards, please see: + // https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. + // You can group multiple rich cards into one using [RbmCarouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard] but + // carousel cards will give you less control over the card layout. + message RbmStandaloneCard { + // Orientation of the card. + enum CardOrientation { + // Not specified. + CARD_ORIENTATION_UNSPECIFIED = 0; + + // Horizontal layout. + HORIZONTAL = 1; + + // Vertical layout. + VERTICAL = 2; + } + + // Thumbnail preview alignment for standalone cards with horizontal + // layout. + enum ThumbnailImageAlignment { + // Not specified. + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0; + + // Thumbnail preview is left-aligned. + LEFT = 1; + + // Thumbnail preview is right-aligned. + RIGHT = 2; + } + + // Required. Orientation of the card. + CardOrientation card_orientation = 1; + + // Required if orientation is horizontal. + // Image preview alignment for standalone cards with horizontal layout. + ThumbnailImageAlignment thumbnail_image_alignment = 2; + + // Required. Card content. + RbmCardContent card_content = 3; + } + + // Rich Business Messaging (RBM) Card content + message RbmCardContent { + // Rich Business Messaging (RBM) Media displayed in Cards + // The following media-types are currently supported: + // + // ## Image Types + // + // image/jpeg + // image/jpg' + // image/gif + // image/png + // + // ## Video Types + // + // video/h263 + // video/m4v + // video/mp4 + // video/mpeg + // video/mpeg4 + // video/webm + message RbmMedia { + // Media height + enum Height { + // Not specified. + HEIGHT_UNSPECIFIED = 0; + + // 112 DP. + SHORT = 1; + + // 168 DP. + MEDIUM = 2; + + // 264 DP. Not available for rich card carousels when the card width + // is set to small. + TALL = 3; + } + + // Required. Publicly reachable URI of the file. The RBM platform + // determines the MIME type of the file from the content-type field in + // the HTTP headers when the platform fetches the file. The content-type + // field must be present and accurate in the HTTP response from the URL. + string file_uri = 1; + + // Optional. Publicly reachable URI of the thumbnail.If you don't + // provide a thumbnail URI, the RBM platform displays a blank + // placeholder thumbnail until the user's device downloads the file. + // Depending on the user's setting, the file may not download + // automatically and may require the user to tap a download button. + string thumbnail_uri = 2; + + // Required for cards with vertical orientation. The height of the media + // within a rich card with a vertical layout. (https://goo.gl/NeFCjz). + // For a standalone card with horizontal layout, height is not + // customizable, and this field is ignored. + Height height = 3; + } + + // Optional. Title of the card (at most 200 bytes). + // + // At least one of the title, description or media must be set. + string title = 1; + + // Optional. Description of the card (at most 2000 bytes). + // + // At least one of the title, description or media must be set. + string description = 2; + + // Optional. However at least one of the title, description or media must + // be set. Media (image, GIF or a video) to include in the card. + RbmMedia media = 3; + + // Optional. List of suggestions to include in the card. + repeated RbmSuggestion suggestions = 4; + } + + // Rich Business Messaging (RBM) suggestion. Suggestions allow user to + // easily select/click a predefined response or perform an action (like + // opening a web uri). + message RbmSuggestion { + // Predefined suggested response or action for user to choose + oneof suggestion { + // Predefined replies for user to select instead of typing + RbmSuggestedReply reply = 1; + + // Predefined client side actions that user can choose + RbmSuggestedAction action = 2; + } + } + + // Rich Business Messaging (RBM) suggested reply that the user can click + // instead of typing in their own response. + message RbmSuggestedReply { + // Suggested reply text. + string text = 1; + + // Opaque payload that the Dialogflow receives in a user event + // when the user taps the suggested reply. This data will be also + // forwarded to webhook to allow performing custom business logic. + string postback_data = 2; + } + + // Rich Business Messaging (RBM) suggested client-side action that the user + // can choose from the card. + message RbmSuggestedAction { + // Opens the user's default dialer app with the specified phone number + // but does not dial automatically (https://goo.gl/ergbB2). + message RbmSuggestedActionDial { + // Required. The phone number to fill in the default dialer app. + // This field should be in [E.164](https://en.wikipedia.org/wiki/E.164) + // format. An example of a correctly formatted phone number: + // +15556767888. + string phone_number = 1; + } + + // Opens the user's default web browser app to the specified uri + // (https://goo.gl/6GLJD2). If the user has an app installed that is + // registered as the default handler for the URL, then this app will be + // opened instead, and its icon will be used in the suggested action UI. + message RbmSuggestedActionOpenUri { + // Required. The uri to open on the user device + string uri = 1; + } + + // Opens the device's location chooser so the user can pick a location + // to send back to the agent (https://goo.gl/GXotJW). + message RbmSuggestedActionShareLocation { + + } + + // Text to display alongside the action. + string text = 1; + + // Opaque payload that the Dialogflow receives in a user event + // when the user taps the suggested action. This data will be also + // forwarded to webhook to allow performing custom business logic. + string postback_data = 2; + + // Action that needs to be triggered. + oneof action { + // Suggested client side action: Dial a phone number + RbmSuggestedActionDial dial = 3; + + // Suggested client side action: Open a URI on device + RbmSuggestedActionOpenUri open_url = 4; + + // Suggested client side action: Share user location + RbmSuggestedActionShareLocation share_location = 5; + } + } + // Represents different platforms that a rich message can be intended for. enum Platform { // Not specified. @@ -498,6 +807,12 @@ message Intent { // } // } ACTIONS_ON_GOOGLE = 8; + + // Telephony Gateway. + TELEPHONY = 10; + + // Google Hangouts. + GOOGLE_HANGOUTS = 11; } // Required. The rich response message. @@ -536,6 +851,27 @@ message Intent { // Displays a carousel card for Actions on Google. CarouselSelect carousel_select = 12; + + // Plays audio from a file in Telephony Gateway. + TelephonyPlayAudio telephony_play_audio = 13; + + // Synthesizes speech in Telephony Gateway. + TelephonySynthesizeSpeech telephony_synthesize_speech = 14; + + // Transfers the call in Telephony Gateway. + TelephonyTransferCall telephony_transfer_call = 15; + + // Rich Business Messaging (RBM) text response. + // + // RBM allows businesses to send enriched and branded versions of SMS. See + // https://jibe.google.com/business-messaging. + RbmText rbm_text = 18; + + // Standalone Rich Business Messaging (RBM) rich card response. + RbmStandaloneCard rbm_standalone_rich_card = 19; + + // Rich Business Messaging (RBM) carousel rich card response. + RbmCarouselCard rbm_carousel_rich_card = 20; } // Optional. The platform that this message is intended for. @@ -548,7 +884,7 @@ message Intent { // Format: `projects//agent/intents/`. string followup_intent_name = 1; - // The unique identifier of the followup intent parent. + // The unique identifier of the followup intent's parent. // Format: `projects//agent/intents/`. string parent_followup_intent_name = 2; } @@ -566,20 +902,23 @@ message Intent { WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; } - // Required for all methods except `create` (`create` populates the name - // automatically. // The unique identifier of this intent. + // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents] + // methods. // Format: `projects//agent/intents/`. string name = 1; // Required. The name of this intent. string display_name = 2; - // Required. Indicates whether webhooks are enabled for the 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. Zero or negative numbers mean that the intent is disabled. + // priorities. If this is zero or unspecified, we use the default + // priority 500000. + // + // Negative numbers mean that the intent is disabled. int32 priority = 3; // Optional. Indicates whether this is a fallback intent. @@ -590,13 +929,13 @@ message Intent { // taken into account during inference in `ML ONLY` match mode. Also, // auto-markup in the UI is turned off. // DEPRECATED! Please use `ml_disabled` field instead. - // NOTE: If neither `ml_enabled` nor `ml_disabled` field is set, then the - // default value is determined as follows: + // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, + // then the default value is determined as follows: // - Before April 15th, 2018 the default is: // ml_enabled = false / ml_disabled = true. // - After April 15th, 2018 the default is: // ml_enabled = true / ml_disabled = false. - bool ml_enabled = 5; + bool ml_enabled = 5 [deprecated = true]; // Optional. Indicates whether Machine Learning is disabled for the intent. // Note: If `ml_disabled` setting is set to true, then this intent is not @@ -604,6 +943,11 @@ message Intent { // auto-markup in the UI is turned off. bool ml_disabled = 19; + // Optional. Indicates that this intent ends an interaction. Some integrations + // (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 = 21; + // Optional. The list of context names required for this intent to be // triggered. // Format: `projects//agent/sessions/-/contexts/`. @@ -614,11 +958,12 @@ message Intent { // be present in the active user session for an event to trigger this intent. repeated string events = 8; - // Optional. The collection of examples/templates that the agent is + // Optional. The collection of examples that the agent is // trained on. repeated TrainingPhrase training_phrases = 9; // Optional. The name of the action associated with the intent. + // Note: The action name must not contain whitespaces. string action = 10; // Optional. The collection of contexts that are activated when the intent @@ -639,23 +984,28 @@ message Intent { // `Response` field in the Dialogflow console. repeated Message messages = 14; - // Optional. The list of platforms for which the first response will be - // taken from among the messages assigned to the DEFAULT_PLATFORM. + // 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; - // The unique identifier of the root intent in the chain of followup intents. - // It identifies the correct followup intents chain for this intent. + // Read-only. The unique identifier of the root intent in the chain of + // followup intents. It identifies the correct followup intents chain for + // this intent. We populate this field only in the output. + // // Format: `projects//agent/intents/`. string root_followup_intent_name = 16; - // The unique identifier of the parent intent in the chain of followup - // intents. + // 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. + // // It identifies the parent followup intent. // Format: `projects//agent/intents/`. string parent_followup_intent_name = 17; - // Optional. Collection of information about all followup intents that have - // name of this intent as a root_name. + // Read-only. Information about all followup intents that have this intent as + // a direct or indirect parent. We populate this field only in the output. repeated FollowupIntentInfo followup_intent_info = 18; } @@ -667,9 +1017,10 @@ message ListIntentsRequest { // Optional. The language to list training phrases, parameters and rich // messages for. If not specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent before they can be 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 resource view to apply to the returned intent. @@ -702,9 +1053,10 @@ message GetIntentRequest { // Optional. The language to retrieve training phrases, parameters and rich // messages for. If not specified, the agent's default language is used. - // [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be 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 resource view to apply to the returned intent. @@ -722,9 +1074,10 @@ message CreateIntentRequest { // Optional. The language of training phrases, parameters and rich messages // defined in `intent`. If not specified, the agent's default language is - // used. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 resource view to apply to the returned intent. @@ -734,14 +1087,14 @@ message CreateIntentRequest { // The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. message UpdateIntentRequest { // Required. The intent to update. - // Format: `projects//agent/intents/`. 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. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 mask to control which fields get updated. @@ -753,7 +1106,9 @@ message UpdateIntentRequest { // The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. message DeleteIntentRequest { - // Required. The name of the intent to delete. + // 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; } @@ -777,9 +1132,10 @@ message BatchUpdateIntentsRequest { // Optional. The language of training phrases, parameters and rich messages // defined in `intents`. If not specified, the agent's default language is - // used. [More than a dozen - // languages](https://dialogflow.com/docs/reference/language) are supported. - // Note: languages must be enabled in the agent, before they can be used. + // 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 mask to control which fields get updated. diff --git a/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/google/cloud/dialogflow/v2beta1/knowledge_base.proto new file mode 100644 index 000000000..ce992dde4 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -0,0 +1,188 @@ +// 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.dialogflow.v2beta1; + +import "google/api/annotations.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.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "KnowledgeBaseProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Manages knowledge bases. +// +// Allows users to setup and maintain knowledge bases with their knowledge data. +service KnowledgeBases { + 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 knowledge bases of the specified agent. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*}/knowledgeBases" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" + } + }; + } + + // Retrieves the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/knowledgeBases/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" + } + }; + } + + // Creates a knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc CreateKnowledgeBase(CreateKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/knowledgeBases" + body: "knowledge_base" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" + body: "knowledge_base" + } + }; + } + + // Deletes the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/knowledgeBases/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" + } + }; + } + + // Updates the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc UpdateKnowledgeBase(UpdateKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + patch: "/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}" + body: "knowledge_base" + additional_bindings { + patch: "/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}" + body: "knowledge_base" + } + }; + } +} + +// Represents knowledge base resource. +// +// Note: The `projects.agent.knowledgeBases` resource is deprecated; +// only use `projects.knowledgeBases`. +message KnowledgeBase { + // The knowledge base resource name. + // The name must be empty when creating a knowledge base. + // Format: `projects//knowledgeBases/`. + string name = 1; + + // 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; +} + +// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. +message ListKnowledgeBasesRequest { + // Required. The project to list of knowledge bases for. + // Format: `projects/`. + string parent = 1; + + // Optional. The maximum number of items to return in a single page. By + // default 10 and at most 100. + int32 page_size = 2; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. +message ListKnowledgeBasesResponse { + // The list of knowledge bases. + repeated KnowledgeBase knowledge_bases = 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 message for [KnowledgeBase.GetDocument][]. +message GetKnowledgeBaseRequest { + // Required. The name of the knowledge base to retrieve. + // Format `projects//knowledgeBases/`. + string name = 1; +} + +// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. +message CreateKnowledgeBaseRequest { + // Required. The project to create a knowledge base for. + // Format: `projects/`. + string parent = 1; + + // Required. The knowledge base to create. + KnowledgeBase knowledge_base = 2; +} + +// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. +message DeleteKnowledgeBaseRequest { + // Required. The name of the knowledge base to delete. + // Format: `projects//knowledgeBases/`. + string name = 1; + + // Optional. Force deletes the knowledge base. When set to true, any documents + // in the knowledge base are also deleted. + bool force = 2; +} + +// Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. +message UpdateKnowledgeBaseRequest { + // Required. The knowledge base to update. + KnowledgeBase knowledge_base = 1; + + // Optional. Not specified means `update all`. + // Currently, only `display_name` can be updated, an InvalidArgument will be + // returned for attempting to update other fields. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/google/cloud/dialogflow/v2beta1/session.proto b/google/cloud/dialogflow/v2beta1/session.proto index 489c2b9ac..8d0f91f45 100644 --- a/google/cloud/dialogflow/v2beta1/session.proto +++ b/google/cloud/dialogflow/v2beta1/session.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,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.dialogflow.v2beta1; import "google/api/annotations.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/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.V2beta1"; @@ -32,12 +37,16 @@ option java_outer_classname = "SessionProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // 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 // [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method to determine // user intent and respond. service Sessions { + 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"; + // Processes a natural language query and returns structured, actionable data // as a result. This method is not idempotent, because it may cause contexts // and session entity types to be updated, which in turn might affect @@ -56,7 +65,8 @@ service Sessions { // Processes a natural language query in audio format in a streaming fashion // and returns structured, actionable data as a result. This method is only // available via the gRPC API (not REST). - rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse); + rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { + } } // The request to detect user's intent. @@ -64,13 +74,12 @@ message DetectIntentRequest { // Required. The name of the session this query is sent to. Format: // `projects//agent/sessions/`, or // `projects//agent/environments//users//sessions/`. Note: Environments and users are under - // construction and will be available soon. If is not - // specified, we assume default 'draft' environment. If is not - // specified, we are using "-". It’s up to the API caller to choose an - // appropriate . and . They can be a random numbers or - // some type of user and session identifiers (preferably hashed). The length - // of the and must not exceed 36 characters. + // ID>/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; // Optional. The parameters of this query. @@ -86,6 +95,11 @@ 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 + // 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 // 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. @@ -98,12 +112,33 @@ message DetectIntentResponse { // locate a response in the training example set or for reporting issues. string response_id = 1; - // The results of the conversational query or event processing. + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. QueryResult query_result = 2; - // Specifies the status of the webhook request. `webhook_status` - // is never populated in webhook requests. + // If Knowledge Connectors are enabled, there could be more than one result + // returned for a given query or event, and this field will contain all + // results except for the top one, which is captured in query_result. The + // alternative results are ordered by decreasing + // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are + // disabled, this field will be empty until multiple responses for regular + // intents are supported, at which point those additional results will be + // surfaced here. + repeated QueryResult alternative_query_results = 5; + + // Specifies the status of the webhook request. google.rpc.Status webhook_status = 3; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // 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. + bytes output_audio = 4; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; } // Represents the parameters of the conversational query. @@ -125,14 +160,25 @@ message QueryParameters { // before the new ones are activated. bool reset_contexts = 4; - // Optional. The collection of session entity types to replace or extend - // developer entities with for this query only. The entity synonyms apply - // to all languages. + // 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 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. google.protobuf.Struct payload = 6; + + // Optional. 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 + // provided, sentiment analysis is not performed. + // Note: Sentiment Analysis is only currently available for Enterprise Edition + // agents. + SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; } // Represents the query input. It can contain either: @@ -140,7 +186,7 @@ message QueryParameters { // 1. An audio config which // instructs the speech recognizer how to process the speech audio. // -// 2. A conversational query in the form of text,. +// 2. A conversational query in the form of text. // // 3. An event that specifies which intent to trigger. message QueryInput { @@ -160,16 +206,19 @@ message QueryInput { // Represents the result of conversational query or event processing. message QueryResult { // The original conversational query text: + // // - If natural language text was provided as input, `query_text` contains // a copy of the input. // - If natural language speech audio was provided as input, `query_text` // contains the speech recognition result. If speech recognizer produced // multiple alternatives, a particular one is picked. - // - If an event was provided as input, `query_text` is not set. + // - If automatic spell correction is enabled, `query_text` will contain the + // corrected user input. string query_text = 1; // The language that was triggered during intent detection. - // See [Language Support](https://dialogflow.com/docs/reference/language) + // See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. string language_code = 15; @@ -178,10 +227,10 @@ message QueryResult { // correct. The default of 0.0 is a sentinel value indicating that confidence // was not set. // - // You should not rely on this field as it isn't guaranteed to be accurate, or - // even set. In particular this field isn't set in Webhook calls and for - // StreamingDetectIntent since the streaming endpoint has separate confidence - // estimates per portion of the audio in StreamingRecognitionResult. + // This field is not guaranteed to be accurate or set. In particular this + // field isn't set for StreamingDetectIntent since the streaming endpoint has + // separate confidence estimates per portion of the audio in + // StreamingRecognitionResult. float speech_recognition_confidence = 2; // The action name from the matched intent. @@ -191,6 +240,7 @@ message QueryResult { google.protobuf.Struct parameters = 4; // This field is set to: + // // - `false` if the matched intent has required parameters and not all of // the required parameter values have been collected. // - `true` if all required parameter values have been collected, or if the @@ -198,6 +248,7 @@ message QueryResult { bool all_required_params_present = 5; // The text to be pronounced to the user or shown on the screen. + // Note: This is a legacy field, `fulfillment_messages` should be preferred. string fulfillment_text = 6; // The collection of rich messages to present to the user. @@ -224,11 +275,82 @@ message QueryResult { // The intent detection confidence. Values range from 0.0 // (completely uncertain) to 1.0 (completely certain). + // This value is for informational purpose only and is only used to + // help match the best intent within the classification threshold. + // This value may change for the same end-user expression at any time due to a + // model retraining or change in implementation. + // If there are `multiple knowledge_answers` messages, this value is set to + // 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 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. google.protobuf.Struct diagnostic_info = 14; + + // The sentiment analysis result, which depends on the + // `sentiment_analysis_request_config` specified in the request. + SentimentAnalysisResult sentiment_analysis_result = 17; + + // The result from Knowledge Connector (if any), ordered by decreasing + // `KnowledgeAnswers.match_confidence`. + KnowledgeAnswers knowledge_answers = 18; +} + +// Represents the result of querying a Knowledge base. +message KnowledgeAnswers { + // An answer from Knowledge Connector. + message Answer { + // Represents the system's confidence that this knowledge answer is a good + // match for this conversational query. + enum MatchConfidenceLevel { + // Not specified. + MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0; + + // Indicates that the confidence is low. + LOW = 1; + + // Indicates our confidence is medium. + MEDIUM = 2; + + // Indicates our confidence is high. + HIGH = 3; + } + + // Indicates which Knowledge Document this answer was extracted from. + // Format: `projects//knowledgeBases//documents/`. + string source = 1; + + // The corresponding FAQ question if the answer was extracted from a FAQ + // Document, empty otherwise. + string faq_question = 2; + + // The piece of text from the `source` knowledge base document that answers + // this conversational query. + string answer = 3; + + // The system's confidence level that this knowledge answer is a good match + // for this conversational query. + // NOTE: The confidence level for a given `` pair may change + // without notice, as it depends on models that are constantly being + // improved. However, it will change less frequently than the confidence + // score below, and should be preferred for referencing the quality of an + // answer. + MatchConfidenceLevel match_confidence_level = 4; + + // The system's confidence score that this Knowledge answer is a good match + // for this conversational query. + // The range is from 0.0 (completely uncertain) to 1.0 (completely certain). + // Note: The confidence score is likely to vary somewhat (possibly even for + // identical requests), as the underlying model is under constant + // improvement. It may be deprecated in the future. We recommend using + // `match_confidence_level` which should be generally more stable. + float match_confidence = 5; + } + + // A list of answers from Knowledge Connector. + repeated Answer answers = 1; } // The top-level message sent by the client to the @@ -237,23 +359,22 @@ message QueryResult { // Multiple request messages should be sent in order: // // 1. The first message must contain `session`, `query_input` plus optionally -// `query_params` and/or `single_utterance`. The message must not contain `input_audio`. -// +// `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 only `input_audio`. -// Otherwise, finish the request stream. +// all subsequent messages must contain `input_audio`. Otherwise, finish the request stream. message StreamingDetectIntentRequest { // Required. The name of the session the query is sent to. // Format of the session name: // `projects//agent/sessions/`, or // `projects//agent/environments//users//sessions/`. Note: Environments and users are under - // construction and will be available soon. If is not - // specified, we assume default 'draft' environment. If is not - // specified, we are using "-". It’s up to the API caller to choose an - // appropriate . and . They can be a random numbers or - // some type of user and session identifiers (preferably hashed). The length - // of the and must not exceed 36 characters. + // ID>/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; // Optional. The parameters of this query. @@ -269,6 +390,7 @@ message StreamingDetectIntentRequest { // 3. an event that specifies which intent to trigger. 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 // client closes the stream. // If `true`, the recognizer will detect a single spoken utterance in input @@ -279,6 +401,11 @@ 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 + // 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 // `query_input` was set to a streaming input audio config. The complete audio // over all streaming messages must not exceed 1 minute. @@ -295,8 +422,13 @@ message StreamingDetectIntentRequest { // complete transcript of what the user said. The last `recognition_result` // has `is_final` set to `true`. // -// 2. The next message contains `response_id`, `query_result` -// and optionally `webhook_status` if a WebHook was called. +// 2. The next message contains `response_id`, `query_result`, +// `alternative_query_results` and optionally `webhook_status` if a WebHook +// was called. +// +// 3. If `output_audio_config` was specified in the request or agent-level +// speech synthesizer is configured, all subsequent messages contain +// `output_audio` and `output_audio_config`. message StreamingDetectIntentResponse { // The unique identifier of the response. It can be used to // locate a response in the training example set or for reporting issues. @@ -305,11 +437,33 @@ message StreamingDetectIntentResponse { // The result of speech recognition. StreamingRecognitionResult recognition_result = 2; - // The result of the conversational query or event processing. + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. QueryResult query_result = 3; + // If Knowledge Connectors are enabled, there could be more than one result + // returned for a given query or event, and this field will contain all + // results except for the top one, which is captured in query_result. The + // alternative results are ordered by decreasing + // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are + // disabled, this field will be empty until multiple responses for regular + // intents are supported, at which point those additional results will be + // surfaced here. + repeated QueryResult alternative_query_results = 7; + // Specifies the status of the webhook request. google.rpc.Status webhook_status = 4; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // 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. + bytes output_audio = 5; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; } // Contains a speech recognition result corresponding to a portion of the audio @@ -331,7 +485,7 @@ message StreamingDetectIntentResponse { // // 6. transcript: " that is" // -// 7. recognition_event_type: `RECOGNITION_EVENT_END_OF_SINGLE_UTTERANCE` +// 7. message_type: `END_OF_SINGLE_UTTERANCE` // // 8. transcript: " that is the question" // is_final: true @@ -342,9 +496,9 @@ message StreamingDetectIntentResponse { // // In each response we populate: // -// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`. +// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. // -// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `event_type`. +// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. message StreamingRecognitionResult { // Type of the response message. enum MessageType { @@ -368,14 +522,13 @@ message StreamingRecognitionResult { MessageType message_type = 1; // Transcript text representing the words that the user spoke. - // Populated if and only if `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + // Populated if and only if `message_type` = `TRANSCRIPT`. string transcript = 2; - // The default of 0.0 is a sentinel value indicating `confidence` was not set. // If `false`, the `StreamingRecognitionResult` represents an // interim result that may change. If `true`, the recognizer will not return // any further hypotheses about this piece of the audio. May only be populated - // for `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + // for `message_type` = `TRANSCRIPT`. bool is_final = 3; // The Speech confidence between 0.0 and 1.0 for the current portion of audio. @@ -386,50 +539,44 @@ 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; -} - -// 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](/speech/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://dialogflow.com/docs/languages) 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; - // Optional. The collection of phrase hints which are used to boost accuracy - // of speech recognition. - // Refer to [Cloud Speech API documentation](/speech/docs/basics#phrase-hints) - // for more details. - repeated string phrase_hints = 4; + // An estimate of the likelihood that the speech recognizer will + // not change its guess about this interim recognition result: + // * If the value is unspecified or 0.0, Dialogflow didn't compute the + // stability. In particular, Dialogflow will only provide stability for + // `TRANSCRIPT` results with `is_final = false`. + // * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + // unstable and 1.0 means completely stable. + float stability = 6; + + // Word-specific information for the words recognized by Speech in + // [transcript][google.cloud.dialogflow.v2beta1.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 bytes. + // Text length must not exceed 256 characters. string text = 1; // Required. The language of this conversational query. See [Language - // Support](https://dialogflow.com/docs/languages) 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. + // 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; } // Events allow for matching intents by event name instead of the natural -// language input. For instance, input `` can trigger a personalized welcome response. +// language input. For instance, input `` can trigger a personalized welcome response. // The parameter `name` may be used by the agent in the response: -// `“Hello #welcome_event.name! What can I do for you today?”`. +// `"Hello #welcome_event.name! What can I do for you today?"`. message EventInput { // Required. The unique identifier of the event. string name = 1; @@ -438,55 +585,35 @@ message EventInput { google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language - // Support](https://dialogflow.com/docs/languages) 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. + // 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; } -// Audio encoding of the audio content sent in the conversational query request. -// Refer to the [Cloud Speech API documentation](/speech/docs/basics) for more -// details. -enum AudioEncoding { - // Not specified. - AUDIO_ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_LINEAR_16 = 1; - - // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio - // Codec) is the recommended encoding because it is lossless (therefore - // recognition is not compromised) and requires only about half the - // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and - // 24-bit samples, however, not all fields in `STREAMINFO` are supported. - AUDIO_ENCODING_FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - AUDIO_ENCODING_MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AUDIO_ENCODING_AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_AMR_WB = 5; - - // Opus encoded audio frames in Ogg container - // ([OggOpus](https://wiki.xiph.org/OggOpus)). - // `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_OGG_OPUS = 6; - - // Although the use of lossy encodings is not recommended, if a very low - // bitrate encoding is required, `OGG_OPUS` is highly preferred over - // Speex encoding. The [Speex](https://speex.org/) encoding supported by - // Dialogflow API has a header byte in each block, as in MIME type - // `audio/x-speex-with-header-byte`. - // It is a variant of the RTP Speex encoding defined in - // [RFC 5574](https://tools.ietf.org/html/rfc5574). - // The stream is a sequence of blocks, one block per RTP packet. Each block - // starts with a byte containing the length of the block, in bytes, followed - // by one or more frames of Speex data, padded to an integral number of - // bytes (octets) as specified in RFC 5574. In other words, each RTP header - // is replaced with a single byte containing the block length. Only Speex - // wideband is supported. `sample_rate_hertz` must be 16000. - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; +// Configures the types of sentiment analysis to perform. +message SentimentAnalysisRequestConfig { + // Optional. 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; +} + +// The result of sentiment analysis as configured by +// `sentiment_analysis_request_config`. +message SentimentAnalysisResult { + // The sentiment analysis result for `query_text`. + Sentiment query_text_sentiment = 1; +} + +// The sentiment, such as positive/negative feeling or association, for a unit +// of analysis, such as the query text. +message Sentiment { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the absolute + // magnitude of sentiment, regardless of score (positive or negative). + float magnitude = 2; } diff --git a/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/google/cloud/dialogflow/v2beta1/session_entity_type.proto index 2c36ee3b6..a8bd153e4 100644 --- a/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/google/cloud/dialogflow/v2beta1/session_entity_type.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"; @@ -20,6 +21,7 @@ import "google/api/annotations.proto"; import "google/cloud/dialogflow/v2beta1/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.V2beta1"; @@ -29,7 +31,6 @@ option java_outer_classname = "SessionEntityTypeProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // Entities are extracted from user input and represent parameters that are // meaningful to your application. For example, a date range, a proper name // such as a geographic location or landmark, and so on. Entities represent @@ -41,8 +42,14 @@ option objc_class_prefix = "DF"; // entity type at the session level. // // For more information about entity types, see the -// [Dialogflow documentation](https://dialogflow.com/docs/entities). +// [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). service SessionEntityTypes { + 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 session entity types in the specified session. rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { option (google.api.http) = { @@ -64,6 +71,9 @@ service SessionEntityTypes { } // Creates a session entity type. + // + // If the specified session entity type already exists, overrides the + // session entity type. rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" @@ -117,10 +127,13 @@ message SessionEntityType { // The collection of session entities extends the collection of entities in // the corresponding developer entity type. - // Calls to `ListSessionEntityTypes`, `GetSessionEntityType`, - // `CreateSessionEntityType` and `UpdateSessionEntityType` return the full - // collection of entities from the developer entity type in the agent's - // default language and the session 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 + // and merge. ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; } @@ -128,11 +141,12 @@ message SessionEntityType { // `projects//agent/sessions//entityTypes/`, or // `projects//agent/environments//users//sessions - // //entityTypes/`. - // Note: Environments and users are under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // ID>/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; // Required. Indicates whether the additional data should override or @@ -150,9 +164,8 @@ message ListSessionEntityTypesRequest { // Format: `projects//agent/sessions/` or // `projects//agent/environments//users// // sessions/`. - // Note: Environments and users are under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. string parent = 1; // Optional. The maximum number of items to return in a single page. By @@ -179,11 +192,9 @@ message GetSessionEntityTypeRequest { // Required. The name of the session entity type. Format: // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions// - // entityTypes/`. - // Note: Environments and users re under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // ID>/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; } @@ -192,10 +203,9 @@ message CreateSessionEntityTypeRequest { // Required. The session to create a session entity type for. // Format: `projects//agent/sessions/` or // `projects//agent/environments//users// - // sessions/`. - // Note: Environments and users are under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // 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; // Required. The session entity type to create. @@ -208,10 +218,8 @@ message UpdateSessionEntityTypeRequest { // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - // Note: Environments and users are under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // Name>`. If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. SessionEntityType session_entity_type = 1; // Optional. The mask to control which fields get updated. @@ -224,9 +232,7 @@ message DeleteSessionEntityTypeRequest { // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. - // Note: Environments and users are under construction and will be available - // soon. If is not specified, we assume default 'draft' - // environment. If is not specified, we assume default '-' user. + // Name>`. If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. string name = 1; } diff --git a/google/cloud/dialogflow/v2beta1/webhook.proto b/google/cloud/dialogflow/v2beta1/webhook.proto index e19ce8352..cdf630102 100644 --- a/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/google/cloud/dialogflow/v2beta1/webhook.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,16 +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.v2beta1; -import "google/api/annotations.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; import "google/cloud/dialogflow/v2beta1/intent.proto"; import "google/cloud/dialogflow/v2beta1/session.proto"; +import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; @@ -30,12 +32,13 @@ option java_outer_classname = "WebhookProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; - // The request message for a webhook call. message WebhookRequest { // The unique identifier of detectIntent request session. // Can be used to identify end-user inside webhook implementation. - // Format: `projects//agent/sessions/`. + // Format: `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. string session = 4; // The unique identifier of the response. Contains the same value as @@ -46,6 +49,9 @@ message WebhookRequest { // same value as `[Streaming]DetectIntentResponse.query_result`. QueryResult query_result = 2; + // Alternative query results from KnowledgeService. + repeated QueryResult alternative_query_results = 5; + // Optional. The contents of the original request that was passed to // `[Streaming]DetectIntent` call. OriginalDetectIntentRequest original_detect_intent_request = 3; @@ -95,7 +101,14 @@ message WebhookResponse { // Optional. Makes the platform immediately invoke another `DetectIntent` call // internally with the specified event as input. + // When this field is set, Dialogflow ignores the `fulfillment_text`, + // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; + + // Optional. Indicates that this intent ends an interaction. Some integrations + // (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; } // Represents the contents of the original request that was passed to @@ -105,7 +118,22 @@ message OriginalDetectIntentRequest { // by Dialogflow-owned servers. string source = 1; - // Optional. This field is set to the value of `QueryParameters.payload` field - // passed in the request. + // Optional. The version of the protocol used for this request. + // This field is AoG-specific. + string version = 2; + + // Optional. This field is set to the value of the `QueryParameters.payload` + // 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: + //
{
+  //  "telephony": {
+  //    "caller_id": "+18558363987"
+  //  }
+  // }
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard + // Edition agents and populated with the caller ID in [E.164 + // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. google.protobuf.Struct payload = 3; } diff --git a/google/cloud/functions/artman_functions.yaml b/google/cloud/functions/artman_functions.yaml index f7c6c0a24..d23f76de3 100644 --- a/google/cloud/functions/artman_functions.yaml +++ b/google/cloud/functions/artman_functions.yaml @@ -12,83 +12,23 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-functions - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/google-cloud-functions-v1beta2 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-functions-v1beta2 - - name: grpc - dest: generated/python/proto-google-cloud-functions-v1beta2 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-functions-v1beta2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/functions/v1beta2 - dest: google-cloud-functions/lib/google/cloud/functions/v1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-functions - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: functions/apiv1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: google-functions-v1beta2/cloud.google.com/go/functions/apiv1beta2 - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/functions - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1beta2 - dest: packages/functions/src/v1beta2 - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/functions/v1beta2/functions.proto b/google/cloud/functions/v1beta2/functions.proto index 0280a8dea..77a66841a 100644 --- a/google/cloud/functions/v1beta2/functions.proto +++ b/google/cloud/functions/v1beta2/functions.proto @@ -29,42 +29,59 @@ option java_outer_classname = "FunctionsProto"; option java_package = "com.google.cloud.functions.v1beta2"; option objc_class_prefix = "GCF"; - // A service that application uses to manipulate triggers and functions. service CloudFunctionsService { // 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.http) = { + get: "/v1beta2/{location=projects/*/locations/*}/functions" + }; } // Returns a function with the given name from the requested project. rpc GetFunction(GetFunctionRequest) returns (CloudFunction) { - option (google.api.http) = { get: "/v1beta2/{name=projects/*/locations/*/functions/*}" }; + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/functions/*}" + }; } // 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) { - option (google.api.http) = { post: "/v1beta2/{location=projects/*/locations/*}/functions" body: "function" }; + rpc CreateFunction(CreateFunctionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{location=projects/*/locations/*}/functions" + body: "function" + }; } // Updates existing function. - rpc UpdateFunction(UpdateFunctionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { put: "/v1beta2/{name=projects/*/locations/*/functions/*}" body: "function" }; + rpc UpdateFunction(UpdateFunctionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + put: "/v1beta2/{name=projects/*/locations/*/functions/*}" + body: "function" + }; } // 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) { - option (google.api.http) = { delete: "/v1beta2/{name=projects/*/locations/*/functions/*}" }; + rpc DeleteFunction(DeleteFunctionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/functions/*}" + }; } // Invokes synchronously deployed function. To be used for testing, very // limited traffic allowed. rpc CallFunction(CallFunctionRequest) returns (CallFunctionResponse) { - option (google.api.http) = { post: "/v1beta2/{name=projects/*/locations/*/functions/*}:call" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/{name=projects/*/locations/*/functions/*}:call" + body: "*" + }; } } diff --git a/google/cloud/functions/v1beta2/functions_gapic.yaml b/google/cloud/functions/v1beta2/functions_gapic.yaml index 68da8d821..3f7e53ade 100644 --- a/google/cloud/functions/v1beta2/functions_gapic.yaml +++ b/google/cloud/functions/v1beta2/functions_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: functions.v1beta2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.functions.v1beta2.CloudFunctionsService collections: @@ -50,7 +47,6 @@ interfaces: - location required_fields: - location - request_object_method: true page_streaming: request: page_size_field: page_size @@ -70,7 +66,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -85,7 +80,6 @@ interfaces: required_fields: - location - function - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -107,7 +101,6 @@ interfaces: required_fields: - name - function - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -127,7 +120,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -149,7 +141,6 @@ interfaces: required_fields: - name - data - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/cloud/functions/v1beta2/operations.proto b/google/cloud/functions/v1beta2/operations.proto index 2a6f267e8..1456a924e 100644 --- a/google/cloud/functions/v1beta2/operations.proto +++ b/google/cloud/functions/v1beta2/operations.proto @@ -24,7 +24,6 @@ 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 diff --git a/google/cloud/iot/BUILD.bazel b/google/cloud/iot/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/iot/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/iot/artman_cloudiot.yaml b/google/cloud/iot/artman_cloudiot.yaml index c0317e43d..4ff6d9a40 100644 --- a/google/cloud/iot/artman_cloudiot.yaml +++ b/google/cloud/iot/artman_cloudiot.yaml @@ -5,6 +5,7 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v1 service_yaml: cloudiot.yaml @@ -24,12 +25,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-iot-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/iot/v1/BUILD.bazel b/google/cloud/iot/v1/BUILD.bazel new file mode 100644 index 000000000..b7a137950 --- /dev/null +++ b/google/cloud/iot/v1/BUILD.bazel @@ -0,0 +1,156 @@ +# 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 = "iot_proto", + srcs = [ + "device_manager.proto", + "resources.proto", + ], + deps = [ + "//google/api:annotations_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 = "iot_proto_with_info", + deps = [":iot_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +java_proto_library( + name = "iot_java_proto", + deps = [":iot_proto"], +) + +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"], +) + +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"], + deps = [ + ":iot_java_proto", + ":iot_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":iot_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.iot.v1.DeviceManagerClientTest", +]] + +# Opensource 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 = [ + ":iot_java_proto", + ":iot_proto", + ":iot_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 = "iot_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/iot/v1", + protos = [":iot_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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", + deps = [ + ":iot_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_test( + name = "iot_go_gapic_test", + srcs = [":iot_go_gapic_srcjar_test"], + embed = [":iot_go_gapic"], + importpath = "cloud.google.com/go/iot/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/iot/v1/cloudiot_gapic.yaml b/google/cloud/iot/v1/cloudiot_gapic.yaml index 2b0b789cd..72ed2c09b 100644 --- a/google/cloud/iot/v1/cloudiot_gapic.yaml +++ b/google/cloud/iot/v1/cloudiot_gapic.yaml @@ -17,12 +17,6 @@ language_settings: nodejs: package_name: iot.v1 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. @@ -97,10 +91,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -151,7 +141,6 @@ interfaces: - device_registry header_request_params: - parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -167,7 +156,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -185,7 +173,6 @@ interfaces: - update_mask header_request_params: - device_registry.name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -201,7 +188,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -217,7 +203,6 @@ interfaces: - parent header_request_params: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -242,7 +227,6 @@ interfaces: - device header_request_params: - parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -258,7 +242,6 @@ interfaces: - name header_request_params: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -276,7 +259,6 @@ interfaces: - update_mask header_request_params: - device.name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -292,7 +274,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -308,7 +289,6 @@ interfaces: - parent header_request_params: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -333,7 +313,6 @@ interfaces: - binary_data header_request_params: - name - request_object_method: true retry_codes_name: rate_limited_aware retry_params_name: rate_limited_aware field_name_patterns: @@ -349,7 +328,6 @@ interfaces: - name header_request_params: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -365,7 +343,6 @@ interfaces: - name header_request_params: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -383,7 +360,6 @@ interfaces: - policy header_request_params: - resource - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -399,7 +375,6 @@ interfaces: - resource header_request_params: - resource - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -417,13 +392,68 @@ interfaces: - permissions header_request_params: - resource - request_object_method: true 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: @@ -467,6 +497,15 @@ resource_name_generation: - 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 diff --git a/google/cloud/iot/v1/device_manager.proto b/google/cloud/iot/v1/device_manager.proto index dd9f99410..27ec0f030 100644 --- a/google/cloud/iot/v1/device_manager.proto +++ b/google/cloud/iot/v1/device_manager.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -24,6 +25,7 @@ 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; option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot"; @@ -31,12 +33,11 @@ option java_multiple_files = true; option java_outer_classname = "DeviceManagerProto"; option java_package = "com.google.cloud.iot.v1"; - -// Internet of things (IoT) service. Allows to manipulate device registry -// instances and the registration of devices (Things) to the cloud. +// Internet of Things (IoT) service. Securely connect and manage IoT devices. service DeviceManager { // 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" @@ -51,7 +52,8 @@ service DeviceManager { } // 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" @@ -59,14 +61,16 @@ service DeviceManager { } // 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/*}" }; } // Lists device registries. - rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) { + rpc ListDeviceRegistries(ListDeviceRegistriesRequest) + returns (ListDeviceRegistriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/registries" }; @@ -106,9 +110,6 @@ service DeviceManager { rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" - } }; } @@ -117,7 +118,7 @@ service DeviceManager { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/registries/*}/devices" additional_bindings { - get: "/v1/{parent=projects/*/locations/*/groups/*}/devices" + get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" } }; } @@ -125,7 +126,8 @@ service DeviceManager { // 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: "*" @@ -138,7 +140,8 @@ service DeviceManager { // 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 { @@ -149,7 +152,8 @@ service DeviceManager { // 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 { @@ -160,7 +164,8 @@ service DeviceManager { // 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,7 +179,8 @@ service DeviceManager { // 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: "*" @@ -188,7 +194,8 @@ service DeviceManager { // 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: "*" @@ -198,6 +205,57 @@ service DeviceManager { } }; } + + // Sends a command to the specified device. In order for a device to be able + // to receive commands, it must: + // 1) be connected to Cloud IoT Core using the MQTT protocol, and + // 2) be subscribed to the group of MQTT topics specified by + // /devices/{device-id}/commands/#. This subscription will receive commands + // at the top-level topic /devices/{device-id}/commands as well as commands + // for subfolders, like /devices/{device-id}/commands/subfolder. + // Note that subscribing to specific subfolders is not supported. + // If the command could not be delivered to the device, this method will + // return an error; in particular, if the device is not subscribed, this + // 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) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice" + body: "*" + } + }; + } + + // Associates the device with the gateway. + rpc BindDeviceToGateway(BindDeviceToGatewayRequest) + returns (BindDeviceToGatewayResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway" + body: "*" + } + }; + } + + // Deletes the association between the device and the gateway. + rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) + returns (UnbindDeviceFromGatewayResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway" + body: "*" + } + }; + } } // Request for `CreateDeviceRegistry`. @@ -249,13 +307,13 @@ message ListDeviceRegistriesRequest { // 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 - // objects than requested, but if there is a non-empty `page_token`, it - // indicates that more entries are available. + // objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. int32 page_size = 2; // The value returned by the last `ListDeviceRegistriesResponse`; indicates - // that this is a continuation of a prior `ListDeviceRegistries` call, and - // that the system should return the next page of data. + // that this is a continuation of a prior `ListDeviceRegistries` call and + // the system should return the next page of data. string page_token = 3; } @@ -278,7 +336,7 @@ message CreateDeviceRequest { string parent = 1; // The device registration details. The field `name` must be empty. The server - // will generate that field from the device registry `id` provided and the + // generates `name` from the device registry `id` and the // `parent` field. Device device = 2; } @@ -297,7 +355,7 @@ message GetDeviceRequest { // Request for `UpdateDevice`. message UpdateDeviceRequest { - // The new values for the device registry. The `id` and `num_id` fields must + // 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}`. @@ -324,32 +382,58 @@ message ListDevicesRequest { // `projects/my-project/locations/us-central1/registries/my-registry`. string parent = 1; - // A list of device numerical ids. If empty, it will ignore this field. This - // field cannot hold more than 10,000 entries. + // A list of device numeric IDs. If empty, this field is ignored. Maximum + // IDs: 10,000. repeated uint64 device_num_ids = 2; - // A list of device string identifiers. If empty, it will ignore this field. - // For example, `['device0', 'device12']`. This field cannot hold more than - // 10,000 entries. + // A list of device string IDs. For example, `['device0', 'device12']`. + // If empty, this field is ignored. Maximum IDs: 10,000 repeated string device_ids = 3; // The fields of the `Device` resource to be returned in the response. The - // fields `id`, and `num_id` are always returned by default, along with any + // fields `id` and `num_id` are always returned, along with any // other fields specified. google.protobuf.FieldMask field_mask = 4; + // Options related to gateways. + GatewayListOptions gateway_list_options = 6; + // The maximum number of devices to return in the response. If this value // is zero, the service will select a default size. A call may return fewer - // objects than requested, but if there is a non-empty `page_token`, it - // indicates that more entries are available. + // objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. int32 page_size = 100; // The value returned by the last `ListDevicesResponse`; indicates - // that this is a continuation of a prior `ListDevices` call, and - // that the system should return the next page of data. + // that this is a continuation of a prior `ListDevices` call and + // the system should return the next page of data. string page_token = 101; } +// Options for limiting the list based on gateway type and associations. +message GatewayListOptions { + // If not set, all devices and gateways are returned. If set, the list is + // filtered based on gateway type and associations. + oneof filter { + // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + // is specified, only non-gateway devices are returned. If + // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + GatewayType gateway_type = 1; + + // If set, only devices associated with the specified gateway are returned. + // The gateway ID can be numeric (`num_id`) or the user-defined string + // (`id`). For example, if `123` is specified, only devices bound to the + // gateway with `num_id` 123 are returned. + string associations_gateway_id = 2; + + // If set, returns only the gateways with which the specified device is + // associated. The device ID can be numeric (`num_id`) or the user-defined + // string (`id`). For example, if `456` is specified, returns only the + // gateways to which the device with `num_id` 456 is bound. + string associations_device_id = 3; + } +} + // Response for `ListDevices`. message ListDevicesResponse { // The devices that match the request. @@ -417,3 +501,62 @@ message ListDeviceStatesResponse { // update time, starting from the most recent one. repeated DeviceState device_states = 1; } + +// Request for `SendCommandToDevice`. +message SendCommandToDeviceRequest { + // 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; + + // The command data to send to the device. + bytes binary_data = 2; + + // Optional subfolder for the command. If empty, the command will be delivered + // to the /devices/{device-id}/commands topic, otherwise it will be delivered + // to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + // subfolders are allowed. This field must not have more than 256 characters, + // and must not contain any MQTT wildcards ("+" or "#") or null characters. + string subfolder = 3; +} + +// Response for `SendCommandToDevice`. +message SendCommandToDeviceResponse {} + +// Request for `BindDeviceToGateway`. +message BindDeviceToGatewayRequest { + // 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 + // user-defined device identifier. + string gateway_id = 2; + + // 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; +} + +// Response for `BindDeviceToGateway`. +message BindDeviceToGatewayResponse {} + +// Request for `UnbindDeviceFromGateway`. +message UnbindDeviceFromGatewayRequest { + // 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 + // user-defined device identifier. + string gateway_id = 2; + + // 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; +} + +// Response for `UnbindDeviceFromGateway`. +message UnbindDeviceFromGatewayResponse {} diff --git a/google/cloud/iot/v1/resources.proto b/google/cloud/iot/v1/resources.proto index 542947637..2a91e989e 100644 --- a/google/cloud/iot/v1/resources.proto +++ b/google/cloud/iot/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -26,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; option java_package = "com.google.cloud.iot.v1"; - // The device resource. message Device { // The user-defined device identifier. The device ID must be unique @@ -106,6 +106,12 @@ message Device { // has been reported, this field is not present. DeviceState state = 16; + // **Beta Feature** + // + // The logging verbosity for device activity. If unspecified, + // DeviceRegistry.log_level will be used. + LogLevel log_level = 21; + // The metadata key-value pairs assigned to the device. This metadata is not // interpreted or indexed by Cloud IoT Core. It can be used to add contextual // information for the device. @@ -119,6 +125,26 @@ message Device { // The total size of all keys and values must be less than 256 KB, and the // maximum number of key-value pairs is 500. map metadata = 17; + + // Gateway-related configuration and state. + GatewayConfig gateway_config = 24; +} + +// Gateway-related configuration and state. +message GatewayConfig { + // Indicates whether the device is a gateway. + GatewayType gateway_type = 1; + + // Indicates how to authorize and/or authenticate devices to access the + // gateway. + GatewayAuthMethod gateway_auth_method = 2; + + // [Output only] The ID of the gateway the device accessed most recently. + string last_accessed_gateway_id = 3; + + // [Output only] The most recent time at which the device accessed the gateway + // specified in `last_accessed_gateway`. + google.protobuf.Timestamp last_accessed_gateway_time = 4; } // A container for a group of devices. @@ -155,6 +181,12 @@ message DeviceRegistry { // The DeviceService (HTTP) configuration for this device registry. HttpConfig http_config = 9; + // **Beta Feature** + // + // The default logging verbosity for activity from devices in this registry. + // The verbosity level can be overridden by Device.log_level. + LogLevel log_level = 11; + // The credentials used to verify the device credentials. No more than 10 // credentials can be bound to a single registry at a time. The verification // process occurs at the time of device creation or update. If this field is @@ -342,6 +374,63 @@ enum HttpState { 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 diff --git a/google/cloud/irm/artman_irm_v1alpha2.yaml b/google/cloud/irm/artman_irm_v1alpha2.yaml new file mode 100644 index 000000000..90ace2b94 --- /dev/null +++ b/google/cloud/irm/artman_irm_v1alpha2.yaml @@ -0,0 +1,34 @@ +common: + api_name: irm + api_version: v1alpha2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1alpha2 + service_yaml: irm_v1alpha2.yaml + gapic_yaml: v1alpha2/irm_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/irm/irm_v1alpha2.yaml b/google/cloud/irm/irm_v1alpha2.yaml new file mode 100644 index 000000000..361cfff60 --- /dev/null +++ b/google/cloud/irm/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/irm/v1alpha2/incidents.proto b/google/cloud/irm/v1alpha2/incidents.proto new file mode 100644 index 000000000..78972ae03 --- /dev/null +++ b/google/cloud/irm/v1alpha2/incidents.proto @@ -0,0 +1,491 @@ +// 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.irm.v1alpha2; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2;irm"; +option java_multiple_files = true; +option java_package = "com.google.irm.service.v1alpha2.api"; + +// A user of the IRM app. +message User { + // One of several ways to uniquely identify a user. + oneof user { + // Output only. User id that will allow to get additional information from + // People API. This field will be populated implicitly if the caller creates + // or edits a resource (for example, posts an annotation). + string user_id = 1; + + // Email address of the user. This must be associated with a Google account. + // This field will be set if the user is explicitly identified (verbatim) by + // email address in an API request (potentially sometime in the past). It + // will not be populated based on the credentials of a caller of the API. + string email = 2; + } +} + +// A signal is a message calling attention to a (potential) incident. An example +// is a page based on a Stackdriver Alerting policy. +message Signal { + // An artifact associated with the Signal. + message SignalArtifact { + // The type of resource linked to + oneof artifact_type { + // A custom user type + string user_type = 2; + } + + // The URI for the artifact. + string uri = 3; + } + + // Describes whether the alerting condition is still firing. + enum State { + // Unspecified + STATE_UNSPECIFIED = 0; + + // Firing + STATE_OPEN = 1; + + // Non-firing + STATE_CLOSED = 2; + } + + // Resource name of the signal, for example, + // "projects/{project_id}/signals/{signal_id}". + string name = 1; + + // Etag to validate the object is unchanged for a read-modify-write operation. + // An empty etag will overwrite other changes. + string etag = 2; + + // Resource name of the incident this signal is currently assigned to. + // May be empty if signal is unassigned. + string incident = 3; + + // Output only. Time this signal was created. + google.protobuf.Timestamp create_time = 4; + + // Output only. Time this signal was closed. This field is not populated + // while the signal is still firing. + google.protobuf.Timestamp close_time = 10; + + // The time this Signal was first detected. This is identical to create_time + // for Signals created by Stackdriver Alerting. + google.protobuf.Timestamp detect_time = 15; + + // Output only. The user that created this signal for manually created + // signals. Empty if this signal was generated by a system (for example, + // Stackdriver Alerting). + User creator = 5; + + // One-line summary of the signal. + // Immutable. + string title = 6; + + // Content type string. 'text/plain' is currently the only supported content + // type for Signals created via the API. Signals created by Stackdriver + // Alerting support 'text/html' as well. Immutable for Signals created by + // Stackdriver Alerting. + string content_type = 7; + + // Full message of the signal. + // Immutable for Signals created by Stackdriver Alerting. + string content = 8; + + // The state of this signal. + // For Signals created by Stackdriver Alerting this field is output only. + State signal_state = 9; + + // A set of artifacts to additional resources for this Signal. For example, a + // link to Stackdriver logging for the Signal. + // Immutable for Signals created by Stackdriver Alerting. + repeated SignalArtifact signal_artifacts = 16; +} + +// A text annotation by a user. +message Annotation { + // Resource name of the annotation, for example, + // "projects/{project_id}/incidents/{incident_id}/annotations/{annotation_id}". + string name = 1; + + // Output only. Author of the annotation. + User author = 2; + + // Output only. Time the annotation was created. + google.protobuf.Timestamp create_time = 3; + + // Content of the annotation. Immutable. + string content = 4; + + // Content type of the annotation, for example, 'text/plain' + // or 'text/markdown'. Immutable. + string content_type = 5; +} + +// A tag by a user. +message Tag { + // Resource name of a tag, for example, + // "projects/{project_id}/incidents/{incident_id}/tags/{tag_id}" + string name = 1; + + // Display name of the resource (for example, "cause:rollout"). Immutable. + string display_name = 2; +} + +// Synopsis is a summary of an incident and it contains a textual content, +// an author and a last updated timestamp. +message Synopsis { + // Content type string, for example, 'text/plain' or 'text/markdown'. + string content_type = 1; + + // Textual content of the synopsis. It can be plain text or markdown as + // indicated by the content_type. + string content = 2; + + // Last updated timestamp. + google.protobuf.Timestamp update_time = 3; + + // Author of the synopsis. + User author = 4; +} + +// Representation of an incident. +message Incident { + // CommunicationVenue is a record of where conversations about an incident + // are happening. + message CommunicationVenue { + // The type of channel/venue for incident communications. + enum ChannelType { + // An unspecified communication channel. + CHANNEL_TYPE_UNSPECIFIED = 0; + + // A communication channel that is represented by a generic URI. + CHANNEL_TYPE_URI = 1; + + // A communication channel that represents a Slack channel. + CHANNEL_TYPE_SLACK = 5; + } + + // A URI to the web interface of the channel. + string uri = 1; + + // A name representing the channel in IRM UI. + string display_name = 2; + + // The type of channel/venue for incident communications. + ChannelType channel_type = 3; + } + + // Specifies the escalation level of this incident, within the IRM protocol + // for handling incidents. + enum EscalationLevel { + // The incident has not been escalated. This is the value used by all new + // and legacy incidents. + ESCALATION_LEVEL_UNSPECIFIED = 0; + + // The incident has been escalated to the organizational level. + ESCALATION_LEVEL_ORGANIZATION = 1; + } + + // Severity of an incident. + enum Severity { + // Severity is not specified. + SEVERITY_UNSPECIFIED = 0; + + // Huge incident. + SEVERITY_HUGE = 1; + + // Major incident. + SEVERITY_MAJOR = 2; + + // Medium incident. + SEVERITY_MEDIUM = 3; + + // Minor incident. + SEVERITY_MINOR = 4; + + // Negligible incident. + SEVERITY_NEGLIGIBLE = 5; + } + + // Stage of an incident. + enum Stage { + // This is the default value if no stage has been specified. + // Note: The caller of the API should set the stage to DETECTED. + STAGE_UNSPECIFIED = 0; + + // The incident has been detected. This is the initial stage of a new + // incident. + // Note: The caller still has to set the stage manually. + STAGE_DETECTED = 4; + + // This incident has been formally characterized. + STAGE_TRIAGED = 1; + + // This incident has been mitigated, i.e. does not affect the service level + // anymore. + STAGE_MITIGATED = 2; + + // This incident has been fully resolved, i.e. there are no immediate + // follow-up tasks. + STAGE_RESOLVED = 3; + + // Postmortem for the incident was written. + STAGE_DOCUMENTED = 5; + + // Stage for an incident with `duplicate_incident`. This incident is not + // authoritative anymore and the `duplicate_incident` should be used to + // determine the stage. + STAGE_DUPLICATE = 6; + } + + // Output only. Resource name of the incident, for example, + // "projects/{project_id}/incidents/{incident_id}". + string name = 1; + + // One-line summary of the incident. + string title = 2; + + // Escalation level of the incident. + EscalationLevel escalation_level = 3; + + // Etag to validate the object is unchanged for a read-modify-write operation. + // An empty etag will overwrite other changes. + string etag = 4; + + // Severity of the incident. + Severity severity = 5; + + // Stage of the incident. + Stage stage = 6; + + // Resource name of the incident this incident is a duplicate of. Empty if + // this incident is not a duplicate. + // An incident can only be a duplicate of an incident that is not marked as a + // duplicate already. Setting this to a non-empty value must also set the + // stage to `STAGE_DUPLICATE`. Unsetting this value value must also update + // `stage` to a value other than `STAGE_DUPLICATE`. + string duplicate_incident = 9; + + // Output only. Time this incident started. Used to measure the 'elapsed + // time'. Start time of an incident is the earliest creation time of any of + // its Signals or the create time of the incident if no Signals are assigned. + google.protobuf.Timestamp start_time = 7; + + // Output only. Synopsis of this incident. + Synopsis synopsis = 8; + + // Location of communications for this incident. This is informational + // only; IRM does not use this to send messages. + CommunicationVenue communication_venue = 10; +} + +// Describes a role that can be assigned to an incident. +message IncidentRole { + // List of possible roles. + enum Type { + // The role is unspecified. + TYPE_UNSPECIFIED = 0; + + // Incident Commander: Manages response plan, near-term and long-term + // objectives, establishes priorities, and delegates tasks as needed. + TYPE_INCIDENT_COMMANDER = 1; + + // Communications Lead: Keeps everybody outside and within the response team + // informed. + TYPE_COMMUNICATIONS_LEAD = 2; + + // Operations Lead: Figures out what to do, and gets it done. + TYPE_OPERATIONS_LEAD = 3; + + // External Customer Communications Lead: Responsible for communicating + // incident details to customers/public. + TYPE_EXTERNAL_CUSTOMER_COMMUNICATIONS_LEAD = 4; + + // Primary Oncall: Responds to the initial page and handles all + // responsibilities for pre-escalated incidents. + TYPE_PRIMARY_ONCALL = 5; + + // Secondary Oncall: Helps the primary oncall if necessary; mostly useful + // for pre-escalated incidents. + TYPE_SECONDARY_ONCALL = 6; + + // User-specified roles. One example is a Planning Lead, who keeps track of + // the incident. Another is an assistant Incident Commander. + TYPE_OTHER = 7; + } + + // The type of role. The role type is immutable in role assignments. Each role + // 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. + string title = 2; + + // Output only 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 { + // Output only. Resource name such as + // "projects/{project_id}/incidents/{incident_id}/role_assignments/{role_id}". + string name = 1; + + // Output only. Etag for this version of the resource. Must be specified in + // update requests and match the current version in storage. Must not be + // modified by the client. + string etag = 2; + + // The role that is or will be assigned. + IncidentRole role = 3; + + // The user this role is assigned to. This field can only be directly set + // during creation request. Subsequent updates are done via the + // IncidentRoleHandover methods. + User assignee = 4; + + // The recipient of a requested role handoff. This field can only be directly + // set during creation request. Subsequent updates are done via the + // IncidentRoleHandover methods. + // + // `assignee` is always the current role-holder, and `proposed_assignee` is + // used to track unfinished assignments and handoffs. Let's say Bob assigns + // Alice to a role. Then the fields are: + // `assignee`: nil, `proposed_assignee`: Alice + // If Alice accepts, then the fields are: + // `assignee`: Alice, `proposed_assignee`: nil + // If she cancels, then the RoleAssignment is deleted. + // Let's say Alice has the role. Then the fields are: + // `assignee`: Alice, `proposed_assignee`: nil + // If Alice becomes incapacitated and Bob requests Carol to take over, then + // the fields are: + // `assignee`: Alice, `proposed_assignee`: Carol + // After Carol accepts the handover, the fields are: + // `assignee`: Carol, `proposed_assignee`: nil + // Or if Carol refuses the handover, the fields are: + // `assignee`: Alice, `proposed_assignee`: nil + User proposed_assignee = 5; +} + +// External artifact associated to an incident. +message Artifact { + // Possible types of an artifact. + enum Type { + // External type is unspecified. + TYPE_UNSPECIFIED = 0; + + // URL. + TYPE_URL = 1; + + // A JIRA issue. + TYPE_JIRA_ISSUE = 4; + } + + // Output only. Resource name such as + // "projects/{project_id}/incidents/{incident_id}/artifacts/{artifact_id}". + string name = 1; + + // User provided name of an artifact. + string display_name = 2; + + // Output only. Etag for this version of the resource. Must be specified in + // update requests and match the current version in storage. Must not be + // modified by the client. + string etag = 3; + + // URL to access the artifact. + string url = 4; + + // Type of this artifact. + Type type = 5; +} + +// Communication Channels are mechanisms used to receive notifications +// about changes to incidents. +message CommunicationChannel { + // A communication channel that delivers messages to an email address. + message Email { + // The email address, for example, "user@example.com". + string address = 1; + } + + // A communication channel that delivers messages to a Stackdriver + // notification channel. + message NotificationChannel { + // Stackdriver notification channel name. + string name = 1; + } + + // An endpoint describes how messages will be delivered. + oneof endpoint { + // Messages will be delivered via email. + Email email = 1; + + // Messages will be delivered via a Stackdriver notification channel. + NotificationChannel notification_channel = 2; + } +} + +// A subscription allows users to get notifications about changes to +// an incident. +message Subscription { + // Types of changes that users can subscribe to in an incident. + enum EventType { + // An event_type that's not specified is an error. + EVENT_TYPE_UNSPECIFIED = 0; + + // The incident's title has changed. + EVENT_TYPE_TITLE_CHANGE = 1; + + // The incident's synopsis has changed. + EVENT_TYPE_SYNOPSIS_CHANGE = 2; + + // The incident's stage has changed. + EVENT_TYPE_STAGE_CHANGE = 3; + + // The incident's severity has changed. + EVENT_TYPE_SEVERITY_CHANGE = 4; + + // A new annotation has been added to the incident. + EVENT_TYPE_ANNOTATION_ADD = 5; + + // An annotation has been modified. + EVENT_TYPE_ANNOTATION_CHANGE = 6; + } + + // Output only. Resource name such as + // "projects/{project_id}/incidents/{incident_id}/subscriptions/{subscription_id}". + string name = 1; + + // Output only. Etag for this version of the resource. Must be specified in + // update requests and match the current version in storage. Must not be + // modified by the client. + string etag = 2; + + // A communications channel to send subscription messages to. + CommunicationChannel subscription_channel = 3; + + // Types of events this subscription receives notifications for. + repeated EventType event_types = 4; +} diff --git a/google/cloud/irm/v1alpha2/incidents_service.proto b/google/cloud/irm/v1alpha2/incidents_service.proto new file mode 100644 index 000000000..76cc3ae38 --- /dev/null +++ b/google/cloud/irm/v1alpha2/incidents_service.proto @@ -0,0 +1,914 @@ +// 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.irm.v1alpha2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/irm/v1alpha2/incidents.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2;irm"; +option java_multiple_files = true; +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"; + + // Creates a new incident. + rpc CreateIncident(CreateIncidentRequest) returns (Incident) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*}/incidents" + body: "incident" + }; + } + + // Returns an incident by name. + rpc GetIncident(GetIncidentRequest) returns (Incident) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/incidents/*}" + }; + } + + // Returns a list of incidents. + // Incidents are ordered by start time, with the most recent incidents first. + rpc SearchIncidents(SearchIncidentsRequest) + returns (SearchIncidentsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*}/incidents:search" + }; + } + + // Updates an existing incident. + rpc UpdateIncident(UpdateIncidentRequest) returns (Incident) { + option (google.api.http) = { + patch: "/v1alpha2/{incident.name=projects/*/incidents/*}" + body: "incident" + }; + } + + // 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) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/incidents/*}:searchSimilar" + additional_bindings { + get: "/v1alpha2/{name=projects/*/signals/*}:searchSimilarIncidents" + } + }; + } + + // Creates an annotation on an existing incident. Only 'text/plain' and + // 'text/markdown' annotations can be created via this method. + rpc CreateAnnotation(CreateAnnotationRequest) returns (Annotation) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/incidents/*}/annotations" + body: "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) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/incidents/*}/annotations" + }; + } + + // Creates a tag on an existing incident. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/incidents/*}/tags" + body: "tag" + }; + } + + // Deletes an existing tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/incidents/*/tags/*}" + }; + } + + // Lists tags that are part of an incident. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/incidents/*}/tags" + }; + } + + // Creates a new signal. + rpc CreateSignal(CreateSignalRequest) returns (Signal) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*}/signals" + body: "signal" + }; + } + + // Lists signals that are part of an incident. + // Signals are returned in reverse chronological order. + rpc SearchSignals(SearchSignalsRequest) returns (SearchSignalsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*}/signals:search" + }; + } + + // Finds a signal by other unique IDs. + rpc LookupSignal(LookupSignalRequest) returns (Signal) { + option (google.api.http) = { + get: "/v1alpha2/signals:lookup" + }; + } + + // Returns a signal by name. + rpc GetSignal(GetSignalRequest) returns (Signal) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/signals/*}" + }; + } + + // Updates an existing signal (for example, to assign/unassign it to an + // incident). + rpc UpdateSignal(UpdateSignalRequest) returns (Signal) { + option (google.api.http) = { + patch: "/v1alpha2/{signal.name=projects/*/signals/*}" + body: "signal" + }; + } + + // Escalates an incident. + rpc EscalateIncident(EscalateIncidentRequest) + returns (EscalateIncidentResponse) { + option (google.api.http) = { + post: "/v1alpha2/{incident.name=projects/*/incidents/*}:escalate" + body: "*" + }; + } + + // Creates a new artifact. + rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts" + body: "artifact" + }; + } + + // Returns a list of artifacts for an incident. + rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/incidents/*}/artifacts" + }; + } + + // Updates an existing artifact. + rpc UpdateArtifact(UpdateArtifactRequest) returns (Artifact) { + option (google.api.http) = { + patch: "/v1alpha2/{artifact.name=projects/*/incidents/*/artifacts/*}" + body: "artifact" + }; + } + + // Deletes an existing artifact. + rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/incidents/*/artifacts/*}" + }; + } + + // Sends a summary of the shift for oncall handoff. + rpc SendShiftHandoff(SendShiftHandoffRequest) + returns (SendShiftHandoffResponse) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*}/shiftHandoff:send" + body: "*" + }; + } + + // Creates a new subscription. + // This will fail if: + // a. there are too many (50) subscriptions in the incident already + // b. a subscription using the given channel already exists + rpc CreateSubscription(CreateSubscriptionRequest) returns (Subscription) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions" + body: "subscription" + }; + } + + // Updates a subscription. + rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) { + option (google.api.http) = { + patch: "/v1alpha2/{subscription.name=projects/*/incidents/*/subscriptions/*}" + body: "subscription" + }; + } + + // Returns a list of subscriptions for an incident. + rpc ListSubscriptions(ListSubscriptionsRequest) + returns (ListSubscriptionsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/incidents/*}/subscriptions" + }; + } + + // Deletes an existing subscription. + rpc DeleteSubscription(DeleteSubscriptionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/incidents/*/subscriptions/*}" + }; + } + + // Creates a role assignment on an existing incident. Normally, the user field + // will be set when assigning a role to oneself, and the next field will be + // 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) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments" + body: "*" + }; + } + + // Deletes an existing role assignment. + rpc DeleteIncidentRoleAssignment(DeleteIncidentRoleAssignmentRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}" + }; + } + + // Lists role assignments that are part of an incident. + rpc ListIncidentRoleAssignments(ListIncidentRoleAssignmentsRequest) + returns (ListIncidentRoleAssignmentsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/incidents/*}/roleAssignments" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:requestHandover" + body: "*" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:confirmHandover" + body: "*" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:forceHandover" + body: "*" + }; + } + + // 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) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/incidents/*/roleAssignments/*}:cancelHandover" + body: "*" + }; + } +} + +// Request for the CreateIncident method. +message CreateIncidentRequest { + // The incident to create. + Incident incident = 1; + + // 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; +} + +// Request for the GetIncident method. +message GetIncidentRequest { + // Resource name of the incident, for example, + // "projects/{project_id}/incidents/{incident_id}". + string name = 1; +} + +// Request for the UpdateIncident method. +message UpdateIncidentRequest { + // The incident to update with the new values. + Incident incident = 1; + + // List of fields that should be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// 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; + + // Number of similar incidents to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in 'next_page_token'. + string page_token = 3; +} + +// Response for the SearchSimilarIncidents method. +message SearchSimilarIncidentsResponse { + // A single search result, i.e. an incident with (potentially) additional + // information. + message Result { + // An incident that is "similar" to the incident or signal specified in the + // request. + Incident incident = 1; + } + + // The search results, ordered by descending relevance. + repeated Result results = 1; + + // Page token to fetch the next set of similar incidents. + string next_page_token = 2; +} + +// 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; +} + +// Request for the ListAnnotations method. +message ListAnnotationsRequest { + // Resource name of the incident, for example, + // "projects/{project_id}/incidents/{incident_id}". + string parent = 1; + + // Number of annotations to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; +} + +// Response for the ListAnnotations method. +message ListAnnotationsResponse { + // List of annotations. + repeated Annotation annotations = 1; + + // Page token to fetch the next set of annotations. + string next_page_token = 2; +} + +// 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; +} + +// Request for the DeleteTag method. +message DeleteTagRequest { + // Resource name of the tag. + string name = 1; +} + +// Request for the ListTagsForIncident method. +message ListTagsRequest { + // Resource name of the incident, for example, + // "projects/{project_id}/incidents/{incident_id}". + string parent = 1; + + // Number of tags to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; +} + +// Response for the ListTagsForIncident method. +message ListTagsResponse { + // Tags. + repeated Tag tags = 1; + + // Page token to fetch the next set of tags. + string next_page_token = 2; +} + +// Request for the CreateSignal method. +message CreateSignalRequest { + // The resource name of the hosting Stackdriver project which requested + // signal belongs to. + string parent = 1; + + // The signal to create. + Signal signal = 2; +} + +// Request for the SearchSignals method. +message SearchSignalsRequest { + // The resource name of the hosting Stackdriver project which requested + // incidents belong to. + string parent = 1; + + // An expression that defines which signals to return. + // + // Search atoms can be used to match certain specific fields. Otherwise, + // plain text will match text fields in the signal. + // + // Search atoms: + // + // * `start` - (timestamp) The time the signal was created. + // * `title` - The title of the signal. + // * `signal_state` - `open` or `closed`. State of the signal. + // (e.g., `signal_state:open`) + // + // Timestamp formats: + // + // * yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. + // In other words, the "<" operator will match dates before that date, the + // ">" operator will match dates after that date, and the ":" operator will + // match the entire day. + // * yyyy-MM-ddTHH:mm - Same as above, but with minute resolution. + // * yyyy-MM-ddTHH:mm:ss - Same as above, but with second resolution. + // * Nd (e.g. 7d) - a relative number of days ago, treated as a moment in time + // (as opposed to a day-wide span) a multiple of 24 hours ago (as opposed to + // calendar days). In the case of daylight savings time, it will apply the + // current timezone to both ends of the range. Note that exact matching + // (e.g. `start:7d`) is unlikely to be useful because that would only match + // signals created precisely at a particular instant in time. + // + // The absolute timestamp formats (everything starting with a year) can + // optionally be followed with a UTC offset in +/-hh:mm format. Also, the 'T' + // separating dates and times can optionally be replaced with a space. Note + // that any timestamp containing a space or colon will need to be quoted. + // + // Examples: + // + // * `foo` - matches signals containing the word "foo" + // * `"foo bar"` - matches signals containing the phrase "foo bar" + // * `foo bar` or `foo AND bar` - matches signals containing the words + // "foo" and "bar" + // * `foo -bar` or `foo AND NOT bar` - matches signals containing the + // word + // "foo" but not the word "bar" + // * `foo OR bar` - matches signals containing the word "foo" or the + // word "bar" + // * `start>2018-11-28` - matches signals which started after November + // 11, 2018. + // * `start<=2018-11-28` - matches signals which started on or before + // November 11, 2018. + // * `start:2018-11-28` - matches signals which started on November 11, + // 2018. + // * `start>"2018-11-28 01:02:03+04:00"` - matches signals which started + // after November 11, 2018 at 1:02:03 AM according to the UTC+04 time + // zone. + // * `start>7d` - matches signals which started after the point in time + // 7*24 hours ago + // * `start>180d` - similar to 7d, but likely to cross the daylight savings + // time boundary, so the end time will be 1 hour different from "now." + // * `foo AND start>90d AND stagemedium`, + // `severity<=minor`, etc.). + // + // Timestamp formats: + // * yyyy-MM-dd - an absolute date, treated as a calendar-day-wide window. + // In other words, the "<" operator will match dates before that date, the + // ">" operator will match dates after that date, and the ":" or "=" + // operators will match the entire day. + // * Nd (for example, 7d) - a relative number of days ago, treated as a moment + // in time (as opposed to a day-wide span). A multiple of 24 hours ago (as + // opposed to calendar days). In the case of daylight savings time, it will + // apply the current timezone to both ends of the range. Note that exact + // matching (for example, `start:7d`) is unlikely to be useful because that + // would only match incidents created precisely at a particular instant in + // time. + // + // Examples: + // + // * `foo` - matches incidents containing the word "foo" + // * `"foo bar"` - matches incidents containing the phrase "foo bar" + // * `foo bar` or `foo AND bar` - matches incidents containing the words "foo" + // and "bar" + // * `foo -bar` or `foo AND NOT bar` - matches incidents containing the word + // "foo" but not the word "bar" + // * `foo OR bar` - matches incidents containing the word "foo" or the word + // "bar" + // * `start>2018-11-28` - matches incidents which started after November 11, + // 2018. + // * `start<=2018-11-28` - matches incidents which started on or before + // November 11, 2018. + // * `start:2018-11-28` - matches incidents which started on November 11, + // 2018. + // * `start>7d` - matches incidents which started after the point in time 7*24 + // hours ago + // * `start>180d` - similar to 7d, but likely to cross the daylight savings + // time boundary, so the end time will be 1 hour different from "now." + // * `foo AND start>90d AND stage labels = 10; } +// A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate] specifies the properties to use when creating +// a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually with +// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or +// automatically as a result of auto-rotation. +message CryptoKeyVersionTemplate { + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on + // this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + ProtectionLevel protection_level = 1; + + // Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use + // when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. + // + // 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; +} + +// Contains an HSM-generated attestation about a key operation. For more +// information, see [Verifying attestations] +// (https://cloud.google.com/kms/docs/attest-key). +message KeyOperationAttestation { + // Attestation formats provided by the HSM. + enum AttestationFormat { + // Not specified. + ATTESTATION_FORMAT_UNSPECIFIED = 0; + + // Cavium HSM attestation compressed with gzip. Note that this format is + // defined by Cavium and subject to change at any time. + CAVIUM_V1_COMPRESSED = 3; + + // Cavium HSM attestation V2 compressed with gzip. This is a new format + // introduced in Cavium's version 3.2-08. + CAVIUM_V2_COMPRESSED = 4; + } + + // Output only. The format of the attestation data. + AttestationFormat format = 4; + + // Output only. The attestation data provided by the HSM when the key + // operation was performed. + bytes content = 5; +} + // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an individual cryptographic key, and the // associated key material. // -// It can be used for cryptographic operations either directly, or via its -// parent [CryptoKey][google.cloud.kms.v1.CryptoKey], in which case the server will choose the appropriate -// version for the operation. +// An [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] version can be +// used for cryptographic operations. // // For security reasons, the raw cryptographic key material represented by a // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed or exported. It can only be used to -// encrypt or decrypt data when an authorized user or application invokes Cloud -// KMS. +// encrypt, decrypt, or sign data when an authorized user or application invokes +// Cloud KMS. message CryptoKeyVersion { + // The algorithm of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what + // parameters must be used for each cryptographic operation. + // + // The + // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION] + // algorithm is usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + // + // Algorithms beginning with "RSA_SIGN_" are usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]. + // + // The fields in the name after "RSA_SIGN_" correspond to the following + // parameters: padding algorithm, modulus bit length, and digest algorithm. + // + // For PSS, the salt length used is equal to the length of digest + // algorithm. For example, + // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256] + // will use PSS with a salt length of 256 bits or 32 bytes. + // + // Algorithms beginning with "RSA_DECRYPT_" are usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + // + // The fields in the name after "RSA_DECRYPT_" correspond to the following + // parameters: padding algorithm, modulus bit length, and digest algorithm. + // + // Algorithms beginning with "EC_SIGN_" are usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]. + // + // The fields in the name after "EC_SIGN_" correspond to the following + // parameters: elliptic curve, digest algorithm. + // + // For more information, see [Key purposes and algorithms] + // (https://cloud.google.com/kms/docs/algorithms). + enum CryptoKeyVersionAlgorithm { + // Not specified. + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + + // Creates symmetric encryption keys. + GOOGLE_SYMMETRIC_ENCRYPTION = 1; + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 2; + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 3; + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 4; + + // RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_SIGN_PSS_4096_SHA512 = 15; + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5; + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 16; + + // RSAES-OAEP 2048 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_2048_SHA256 = 8; + + // RSAES-OAEP 3072 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_3072_SHA256 = 9; + + // RSAES-OAEP 4096 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_4096_SHA256 = 10; + + // RSAES-OAEP 4096 bit key with a SHA512 digest. + RSA_DECRYPT_OAEP_4096_SHA512 = 17; + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 12; + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 13; + } + // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating if it can be used. enum CryptoKeyVersionState { // Not specified. CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; - // This version may be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] requests. + // This version is still being generated. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. + PENDING_GENERATION = 5; + + // This version may be used for cryptographic operations. ENABLED = 1; // This version may not be used, but the key material is still available, @@ -136,6 +295,31 @@ message CryptoKeyVersion { // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] // to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state. DESTROY_SCHEDULED = 4; + + // This version is still being imported. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. + PENDING_IMPORT = 6; + + // This version was not imported successfully. It may not be used, enabled, + // disabled, or destroyed. The submitted key material has been discarded. + // Additional details can be found in + // [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. + IMPORT_FAILED = 7; + } + + // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s. Controls the level of detail returned + // for [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in + // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions] and + // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys]. + enum CryptoKeyVersionView { + // Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include + // the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + + // Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + FULL = 1; } // Output only. The resource name for this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format @@ -145,9 +329,27 @@ message CryptoKeyVersion { // 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; + + // Output only. The [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] that this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] supports. + CryptoKeyVersionAlgorithm algorithm = 10; + + // 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; + // Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. google.protobuf.Timestamp create_time = 4; + // Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + // generated. + google.protobuf.Timestamp generate_time = 11; + // 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]. @@ -157,4 +359,175 @@ message CryptoKeyVersion { // 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; + + // 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; + + // Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material + // was imported. + google.protobuf.Timestamp import_time = 15; + + // 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; +} + +// The public key for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via +// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. +message 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 + // [Textual Encoding of Subject Public Key Info] + // (https://tools.ietf.org/html/rfc7468#section-13). + string pem = 1; + + // The [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] associated + // with this key. + 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. +// +// When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will generate a "wrapping key", +// which is a public/private key pair. You use the wrapping key to encrypt (also +// known as wrap) the pre-existing key material to protect it during the import +// process. The nature of the wrapping key depends on the choice of +// [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the wrapping key generation +// is complete, the [state][google.cloud.kms.v1.ImportJob.state] will be set to +// [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the [public_key][google.cloud.kms.v1.ImportJob.public_key] +// can be fetched. The fetched public key can then be used to wrap your +// pre-existing key material. +// +// Once the key material is wrapped, it can be imported into a new +// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling +// [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. +// Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be imported with a single +// [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS uses the private key portion of the wrapping key to +// unwrap the key material. Only Cloud KMS has access to the private key. +// +// An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is created. Once expired, Cloud KMS +// will no longer be able to import or unwrap any key material that was wrapped +// with the [ImportJob][google.cloud.kms.v1.ImportJob]'s public key. +// +// For more information, see +// [Importing a key](https://cloud.google.com/kms/docs/importing-a-key). +message ImportJob { + // 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 { + // 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 + // [Textual Encoding of Subject Public Key Info] + // (https://tools.ietf.org/html/rfc7468#section-13). + string pem = 1; + } + + // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the key wrapping method chosen for this + // [ImportJob][google.cloud.kms.v1.ImportJob]. + enum ImportMethod { + // Not specified. + IMPORT_METHOD_UNSPECIFIED = 0; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 3072 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_3072_SHA1_AES_256 = 1; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 4096 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_4096_SHA1_AES_256 = 2; + } + + // The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + enum ImportJobState { + // Not specified. + IMPORT_JOB_STATE_UNSPECIFIED = 0; + + // The wrapping key for this job is still being generated. It may not be + // used. Cloud KMS will automatically mark this job as + // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as the wrapping key is generated. + PENDING_GENERATION = 1; + + // This job may be used in + // [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] and + // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + // requests. + ACTIVE = 2; + + // This job can no longer be used and may not leave this state once entered. + EXPIRED = 3; + } + + // Output only. The resource name for this [ImportJob][google.cloud.kms.v1.ImportJob] in the format + // `projects/*/locations/*/keyRings/*/importJobs/*`. + string name = 1; + + // Required and immutable. The wrapping method to be used for incoming + // key material. + ImportMethod import_method = 2; + + // Required and 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; + + // Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created. + google.protobuf.Timestamp create_time = 3; + + // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated. + google.protobuf.Timestamp generate_time = 4; + + // 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; + + // 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; + + // Output only. The current state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can + // be used. + ImportJobState state = 6; + + // 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; + + // 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; } diff --git a/google/cloud/kms/v1/service.proto b/google/cloud/kms/v1/service.proto index 682c95fc8..0f1266dfe 100644 --- a/google/cloud/kms/v1/service.proto +++ b/google/cloud/kms/v1/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,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"; @@ -19,8 +20,7 @@ package google.cloud.kms.v1; import "google/api/annotations.proto"; import "google/cloud/kms/v1/resources.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Kms.V1"; @@ -30,7 +30,6 @@ option java_outer_classname = "KmsProto"; option java_package = "com.google.cloud.kms.v1"; option php_namespace = "Google\\Cloud\\Kms\\V1"; - // Google Cloud Key Management Service // // Manages cryptographic keys and operations using those keys. Implements a REST @@ -39,48 +38,100 @@ 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] +// +// If you are using manual gRPC libraries, see +// [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc). service KeyManagementService { + option (google.api.default_host) = "cloudkms.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloudkms"; + // Lists [KeyRings][google.cloud.kms.v1.KeyRing]. rpc ListKeyRings(ListKeyRingsRequest) returns (ListKeyRingsResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/keyRings" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/keyRings" + }; } // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys" + }; } // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. rpc ListCryptoKeyVersions(ListCryptoKeyVersionsRequest) returns (ListCryptoKeyVersionsResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions" + }; + } + + // Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + rpc ListImportJobs(ListImportJobsRequest) returns (ListImportJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs" + }; } // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. rpc GetKeyRing(GetKeyRingRequest) returns (KeyRing) { - option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/keyRings/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*}" + }; } // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as well as its // [primary][google.cloud.kms.v1.CryptoKey.primary] [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. rpc GetCryptoKey(GetCryptoKeyRequest) returns (CryptoKey) { - option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}" + }; } // Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest) returns (CryptoKeyVersion) { - option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}" + }; + } + + // Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] or + // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + rpc GetPublicKey(GetPublicKeyRequest) returns (PublicKey) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey" + }; + } + + // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + rpc GetImportJob(GetImportJobRequest) returns (ImportJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}" + }; } // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location. rpc CreateKeyRing(CreateKeyRingRequest) returns (KeyRing) { - option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/keyRings" body: "key_ring" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/keyRings" + body: "key_ring" + }; } // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing]. // - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is required. + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + // are required. rpc CreateCryptoKey(CreateCryptoKeyRequest) returns (CryptoKey) { - option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys" body: "crypto_key" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys" + body: "crypto_key" + }; } // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey]. @@ -89,12 +140,40 @@ service KeyManagementService { // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. rpc CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest) returns (CryptoKeyVersion) { - option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions" body: "crypto_key_version" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions" + body: "crypto_key_version" + }; + } + + // Imports a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] into an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] using the + // wrapped key material provided in the request. + // + // The version ID will be assigned the next sequential id within the + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + rpc ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest) returns (CryptoKeyVersion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import" + body: "*" + }; + } + + // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a [KeyRing][google.cloud.kms.v1.KeyRing]. + // + // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is required. + rpc CreateImportJob(CreateImportJobRequest) returns (ImportJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs" + body: "import_job" + }; } // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. rpc UpdateCryptoKey(UpdateCryptoKeyRequest) returns (CryptoKey) { - option (google.api.http) = { patch: "/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}" body: "crypto_key" }; + option (google.api.http) = { + patch: "/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}" + body: "crypto_key" + }; } // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s metadata. @@ -105,22 +184,59 @@ service KeyManagementService { // method. See [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] and [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] to // move between other states. rpc UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest) returns (CryptoKeyVersion) { - option (google.api.http) = { patch: "/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}" body: "crypto_key_version" }; + option (google.api.http) = { + patch: "/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}" + body: "crypto_key_version" + }; } // Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + // The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. rpc Encrypt(EncryptRequest) returns (EncryptResponse) { - option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt" + body: "*" + }; } - // Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + // Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. rpc Decrypt(DecryptRequest) returns (DecryptResponse) { - option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt" + body: "*" + }; + } + + // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // ASYMMETRIC_SIGN, producing a signature that can be verified with the public + // key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + rpc AsymmetricSign(AsymmetricSignRequest) returns (AsymmetricSignResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign" + body: "*" + }; } - // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] + // Decrypts data that was encrypted with a public key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_DECRYPT. + rpc AsymmetricDecrypt(AsymmetricDecryptRequest) returns (AsymmetricDecryptResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt" + body: "*" + }; + } + + // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + // + // Returns an error if called on an asymmetric key. rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest) returns (CryptoKey) { - option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion" + body: "*" + }; } // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction. @@ -136,18 +252,24 @@ service KeyManagementService { // Before the [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is reached, // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] may be called to reverse the process. rpc DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest) returns (CryptoKeyVersion) { - option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy" + body: "*" + }; } // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] // state. // // Upon restoration of the CryptoKeyVersion, [state][google.cloud.kms.v1.CryptoKeyVersion.state] // will be set to [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be cleared. rpc RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest) returns (CryptoKeyVersion) { - option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore" + body: "*" + }; } } @@ -166,6 +288,13 @@ message ListKeyRingsRequest { // Optional pagination token, returned earlier via // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. string page_token = 3; + + // Optional. Only include resources that match the filter in the response. + string filter = 4; + + // Optional. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. + string order_by = 5; } // Request message for [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys]. @@ -183,6 +312,16 @@ message ListCryptoKeysRequest { // Optional pagination token, returned earlier via // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. string page_token = 3; + + // 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. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. + string order_by = 6; } // Request message for [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]. @@ -201,6 +340,40 @@ message ListCryptoKeyVersionsRequest { // Optional pagination token, returned earlier via // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. string page_token = 3; + + // 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. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. + string order_by = 6; +} + +// 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 + // 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; + + // Optional pagination token, returned earlier via + // [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + string page_token = 3; + + // Optional. Only include resources that match the filter in the response. + string filter = 4; + + // Optional. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. + string order_by = 5; } // Response message for [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings]. @@ -244,6 +417,19 @@ message ListCryptoKeyVersionsResponse { int32 total_size = 3; } +// Response message for [KeyManagementService.ListImportJobs][google.cloud.kms.v1.KeyManagementService.ListImportJobs]. +message ListImportJobsResponse { + // The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + repeated ImportJob import_jobs = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] to retrieve the next page of results. + string next_page_token = 2; + + // The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that matched the query. + int32 total_size = 3; +} + // 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. @@ -262,6 +448,19 @@ message GetCryptoKeyVersionRequest { string name = 1; } +// 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 + // get. + string name = 1; +} + +// 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; +} + // Request message for [KeyManagementService.CreateKeyRing][google.cloud.kms.v1.KeyManagementService.CreateKeyRing]. message CreateKeyRingRequest { // Required. The resource name of the location associated with the @@ -288,6 +487,13 @@ message CreateCryptoKeyRequest { // A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field values. CryptoKey crypto_key = 3; + + // 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 + // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or + // [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + // before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + bool skip_initial_version_creation = 5; } // Request message for [KeyManagementService.CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]. @@ -300,6 +506,60 @@ message CreateCryptoKeyVersionRequest { CryptoKeyVersion crypto_key_version = 2; } +// 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; + + // 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; + + // 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; + + // Required. The incoming wrapped key material that is to be imported. + oneof wrapped_key_material { + // Wrapped key material produced with + // [RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + // or + // [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256]. + // + // This field contains the concatenation of two wrapped keys: + //
    + //
  1. An ephemeral AES-256 wrapping key wrapped with the + // [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP with SHA-1, + // MGF1 with SHA-1, and an empty label. + //
  2. + //
  3. The key to be imported, wrapped with the ephemeral AES-256 key + // using AES-KWP (RFC 5649). + //
  4. + //
+ // + // This format is the same as the format produced by PKCS#11 mechanism + // CKM_RSA_AES_KEY_WRAP. + bytes rsa_aes_wrapped_key = 5; + } +} + +// Request message for [KeyManagementService.CreateImportJob][google.cloud.kms.v1.KeyManagementService.CreateImportJob]. +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; + + // Required. It must be unique within a KeyRing and match the regular + // expression `[a-zA-Z0-9_-]{1,63}` + string import_job_id = 2; + + // Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field values. + ImportJob import_job = 3; +} + // Request message for [KeyManagementService.UpdateCryptoKey][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey]. message UpdateCryptoKeyRequest { // [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. @@ -328,11 +588,24 @@ message EncryptRequest { string name = 1; // Required. The data to encrypt. Must be no larger than 64KiB. + // + // The maximum size depends on the key version's + // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. For + // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the plaintext must be no larger + // 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; // Optional data that, if specified, must also be provided during decryption - // through [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. Must be no - // larger than 64KiB. + // through [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + // + // The maximum size depends on the key version's + // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. For + // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the AAD must be no larger 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 additional_authenticated_data = 3; } @@ -351,6 +624,28 @@ message DecryptRequest { bytes additional_authenticated_data = 3; } +// 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; + + // 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; +} + +// 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; + + // Required. The data encrypted with the named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public + // key using OAEP. + bytes ciphertext = 3; +} + // Response message for [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. message DecryptResponse { // The decrypted data originally supplied in [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. @@ -366,6 +661,18 @@ message EncryptResponse { bytes ciphertext = 2; } +// Response message for [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]. +message AsymmetricSignResponse { + // The created signature. + bytes signature = 1; +} + +// Response message for [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]. +message AsymmetricDecryptResponse { + // The decrypted data originally encrypted with the matching public key. + bytes plaintext = 1; +} + // 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. @@ -386,3 +693,26 @@ message RestoreCryptoKeyVersionRequest { // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. string name = 1; } + +// A [Digest][google.cloud.kms.v1.Digest] holds a cryptographic message digest. +message Digest { + // Required. The message digest. + oneof digest { + // A message digest produced with the SHA-256 algorithm. + bytes sha256 = 1; + + // A message digest produced with the SHA-384 algorithm. + bytes sha384 = 2; + + // A message digest produced with the SHA-512 algorithm. + bytes sha512 = 3; + } +} + +// Cloud KMS metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. +message LocationMetadata { + // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + // [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; +} diff --git a/google/cloud/language/BUILD.bazel b/google/cloud/language/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/language/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/language/artman_language_v1.yaml b/google/cloud/language/artman_language_v1.yaml index c02f3fd46..56c301dd1 100644 --- a/google/cloud/language/artman_language_v1.yaml +++ b/google/cloud/language/artman_language_v1.yaml @@ -2,110 +2,33 @@ common: api_name: language api_version: v1 organization_name: google-cloud - service_yaml: language_v1.yaml - gapic_yaml: v1/language_gapic.yaml + proto_deps: + - name: google-common-protos src_proto_paths: - v1 - proto_deps: - - name: google-common-protos + service_yaml: language_v1.yaml + gapic_yaml: v1/language_gapic.yaml artifacts: +- name: gapic_config + type: GAPIC_CONFIG - name: java_gapic type: GAPIC language: JAVA - release_level: GA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-language - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-language-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-language-v1 - - name: proto - dest: generated/java/proto-google-cloud-language-v1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-language-v1 - - name: grpc - dest: generated/python/proto-google-cloud-language-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/language_v1 - dest: language/google/cloud/language_v1 - - src: tests/unit/gapic/v1 - dest: language/tests/gapic - - name: grpc - src: google/cloud/proto - dest: language/google/cloud/proto +- name: nodejs_gapic + type: GAPIC + language: NODEJS - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-language-v1 -- name: ruby_gapic - type: GAPIC - language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-language - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/language/v1 - dest: google-cloud-language/lib/google/cloud/language/v1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: language/apiv1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-language-v1/vendor +- name: ruby_gapic + type: GAPIC + language: RUBY - name: csharp_gapic type: GAPIC language: CSHARP -- name: nodejs_gapic - type: GAPIC - language: NODEJS - release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/language/src/v1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/language -- name: gapic_config - type: GAPIC_CONFIG diff --git a/google/cloud/language/artman_language_v1beta2.yaml b/google/cloud/language/artman_language_v1beta2.yaml index 14f251d03..11b3ad242 100644 --- a/google/cloud/language/artman_language_v1beta2.yaml +++ b/google/cloud/language/artman_language_v1beta2.yaml @@ -12,81 +12,18 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-language - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-language-v1beta2 - - name: grpc - dest: generated/java/grpc-google-cloud-language-v1beta2 - - name: proto - dest: generated/java/proto-google-cloud-language-v1beta2 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/language_v1beta2 - dest: language/google/cloud/language_v1beta2 - - src: tests/unit/gapic/v1beta2 - dest: language/tests/gapic - - name: grpc - src: google/cloud/proto/language/v1beta2 - dest: language/google/cloud/proto/language/v1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-language-v1beta2 - - name: grpc - dest: generated/python/proto-google-cloud-language-v1beta2 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-language-v1beta2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/language/v1beta2 - dest: google-cloud-language/lib/google/cloud/language/v1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-language-v1beta2 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: language/apiv1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-language-v1beta2/vendor - name: csharp_gapic type: GAPIC language: CSHARP @@ -94,17 +31,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1beta2 - dest: packages/language/src/v1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/language-v1beta2 - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/language/language.yaml b/google/cloud/language/language.yaml index 02db1f6f0..7746ab4ae 100644 --- a/google/cloud/language/language.yaml +++ b/google/cloud/language/language.yaml @@ -28,3 +28,6 @@ authentication: canonical_scopes: |- https://www.googleapis.com/auth/cloud-language, https://www.googleapis.com/auth/cloud-platform + +legacy: + taxonomy_id: taxonomies/teamsproduct/nodes/8953562382 # http://teams/product/8953562382 diff --git a/google/cloud/language/language_v1.yaml b/google/cloud/language/language_v1.yaml index 7af5eaee6..9ef71698c 100644 --- a/google/cloud/language/language_v1.yaml +++ b/google/cloud/language/language_v1.yaml @@ -1,19 +1,21 @@ type: google.api.Service -config_version: 2 +config_version: 3 name: language.googleapis.com -title: Google Cloud Natural Language API +title: Cloud Natural Language API apis: -- name: google.cloud.language.v1.LanguageService + - name: google.cloud.language.v1.LanguageService documentation: - summary: - 'Google Cloud Natural Language API provides natural language understanding - technologies to developers. Examples include sentiment analysis, entity - recognition, and text annotations.' + summary: |- + Provides natural language understanding technologies, such as sentiment + analysis, entity recognition, entity sentiment analysis, and other text + annotations, to developers. authentication: rules: - - selector: '*' + - selector: 'google.cloud.language.v1.LanguageService.*' oauth: - canonical_scopes: https://www.googleapis.com/auth/cloud-platform + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-language, + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/language/v1/BUILD.bazel b/google/cloud/language/v1/BUILD.bazel new file mode 100644 index 000000000..5766b6440 --- /dev/null +++ b/google/cloud/language/v1/BUILD.bazel @@ -0,0 +1,196 @@ +# 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 = "language_proto", + srcs = ["language_service.proto"], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + ], +) + +proto_library_with_info( + name = "language_proto_with_info", + deps = [":language_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 = "language_java_proto", + deps = [":language_proto"], +) + +java_grpc_library( + name = "language_java_grpc", + srcs = [":language_proto"], + deps = [":language_java_proto"] + _JAVA_GRPC_DEPS, +) + +java_gapic_library( + name = "language_java_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + service_yaml = "//google/cloud/language:language_v1.yaml", + test_deps = [":language_java_grpc"], + deps = [":language_java_proto"] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":language_java_gapic_test"], +) for test_name in [ + "com.google.cloud.language.v1.LanguageServiceClientTest", +]] + +# Opensource 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 = [ + ":language_java_proto", + ":language_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 = "language_go_proto", + 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"], +) + +go_gapic_library( + name = "language_go_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + importpath = "cloud.google.com/go/language/apiv1", + service_yaml = "//google/cloud/language:language_v1.yaml", + deps = [":language_go_proto"], +) + +go_test( + name = "language_go_gapic_test", + srcs = [":language_go_gapic_srcjar_test"], + embed = [":language_go_gapic"], + importpath = "cloud.google.com/go/language/apiv1", +) + +# Opensource 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", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_proto_library", + "php_grpc_library", + "php_gapic_library", + "php_gapic_assembly_pkg", +) + +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", + service_yaml = "//google/cloud/language:language_v1.yaml", + deps = [ + ":langauge_php_grpc", + ":language_php_proto", + ], +) + +# Opensource Packages +php_gapic_assembly_pkg( + name = "google-cloud-language-v1-php", + deps = [ + ":language_php_gapic", + ":language_php_grpc", + ":language_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_library", + "nodejs_gapic_assembly_pkg", +) + +nodejs_gapic_library( + name = "language_nodejs_gapic", + src = ":language_proto_with_info", + gapic_yaml = "language_gapic.yaml", + service_yaml = "//google/cloud/language:language_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "language-v1-nodejs", + deps = [ + ":language_nodejs_gapic", + ":language_proto", + ], +) + diff --git a/google/cloud/language/v1/language.tests.yaml b/google/cloud/language/v1/language.tests.yaml new file mode 100644 index 000000000..d133b04f6 --- /dev/null +++ b/google/cloud/language/v1/language.tests.yaml @@ -0,0 +1,123 @@ +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.yaml b/google/cloud/language/v1/language_gapic.yaml index cb902f889..a3796fc94 100644 --- a/google/cloud/language/v1/language_gapic.yaml +++ b/google/cloud/language/v1/language_gapic.yaml @@ -1,5 +1,6 @@ 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 @@ -7,10 +8,8 @@ language_settings: package_name: google.cloud.language_v1.gapic go: package_name: cloud.google.com/go/language/apiv1 - release_level: GA csharp: package_name: Google.Cloud.Language.V1 - release_level: GA ruby: package_name: Google::Cloud::Language::V1 php: @@ -18,81 +17,340 @@ language_settings: nodejs: package_name: language.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - 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.language.v1.LanguageService - smoke_test: - method: AnalyzeSentiment - init_fields: - - document.content="Hello, world!" - - document.type=PLAIN_TEXT + # 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 + - 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 + initial_rpc_timeout_millis: 20000 rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 60000 + 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 - request_object_method: false retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + 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 - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + 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 - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + 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 - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + 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: @@ -100,10 +358,48 @@ interfaces: - document required_fields: - document - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + 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: @@ -111,10 +407,12 @@ interfaces: - document - features - encoding_type + - parameters: + - document + - features required_fields: - document - features - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + timeout_millis: 60000 diff --git a/google/cloud/language/v1/language_service.proto b/google/cloud/language/v1/language_service.proto index 6895b0d82..41d92f344 100644 --- a/google/cloud/language/v1/language_service.proto +++ b/google/cloud/language/v1/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,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.language.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1;language"; option java_multiple_files = true; @@ -27,40 +30,73 @@ option java_package = "com.google.cloud.language.v1"; // 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) { - option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" }; + option (google.api.http) = { + post: "/v1/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) { - option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" }; + option (google.api.http) = { + post: "/v1/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.v1.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: "/v1/documents:analyzeEntitySentiment" body: "*" }; + option (google.api.http) = { + post: "/v1/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 // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { - option (google.api.http) = { post: "/v1/documents:analyzeSyntax" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:analyzeSyntax" + body: "*" + }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Classifies a document into categories. rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { - option (google.api.http) = { post: "/v1/documents:classifyText" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:classifyText" + body: "*" + }; + option (google.api.method_signature) = "document"; } // A convenience method that provides all the features that analyzeSentiment, // analyzeEntities, and analyzeSyntax provide in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { - option (google.api.http) = { post: "/v1/documents:annotateText" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:annotateText" + body: "*" + }; + option (google.api.method_signature) = "document,features,encoding_type"; + option (google.api.method_signature) = "document,features"; } } @@ -88,6 +124,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. @@ -123,7 +160,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; @@ -140,14 +180,54 @@ 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. @@ -158,8 +238,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. @@ -181,6 +262,32 @@ message Entity { Sentiment sentiment = 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; +} + // Represents the smallest syntactic building block of the text. message Token { // The token text. @@ -846,7 +953,8 @@ message TextSpan { // 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](/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -857,7 +965,7 @@ message ClassificationCategory { // The sentiment analysis request message. message AnalyzeSentimentRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate sentence offsets. EncodingType encoding_type = 2; @@ -880,7 +988,7 @@ message AnalyzeSentimentResponse { // The entity-level sentiment analysis request message. message AnalyzeEntitySentimentRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -900,7 +1008,7 @@ message AnalyzeEntitySentimentResponse { // The entity analysis request message. message AnalyzeEntitiesRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -920,7 +1028,7 @@ message AnalyzeEntitiesResponse { // The syntax analysis request message. message AnalyzeSyntaxRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -943,7 +1051,7 @@ message AnalyzeSyntaxResponse { // The document classification request message. message ClassifyTextRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; } // The document classification response message. @@ -975,10 +1083,10 @@ message AnnotateTextRequest { } // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The enabled features. - Features features = 2; + Features features = 2 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 3; @@ -1012,29 +1120,3 @@ message AnnotateTextResponse { // 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/v1beta1/language_gapic.yaml b/google/cloud/language/v1beta1/language_gapic.yaml index 586242383..63d633a1a 100644 --- a/google/cloud/language/v1beta1/language_gapic.yaml +++ b/google/cloud/language/v1beta1/language_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: language.v1beta1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.language.v1beta1.LanguageService smoke_test: @@ -50,7 +47,6 @@ interfaces: - document required_fields: - document - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -63,7 +59,6 @@ interfaces: required_fields: - document - encoding_type - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -78,7 +73,6 @@ interfaces: - document - features - encoding_type - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 diff --git a/google/cloud/language/v1beta1/language_service.proto b/google/cloud/language/v1beta1/language_service.proto index 27212ac72..1158bb96e 100644 --- a/google/cloud/language/v1beta1/language_service.proto +++ b/google/cloud/language/v1beta1/language_service.proto @@ -23,33 +23,46 @@ option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1beta1"; - // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { - option (google.api.http) = { post: "/v1beta1/documents:analyzeSentiment" body: "*" }; + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { + option (google.api.http) = { + post: "/v1beta1/documents:analyzeSentiment" + body: "*" + }; } // 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) { - option (google.api.http) = { post: "/v1beta1/documents:analyzeEntities" body: "*" }; + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { + post: "/v1beta1/documents:analyzeEntities" + body: "*" + }; } // Analyzes the syntax of the text and provides sentence boundaries and // tokenization along with part of speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { - option (google.api.http) = { post: "/v1beta1/documents:analyzeSyntax" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/documents:analyzeSyntax" + body: "*" + }; } // A convenience method that provides all the features that analyzeSentiment, // analyzeEntities, and analyzeSyntax provide in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { - option (google.api.http) = { post: "/v1beta1/documents:annotateText" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/documents:annotateText" + body: "*" + }; } } @@ -89,11 +102,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](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. + // [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; } @@ -103,8 +116,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta1.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.v1beta1.AnnotateTextRequest.Features.extract_document_sentiment] + // is set to true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -800,7 +813,9 @@ 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.v1beta1.EncodingType] specified in the API request. + // document according to the + // [EncodingType][google.cloud.language.v1beta1.EncodingType] specified in the + // API request. int32 begin_offset = 2; } @@ -821,7 +836,8 @@ 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.v1beta1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta1.Document.language] + // field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -844,7 +860,8 @@ 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.v1beta1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta1.Document.language] + // field for more details. string language = 2; } @@ -867,7 +884,8 @@ 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.v1beta1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta1.Document.language] + // field for more details. string language = 3; } @@ -919,7 +937,8 @@ 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.v1beta1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta1.Document.language] + // field for more details. string language = 5; } diff --git a/google/cloud/language/v1beta2/BUILD.bazel b/google/cloud/language/v1beta2/BUILD.bazel new file mode 100644 index 000000000..1ce9261d4 --- /dev/null +++ b/google/cloud/language/v1beta2/BUILD.bazel @@ -0,0 +1,132 @@ +# 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 = "language_proto", + srcs = ["language_service.proto"], + deps = [ + "//google/api:annotations_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "language_proto_with_info", + deps = [":language_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 = "language_java_proto", + deps = [":language_proto"], +) + +java_grpc_library( + name = "language_java_grpc", + srcs = [":language_proto"], + deps = [":language_java_proto"] + _JAVA_GRPC_DEPS, +) + +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, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":language_java_gapic_test"], +) for test_name in [ + "com.google.cloud.language.v1beta2.LanguageServiceClientTest", +]] + +# Opensource 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 = [ + ":language_java_proto", + ":language_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 = "language_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/language/v1beta2", + 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"], +) + +go_test( + name = "language_go_gapic_test", + srcs = [":language_go_gapic_srcjar_test"], + embed = [":language_go_gapic"], + importpath = "cloud.google.com/go/language/apiv1beta2", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/language/v1beta2/language_gapic.yaml b/google/cloud/language/v1beta2/language_gapic.yaml index f088c043d..7fcf68f14 100644 --- a/google/cloud/language/v1beta2/language_gapic.yaml +++ b/google/cloud/language/v1beta2/language_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: language.v1beta2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.language.v1beta2.LanguageService smoke_test: @@ -51,7 +48,6 @@ interfaces: - document required_fields: - document - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -63,7 +59,6 @@ interfaces: - encoding_type required_fields: - document - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -75,7 +70,6 @@ interfaces: - encoding_type required_fields: - document - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -87,7 +81,6 @@ interfaces: - encoding_type required_fields: - document - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -98,7 +91,6 @@ interfaces: - document required_fields: - document - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -112,7 +104,6 @@ interfaces: required_fields: - document - features - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 diff --git a/google/cloud/language/v1beta2/language_service.proto b/google/cloud/language/v1beta2/language_service.proto index 54c6638cd..0263be04a 100644 --- a/google/cloud/language/v1beta2/language_service.proto +++ b/google/cloud/language/v1beta2/language_service.proto @@ -26,44 +26,66 @@ option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1beta2"; - // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" }; + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { + option (google.api.http) = { + post: "/v1beta2/documents:analyzeSentiment" + body: "*" + }; } // 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) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" }; + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { + post: "/v1beta2/documents:analyzeEntities" + body: "*" + }; } - // 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: "*" }; + // 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: "*" + }; } // Analyzes the syntax of the text and provides sentence boundaries and // 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.http) = { + post: "/v1beta2/documents:analyzeSyntax" + body: "*" + }; } // Classifies a document into categories. rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { - option (google.api.http) = { post: "/v1beta2/documents:classifyText" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/documents:classifyText" + body: "*" + }; } // A convenience method that provides all syntax, sentiment, entity, and // classification features in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { - option (google.api.http) = { post: "/v1beta2/documents:annotateText" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/documents:annotateText" + body: "*" + }; } } @@ -117,8 +139,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; } @@ -178,9 +200,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; } @@ -827,9 +849,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; } @@ -839,7 +861,9 @@ 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; } @@ -870,7 +894,8 @@ 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. @@ -893,7 +918,8 @@ 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; } @@ -913,7 +939,8 @@ 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; } @@ -936,7 +963,8 @@ 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; } @@ -1006,7 +1034,8 @@ 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. diff --git a/google/cloud/location/locations.proto b/google/cloud/location/locations.proto index c5f101ed0..03f327268 100644 --- a/google/cloud/location/locations.proto +++ b/google/cloud/location/locations.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "LocationsProto"; option java_package = "com.google.cloud.location"; - // An abstract interface that provides location-related information for // a service. Service-specific metadata is provided through the // [Location.metadata][google.cloud.location.Location.metadata] field. @@ -45,7 +44,8 @@ service Locations { } } -// The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. +// The request message for +// [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. message ListLocationsRequest { // The resource that owns the locations collection, if applicable. string name = 1; @@ -60,7 +60,8 @@ message ListLocationsRequest { string page_token = 4; } -// The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. +// The response message for +// [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. message ListLocationsResponse { // A list of locations that matches the specified filter in the request. repeated Location locations = 1; @@ -69,7 +70,8 @@ message ListLocationsResponse { string next_page_token = 2; } -// The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation]. +// The request message for +// [Locations.GetLocation][google.cloud.location.Locations.GetLocation]. message GetLocationRequest { // Resource name for the location. string name = 1; diff --git a/google/cloud/ml/v1/job_service.proto b/google/cloud/ml/v1/job_service.proto index 93beed1c0..d1f608941 100644 --- a/google/cloud/ml/v1/job_service.proto +++ b/google/cloud/ml/v1/job_service.proto @@ -31,28 +31,36 @@ option java_package = "com.google.cloud.ml.api.v1"; // Proto file for the Google Cloud Machine Learning Engine. // Describes the 'job service' to manage training and prediction jobs. - - // Service to create and manage training and batch prediction jobs. service JobService { // Creates a training or a batch prediction job. rpc CreateJob(CreateJobRequest) returns (Job) { - option (google.api.http) = { post: "/v1/{parent=projects/*}/jobs" body: "job" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*}/jobs" + body: "job" + }; } // Lists the jobs in the project. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*}/jobs" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*}/jobs" + }; } // Describes a job. rpc GetJob(GetJobRequest) returns (Job) { - option (google.api.http) = { get: "/v1/{name=projects/*/jobs/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/jobs/*}" + }; } // Cancels a running job. rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=projects/*/jobs/*}:cancel" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/jobs/*}:cancel" + body: "*" + }; } } diff --git a/google/cloud/ml/v1/model_service.proto b/google/cloud/ml/v1/model_service.proto index 783ba8713..c57b16b50 100644 --- a/google/cloud/ml/v1/model_service.proto +++ b/google/cloud/ml/v1/model_service.proto @@ -32,8 +32,6 @@ option java_package = "com.google.cloud.ml.api.v1"; // Describes the 'models service' to work with the 'model' and 'version' // resources. - - // Provides methods that create and manage machine learning models and their // versions. // @@ -67,7 +65,10 @@ service ModelService { // the model. Add versions by calling // [projects.models.versions.create](/ml/reference/rest/v1/projects.models.versions/create). rpc CreateModel(CreateModelRequest) returns (Model) { - option (google.api.http) = { post: "/v1/{parent=projects/*}/models" body: "model" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*}/models" + body: "model" + }; } // Lists the models in a project. @@ -75,14 +76,18 @@ service ModelService { // Each project can contain multiple models, and each model can have multiple // versions. rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*}/models" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*}/models" + }; } // Gets information about a model, including its name, the description (if // set), and the default version (if at least one version of the model has // been deployed). rpc GetModel(GetModelRequest) returns (Model) { - option (google.api.http) = { get: "/v1/{name=projects/*/models/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/models/*}" + }; } // Deletes a model. @@ -91,7 +96,9 @@ service ModelService { // versions by calling // [projects.models.versions.delete](/ml/reference/rest/v1/projects.models.versions/delete). rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/{name=projects/*/models/*}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/models/*}" + }; } // Creates a new version of a model from a trained TensorFlow model. @@ -102,8 +109,12 @@ service ModelService { // versions, the default version does not automatically change. If you want a // new version to be the default, you must call // [projects.models.versions.setDefault](/ml/reference/rest/v1/projects.models.versions/setDefault). - rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/{parent=projects/*/models/*}/versions" body: "version" }; + rpc CreateVersion(CreateVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/models/*}/versions" + body: "version" + }; } // Gets basic information about all the versions of a model. @@ -112,7 +123,9 @@ service ModelService { // only a limited number of results at a time, you can request that the list // be retrieved in batches (called pages): rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { - option (google.api.http) = { get: "/v1/{parent=projects/*/models/*}/versions" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/models/*}/versions" + }; } // Gets information about a model version. @@ -122,7 +135,9 @@ service ModelService { // to get the same information that this method returns for all of the // versions of a model. rpc GetVersion(GetVersionRequest) returns (Version) { - option (google.api.http) = { get: "/v1/{name=projects/*/models/*/versions/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/models/*/versions/*}" + }; } // Deletes a model version. @@ -132,8 +147,11 @@ service ModelService { // // Note: You cannot delete the version that is set as the default version // of the model unless it is the only remaining version. - rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { delete: "/v1/{name=projects/*/models/*/versions/*}" }; + rpc DeleteVersion(DeleteVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/models/*/versions/*}" + }; } // Designates a version to be the default for the model. @@ -145,7 +163,10 @@ service ModelService { // default. You must make any subsequent changes to the default version // setting manually using this method. rpc SetDefaultVersion(SetDefaultVersionRequest) returns (Version) { - option (google.api.http) = { post: "/v1/{name=projects/*/models/*/versions/*}:setDefault" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/models/*/versions/*}:setDefault" + body: "*" + }; } } diff --git a/google/cloud/ml/v1/operation_metadata.proto b/google/cloud/ml/v1/operation_metadata.proto index c29a78925..0220cfd7e 100644 --- a/google/cloud/ml/v1/operation_metadata.proto +++ b/google/cloud/ml/v1/operation_metadata.proto @@ -30,8 +30,6 @@ option java_package = "com.google.cloud.ml.api.v1"; // Proto file for the Google Cloud Machine Learning Engine. // Describes the metadata for longrunning operations. - - // Represents the metadata of the long-running operation. message OperationMetadata { // The operation type. diff --git a/google/cloud/ml/v1/prediction_service.proto b/google/cloud/ml/v1/prediction_service.proto index c5e25dcd3..dba49277c 100644 --- a/google/cloud/ml/v1/prediction_service.proto +++ b/google/cloud/ml/v1/prediction_service.proto @@ -29,8 +29,6 @@ option java_package = "com.google.cloud.ml.api.v1"; // Proto file for the Google Cloud Machine Learning Engine. // Describes the online prediction service. - - // The Prediction API, which serves predictions for models managed by // ModelService. service OnlinePredictionService { @@ -38,7 +36,10 @@ service OnlinePredictionService { // // **** REMOVE FROM GENERATED DOCUMENTATION rpc Predict(PredictRequest) returns (google.api.HttpBody) { - option (google.api.http) = { post: "/v1/{name=projects/**}:predict" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/**}:predict" + body: "*" + }; } } diff --git a/google/cloud/ml/v1/project_service.proto b/google/cloud/ml/v1/project_service.proto index f54eadf6a..b5949093d 100644 --- a/google/cloud/ml/v1/project_service.proto +++ b/google/cloud/ml/v1/project_service.proto @@ -28,8 +28,6 @@ option java_package = "com.google.cloud.ml.api.v1"; // Proto file for the Google Cloud Machine Learning Engine. // Describes the project management service. - - // Allows retrieving project related information. service ProjectManagementService { // Get the service account information associated with your project. You need @@ -37,7 +35,9 @@ service ProjectManagementService { // the Google Cloud Storage location where you put your model training code // for training the model with Google Cloud Machine Learning. rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*}:getConfig" }; + option (google.api.http) = { + get: "/v1/{name=projects/*}:getConfig" + }; } } diff --git a/google/cloud/oslogin/BUILD.bazel b/google/cloud/oslogin/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/oslogin/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/oslogin/artman_oslogin_v1.yaml b/google/cloud/oslogin/artman_oslogin_v1.yaml index 4a6968f72..70e9022e2 100644 --- a/google/cloud/oslogin/artman_oslogin_v1.yaml +++ b/google/cloud/oslogin/artman_oslogin_v1.yaml @@ -15,21 +15,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-os-login-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-os-login-v1 - - name: proto - dest: generated/java/proto-google-cloud-os-login-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-os-login - name: python_gapic type: GAPIC language: PYTHON @@ -39,12 +24,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-oslogin-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/oslogin/artman_oslogin_v1beta.yaml b/google/cloud/oslogin/artman_oslogin_v1beta.yaml index b29444c79..6e3c099b6 100644 --- a/google/cloud/oslogin/artman_oslogin_v1beta.yaml +++ b/google/cloud/oslogin/artman_oslogin_v1beta.yaml @@ -24,12 +24,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-oslogin-v1beta - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/oslogin/common/BUILD.bazel b/google/cloud/oslogin/common/BUILD.bazel new file mode 100644 index 000000000..8b02bf5ff --- /dev/null +++ b/google/cloud/oslogin/common/BUILD.bazel @@ -0,0 +1,61 @@ +# 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 = "common_proto", + srcs = [ + "common.proto", + ], + deps = [ + "//google/api:annotations_proto", + ], +) + +proto_library_with_info( + name = "common_proto_with_info", + deps = [":common_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "common_java_proto", + deps = [":common_proto"], +) + +java_grpc_library( + name = "common_java_grpc", + srcs = [":common_proto"], + 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") + +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"], +) diff --git a/google/cloud/oslogin/common/common.proto b/google/cloud/oslogin/common/common.proto index 822b714f1..6c45ebb6d 100644 --- a/google/cloud/oslogin/common/common.proto +++ b/google/cloud/oslogin/common/common.proto @@ -24,7 +24,6 @@ option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.common"; option php_namespace = "Google\\Cloud\\OsLogin\\Common"; - // The POSIX account information associated with a Google account. message PosixAccount { // Only one POSIX account can be marked as primary. diff --git a/google/cloud/oslogin/v1/BUILD.bazel b/google/cloud/oslogin/v1/BUILD.bazel new file mode 100644 index 000000000..bcee7033f --- /dev/null +++ b/google/cloud/oslogin/v1/BUILD.bazel @@ -0,0 +1,165 @@ +# 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_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_proto", +] + +proto_library( + name = "oslogin_proto", + srcs = [ + "oslogin.proto", + ], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +proto_library_with_info( + name = "oslogin_proto_with_info", + deps = [":oslogin_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_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_java_proto", +] + +_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"], +) + +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"], +) + +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", + 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, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":oslogin_java_gapic_test"], +) for test_name in [ + "com.google.cloud.oslogin.v1.OsLoginServiceClientTest", +]] + +# Opensource 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 = [ + ":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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "oslogin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/v1", + protos = [":oslogin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/cloud/oslogin/common:common_go_proto", + ], +) + +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", + deps = [ + ":oslogin_go_proto", + "//google/cloud/oslogin/common:common_go_proto", + ], +) + +go_test( + name = "oslogin_go_gapic_test", + srcs = [":oslogin_go_gapic_srcjar_test"], + embed = [":oslogin_go_gapic"], + importpath = "cloud.google.com/go/oslogin/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/oslogin/v1/oslogin.proto b/google/cloud/oslogin/v1/oslogin.proto index 0b87af767..d76bd47e6 100644 --- a/google/cloud/oslogin/v1/oslogin.proto +++ b/google/cloud/oslogin/v1/oslogin.proto @@ -28,44 +28,62 @@ option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.v1"; option php_namespace = "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 { // Deletes a POSIX account. - rpc DeletePosixAccount(DeletePosixAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=users/*/projects/*}" }; + rpc DeletePosixAccount(DeletePosixAccountRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=users/*/projects/*}" + }; } // Deletes an SSH public key. - rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=users/*/sshPublicKeys/*}" }; + rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=users/*/sshPublicKeys/*}" + }; } // Retrieves the profile information used for logging in to a virtual machine // on Google Compute Engine. rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) { - option (google.api.http) = { get: "/v1/{name=users/*}/loginProfile" }; + option (google.api.http) = { + get: "/v1/{name=users/*}/loginProfile" + }; } // Retrieves an SSH public key. - rpc GetSshPublicKey(GetSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { get: "/v1/{name=users/*/sshPublicKeys/*}" }; + rpc GetSshPublicKey(GetSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + get: "/v1/{name=users/*/sshPublicKeys/*}" + }; } // 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) { - option (google.api.http) = { post: "/v1/{parent=users/*}:importSshPublicKey" body: "ssh_public_key" }; + rpc ImportSshPublicKey(ImportSshPublicKeyRequest) + returns (ImportSshPublicKeyResponse) { + option (google.api.http) = { + post: "/v1/{parent=users/*}:importSshPublicKey" + body: "ssh_public_key" + }; } // Updates an SSH public key and returns the profile information. This method // supports patch semantics. - rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { patch: "/v1/{name=users/*/sshPublicKeys/*}" body: "ssh_public_key" }; + rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + patch: "/v1/{name=users/*/sshPublicKeys/*}" + body: "ssh_public_key" + }; } } diff --git a/google/cloud/oslogin/v1/oslogin_gapic.yaml b/google/cloud/oslogin/v1/oslogin_gapic.yaml index e59e225a4..167c821f3 100644 --- a/google/cloud/oslogin/v1/oslogin_gapic.yaml +++ b/google/cloud/oslogin/v1/oslogin_gapic.yaml @@ -17,12 +17,6 @@ language_settings: nodejs: package_name: os-login.v1 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. @@ -78,10 +72,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -128,7 +118,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -142,7 +131,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -156,7 +144,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -170,7 +157,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -190,7 +176,6 @@ interfaces: required_fields: - parent - ssh_public_key - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -210,7 +195,6 @@ interfaces: required_fields: - name - ssh_public_key - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: diff --git a/google/cloud/oslogin/v1alpha/oslogin.proto b/google/cloud/oslogin/v1alpha/oslogin.proto index f46feeb7e..f3b754cca 100644 --- a/google/cloud/oslogin/v1alpha/oslogin.proto +++ b/google/cloud/oslogin/v1alpha/oslogin.proto @@ -28,44 +28,62 @@ option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.v1alpha"; option php_namespace = "Google\\Cloud\\OsLogin\\V1alpha"; - // 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 { // Deletes a POSIX account. - rpc DeletePosixAccount(DeletePosixAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1alpha/{name=users/*/projects/*}" }; + rpc DeletePosixAccount(DeletePosixAccountRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=users/*/projects/*}" + }; } // Deletes an SSH public key. - rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1alpha/{name=users/*/sshPublicKeys/*}" }; + rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=users/*/sshPublicKeys/*}" + }; } // Retrieves the profile information used for logging in to a virtual machine // on Google Compute Engine. rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) { - option (google.api.http) = { get: "/v1alpha/{name=users/*}/loginProfile" }; + option (google.api.http) = { + get: "/v1alpha/{name=users/*}/loginProfile" + }; } // Retrieves an SSH public key. - rpc GetSshPublicKey(GetSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { get: "/v1alpha/{name=users/*/sshPublicKeys/*}" }; + rpc GetSshPublicKey(GetSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + get: "/v1alpha/{name=users/*/sshPublicKeys/*}" + }; } // 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) { - option (google.api.http) = { post: "/v1alpha/{parent=users/*}:importSshPublicKey" body: "ssh_public_key" }; + rpc ImportSshPublicKey(ImportSshPublicKeyRequest) + returns (ImportSshPublicKeyResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=users/*}:importSshPublicKey" + body: "ssh_public_key" + }; } // Updates an SSH public key and returns the profile information. This method // supports patch semantics. - rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { patch: "/v1alpha/{name=users/*/sshPublicKeys/*}" body: "ssh_public_key" }; + rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + patch: "/v1alpha/{name=users/*/sshPublicKeys/*}" + body: "ssh_public_key" + }; } } diff --git a/google/cloud/oslogin/v1beta/BUILD.bazel b/google/cloud/oslogin/v1beta/BUILD.bazel new file mode 100644 index 000000000..b93768497 --- /dev/null +++ b/google/cloud/oslogin/v1beta/BUILD.bazel @@ -0,0 +1,165 @@ +# 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_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_proto", +] + +proto_library( + name = "oslogin_proto", + srcs = [ + "oslogin.proto", + ], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +proto_library_with_info( + name = "oslogin_proto_with_info", + deps = [":oslogin_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_SUBPACKAGE_DEPS = [ + "//google/cloud/oslogin/common:common_java_proto", +] + +_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"], +) + +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"], +) + +java_gapic_library( + name = "oslogin_java_gapic", + 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, + deps = [ + ":oslogin_java_proto", + ":oslogin_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS + _JAVA_PROTO_SUBPACKAGE_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":oslogin_java_gapic_test"], +) for test_name in [ + "com.google.cloud.oslogin.v1beta.OsLoginServiceClientTest", +]] + +# Opensource 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 = [ + ":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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "oslogin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/oslogin/v1beta", + protos = [":oslogin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/cloud/oslogin/common:common_go_proto", + ], +) + +go_gapic_library( + name = "oslogin_go_gapic", + src = ":oslogin_proto_with_info", + gapic_yaml = "oslogin_gapic.yaml", + importpath = "cloud.google.com/go/oslogin/apiv1beta", + service_yaml = "//google/cloud/oslogin:oslogin_v1beta.yaml", + deps = [ + ":oslogin_go_proto", + "//google/cloud/oslogin/common:common_go_proto", + ], +) + +go_test( + name = "oslogin_go_gapic_test", + srcs = [":oslogin_go_gapic_srcjar_test"], + embed = [":oslogin_go_gapic"], + importpath = "cloud.google.com/go/oslogin/apiv1beta", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/oslogin/v1beta/oslogin.proto b/google/cloud/oslogin/v1beta/oslogin.proto index e31c37bde..304c4d9f6 100644 --- a/google/cloud/oslogin/v1beta/oslogin.proto +++ b/google/cloud/oslogin/v1beta/oslogin.proto @@ -28,44 +28,62 @@ option java_outer_classname = "OsLoginProto"; option java_package = "com.google.cloud.oslogin.v1beta"; option php_namespace = "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 { // Deletes a POSIX account. - rpc DeletePosixAccount(DeletePosixAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta/{name=users/*/projects/*}" }; + rpc DeletePosixAccount(DeletePosixAccountRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=users/*/projects/*}" + }; } // Deletes an SSH public key. - rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta/{name=users/*/sshPublicKeys/*}" }; + rpc DeleteSshPublicKey(DeleteSshPublicKeyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=users/*/sshPublicKeys/*}" + }; } // Retrieves the profile information used for logging in to a virtual machine // on Google Compute Engine. rpc GetLoginProfile(GetLoginProfileRequest) returns (LoginProfile) { - option (google.api.http) = { get: "/v1beta/{name=users/*}/loginProfile" }; + option (google.api.http) = { + get: "/v1beta/{name=users/*}/loginProfile" + }; } // Retrieves an SSH public key. - rpc GetSshPublicKey(GetSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { get: "/v1beta/{name=users/*/sshPublicKeys/*}" }; + rpc GetSshPublicKey(GetSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + get: "/v1beta/{name=users/*/sshPublicKeys/*}" + }; } // 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) { - option (google.api.http) = { post: "/v1beta/{parent=users/*}:importSshPublicKey" body: "ssh_public_key" }; + rpc ImportSshPublicKey(ImportSshPublicKeyRequest) + returns (ImportSshPublicKeyResponse) { + option (google.api.http) = { + post: "/v1beta/{parent=users/*}:importSshPublicKey" + body: "ssh_public_key" + }; } // Updates an SSH public key and returns the profile information. This method // supports patch semantics. - rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) returns (google.cloud.oslogin.common.SshPublicKey) { - option (google.api.http) = { patch: "/v1beta/{name=users/*/sshPublicKeys/*}" body: "ssh_public_key" }; + rpc UpdateSshPublicKey(UpdateSshPublicKeyRequest) + returns (google.cloud.oslogin.common.SshPublicKey) { + option (google.api.http) = { + patch: "/v1beta/{name=users/*/sshPublicKeys/*}" + body: "ssh_public_key" + }; } } diff --git a/google/cloud/oslogin/v1beta/oslogin_gapic.yaml b/google/cloud/oslogin/v1beta/oslogin_gapic.yaml index 2882b9c33..09251d436 100644 --- a/google/cloud/oslogin/v1beta/oslogin_gapic.yaml +++ b/google/cloud/oslogin/v1beta/oslogin_gapic.yaml @@ -17,12 +17,6 @@ language_settings: nodejs: package_name: os-login.v1beta 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. @@ -78,10 +72,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -128,7 +118,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -142,7 +131,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -156,7 +144,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -170,7 +157,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -190,7 +176,6 @@ interfaces: required_fields: - parent - ssh_public_key - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -210,7 +195,6 @@ interfaces: required_fields: - name - ssh_public_key - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: diff --git a/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml new file mode 100644 index 000000000..547e0fa99 --- /dev/null +++ b/google/cloud/phishingprotection/artman_phishingprotection_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: phishingprotection + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: phishingprotection.yaml + gapic_yaml: v1beta1/phishingprotection_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/phishingprotection/phishingprotection.yaml b/google/cloud/phishingprotection/phishingprotection.yaml new file mode 100644 index 000000000..7adec2ebb --- /dev/null +++ b/google/cloud/phishingprotection/phishingprotection.yaml @@ -0,0 +1,14 @@ +type: google.api.Service +config_version: 3 +name: phishingprotection.googleapis.com +title: Phishing Protection API + +apis: +- name: google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1 + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/google/cloud/phishingprotection/v1beta1/phishingprotection.proto new file mode 100644 index 000000000..62a9fd03e --- /dev/null +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection.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.phishingprotection.v1beta1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.PhishingProtection.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1;phishingprotection"; +option java_multiple_files = true; +option java_outer_classname = "PhishingProtectionProto"; +option java_package = "com.google.phishingprotection.v1beta1"; +option objc_class_prefix = "GCPP"; +option php_namespace = "Google\\Cloud\\PhishingProtection\\V1beta1"; + +// Service to report phishing URIs. +service PhishingProtectionServiceV1Beta1 { + // 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. + rpc ReportPhishing(ReportPhishingRequest) returns (ReportPhishingResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/phishing:report" + body: "*" + }; + } +} + +// The ReportPhishing request message. +message ReportPhishingRequest { + // Required. The name of the project for which the report will be created, + // in the format "projects/{project_number}". + string parent = 1; + + // The URI that is being reported for phishing content to be analyzed. + string uri = 2; +} + +// The ReportPhishing (empty) response message. +message ReportPhishingResponse {} diff --git a/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.yaml new file mode 100644 index 000000000..02d430412 --- /dev/null +++ b/google/cloud/phishingprotection/v1beta1/phishingprotection_gapic.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/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml new file mode 100644 index 000000000..9303e71b4 --- /dev/null +++ b/google/cloud/recaptchaenterprise/artman_recaptchaenterprise_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: recaptchaenterprise + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: recaptchaenterprise_v1beta1.yaml + gapic_yaml: v1beta1/recaptchaenterprise_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/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml b/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml new file mode 100644 index 000000000..4996c5a4f --- /dev/null +++ b/google/cloud/recaptchaenterprise/recaptchaenterprise_v1beta1.yaml @@ -0,0 +1,18 @@ +type: google.api.Service +config_version: 3 +name: recaptchaenterprise.googleapis.com +title: reCAPTCHA Enterprise API + +apis: +- name: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1 + +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 + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto new file mode 100644 index 000000000..188f99f6f --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -0,0 +1,183 @@ +// 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.recaptchaenterprise.v1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1beta1;recaptchaenterprise"; +option java_multiple_files = true; +option java_outer_classname = "RecaptchaEnterpriseProto"; +option java_package = "com.google.recaptchaenterprise.v1beta1"; +option objc_class_prefix = "GCRE"; +option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1beta1"; + + +// Service to determine the likelihood an event is legitimate. +service RecaptchaEnterpriseServiceV1Beta1 { + // 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" + }; + } + + // 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: "/v1beta1/{name=projects/*/assessments/*}:annotate" + body: "*" + }; + } +} + +// 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_number}". + string parent = 1; + + // The asessment details. + Assessment assessment = 2; +} + +// 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; + } + + // 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; +} + +// Empty response for AnnotateAssessment. +message AnnotateAssessmentResponse { + +} + +// A recaptcha assessment resource. +message 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. + AUTOMATION = 1; + + // The event was not made from the proper context on the real site. + UNEXPECTED_ENVIRONMENT = 2; + + // Browsing behavior leading up to the event was generated was out of the + // ordinary. + UNEXPECTED_USAGE_PATTERNS = 4; + + // Too little traffic has been received from this site thus far to generate + // quality risk analysis. + PROVISIONAL_RISK_ANALYSIS = 5; + } + + // Output only. The resource name for the Assessment in the format + // "projects/{project_number}/assessments/{assessment_id}". + string name = 1; + + // The event being assessed. + Event event = 2; + + // 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; + + // Output only. Properties of the provided event token. + TokenProperties token_properties = 4; + + // Output only. Reasons contributing to the risk analysis verdict. + repeated ClassificationReason reasons = 5; +} + +message Event { + // The user response token provided by the reCAPTCHA client-side integration + // on your site. + string token = 1; + + // The site key that was used to invoke reCAPTCHA on your site and generate + // the token. + string site_key = 2; +} + +message TokenProperties { + // 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 did not match the provided site secret. + // This may be a configuration error (e.g. development keys used in + // production) or end users trying to use verification tokens from other + // sites. + SITE_MISMATCH = 5; + + // The user verification token was not present. It is a required input. + MISSING = 6; + } + + // Output only. Whether the provided user response token is valid. + bool valid = 1; + + // Output only. Reason associated with the response when valid = false. + InvalidReason invalid_reason = 2; + + // Output only. 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. + string hostname = 4; + + // Output only. Action name provided at token generation. + string action = 5; +} diff --git a/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.yaml new file mode 100644 index 000000000..7973f096c --- /dev/null +++ b/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_gapic.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/recommender/artman_recommender_v1beta1.yaml b/google/cloud/recommender/artman_recommender_v1beta1.yaml new file mode 100644 index 000000000..e66456bf0 --- /dev/null +++ b/google/cloud/recommender/artman_recommender_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: recommender + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: recommender_v1beta1.yaml + gapic_yaml: v1beta1/recommender_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/recommender/recommender_v1beta1.yaml b/google/cloud/recommender/recommender_v1beta1.yaml new file mode 100644 index 000000000..d72478e8e --- /dev/null +++ b/google/cloud/recommender/recommender_v1beta1.yaml @@ -0,0 +1,19 @@ +type: google.api.Service +config_version: 3 +name: recommender.googleapis.com +title: Recommender API + +apis: +- name: google.cloud.recommender.v1beta1.Recommender + +backend: + rules: + - selector: 'google.cloud.recommender.v1beta1.Recommender.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.recommender.v1beta1.Recommender.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/recommender/v1beta1/recommendation.proto b/google/cloud/recommender/v1beta1/recommendation.proto new file mode 100644 index 000000000..8980de0c4 --- /dev/null +++ b/google/cloud/recommender/v1beta1/recommendation.proto @@ -0,0 +1,234 @@ +// 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.v1beta1; + +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.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"; + +// A recommendation along with a suggested action. E.g., a rightsizing +// recommendation for an underutilized VM, IAM role recommendations, etc +message Recommendation { + // 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 + // 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 will be added when either content or primary impact category + // changes. + // + // Examples: + // For recommender = "google.iam.policy.RoleRecommender", + // 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 inspired by 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; + + // Value for the `path` field. Set if action is 'add'/'replace'/'test'. + google.protobuf.Value value = 7; + + // 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: { + // "/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"] + // } + map path_filters = 8; +} + +// 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; + } + + // 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/v1beta1/recommender_gapic.yaml b/google/cloud/recommender/v1beta1/recommender_gapic.yaml new file mode 100644 index 000000000..2acecf311 --- /dev/null +++ b/google/cloud/recommender/v1beta1/recommender_gapic.yaml @@ -0,0 +1,174 @@ +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 + 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_service.proto b/google/cloud/recommender/v1beta1/recommender_service.proto new file mode 100644 index 000000000..49a076ae7 --- /dev/null +++ b/google/cloud/recommender/v1beta1/recommender_service.proto @@ -0,0 +1,190 @@ +// 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.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/recommender/v1beta1/recommendation.proto"; +import "google/longrunning/operations.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.Recommmender.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. +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: "/v1beta1/{parent=projects/*/locations/*/recommenders/*}/recommendations" + }; + } + + // Gets the requested recommendation. Requires the recommender.*.get + // IAM permission for the specified recommender. + rpc GetRecommendation(GetRecommendationRequest) returns (Recommendation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed" + body: "*" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded" + body: "*" + }; + } + + // 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: "/v1beta1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed" + body: "*" + }; + } +} + +// 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; + + // 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. 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; + + // 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 { + // Name of the recommendation. + string name = 1; +} + +// Request for the `MarkRecommendationClaimed` Method. +message MarkRecommendationClaimedRequest { + // Name of the recommendation. + string name = 1; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + map state_metadata = 2; + + // Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3; +} + +// Request for the `MarkRecommendationSucceeded` Method. +message MarkRecommendationSucceededRequest { + // Name of the recommendation. + string name = 1; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + map state_metadata = 2; + + // Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3; +} + +// Request for the `MarkRecommendationFailed` Method. +message MarkRecommendationFailedRequest { + // Name of the recommendation. + string name = 1; + + // State properties to include with this state. Overwrites any existing + // `state_metadata`. + map state_metadata = 2; + + // Fingerprint of the Recommendation. Provides optimistic locking. + string etag = 3; +} diff --git a/google/cloud/redis/BUILD.bazel b/google/cloud/redis/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/redis/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/redis/artman_redis_v1.yaml b/google/cloud/redis/artman_redis_v1.yaml new file mode 100644 index 000000000..7c041414b --- /dev/null +++ b/google/cloud/redis/artman_redis_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: redis + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: redis_v1.yaml + gapic_yaml: v1/redis_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/redis/artman_redis_v1beta1.yaml b/google/cloud/redis/artman_redis_v1beta1.yaml index 23b7404ed..880e6ca8e 100644 --- a/google/cloud/redis/artman_redis_v1beta1.yaml +++ b/google/cloud/redis/artman_redis_v1beta1.yaml @@ -3,7 +3,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: redis_v1beta1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-redis-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-redis-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-redis-v1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-redis - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-redis-v1beta1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/redis/redis_v1.yaml b/google/cloud/redis/redis_v1.yaml new file mode 100644 index 000000000..baee17fa0 --- /dev/null +++ b/google/cloud/redis/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/redis_v1beta1.yaml b/google/cloud/redis/redis_v1beta1.yaml index 494b82aa5..b9e101404 100644 --- a/google/cloud/redis/redis_v1beta1.yaml +++ b/google/cloud/redis/redis_v1beta1.yaml @@ -11,45 +11,33 @@ types: - name: google.cloud.redis.v1beta1.ZoneMetadata documentation: - summary: |- - The Google Cloud Memorystore for Redis API is used for creating and managing - Redis instances on the Google Cloud Platform. + summary: Creates and manages Redis instances on the Google Cloud Platform. 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.cloud.redis.v1beta1.CloudRedis.ListInstances - deadline: 60.0 - - selector: google.cloud.redis.v1beta1.CloudRedis.GetInstance - deadline: 60.0 - - selector: google.cloud.redis.v1beta1.CloudRedis.CreateInstance - deadline: 60.0 - - selector: google.cloud.redis.v1beta1.CloudRedis.UpdateInstance + - selector: 'google.cloud.redis.v1beta1.CloudRedis.*' deadline: 60.0 - - selector: google.cloud.redis.v1beta1.CloudRedis.DeleteInstance + - selector: 'google.longrunning.Operations.*' deadline: 60.0 http: rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v1beta1/{name=projects/*/locations/*}/operations' - additional_bindings: - + - 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/*}' - additional_bindings: - + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=projects/*/locations/*}/operations' authentication: rules: - - selector: '*' + - 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/redis/v1/BUILD.bazel b/google/cloud/redis/v1/BUILD.bazel new file mode 100644 index 000000000..1f6917e05 --- /dev/null +++ b/google/cloud/redis/v1/BUILD.bazel @@ -0,0 +1,153 @@ +# 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 = "redis_proto", + srcs = [ + "cloud_redis.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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 = "redis_proto_with_info", + deps = [":redis_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 = "redis_java_proto", + deps = [":redis_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.redis.v1.CloudRedisClientTest", +]] + +# Opensource 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 = [ + ":redis_java_proto", + ":redis_proto", + ":redis_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 = "redis_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/redis/v1", + protos = [":redis_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":redis_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "redis_go_gapic_test", + srcs = [":redis_go_gapic_srcjar_test"], + embed = [":redis_go_gapic"], + importpath = "cloud.google.com/go/redis/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/redis/v1/cloud_redis.proto b/google/cloud/redis/v1/cloud_redis.proto new file mode 100644 index 000000000..65366ca43 --- /dev/null +++ b/google/cloud/redis/v1/cloud_redis.proto @@ -0,0 +1,514 @@ +// 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.redis.v1; + +import "google/api/annotations.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; +option java_outer_classname = "CloudRedisServiceV1Proto"; +option java_package = "com.google.cloud.redis.v1"; + +// Configures and manages Cloud Memorystore for Redis instances +// +// Google Cloud Memorystore for Redis v1 +// +// The `redis.googleapis.com` service implements the Google Cloud Memorystore +// for Redis API and defines the following resource model for managing Redis +// 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 Redis instances, named: `/instances/*` +// * As such, Redis instances are resources of the form: +// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` +// +// Note that location_id must be referring to a GCP `region`; for example: +// * `projects/redpepper-1290/locations/us-central1/instances/my-redis` +service CloudRedis { + option (google.api.default_host) = "redis.googleapis.com"; + + // 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 + // available to the project are queried, and the results are aggregated. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + } + + // Gets the details of a specific Redis instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + } + + // Creates a Redis instance based on the specified tier and memory size. + // + // By default, the instance is accessible from the project's + // [default network](/compute/docs/networks-and-firewalls#networks). + // + // The creation is executed asynchronously and callers may check the returned + // operation to track its progress. Once the operation is completed the Redis + // instance will be fully functional. Completed longrunning.Operation will + // contain the new instance object in the response field. + // + // The returned operation is automatically deleted after a few hours, so there + // is no need to call DeleteOperation. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + } + + // Updates the metadata and configuration of a specific Redis instance. + // + // Completed longrunning.Operation will contain the new instance object + // in the response field. The returned operation is automatically deleted + // after a few hours, so there is no need to call DeleteOperation. + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" + body: "instance" + }; + } + + // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. + // + // Redis may stop serving during this operation. Instance state will be + // IMPORTING for entire operation. When complete, the instance will contain + // only data from the imported file. + // + // The returned operation is automatically deleted after a few hours, so + // there is no need to call DeleteOperation. + rpc ImportInstance(ImportInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:import" + body: "*" + }; + } + + // Export Redis instance data into a Redis RDB format file in Cloud Storage. + // + // Redis will continue serving during this operation. + // + // The returned operation is automatically deleted after a few hours, so + // there is no need to call DeleteOperation. + rpc ExportInstance(ExportInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:export" + body: "*" + }; + } + + // Initiates a failover of the master node to current replica node for a + // specific STANDARD tier Cloud Memorystore for Redis instance. + rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:failover" + body: "*" + }; + } + + // Deletes a specific Redis instance. Instance stops serving and data is + // deleted. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + } +} + +// A Google Cloud Redis instance. +message Instance { + // Represents the different states of a Redis instance. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // Redis instance is being created. + CREATING = 1; + + // Redis instance has been created and is fully usable. + READY = 2; + + // Redis instance configuration is being updated. Certain kinds of updates + // may cause the instance to become unusable while the update is in + // progress. + UPDATING = 3; + + // Redis instance is being deleted. + DELETING = 4; + + // Redis instance is being repaired and may be unusable. + REPAIRING = 5; + + // Maintenance is being performed on this Redis instance. + MAINTENANCE = 6; + + // Redis instance is importing data (availability may be affected). + IMPORTING = 8; + + // Redis instance is failing over (availability may be affected). + FAILING_OVER = 9; + } + + // Available service tiers to choose from + enum Tier { + // Not set. + TIER_UNSPECIFIED = 0; + + // BASIC tier: standalone instance + BASIC = 1; + + // STANDARD_HA tier: highly available primary/replica instances + STANDARD_HA = 3; + } + + // 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: 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; + + // An arbitrary and optional user-provided name for the instance. + string display_name = 2; + + // Resource labels to represent user provided metadata + map labels = 3; + + // 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; + + // 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; + + // 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: + // + // * `REDIS_4_0` for Redis 4.0 compatibility (default) + // * `REDIS_3_2` for Redis 3.2 compatibility + string redis_version = 7; + + // 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; + + // Output only. Hostname or IP address of the exposed Redis endpoint used by + // clients to connect to the service. + string host = 10; + + // Output only. The port number of the exposed Redis endpoint. + int32 port = 11; + + // 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] + // provided by the user at creation time. For Standard Tier instances, + // this can be either [location_id] or [alternative_location_id] and can + // change after a failover event. + string current_location_id = 12; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 13; + + // Output only. The current state of this instance. + State state = 14; + + // Output only. Additional information about the current status of this + // instance, if available. + string status_message = 15; + + // Optional. Redis configuration parameters, according to + // http://redis.io/topics/config. Currently, the only supported parameters + // are: + // + // Redis 3.2 and above: + // + // * maxmemory-policy + // * notify-keyspace-events + // + // Redis 4.0 and above: + // + // * activedefrag + // * lfu-log-factor + // * lfu-decay-time + map redis_configs = 16; + + // Required. The service tier of the instance. + Tier tier = 17; + + // Required. Redis memory size in GiB. + int32 memory_size_gb = 18; + + // 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; + + // 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; +} + +// Request for [ListInstances][google.cloud.redis.v1.CloudRedis.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; + + // 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] + // 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; +} + +// Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. +message ListInstancesResponse { + // A list of Redis 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. + // 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". + repeated Instance instances = 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.redis.v1.CloudRedis.GetInstance]. +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; +} + +// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.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; + + // Required. The logical name of the Redis instance in the customer 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 customer project / location + string instance_id = 2; + + // Required. A Redis [Instance] resource + Instance instance = 3; +} + +// 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]: + // + // * `displayName` + // * `labels` + // * `memorySizeGb` + // * `redisConfig` + google.protobuf.FieldMask update_mask = 1; + + // Required. Update description. + // Only fields specified in update_mask are updated. + Instance instance = 2; +} + +// Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. +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; +} + +// The Cloud Storage location for the input content +message GcsSource { + // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). + string uri = 1; +} + +// The input content +message InputConfig { + // Required. Specify source location of input data + oneof source { + // Google Cloud Storage location where input content is located. + GcsSource gcs_source = 1; + } +} + +// Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. +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; + + // Required. Specify data to be imported. + InputConfig input_config = 3; +} + +// 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; +} + +// The output content +message OutputConfig { + // Required. Specify destination location of output data + oneof destination { + // Google Cloud Storage destination for output content. + GcsDestination gcs_destination = 1; + } +} + +// Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. +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; + + // Required. Specify data to be exported. + OutputConfig output_config = 3; +} + +// Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. +message FailoverInstanceRequest { + enum DataProtectionMode { + // Defaults to LIMITED_DATA_LOSS if a data protection mode is not + // specified. + DATA_PROTECTION_MODE_UNSPECIFIED = 0; + + // Instance failover will be protected with data loss control. More + // specifically, the failover will only be performed if the current + // replication offset diff between master and replica is under a certain + // threshold. + LIMITED_DATA_LOSS = 1; + + // Instance failover will be performed without data loss control. + FORCE_DATA_LOSS = 2; + } + + // 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; + + // 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; +} + +// Represents the v1 metadata of the long-running operation. +message OperationMetadata { + // Creation timestamp. + google.protobuf.Timestamp create_time = 1; + + // End timestamp. + google.protobuf.Timestamp end_time = 2; + + // Operation target. + string target = 3; + + // Operation verb. + string verb = 4; + + // Operation status details. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} + +// This location metadata represents additional configuration options for a +// given location where a Redis instance may be created. All fields are output +// only. It is returned as content of the +// `google.cloud.location.Location.metadata` field. +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 `location_id` or `alternative_location_id` fields when + // creating a Redis instance. + map available_zones = 1; +} + +// Defines specific information for a particular zone. Currently empty and +// reserved for future use only. +message ZoneMetadata { + +} diff --git a/google/cloud/redis/v1/redis_gapic.yaml b/google/cloud/redis/v1/redis_gapic.yaml new file mode 100644 index 000000000..bfff68c58 --- /dev/null +++ b/google/cloud/redis/v1/redis_gapic.yaml @@ -0,0 +1,299 @@ +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 + - 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/v1beta1/BUILD.bazel b/google/cloud/redis/v1beta1/BUILD.bazel new file mode 100644 index 000000000..cedc6e83d --- /dev/null +++ b/google/cloud/redis/v1beta1/BUILD.bazel @@ -0,0 +1,155 @@ +# 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 = "redis_proto", + srcs = [ + "cloud_redis.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "redis_proto_with_info", + deps = [":redis_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 = "redis_java_proto", + deps = [":redis_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.redis.v1beta1.CloudRedisClientTest", +]] + +# Opensource 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 = [ + ":redis_java_proto", + ":redis_proto", + ":redis_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 = "redis_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/redis/v1beta1", + protos = [":redis_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":redis_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:any_go_proto", + ], +) + +go_test( + name = "redis_go_gapic_test", + srcs = [":redis_go_gapic_srcjar_test"], + embed = [":redis_go_gapic"], + importpath = "cloud.google.com/go/redis/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/redis/v1beta1/cloud_redis.proto b/google/cloud/redis/v1beta1/cloud_redis.proto index 1aa944cdb..699df83fa 100644 --- a/google/cloud/redis/v1beta1/cloud_redis.proto +++ b/google/cloud/redis/v1beta1/cloud_redis.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"; @@ -20,13 +21,13 @@ import "google/api/annotations.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; option java_outer_classname = "CloudRedisServiceBetaProto"; option java_package = "com.google.cloud.redis.v1beta1"; - // Configures and manages Cloud Memorystore for Redis instances // // Google Cloud Memorystore for Redis v1beta1 @@ -43,6 +44,8 @@ option java_package = "com.google.cloud.redis.v1beta1"; // Note that location_id must be refering to a GCP `region`; for example: // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { + option (google.api.default_host) = "redis.googleapis.com"; + // Lists all Redis instances owned by a project in either the specified // location (region) or all locations. // @@ -66,7 +69,7 @@ service CloudRedis { // Creates a Redis instance based on the specified tier and memory size. // - // By default, the instance is peered to the project's + // By default, the instance is accessible from the project's // [default network](/compute/docs/networks-and-firewalls#networks). // // The creation is executed asynchronously and callers may check the returned @@ -95,6 +98,43 @@ service CloudRedis { }; } + // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. + // + // Redis may stop serving during this operation. Instance state will be + // IMPORTING for entire operation. When complete, the instance will contain + // only data from the imported file. + // + // The returned operation is automatically deleted after a few hours, so + // there is no need to call DeleteOperation. + rpc ImportInstance(ImportInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:import" + body: "*" + }; + } + + // Export Redis instance data into a Redis RDB format file in Cloud Storage. + // + // Redis will continue serving during this operation. + // + // The returned operation is automatically deleted after a few hours, so + // there is no need to call DeleteOperation. + rpc ExportInstance(ExportInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:export" + body: "*" + }; + } + + // Initiates a failover of the master node to current replica node for a + // specific STANDARD tier Cloud Memorystore for Redis instance. + rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:failover" + body: "*" + }; + } + // Deletes a specific Redis instance. Instance stops serving and data is // deleted. rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { @@ -125,12 +165,17 @@ message Instance { // Redis instance is being deleted. DELETING = 4; - // Redis instance is being repaired and may be unusable. Details can be - // found in the `status_message` field. + // Redis instance is being repaired and may be unusable. REPAIRING = 5; // Maintenance is being performed on this Redis instance. MAINTENANCE = 6; + + // Redis instance is importing data (availability may be affected). + IMPORTING = 8; + + // Redis instance is failing over (availability may be affected). + FAILING_OVER = 10; } // Available service tiers to choose from @@ -150,7 +195,7 @@ message Instance { // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // // Note: Redis instances are managed and addressed at regional level so - // location_id here refers to a GCP region; however, users get to choose which + // 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. @@ -165,7 +210,7 @@ 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 + // failures. If [alternative_location_id] is also provided, it must be // different from [location_id]. string location_id = 4; @@ -175,27 +220,32 @@ message Instance { string alternative_location_id = 5; // Optional. The version of Redis software. - // If not provided, latest supported version will be used. + // 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: + // + // * `REDIS_4_0` for Redis 4.0 compatibility (default) + // * `REDIS_3_2` for Redis 3.2 compatibility string redis_version = 7; // 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 a network. + // and non-overlapping with existing subnets in an authorized network. string reserved_ip_range = 9; - // Output only. Hostname or IP address of the exposed redis endpoint used by + // Output only. Hostname or IP address of the exposed Redis endpoint used by // clients to connect to the service. string host = 10; - // Output only. The port number of the exposed redis endpoint. + // Output only. The port number of the exposed Redis endpoint. int32 port = 11; - // Output only. The current zone where the Redis endpoint is placed. In - // single zone deployments, this will always be the same as [location_id] - // provided by the user at creation time. In cross-zone instances (only - // applicable in STANDARD_HA tier), this can be either [location_id] or - // [alternative_location_id] and can change on a failover event. + // 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] + // provided by the user at creation time. For Standard Tier instances, + // this can be either [location_id] or [alternative_location_id] and can + // change after a failover event. string current_location_id = 12; // Output only. The time the instance was created. @@ -211,14 +261,23 @@ message Instance { // Optional. Redis configuration parameters, according to // http://redis.io/topics/config. Currently, the only supported parameters // are: - // * maxmemory-policy - // * notify-keyspace-events + // + // Redis 3.2 and above: + // + // * maxmemory-policy + // * notify-keyspace-events + // + // Redis 4.0 and above: + // + // * activedefrag + // * lfu-log-factor + // * lfu-decay-time map redis_configs = 16; // Required. The service tier of the instance. Tier tier = 17; - // Required. Redis memory size in GB. + // Required. Redis memory size in GiB. int32 memory_size_gb = 18; // Optional. The full name of the Google Compute Engine @@ -226,13 +285,20 @@ message Instance { // instance is connected. If left unspecified, the `default` network // will be used. string authorized_network = 20; + + // 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; } // Request for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.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 + // where `location_id` refers to a GCP region. string parent = 1; // The maximum number of items to return. @@ -266,13 +332,16 @@ message ListInstancesResponse { // 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.redis.v1beta1.CloudRedis.GetInstance]. 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 + // where `location_id` refers to a GCP region. string name = 1; } @@ -280,7 +349,7 @@ message GetInstanceRequest { 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 + // where `location_id` refers to a GCP region. string parent = 1; // Required. The logical name of the Redis instance in the customer project @@ -301,11 +370,12 @@ message CreateInstanceRequest { 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]: - // * `display_name` - // * `labels` - // * `memory_size_gb` - // * `redis_config` + // fields from [Instance][google.cloud.redis.v1beta1.Instance]: + // + // * `displayName` + // * `labels` + // * `memorySizeGb` + // * `redisConfig` google.protobuf.FieldMask update_mask = 1; // Required. Update description. @@ -317,10 +387,90 @@ message UpdateInstanceRequest { 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 + // where `location_id` refers to a GCP region. string name = 1; } +// The Cloud Storage location for the input content +message GcsSource { + // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). + string uri = 1; +} + +// The input content +message InputConfig { + // Required. Specify source location of input data + oneof source { + // Google Cloud Storage location where input content is located. + GcsSource gcs_source = 1; + } +} + +// Request for [Import][google.cloud.redis.v1beta1.CloudRedis.ImportInstance]. +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; + + // Required. Specify data to be imported. + InputConfig input_config = 3; +} + +// 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; +} + +// The output content +message OutputConfig { + // Required. Specify destination location of output data + oneof destination { + // Google Cloud Storage destination for output content. + GcsDestination gcs_destination = 1; + } +} + +// Request for [Export][google.cloud.redis.v1beta1.CloudRedis.ExportInstance]. +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; + + // Required. Specify data to be exported. + OutputConfig output_config = 3; +} + +// Request for [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. +message FailoverInstanceRequest { + enum DataProtectionMode { + // Defaults to LIMITED_DATA_LOSS if a data protection mode is not + // specified. + DATA_PROTECTION_MODE_UNSPECIFIED = 0; + + // Instance failover will be protected with data loss control. More + // specifically, the failover will only be performed if the current + // replication offset diff between master and replica is under a certain + // threshold. + LIMITED_DATA_LOSS = 1; + + // Instance failover will be performed without data loss control. + FORCE_DATA_LOSS = 2; + } + + // 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; + + // 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; +} + // This location metadata represents additional configuration options for a // given location where a Redis instance may be created. All fields are output // only. It is returned as content of the diff --git a/google/cloud/redis/v1beta1/redis_gapic.yaml b/google/cloud/redis/v1beta1/redis_gapic.yaml index 25cdaf0b3..855a5356c 100644 --- a/google/cloud/redis/v1beta1/redis_gapic.yaml +++ b/google/cloud/redis/v1beta1/redis_gapic.yaml @@ -16,15 +16,9 @@ language_settings: package_name: Google\Cloud\Redis\V1beta1 nodejs: package_name: redis.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. +# 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. @@ -45,8 +39,8 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] # Definition for retry/backoff parameters. @@ -75,10 +69,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -125,7 +115,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -146,7 +135,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -164,24 +152,23 @@ interfaces: - parent - instance_id - instance - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: parent: location - timeout_millis: 60000 long_running: return_type: google.cloud.redis.v1beta1.Instance metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes + 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 + 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 + - instance_id="test_instance" + - instance.tier="BASIC" + - instance.memory_size_gb=1 - name: UpdateInstance flattening: groups: @@ -191,24 +178,87 @@ interfaces: required_fields: - update_mask - instance - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: instance.name: instance - timeout_millis: 60000 + 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 + 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 + 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 + - 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 + - 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: @@ -216,20 +266,19 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: instance - timeout_millis: 60000 long_running: return_type: google.protobuf.Empty metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes + 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 + 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: diff --git a/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml index 04287002d..c3d61249c 100644 --- a/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml +++ b/google/cloud/resourcemanager/artman_cloudresourcemanager.yaml @@ -5,6 +5,7 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v2 service_yaml: cloudresourcemanager.yaml @@ -24,12 +25,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-resourcemanager-v2 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml index 65b5efcda..49a394d39 100644 --- a/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml +++ b/google/cloud/resourcemanager/v2/cloudresourcemanager_gapic.yaml @@ -17,12 +17,6 @@ language_settings: nodejs: package_name: resourcemanager.v2 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 collection_oneofs: - oneof_name: parent_oneof collection_names: @@ -83,9 +77,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # 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. @@ -131,7 +123,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -150,7 +141,6 @@ interfaces: groups: - parameters: - query - request_object_method: true page_streaming: request: page_size_field: page_size @@ -168,7 +158,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -184,7 +173,6 @@ interfaces: required_fields: - parent - folder - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -200,7 +188,6 @@ interfaces: required_fields: - folder - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 30000 @@ -213,7 +200,6 @@ interfaces: required_fields: - name - destination_parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -231,7 +217,6 @@ interfaces: - recursive_delete required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -245,7 +230,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -259,7 +243,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -274,7 +257,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -289,7 +271,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/cloud/resourcemanager/v2/folders.proto b/google/cloud/resourcemanager/v2/folders.proto index d6d7db8b5..b231babfd 100644 --- a/google/cloud/resourcemanager/v2/folders.proto +++ b/google/cloud/resourcemanager/v2/folders.proto @@ -30,7 +30,6 @@ 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. @@ -43,7 +42,9 @@ service Folders { // The caller must have `resourcemanager.folders.list` permission on the // identified parent. rpc ListFolders(ListFoldersRequest) returns (ListFoldersResponse) { - option (google.api.http) = { get: "/v2/folders" }; + option (google.api.http) = { + get: "/v2/folders" + }; } // Search for folders that match specific filter criteria. @@ -53,7 +54,10 @@ service Folders { // This will only return folders on which the caller has the // permission `resourcemanager.folders.get`. rpc SearchFolders(SearchFoldersRequest) returns (SearchFoldersResponse) { - option (google.api.http) = { post: "/v2/folders:search" body: "*" }; + option (google.api.http) = { + post: "/v2/folders:search" + body: "*" + }; } // Retrieves a Folder identified by the supplied resource name. @@ -62,7 +66,9 @@ service Folders { // The caller must have `resourcemanager.folders.get` permission on the // identified folder. rpc GetFolder(GetFolderRequest) returns (Folder) { - option (google.api.http) = { get: "/v2/{name=folders/*}" }; + option (google.api.http) = { + get: "/v2/{name=folders/*}" + }; } // Creates a Folder in the resource hierarchy. @@ -87,12 +93,15 @@ service Folders { // 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 the Operation.error field. + // via the Operation.error field. // // The caller must have `resourcemanager.folders.create` permission on the // identified parent. rpc CreateFolder(CreateFolderRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v2/folders" body: "folder" }; + option (google.api.http) = { + post: "/v2/folders" + body: "folder" + }; } // Updates a Folder, changing its display_name. @@ -110,7 +119,10 @@ service Folders { // PreconditionFailure explaining this violation will be returned // in the Status.details field. rpc UpdateFolder(UpdateFolderRequest) returns (Folder) { - option (google.api.http) = { patch: "/v2/{folder.name=folders/*}" body: "folder" }; + option (google.api.http) = { + patch: "/v2/{folder.name=folders/*}" + body: "folder" + }; } // Moves a Folder under a new resource parent. @@ -130,7 +142,10 @@ service Folders { // The caller must have `resourcemanager.folders.move` permission on the // folder's current and proposed new parent. rpc MoveFolder(MoveFolderRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v2/{name=folders/*}:move" body: "*" }; + option (google.api.http) = { + post: "/v2/{name=folders/*}:move" + body: "*" + }; } // Requests deletion of a Folder. The Folder is moved into the @@ -141,7 +156,9 @@ service Folders { // 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.http) = { + delete: "/v2/{name=folders/*}" + }; } // Cancels the deletion request for a Folder. This method may only be @@ -153,7 +170,10 @@ service Folders { // The caller must have `resourcemanager.folders.undelete` permission on the // identified folder. rpc UndeleteFolder(UndeleteFolderRequest) returns (Folder) { - option (google.api.http) = { post: "/v2/{name=folders/*}:undelete" body: "*" }; + option (google.api.http) = { + post: "/v2/{name=folders/*}:undelete" + body: "*" + }; } // Gets the access control policy for a Folder. The returned policy may be @@ -161,8 +181,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) { - option (google.api.http) = { post: "/v2/{resource=folders/*}:getIamPolicy" body: "*" }; + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=folders/*}:getIamPolicy" + body: "*" + }; } // Sets the access control policy on a Folder, replacing any existing policy. @@ -170,8 +194,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) { - option (google.api.http) = { post: "/v2/{resource=folders/*}:setIamPolicy" body: "*" }; + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=folders/*}:setIamPolicy" + body: "*" + }; } // Returns permissions that a caller has on the specified Folder. @@ -179,8 +207,12 @@ 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) { - option (google.api.http) = { post: "/v2/{resource=folders/*}:testIamPermissions" body: "*" }; + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2/{resource=folders/*}:testIamPermissions" + body: "*" + }; } } diff --git a/google/cloud/runtimeconfig/BUILD.bazel b/google/cloud/runtimeconfig/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/google/cloud/runtimeconfig/v1beta1/resources.proto b/google/cloud/runtimeconfig/v1beta1/resources.proto index d3ee12238..165cbf78a 100644 --- a/google/cloud/runtimeconfig/v1beta1/resources.proto +++ b/google/cloud/runtimeconfig/v1beta1/resources.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_package = "com.google.cloud.runtimeconfig.v1beta1"; option php_namespace = "Google\\Cloud\\RuntimeConfig\\V1beta1"; - // A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig // service. A RuntimeConfig resource consists of metadata and a hierarchy of // variables. @@ -73,7 +72,7 @@ message Variable { // Once you create a variable, you cannot change the variable name. string name = 1; - // The the value of the variable. It can be either a binary or a string + // The value of the variable. It can be either a binary or a string // value. You must specify one of either `value` or `text`. Specifying both // will cause the server to return an error. oneof contents { @@ -91,9 +90,9 @@ message Variable { // [Output Only] The time of the last variable update. google.protobuf.Timestamp update_time = 3; - // [Ouput only] The current state of the variable. The variable state indicates - // the outcome of the `variables().watch` call and is visible through the - // `get` and `list` calls. + // [Ouput only] The current state of the variable. The variable state + // indicates the outcome of the `variables().watch` call and is visible + // through the `get` and `list` calls. VariableState state = 4; } @@ -130,10 +129,10 @@ message EndCondition { } } -// A Waiter resource waits for some end condition within a RuntimeConfig resource -// to be met before it returns. For example, assume you have a distributed -// system where each node writes to a Variable resource indidicating the node's -// readiness as part of the startup process. +// A Waiter resource waits for some end condition within a RuntimeConfig +// resource to be met before it returns. For example, assume you have a +// distributed system where each node writes to a Variable resource indidicating +// the node's readiness as part of the startup process. // // You then configure a Waiter resource with the success condition set to wait // until some number of nodes have checked in. Afterwards, your application @@ -143,7 +142,8 @@ message EndCondition { // Once created, a Waiter resource is immutable. // // To learn more about using waiters, read the -// [Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter) +// [Creating a +// Waiter](/deployment-manager/runtime-configurator/creating-a-waiter) // documentation. message Waiter { // The name of the Waiter resource, in the format: @@ -172,9 +172,9 @@ message Waiter { EndCondition failure = 3; // [Required] The success condition. If this condition is met, `done` will be - // set to `true` and the `error` value will remain unset. The failure condition - // takes precedence over the success condition. If both conditions are met, a - // failure will be indicated. + // set to `true` and the `error` value will remain unset. The failure + // condition takes precedence over the success condition. If both conditions + // are met, a failure will be indicated. EndCondition success = 4; // [Output Only] The instant at which this Waiter resource was created. Adding diff --git a/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto b/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto index 3184d3b57..fbd1d4105 100644 --- a/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto +++ b/google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto @@ -28,7 +28,6 @@ option java_multiple_files = true; option java_package = "com.google.cloud.runtimeconfig.v1beta1"; option php_namespace = "Google\\Cloud\\RuntimeConfig\\V1beta1"; - // RuntimeConfig API represents configuration objects and operations on those // configuration objects. // RuntimeConfig objects consist of Variables logically grouped in the those @@ -42,41 +41,57 @@ option php_namespace = "Google\\Cloud\\RuntimeConfig\\V1beta1"; service RuntimeConfigManager { // Lists all the RuntimeConfig resources within project. rpc ListConfigs(ListConfigsRequest) returns (ListConfigsResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*}/configs" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/configs" + }; } // Gets information about a RuntimeConfig resource. rpc GetConfig(GetConfigRequest) returns (RuntimeConfig) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/configs/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/configs/*}" + }; } // Creates a new RuntimeConfig resource. The configuration name must be // unique within project. rpc CreateConfig(CreateConfigRequest) returns (RuntimeConfig) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/configs" body: "config" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/configs" + body: "config" + }; } // Updates a RuntimeConfig resource. The configuration must exist beforehand. rpc UpdateConfig(UpdateConfigRequest) returns (RuntimeConfig) { - option (google.api.http) = { put: "/v1beta1/{name=projects/*/configs/*}" body: "config" }; + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/configs/*}" + body: "config" + }; } // Deletes a RuntimeConfig resource. rpc DeleteConfig(DeleteConfigRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/configs/*}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/configs/*}" + }; } - // Lists variables within given a configuration, matching any provided filters. - // This only lists variable names, not the values, unless `return_values` is - // true, in which case only variables that user has IAM permission to - // GetVariable will be returned. + // Lists variables within given a configuration, matching any provided + // filters. This only lists variable names, not the values, unless + // `return_values` is true, in which case only variables that user has IAM + // permission to GetVariable will be returned. rpc ListVariables(ListVariablesRequest) returns (ListVariablesResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/configs/*}/variables" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/configs/*}/variables" + }; } // Gets information about a single variable. rpc GetVariable(GetVariableRequest) returns (Variable) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/configs/*/variables/**}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/configs/*/variables/**}" + }; } // Watches a specific variable and waits for a change in the variable's value. @@ -85,15 +100,19 @@ service RuntimeConfigManager { // If a variable is deleted while being watched, the `variableState` state is // set to `DELETED` and the method returns the last known variable `value`. // - // If you set the deadline for watching to a larger value than internal timeout - // (60 seconds), the current variable value is returned and the `variableState` - // will be `VARIABLE_STATE_UNSPECIFIED`. + // If you set the deadline for watching to a larger value than internal + // timeout (60 seconds), the current variable value is returned and the + // `variableState` will be `VARIABLE_STATE_UNSPECIFIED`. // // To learn more about creating a watcher, read the - // [Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable) + // [Watching a Variable for + // Changes](/deployment-manager/runtime-configurator/watching-a-variable) // documentation. rpc WatchVariable(WatchVariableRequest) returns (Variable) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/configs/*/variables/**}:watch" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/configs/*/variables/**}:watch" + body: "*" + }; } // Creates a variable within the given configuration. You cannot create @@ -101,15 +120,22 @@ service RuntimeConfigManager { // name that has an existing variable name as a prefix. // // To learn more about creating a variable, read the - // [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables) + // [Setting and Getting + // Data](/deployment-manager/runtime-configurator/set-and-get-variables) // documentation. rpc CreateVariable(CreateVariableRequest) returns (Variable) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/configs/*}/variables" body: "variable" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/configs/*}/variables" + body: "variable" + }; } // Updates an existing variable with a new value. rpc UpdateVariable(UpdateVariableRequest) returns (Variable) { - option (google.api.http) = { put: "/v1beta1/{name=projects/*/configs/*/variables/**}" body: "variable" }; + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/configs/*/variables/**}" + body: "variable" + }; } // Deletes a variable or multiple variables. @@ -119,17 +145,23 @@ service RuntimeConfigManager { // prefix are deleted. You must set a `recursive` to true if you delete // variables by prefix. rpc DeleteVariable(DeleteVariableRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/configs/*/variables/**}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/configs/*/variables/**}" + }; } // List waiters within the given configuration. rpc ListWaiters(ListWaitersRequest) returns (ListWaitersResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/configs/*}/waiters" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/configs/*}/waiters" + }; } // Gets information about a single waiter. rpc GetWaiter(GetWaiterRequest) returns (Waiter) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/configs/*/waiters/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/configs/*/waiters/*}" + }; } // Creates a Waiter resource. This operation returns a long-running Operation @@ -138,18 +170,24 @@ service RuntimeConfigManager { // completing. If the operation fails, the failed Waiter resource will // still exist and must be deleted prior to subsequent creation attempts. rpc CreateWaiter(CreateWaiterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/configs/*}/waiters" body: "waiter" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/configs/*}/waiters" + body: "waiter" + }; } // Deletes the waiter with the specified name. rpc DeleteWaiter(DeleteWaiterRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/configs/*/waiters/*}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/configs/*/waiters/*}" + }; } } // Request for the `ListConfigs()` method. message ListConfigsRequest { - // The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) + // The [project + // ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) // for this request, in the format `projects/[PROJECT_ID]`. string parent = 1; @@ -187,7 +225,8 @@ message GetConfigRequest { // Creates a RuntimeConfig resource. message CreateConfigRequest { - // The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) + // The [project + // ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) // for this request, in the format `projects/[PROJECT_ID]`. string parent = 1; @@ -228,8 +267,9 @@ message DeleteConfigRequest { // Request for the `ListVariables()` method. message ListVariablesRequest { - // The path to the RuntimeConfig resource for which you want to list variables. - // The configuration must exist beforehand; the path must by in the format: + // The path to the RuntimeConfig resource for which you want to list + // variables. The configuration must exist beforehand; the path must by in the + // format: // // `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` string parent = 1; diff --git a/google/cloud/scheduler/BUILD.bazel b/google/cloud/scheduler/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/scheduler/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/scheduler/artman_cloudscheduler_v1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml new file mode 100644 index 000000000..ab2c4fa10 --- /dev/null +++ b/google/cloud/scheduler/artman_cloudscheduler_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: cloudscheduler + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: cloudscheduler_v1.yaml + gapic_yaml: v1/cloudscheduler_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/scheduler/artman_cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml new file mode 100644 index 000000000..44313ae1b --- /dev/null +++ b/google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: cloudscheduler + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: cloudscheduler_v1beta1.yaml + gapic_yaml: v1beta1/cloudscheduler_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/scheduler/cloudscheduler_v1.yaml b/google/cloud/scheduler/cloudscheduler_v1.yaml new file mode 100644 index 000000000..14aa20e04 --- /dev/null +++ b/google/cloud/scheduler/cloudscheduler_v1.yaml @@ -0,0 +1,22 @@ +type: google.api.Service +config_version: 3 +name: cloudscheduler.googleapis.com +title: Cloud Scheduler API + +apis: +- name: google.cloud.scheduler.v1.CloudScheduler + +documentation: + summary: Creates and manages jobs run on a regular recurring schedule. + +backend: + rules: + - selector: 'google.cloud.scheduler.v1.CloudScheduler.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.scheduler.v1.CloudScheduler.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/scheduler/cloudscheduler_v1beta1.yaml b/google/cloud/scheduler/cloudscheduler_v1beta1.yaml new file mode 100644 index 000000000..8b9fdadca --- /dev/null +++ b/google/cloud/scheduler/cloudscheduler_v1beta1.yaml @@ -0,0 +1,22 @@ +type: google.api.Service +config_version: 3 +name: cloudscheduler.googleapis.com +title: Cloud Scheduler API + +apis: +- name: google.cloud.scheduler.v1beta1.CloudScheduler + +documentation: + summary: Creates and manages jobs run on a regular recurring schedule. + +backend: + rules: + - selector: 'google.cloud.scheduler.v1beta1.CloudScheduler.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.scheduler.v1beta1.CloudScheduler.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/scheduler/v1/cloudscheduler.proto b/google/cloud/scheduler/v1/cloudscheduler.proto new file mode 100644 index 000000000..a68446235 --- /dev/null +++ b/google/cloud/scheduler/v1/cloudscheduler.proto @@ -0,0 +1,237 @@ +// 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.scheduler.v1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/scheduler/v1/job.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler"; +option java_multiple_files = true; +option java_outer_classname = "SchedulerProto"; +option java_package = "com.google.cloud.scheduler.v1"; +option objc_class_prefix = "SCHEDULER"; + +// The Cloud Scheduler API allows external entities to reliably +// schedule asynchronous jobs. +service CloudScheduler { + // Lists jobs. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/jobs" + }; + } + + // Gets a job. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/jobs/*}" + }; + } + + // Creates a job. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/jobs" + body: "job" + }; + } + + // Updates a job. + // + // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does + // not exist, `NOT_FOUND` is returned. + // + // If UpdateJob does not successfully return, it is possible for the + // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may + // not be executed. If this happens, retry the UpdateJob request + // until a successful response is received. + rpc UpdateJob(UpdateJobRequest) returns (Job) { + option (google.api.http) = { + patch: "/v1/{job.name=projects/*/locations/*/jobs/*}" + body: "job" + }; + } + + // Deletes a job. + rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/jobs/*}" + }; + } + + // Pauses a job. + // + // If a job is paused then the system will stop executing the job + // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The + // state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it + // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] + // to be paused. + rpc PauseJob(PauseJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/jobs/*}:pause" + body: "*" + }; + } + + // Resume a job. + // + // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The + // state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it + // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in + // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed. + rpc ResumeJob(ResumeJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/jobs/*}:resume" + body: "*" + }; + } + + // Forces a job to run now. + // + // When this method is called, Cloud Scheduler will dispatch the job, even + // if the job is already running. + rpc RunJob(RunJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/jobs/*}:run" + body: "*" + }; + } +} + +// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. +message ListJobsRequest { + // Required. + // + // The location name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID`. + string parent = 1; + + // Requested page size. + // + // The maximum page size is 500. If unspecified, the page size will + // be the maximum. Fewer jobs than requested might be returned, + // even if more jobs exist; use next_page_token to determine if more + // jobs exist. + int32 page_size = 5; + + // A token identifying a page of results the server will 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.scheduler.v1.ListJobsResponse.next_page_token] returned from + // the previous call to [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an error to + // switch the value of [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or + // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while iterating through pages. + string page_token = 6; +} + +// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. +message ListJobsResponse { + // The list of jobs. + repeated Job jobs = 1; + + // A token to retrieve next page of results. Pass this value in the + // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in the subsequent call to + // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve the next page of results. + // If this is empty it indicates that there are no more results + // through which to paginate. + // + // The page token is valid for only 2 hours. + string next_page_token = 2; +} + +// Request message for [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob]. +message GetJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob]. +message CreateJobRequest { + // Required. + // + // The location name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID`. + string parent = 1; + + // 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; +} + +// 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. + // + // Output only fields cannot be modified using UpdateJob. + // Any value specified for an output only field will be ignored. + Job job = 1; + + // A mask used to specify which fields of the job are being updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for deleting a job using +// [DeleteJob][google.cloud.scheduler.v1.CloudScheduler.DeleteJob]. +message DeleteJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob]. +message PauseJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. +message ResumeJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// 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: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} diff --git a/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml new file mode 100644 index 000000000..c3ee26568 --- /dev/null +++ b/google/cloud/scheduler/v1/cloudscheduler_gapic.yaml @@ -0,0 +1,262 @@ +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: + # 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/job.proto b/google/cloud/scheduler/v1/job.proto new file mode 100644 index 000000000..60b472631 --- /dev/null +++ b/google/cloud/scheduler/v1/job.proto @@ -0,0 +1,232 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler"; +option java_multiple_files = true; +option java_outer_classname = "JobProto"; +option java_package = "com.google.cloud.scheduler.v1"; + +// Configuration for a job. +// The maximum allowed size for a job is 100KB. +message Job { + // State of the job. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The job is executing normally. + ENABLED = 1; + + // The job is paused by the user. It will not execute. A user can + // intentionally pause the job using + // [PauseJobRequest][google.cloud.scheduler.v1.PauseJobRequest]. + PAUSED = 2; + + // The job is disabled by the system due to error. The user + // cannot directly set a job to be disabled. + DISABLED = 3; + + // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] + // operation. To recover a job from this state, retry + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] until a successful response is received. + UPDATE_FAILED = 4; + } + + // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob], after + // which it becomes output only. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the job's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + string name = 1; + + // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob] or + // [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. + // + // A human-readable description for the job. This string must not contain + // more than 500 characters. + string description = 2; + + // Required. + // + // Delivery settings containing destination and parameters. + oneof target { + // Pub/Sub target. + PubsubTarget pubsub_target = 4; + + // App Engine HTTP target. + AppEngineHttpTarget app_engine_http_target = 5; + + // HTTP target. + HttpTarget http_target = 6; + } + + // Required, except when used with [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. + // + // Describes the schedule on which the job will be executed. + // + // The schedule can be either of the following types: + // + // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + // * English-like + // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) + // + // As a general rule, execution `n + 1` of a job will not begin + // until execution `n` has finished. Cloud Scheduler will never + // allow two simultaneously outstanding executions. For example, + // this implies that if the `n+1`th execution is scheduled to run at + // 16:00 but the `n`th execution takes until 16:15, the `n+1`th + // execution will not start until `16:15`. + // A scheduled start time will be delayed if the previous + // execution has not ended when its scheduled time occurs. + // + // If [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] > 0 and a job attempt fails, + // the job will be tried a total of [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] + // times, with exponential backoff, until the next scheduled start + // time. + string schedule = 20; + + // Specifies the time zone to be used in interpreting + // [schedule][google.cloud.scheduler.v1.Job.schedule]. The value of this field must be a time + // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). + // + // Note that some time zones include a provision for + // daylight savings time. The rules for daylight saving time are + // determined by the chosen tz. For UTC use the string "utc". If a + // time zone is not specified, the default will be in UTC (also known + // as GMT). + string time_zone = 21; + + // Output only. The creation time of the job. + google.protobuf.Timestamp user_update_time = 9; + + // Output only. State of the job. + State state = 10; + + // Output only. The response from the target for the last attempted execution. + google.rpc.Status status = 11; + + // Output only. The next time the job is scheduled. Note that this may be a + // retry of a previously failed attempt or the next execution time + // according to the schedule. + google.protobuf.Timestamp schedule_time = 17; + + // Output only. The time the last job attempt started. + google.protobuf.Timestamp last_attempt_time = 18; + + // Settings that determine the retry behavior. + RetryConfig retry_config = 19; + + // The deadline for job attempts. If the request handler does not respond by + // this deadline then the request is cancelled and the attempt is marked as a + // `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in + // execution logs. Cloud Scheduler will retry the job according + // to the [RetryConfig][google.cloud.scheduler.v1.RetryConfig]. + // + // The allowed duration for this deadline is: + // * For [HTTP targets][google.cloud.scheduler.v1.Job.http_target], between 15 seconds and 30 minutes. + // * For [App Engine HTTP targets][google.cloud.scheduler.v1.Job.app_engine_http_target], between 15 + // seconds and 24 hours. + google.protobuf.Duration attempt_deadline = 22; +} + +// Settings that determine the retry behavior. +// +// By default, if a job does not complete successfully (meaning that +// an acknowledgement is not received from the handler, then it will be retried +// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1.RetryConfig]. +message RetryConfig { + // The number of attempts that the system will make to run a job using the + // exponential backoff procedure described by + // [max_doublings][google.cloud.scheduler.v1.RetryConfig.max_doublings]. + // + // The default value of retry_count is zero. + // + // If retry_count is zero, a job attempt will *not* be retried if + // it fails. Instead the Cloud Scheduler system will wait for the + // next scheduled execution time. + // + // If retry_count is set to a non-zero number then Cloud Scheduler + // will retry failed attempts, using exponential backoff, + // retry_count times, or until the next scheduled execution time, + // whichever comes first. + // + // Values greater than 5 and negative values are not allowed. + int32 retry_count = 1; + + // The time limit for retrying a failed job, measured from time when an + // execution was first attempted. If specified with + // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count], the job will be retried until both + // limits are reached. + // + // The default value for max_retry_duration is zero, which means retry + // duration is unlimited. + google.protobuf.Duration max_retry_duration = 2; + + // The minimum amount of time to wait before retrying a job after + // it fails. + // + // The default value of this field is 5 seconds. + google.protobuf.Duration min_backoff_duration = 3; + + // The maximum amount of time to wait before retrying a job after + // it fails. + // + // The default value of this field is 1 hour. + google.protobuf.Duration max_backoff_duration = 4; + + // The time between retries will double `max_doublings` times. + // + // A job's retry interval starts at + // [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] up to + // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. + // + // For example, if [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration] is + // 10s, [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] is 300s, and + // `max_doublings` is 3, then the a job will first be retried in 10s. The + // retry interval will double three times, and then increase linearly by + // 2^3 * 10s. Finally, the job will retry at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] until the job has + // been attempted [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. Thus, the + // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + // + // The default value of this field is 5. + int32 max_doublings = 5; +} diff --git a/google/cloud/scheduler/v1/target.proto b/google/cloud/scheduler/v1/target.proto new file mode 100644 index 000000000..e33b1558e --- /dev/null +++ b/google/cloud/scheduler/v1/target.proto @@ -0,0 +1,348 @@ +// 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.scheduler.v1; + +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; +option java_outer_classname = "TargetProto"; +option java_package = "com.google.cloud.scheduler.v1"; + +// Http target. The job will be pushed to the job handler by means of +// an HTTP request via an [http_method][google.cloud.scheduler.v1.HttpTarget.http_method] such as HTTP +// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP +// response code in the range [200 - 299]. A failure to receive a response +// 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 + // 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 + // encode some characters for safety and compatibility. The maximum allowed + // URL length is 2083 characters after encoding. + string uri = 1; + + // Which HTTP method to use for the request. + HttpMethod http_method = 2; + + // The user can specify HTTP request headers to send with the job's + // HTTP request. This map contains the header field names and + // values. Repeated headers are not supported, but a header value can + // contain commas. These headers represent a subset of the headers + // that will accompany the job's HTTP request. Some HTTP request + // headers will be ignored or replaced. A partial list of headers that + // will be ignored or replaced is below: + // - Host: This will be computed by Cloud Scheduler and derived from + // [uri][google.cloud.scheduler.v1.HttpTarget.uri]. + // * `Content-Length`: This will be computed by Cloud Scheduler. + // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. + // * `X-Google-*`: Google internal use only. + // * `X-AppEngine-*`: Google internal use only. + // + // The total size of headers must be less than 80KB. + map headers = 3; + + // HTTP request body. A request body is allowed only if the HTTP + // method is POST, PUT, or PATCH. It is an error to set body on a job with an + // incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod]. + bytes body = 4; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the [HttpTarget.headers][google.cloud.scheduler.v1.HttpTarget.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 be used when sending requests to a GCP + // endpoint. + 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 should be used when sending requests to third + // party endpoints or Cloud Run. + OidcToken oidc_token = 6; + } +} + +// App Engine target. The job will be pushed to a job handler by means +// of an HTTP request via an [http_method][google.cloud.scheduler.v1.AppEngineHttpTarget.http_method] such +// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an +// HTTP response code in the range [200 - 299]. Error 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, constitutes a failed attempt. +message AppEngineHttpTarget { + // The HTTP method to use for the request. PATCH and OPTIONS are not + // permitted. + HttpMethod http_method = 1; + + // App Engine Routing setting for the job. + AppEngineRouting app_engine_routing = 2; + + // The relative URI. + // + // The relative URL must begin with "/" and must be a valid HTTP relative URL. + // It can contain a path, query string arguments, and `#` fragments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + string relative_uri = 3; + + // HTTP request headers. + // + // This map contains the header field names and values. Headers can be set + // when the job is created. + // + // Cloud Scheduler sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Scheduler will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // * `X-CloudScheduler`: This header will be set to true. + // + // If the job has an [body][google.cloud.scheduler.v1.AppEngineHttpTarget.body], Cloud Scheduler sets + // the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explictly + // setting `Content-Type` to a particular media type when the job is + // created. + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Scheduler. This value is + // output only. It cannot be changed. + // + // The headers below are output only. They cannot be set or overridden: + // + // * `X-Google-*`: For Google internal use only. + // * `X-AppEngine-*`: For Google internal use only. + // + // In addition, some App Engine headers, which contain + // job-specific information, are also be sent to the job handler. + map headers = 4; + + // Body. + // + // HTTP request body. A request body is allowed only if the HTTP method is + // POST or PUT. It will result in invalid argument error to set a body on a + // job with an incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod]. + bytes body = 5; +} + +// 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 + // 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; + + // The message payload for PubsubMessage. + // + // Pubsub message must contain either non-empty data, or at least one + // attribute. + bytes data = 3; + + // Attributes for PubsubMessage. + // + // Pubsub message must contain either non-empty data, or at least one + // attribute. + map attributes = 4; +} + +// App Engine Routing. +// +// 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), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// 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). +message AppEngineRouting { + // App service. + // + // By default, the job is sent to the service which is the default + // service when the job is attempted. + string service = 1; + + // App version. + // + // By default, the job is sent to the version which is the default + // version when the job is attempted. + string version = 2; + + // App instance. + // + // By default, the job is sent to an instance which is available when + // the job is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // 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). + string instance = 3; + + // Output only. The host that the job is sent to. + // + // For more information about how App Engine requests are routed, see + // [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + // + // The host is constructed as: + // + // + // * `host = [application_domain_name]`
+ // `| [service] + '.' + [application_domain_name]`
+ // `| [version] + '.' + [application_domain_name]`
+ // `| [version_dot_service]+ '.' + [application_domain_name]`
+ // `| [instance] + '.' + [application_domain_name]`
+ // `| [instance_dot_service] + '.' + [application_domain_name]`
+ // `| [instance_dot_version] + '.' + [application_domain_name]`
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + // + // * `application_domain_name` = The domain name of the app, for + // example .appspot.com, which is associated with the + // job's project ID. + // + // * `service =` [service][google.cloud.scheduler.v1.AppEngineRouting.service] + // + // * `version =` [version][google.cloud.scheduler.v1.AppEngineRouting.version] + // + // * `version_dot_service =` + // [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.scheduler.v1.AppEngineRouting.service] + // + // * `instance =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] + // + // * `instance_dot_service =` + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.scheduler.v1.AppEngineRouting.service] + // + // * `instance_dot_version =` + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.scheduler.v1.AppEngineRouting.version] + // + // * `instance_dot_version_dot_service =` + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.scheduler.v1.AppEngineRouting.service] + // + // + // If [service][google.cloud.scheduler.v1.AppEngineRouting.service] is empty, then the job will be sent + // to the service which is the default service when the job is attempted. + // + // If [version][google.cloud.scheduler.v1.AppEngineRouting.version] is empty, then the job will be sent + // to the version which is the default version when the job is attempted. + // + // If [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is empty, then the job will be + // sent to an instance which is available when the job is attempted. + // + // If [service][google.cloud.scheduler.v1.AppEngineRouting.service], + // [version][google.cloud.scheduler.v1.AppEngineRouting.version], or + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is invalid, then the job will be sent + // to the default version of the default service when the job is attempted. + string host = 4; +} + +// The HTTP method used to execute the job. +enum HttpMethod { + // HTTP method unspecified. Defaults to POST. + HTTP_METHOD_UNSPECIFIED = 0; + + // HTTP POST + POST = 1; + + // HTTP GET + GET = 2; + + // HTTP HEAD + HEAD = 3; + + // HTTP PUT + PUT = 4; + + // HTTP DELETE + DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // HTTP OPTIONS + OPTIONS = 7; +} + +// 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. +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 job. 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 should be used when sending requests to third party +// endpoints or Cloud Run. +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 job. 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/scheduler/v1beta1/BUILD.bazel b/google/cloud/scheduler/v1beta1/BUILD.bazel new file mode 100644 index 000000000..33ac91119 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/BUILD.bazel @@ -0,0 +1,149 @@ +# 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 = "scheduler_proto", + srcs = [ + "cloudscheduler.proto", + "job.proto", + "target.proto", + ], + deps = [ + "//google/api:annotations_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", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "scheduler_proto_with_info", + deps = [":scheduler_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 = "scheduler_java_proto", + deps = [":scheduler_proto"], +) + +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"], +) + +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"], + deps = [ + ":scheduler_java_proto", + "scheduler_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":scheduler_java_gapic_test"], +) for test_name in [ + "com.google.cloud.scheduler.v1beta1.CloudSchedulerClientTest", +]] + +# Opensource 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 = [ + ":scheduler_java_proto", + ":scheduler_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 = "scheduler_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1", + protos = [":scheduler_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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"], +) + +go_test( + name = "scheduler_go_gapic_test", + srcs = [":scheduler_go_gapic_srcjar_test"], + embed = [":scheduler_go_gapic"], + importpath = "cloud.google.com/go/scheduler/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler.proto b/google/cloud/scheduler/v1beta1/cloudscheduler.proto new file mode 100644 index 000000000..4c1d96618 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/cloudscheduler.proto @@ -0,0 +1,237 @@ +// 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.scheduler.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/scheduler/v1beta1/job.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; +option java_multiple_files = true; +option java_outer_classname = "SchedulerProto"; +option java_package = "com.google.cloud.scheduler.v1beta1"; +option objc_class_prefix = "SCHEDULER"; + +// The Cloud Scheduler API allows external entities to reliably +// schedule asynchronous jobs. +service CloudScheduler { + // Lists jobs. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/jobs" + }; + } + + // Gets a job. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/jobs/*}" + }; + } + + // Creates a job. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/jobs" + body: "job" + }; + } + + // Updates a job. + // + // If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does + // not exist, `NOT_FOUND` is returned. + // + // If UpdateJob does not successfully return, it is possible for the + // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may + // not be executed. If this happens, retry the UpdateJob request + // until a successful response is received. + rpc UpdateJob(UpdateJobRequest) returns (Job) { + option (google.api.http) = { + patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}" + body: "job" + }; + } + + // Deletes a job. + rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}" + }; + } + + // Pauses a job. + // + // If a job is paused then the system will stop executing the job + // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The + // state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it + // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] + // to be paused. + rpc PauseJob(PauseJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause" + body: "*" + }; + } + + // Resume a job. + // + // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The + // state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it + // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in + // [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. + rpc ResumeJob(ResumeJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume" + body: "*" + }; + } + + // Forces a job to run now. + // + // When this method is called, Cloud Scheduler will dispatch the job, even + // if the job is already running. + rpc RunJob(RunJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:run" + body: "*" + }; + } +} + +// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. +message ListJobsRequest { + // Required. + // + // The location name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID`. + string parent = 1; + + // Requested page size. + // + // The maximum page size is 500. If unspecified, the page size will + // be the maximum. Fewer jobs than requested might be returned, + // even if more jobs exist; use next_page_token to determine if more + // jobs exist. + int32 page_size = 5; + + // A token identifying a page of results the server will 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.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from + // the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to + // switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or + // [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages. + string page_token = 6; +} + +// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. +message ListJobsResponse { + // The list of jobs. + repeated Job jobs = 1; + + // A token to retrieve next page of results. Pass this value in the + // [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to + // [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results. + // If this is empty it indicates that there are no more results + // through which to paginate. + // + // The page token is valid for only 2 hours. + string next_page_token = 2; +} + +// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob]. +message GetJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob]. +message CreateJobRequest { + // Required. + // + // The location name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID`. + string parent = 1; + + // 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; +} + +// 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. + // + // Output only fields cannot be modified using UpdateJob. + // Any value specified for an output only field will be ignored. + Job job = 1; + + // A mask used to specify which fields of the job are being updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for deleting a job using +// [DeleteJob][google.cloud.scheduler.v1beta1.CloudScheduler.DeleteJob]. +message DeleteJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob]. +message PauseJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. +message ResumeJobRequest { + // Required. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} + +// 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: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + string name = 1; +} diff --git a/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml new file mode 100644 index 000000000..abc706b61 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/cloudscheduler_gapic.yaml @@ -0,0 +1,258 @@ +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: + # 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/job.proto b/google/cloud/scheduler/v1beta1/job.proto new file mode 100644 index 000000000..ddf910b03 --- /dev/null +++ b/google/cloud/scheduler/v1beta1/job.proto @@ -0,0 +1,234 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; +option java_multiple_files = true; +option java_outer_classname = "JobProto"; +option java_package = "com.google.cloud.scheduler.v1beta1"; + +// Configuration for a job. +// The maximum allowed size for a job is 100KB. +message Job { + // State of the job. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The job is executing normally. + ENABLED = 1; + + // The job is paused by the user. It will not execute. A user can + // intentionally pause the job using + // [PauseJobRequest][google.cloud.scheduler.v1beta1.PauseJobRequest]. + PAUSED = 2; + + // The job is disabled by the system due to error. The user + // cannot directly set a job to be disabled. + DISABLED = 3; + + // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] + // operation. To recover a job from this state, retry + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] until a successful response is received. + UPDATE_FAILED = 4; + } + + // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after + // which it becomes output only. + // + // The job name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the job's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + string name = 1; + + // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or + // [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. + // + // A human-readable description for the job. This string must not contain + // more than 500 characters. + string description = 2; + + // Required. + // + // Delivery settings containing destination and parameters. + oneof target { + // Pub/Sub target. + PubsubTarget pubsub_target = 4; + + // App Engine HTTP target. + AppEngineHttpTarget app_engine_http_target = 5; + + // HTTP target. + HttpTarget http_target = 6; + } + + // Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. + // + // Describes the schedule on which the job will be executed. + // + // The schedule can be either of the following types: + // + // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + // * English-like + // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) + // + // As a general rule, execution `n + 1` of a job will not begin + // until execution `n` has finished. Cloud Scheduler will never + // allow two simultaneously outstanding executions. For example, + // this implies that if the `n+1`th execution is scheduled to run at + // 16:00 but the `n`th execution takes until 16:15, the `n+1`th + // execution will not start until `16:15`. + // A scheduled start time will be delayed if the previous + // execution has not ended when its scheduled time occurs. + // + // If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails, + // the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] + // times, with exponential backoff, until the next scheduled start + // time. + string schedule = 20; + + // Specifies the time zone to be used in interpreting + // [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time + // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). + // + // Note that some time zones include a provision for + // daylight savings time. The rules for daylight saving time are + // determined by the chosen tz. For UTC use the string "utc". If a + // time zone is not specified, the default will be in UTC (also known + // as GMT). + string time_zone = 21; + + // Output only. The creation time of the job. + google.protobuf.Timestamp user_update_time = 9; + + // Output only. State of the job. + State state = 10; + + // Output only. The response from the target for the last attempted execution. + google.rpc.Status status = 11; + + // Output only. The next time the job is scheduled. Note that this may be a + // retry of a previously failed attempt or the next execution time + // according to the schedule. + google.protobuf.Timestamp schedule_time = 17; + + // Output only. The time the last job attempt started. + google.protobuf.Timestamp last_attempt_time = 18; + + // Settings that determine the retry behavior. + RetryConfig retry_config = 19; + + // The deadline for job attempts. If the request handler does not respond by + // this deadline then the request is cancelled and the attempt is marked as a + // `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in + // execution logs. Cloud Scheduler will retry the job according + // to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. + // + // The allowed duration for this deadline is: + // + // * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. + // * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 + // seconds and 24 hours. + // * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + google.protobuf.Duration attempt_deadline = 22; +} + +// Settings that determine the retry behavior. +// +// By default, if a job does not complete successfully (meaning that +// an acknowledgement is not received from the handler, then it will be retried +// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. +message RetryConfig { + // The number of attempts that the system will make to run a job using the + // exponential backoff procedure described by + // [max_doublings][google.cloud.scheduler.v1beta1.RetryConfig.max_doublings]. + // + // The default value of retry_count is zero. + // + // If retry_count is zero, a job attempt will *not* be retried if + // it fails. Instead the Cloud Scheduler system will wait for the + // next scheduled execution time. + // + // If retry_count is set to a non-zero number then Cloud Scheduler + // will retry failed attempts, using exponential backoff, + // retry_count times, or until the next scheduled execution time, + // whichever comes first. + // + // Values greater than 5 and negative values are not allowed. + int32 retry_count = 1; + + // The time limit for retrying a failed job, measured from time when an + // execution was first attempted. If specified with + // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both + // limits are reached. + // + // The default value for max_retry_duration is zero, which means retry + // duration is unlimited. + google.protobuf.Duration max_retry_duration = 2; + + // The minimum amount of time to wait before retrying a job after + // it fails. + // + // The default value of this field is 5 seconds. + google.protobuf.Duration min_backoff_duration = 3; + + // The maximum amount of time to wait before retrying a job after + // it fails. + // + // The default value of this field is 1 hour. + google.protobuf.Duration max_backoff_duration = 4; + + // The time between retries will double `max_doublings` times. + // + // A job's retry interval starts at + // [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to + // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. + // + // For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is + // 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and + // `max_doublings` is 3, then the a job will first be retried in 10s. The + // retry interval will double three times, and then increase linearly by + // 2^3 * 10s. Finally, the job will retry at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has + // been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the + // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + // + // The default value of this field is 5. + int32 max_doublings = 5; +} diff --git a/google/cloud/scheduler/v1beta1/target.proto b/google/cloud/scheduler/v1beta1/target.proto new file mode 100644 index 000000000..3bb44a1fb --- /dev/null +++ b/google/cloud/scheduler/v1beta1/target.proto @@ -0,0 +1,348 @@ +// 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.scheduler.v1beta1; + +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; +option java_outer_classname = "TargetProto"; +option java_package = "com.google.cloud.scheduler.v1beta1"; + +// Http target. The job will be pushed to the job handler by means of +// an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as HTTP +// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP +// response code in the range [200 - 299]. A failure to receive a response +// 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 + // 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 + // encode some characters for safety and compatibility. The maximum allowed + // URL length is 2083 characters after encoding. + string uri = 1; + + // Which HTTP method to use for the request. + HttpMethod http_method = 2; + + // The user can specify HTTP request headers to send with the job's + // HTTP request. This map contains the header field names and + // values. Repeated headers are not supported, but a header value can + // contain commas. These headers represent a subset of the headers + // that will accompany the job's HTTP request. Some HTTP request + // headers will be ignored or replaced. A partial list of headers that + // will be ignored or replaced is below: + // - Host: This will be computed by Cloud Scheduler and derived from + // [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri]. + // * `Content-Length`: This will be computed by Cloud Scheduler. + // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. + // * `X-Google-*`: Google internal use only. + // * `X-AppEngine-*`: Google internal use only. + // + // The total size of headers must be less than 80KB. + map headers = 3; + + // HTTP request body. A request body is allowed only if the HTTP + // method is POST, PUT, or PATCH. It is an error to set body on a job with an + // incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + bytes body = 4; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the [HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.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 be used when sending requests to a GCP + // endpoint. + 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 should be used when sending requests to third + // party endpoints. + OidcToken oidc_token = 6; + } +} + +// App Engine target. The job will be pushed to a job handler by means +// of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] such +// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an +// HTTP response code in the range [200 - 299]. Error 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, constitutes a failed attempt. +message AppEngineHttpTarget { + // The HTTP method to use for the request. PATCH and OPTIONS are not + // permitted. + HttpMethod http_method = 1; + + // App Engine Routing setting for the job. + AppEngineRouting app_engine_routing = 2; + + // The relative URI. + // + // The relative URL must begin with "/" and must be a valid HTTP relative URL. + // It can contain a path, query string arguments, and `#` fragments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + string relative_uri = 3; + + // HTTP request headers. + // + // This map contains the header field names and values. Headers can be set + // when the job is created. + // + // Cloud Scheduler sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Scheduler will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // * `X-CloudScheduler`: This header will be set to true. + // + // If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets + // the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explictly + // setting `Content-Type` to a particular media type when the job is + // created. + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Scheduler. This value is + // output only. It cannot be changed. + // + // The headers below are output only. They cannot be set or overridden: + // + // * `X-Google-*`: For Google internal use only. + // * `X-AppEngine-*`: For Google internal use only. + // + // In addition, some App Engine headers, which contain + // job-specific information, are also be sent to the job handler. + map headers = 4; + + // Body. + // + // HTTP request body. A request body is allowed only if the HTTP method is + // POST or PUT. It will result in invalid argument error to set a body on a + // job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + bytes body = 5; +} + +// 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 + // 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; + + // The message payload for PubsubMessage. + // + // Pubsub message must contain either non-empty data, or at least one + // attribute. + bytes data = 3; + + // Attributes for PubsubMessage. + // + // Pubsub message must contain either non-empty data, or at least one + // attribute. + map attributes = 4; +} + +// App Engine Routing. +// +// 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), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// 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). +message AppEngineRouting { + // App service. + // + // By default, the job is sent to the service which is the default + // service when the job is attempted. + string service = 1; + + // App version. + // + // By default, the job is sent to the version which is the default + // version when the job is attempted. + string version = 2; + + // App instance. + // + // By default, the job is sent to an instance which is available when + // the job is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // 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). + string instance = 3; + + // Output only. The host that the job is sent to. + // + // For more information about how App Engine requests are routed, see + // [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + // + // The host is constructed as: + // + // + // * `host = [application_domain_name]`
+ // `| [service] + '.' + [application_domain_name]`
+ // `| [version] + '.' + [application_domain_name]`
+ // `| [version_dot_service]+ '.' + [application_domain_name]`
+ // `| [instance] + '.' + [application_domain_name]`
+ // `| [instance_dot_service] + '.' + [application_domain_name]`
+ // `| [instance_dot_version] + '.' + [application_domain_name]`
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + // + // * `application_domain_name` = The domain name of the app, for + // example .appspot.com, which is associated with the + // job's project ID. + // + // * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // + // * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + // + // * `version_dot_service =` + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // + // * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + // + // * `instance_dot_service =` + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // + // * `instance_dot_version =` + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + // + // * `instance_dot_version_dot_service =` + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // + // + // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent + // to the service which is the default service when the job is attempted. + // + // If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent + // to the version which is the default version when the job is attempted. + // + // If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be + // sent to an instance which is available when the job is attempted. + // + // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent + // to the default version of the default service when the job is attempted. + string host = 4; +} + +// The HTTP method used to execute the job. +enum HttpMethod { + // HTTP method unspecified. Defaults to POST. + HTTP_METHOD_UNSPECIFIED = 0; + + // HTTP POST + POST = 1; + + // HTTP GET + GET = 2; + + // HTTP HEAD + HEAD = 3; + + // HTTP PUT + PUT = 4; + + // HTTP DELETE + DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // HTTP OPTIONS + OPTIONS = 7; +} + +// 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. +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 job. 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 should be used when sending requests to third party +// endpoints. +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 job. 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/securitycenter/BUILD.bazel b/google/cloud/securitycenter/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/securitycenter/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/securitycenter/artman_securitycenter_v1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1.yaml new file mode 100644 index 000000000..733df0f92 --- /dev/null +++ b/google/cloud/securitycenter/artman_securitycenter_v1.yaml @@ -0,0 +1,36 @@ +common: + api_name: securitycenter + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 + src_proto_paths: + - v1 + service_yaml: securitycenter_v1.yaml + gapic_yaml: v1/securitycenter_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/securitycenter/artman_securitycenter_v1beta1.yaml b/google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml new file mode 100644 index 000000000..ff2d5207d --- /dev/null +++ b/google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: securitycenter + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: securitycenter_v1beta1.yaml + gapic_yaml: v1beta1/securitycenter_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/securitycenter/securitycenter_v1.yaml b/google/cloud/securitycenter/securitycenter_v1.yaml new file mode 100644 index 000000000..bb3084313 --- /dev/null +++ b/google/cloud/securitycenter/securitycenter_v1.yaml @@ -0,0 +1,80 @@ +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/securitycenter_v1beta1.yaml b/google/cloud/securitycenter/securitycenter_v1beta1.yaml new file mode 100644 index 000000000..c3a5c91ed --- /dev/null +++ b/google/cloud/securitycenter/securitycenter_v1beta1.yaml @@ -0,0 +1,74 @@ +type: google.api.Service +config_version: 3 +name: securitycenter.googleapis.com +title: Cloud Security Command Center API + +apis: +- name: google.cloud.securitycenter.v1beta1.SecurityCenter + +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.CreateSource + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.CreateFinding + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetIamPolicy + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetOrganizationSettings + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GetSource + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupAssets + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.GroupFindings + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListAssets + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListFindings + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.ListSources + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.RunAssetDiscovery + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.SetFindingState + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.SetIamPolicy + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.TestIamPermissions + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateFinding + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateOrganizationSettings + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSource + deadline: 60.0 + - selector: google.cloud.securitycenter.v1beta1.SecurityCenter.UpdateSecurityMarks + deadline: 60.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=organizations/*/operations}' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1beta1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta1/{name=organizations/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta1/{name=organizations/*/operations/*}:cancel' + body: '*' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/securitycenter/v1/asset.proto b/google/cloud/securitycenter/v1/asset.proto new file mode 100644 index 000000000..74ec9b213 --- /dev/null +++ b/google/cloud/securitycenter/v1/asset.proto @@ -0,0 +1,104 @@ +// 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.v1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// 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 { + // 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; + } + + // 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/123/assets/456". + 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/v1/finding.proto b/google/cloud/securitycenter/v1/finding.proto new file mode 100644 index 000000000..e75247e88 --- /dev/null +++ b/google/cloud/securitycenter/v1/finding.proto @@ -0,0 +1,102 @@ +// 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.v1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +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. +message 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/123/sources/456/findings/789" + 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" + string parent = 2; + + // The full resource name of the Google Cloud Platform (GCP) resource this + // finding is for. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // 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; + + // 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. + 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/v1/organization_settings.proto b/google/cloud/securitycenter/v1/organization_settings.proto new file mode 100644 index 000000000..e975e566c --- /dev/null +++ b/google/cloud/securitycenter/v1/organization_settings.proto @@ -0,0 +1,79 @@ +// 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.v1; + +import "google/api/annotations.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// User specified settings that are attached to the Cloud Security Command +// Center (Cloud SCC) organization. +message 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/123/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; + + 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 new file mode 100644 index 000000000..1cbba38e7 --- /dev/null +++ b/google/cloud/securitycenter/v1/run_asset_discovery_response.proto @@ -0,0 +1,54 @@ +// 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.v1; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// 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/v1/security_marks.proto b/google/cloud/securitycenter/v1/security_marks.proto new file mode 100644 index 000000000..97b3f9377 --- /dev/null +++ b/google/cloud/securitycenter/v1/security_marks.proto @@ -0,0 +1,49 @@ +// 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.v1; + +import "google/api/annotations.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// 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 { + // 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". + 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/v1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1/securitycenter_gapic.yaml new file mode 100644 index 000000000..248968254 --- /dev/null +++ b/google/cloud/securitycenter/v1/securitycenter_gapic.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: 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: 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_service.proto b/google/cloud/securitycenter/v1/securitycenter_service.proto new file mode 100644 index 000000000..bcb4e863d --- /dev/null +++ b/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -0,0 +1,953 @@ +// 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.v1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1/asset.proto"; +import "google/cloud/securitycenter/v1/finding.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"; +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.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// V1 APIs for Security Center service. +service SecurityCenter { + // Creates a source. + rpc CreateSource(CreateSourceRequest) returns (Source) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/sources" + body: "source" + }; + } + + // Creates a finding. The corresponding source must exist for finding creation + // to succeed. + rpc CreateFinding(CreateFindingRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/sources/*}/findings" + body: "finding" + }; + } + + // 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: "/v1/{resource=organizations/*/sources/*}:getIamPolicy" + body: "*" + }; + } + + // Gets the settings for an organization. + rpc GetOrganizationSettings(GetOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/organizationSettings}" + }; + } + + // Gets a source. + rpc GetSource(GetSourceRequest) returns (Source) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/sources/*}" + }; + } + + // Filters an organization's assets and groups them by their specified + // properties. + rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) { + option (google.api.http) = { + post: "/v1/{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: /v1/organizations/123/sources/-/findings + rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/sources/*}/findings:group" + body: "*" + }; + } + + // Lists an organization's assets. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*}/assets" + }; + } + + // Lists an organization or source's findings. + // + // To list across all sources provide a `-` as the source id. + // Example: /v1/organizations/123/sources/-/findings + rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/sources/*}/findings" + }; + } + + // Lists all sources belonging to an organization. + rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*}/sources" + }; + } + + // 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: "/v1/{parent=organizations/*}/assets:runDiscovery" + body: "*" + }; + } + + // Updates the state of a finding. + rpc SetFindingState(SetFindingStateRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1/{name=organizations/*/sources/*/findings/*}:setState" + body: "*" + }; + } + + // 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: "/v1/{resource=organizations/*/sources/*}:setIamPolicy" + body: "*" + }; + } + + // 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: "/v1/{resource=organizations/*/sources/*}:testIamPermissions" + body: "*" + }; + } + + // 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: "/v1/{finding.name=organizations/*/sources/*/findings/*}" + body: "finding" + }; + } + + // Updates an organization's settings. + rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + patch: "/v1/{organization_settings.name=organizations/*/organizationSettings}" + body: "organization_settings" + }; + } + + // Updates a source. + rpc UpdateSource(UpdateSourceRequest) returns (Source) { + option (google.api.http) = { + patch: "/v1/{source.name=organizations/*/sources/*}" + body: "source" + }; + } + + // Updates security marks. + rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) { + option (google.api.http) = { + patch: "/v1/{security_marks.name=organizations/*/assets/*/securityMarks}" + body: "security_marks" + additional_bindings { + patch: "/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}" + body: "security_marks" + } + }; + } +} + +// Request message for creating a finding. +message CreateFindingRequest { + // Resource name of the new finding's parent. Its format should be + // "organizations/[organization_id]/sources/[source_id]". + string parent = 1; + + // 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; + + // 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; +} + +// Request message for creating a source. +message CreateSourceRequest { + // Resource name of the new source's parent. Its format should be + // "organizations/[organization_id]". + string parent = 1; + + // The Source being created, only the display_name and description will be + // used. All other fields will be ignored. + Source source = 2; +} + +// 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; +} + +// Request message for getting a source. +message GetSourceRequest { + // Relative resource name of the source. Its format is + // "organizations/[organization_id]/source/[source_id]". + string name = 1; +} + +// Request message for grouping by assets. +message GroupAssetsRequest { + // Name of the organization to groupBy. Its format is + // "organizations/[organization_id]". + string parent = 1; + + // 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 | '>', '<', '>=', '<=', '=' + // 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 | '=', ':' + // + // 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: + // "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_type + // * security_center_properties.resource_parent + // + // The following fields are supported when compare_duration is set: + // + // * security_center_properties.resource_type + string group_by = 3; + + // 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; + + // 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; + + reserved 6; +} + +// 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 { + // 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; + + // 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 | `>`, `<`, `>=`, `<=` + // security_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". + // + // 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; + + // 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; + + // 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; + + reserved 6; +} + +// 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 sources. +message ListSourcesRequest { + // Resource name of the parent of sources to list. Its format should be + // "organizations/[organization_id]". + string parent = 1; + + // 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 { + // Name of the organization assets should belong to. Its format is + // "organizations/[organization_id]". + string parent = 1; + + // 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 | `>`, `<`, `>=`, `<=` + // 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 | '=', ':' + // + // 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 + // security_center_properties.resource_name + // security_center_properties.resource_parent + // security_center_properties.resource_project + // 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; + + // 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; + + // 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; + + reserved 6; +} + +// 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 { + // 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; + + // 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 | `>`, `<`, `>=`, `<=` + // security_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 + 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; + + // 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; + + // 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; + + reserved 6; +} + +// Response message for listing findings. +message ListFindingsResponse { + // Result containing the Finding and its StateChange. + message ListFindingsResult { + // 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; + } + + // 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 { + // 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; + + // The desired State of the finding. + Finding.State state = 2; + + // The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3; +} + +// 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; +} + +// 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. + // + // 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; + + // 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 an organization's settings. +message UpdateOrganizationSettingsRequest { + // The organization settings resource to update. + OrganizationSettings organization_settings = 1; + + // 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 { + // The source resource to update. + Source source = 1; + + // 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 { + // The security marks resource to update. + SecurityMarks security_marks = 1; + + // 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/v1/source.proto b/google/cloud/securitycenter/v1/source.proto new file mode 100644 index 000000000..26b0d5a64 --- /dev/null +++ b/google/cloud/securitycenter/v1/source.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.securitycenter.v1; + +import "google/api/annotations.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_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +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. +message 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" + 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}])?. + 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; + + reserved 4; +} diff --git a/google/cloud/securitycenter/v1beta1/BUILD.bazel b/google/cloud/securitycenter/v1beta1/BUILD.bazel new file mode 100644 index 000000000..6226c357a --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/BUILD.bazel @@ -0,0 +1,163 @@ +# 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 = "securitycenter_proto", + srcs = [ + "asset.proto", + "finding.proto", + "organization_settings.proto", + "security_marks.proto", + "securitycenter_service.proto", + "source.proto", + ], + deps = [ + "//google/api:annotations_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", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "securitycenter_proto_with_info", + deps = [":securitycenter_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +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_GRPC_DEPS, +) + +java_resource_name_proto_library( + name = "securitycenter_resource_name_java_proto", + gapic_yaml = "securitycenter_gapic.yaml", + deps = [":securitycenter_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"], + deps = [ + ":securitycenter_java_proto", + "securitycenter_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":securitycenter_java_gapic_test"], +) for test_name in [ + "com.google.cloud.securitycenter.v1beta1.SecurityCenterClientTest", +]] + +# Opensource 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 = [ + ":securitycenter_java_proto", + ":securitycenter_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 = "securitycenter_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1", + protos = [":securitycenter_proto"], + deps = [ + "//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", + 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", + ], +) + +go_test( + name = "securitycenter_go_gapic_test", + srcs = [":securitycenter_go_gapic_srcjar_test"], + embed = [":securitycenter_go_gapic"], + importpath = "cloud.google.com/go/securitycenter/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/securitycenter/v1beta1/asset.proto b/google/cloud/securitycenter/v1beta1/asset.proto new file mode 100644 index 000000000..3dd5b3581 --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/asset.proto @@ -0,0 +1,86 @@ +// 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.cloud.securitycenter.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1beta1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.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"; + +// 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 { + // 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 relative resource name of this asset. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/123/assets/456". + 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; +} diff --git a/google/cloud/securitycenter/v1beta1/finding.proto b/google/cloud/securitycenter/v1beta1/finding.proto new file mode 100644 index 000000000..21dfdd561 --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/finding.proto @@ -0,0 +1,99 @@ +// 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.cloud.securitycenter.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1beta1/security_marks.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.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"; + +// 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 { + // 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/123/sources/456/findings/789" + 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" + string parent = 2; + + // The full resource name of the Google Cloud Platform (GCP) resource this + // finding is for. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // 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; + + // 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. + 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/v1beta1/organization_settings.proto b/google/cloud/securitycenter/v1beta1/organization_settings.proto new file mode 100644 index 000000000..ca9be1145 --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/organization_settings.proto @@ -0,0 +1,74 @@ +// 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.cloud.securitycenter.v1beta1; + +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"; + +// User specified settings that are attached to the Cloud Security Command +// Center (Cloud SCC) organization. +message 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/123/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/v1beta1/security_marks.proto b/google/cloud/securitycenter/v1beta1/security_marks.proto new file mode 100644 index 000000000..cfcb5f7dc --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/security_marks.proto @@ -0,0 +1,45 @@ +// 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.cloud.securitycenter.v1beta1; + +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"; + +// 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 { + // 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". + 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 + // characters must be between 1 - 4096 characters (inclusive) + map marks = 2; +} diff --git a/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml b/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml new file mode 100644 index 000000000..b8d9230ce --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/securitycenter_gapic.yaml @@ -0,0 +1,460 @@ +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.v1beta1 + python: + package_name: google.cloud.securitycenter_v1beta1.gapic + go: + package_name: cloud.google.com/go/securitycenter/apiv1beta1 + csharp: + package_name: Google.Cloud.Securitycenter.V1beta1 + ruby: + package_name: Google::Cloud::Securitycenter::V1beta1 + php: + package_name: Google\Cloud\Securitycenter\V1beta1 + nodejs: + package_name: security-center.v1beta1 + 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: organizations/{organization} + entity_name: organization +- name_pattern: organizations/{organization}/assets/{asset}/securityMarks + entity_name: asset_security_marks +- name_pattern: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks + entity_name: finding_security_marks +- name_pattern: organizations/{organization}/organizationSettings + entity_name: organization_settings +- name_pattern: organizations/{organization}/sources/{source} + entity_name: source +- name_pattern: organizations/{organization}/sources/{source}/findings/{finding} + entity_name: finding +collection_oneofs: +- oneof_name: securitymarks_oneof + collection_names: + - asset_security_marks + - finding_security_marks +# A list of API interface configurations. +interfaces: + # The fully qualified name of the API interface. +- name: google.cloud.securitycenter.v1beta1.SecurityCenter + # 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: 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: findings + 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.protobuf.Empty + 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 +resource_name_generation: +- message_name: CreateSourceRequest + field_entity_map: + parent: organization +- message_name: CreateFindingRequest + field_entity_map: + parent: source +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: source +- 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: source +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: source +- 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/v1beta1/securitycenter_service.proto b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto new file mode 100644 index 000000000..dafce562d --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/securitycenter_service.proto @@ -0,0 +1,755 @@ +// 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.cloud.securitycenter.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/securitycenter/v1beta1/asset.proto"; +import "google/cloud/securitycenter/v1beta1/finding.proto"; +import "google/cloud/securitycenter/v1beta1/organization_settings.proto"; +import "google/cloud/securitycenter/v1beta1/security_marks.proto"; +import "google/cloud/securitycenter/v1beta1/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 go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter"; +option java_multiple_files = true; +option java_package = "com.google.cloud.securitycenter.v1beta1"; + +// V1 Beta APIs for Security Center service. +service SecurityCenter { + // Creates a source. + rpc CreateSource(CreateSourceRequest) returns (Source) { + option (google.api.http) = { + post: "/v1beta1/{parent=organizations/*}/sources" + body: "source" + }; + } + + // Creates a finding. The corresponding source must exist for finding creation + // to succeed. + rpc CreateFinding(CreateFindingRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1beta1/{parent=organizations/*/sources/*}/findings" + body: "finding" + }; + } + + // 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: "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy" + body: "*" + }; + } + + // Gets the settings for an organization. + rpc GetOrganizationSettings(GetOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + get: "/v1beta1/{name=organizations/*/organizationSettings}" + }; + } + + // Gets a source. + rpc GetSource(GetSourceRequest) returns (Source) { + option (google.api.http) = { + get: "/v1beta1/{name=organizations/*/sources/*}" + }; + } + + // Filters an organization's assets and groups them by their specified + // properties. + rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) { + option (google.api.http) = { + post: "/v1beta1/{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: /v1beta1/organizations/123/sources/-/findings + rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=organizations/*/sources/*}/findings:group" + body: "*" + }; + } + + // Lists an organization's assets. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=organizations/*}/assets" + }; + } + + // Lists an organization or source's findings. + // + // To list across all sources provide a `-` as the source id. + // Example: /v1beta1/organizations/123/sources/-/findings + rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=organizations/*/sources/*}/findings" + }; + } + + // Lists all sources belonging to an organization. + rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=organizations/*}/sources" + }; + } + + // 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: "/v1beta1/{parent=organizations/*}/assets:runDiscovery" + body: "*" + }; + } + + // Updates the state of a finding. + rpc SetFindingState(SetFindingStateRequest) returns (Finding) { + option (google.api.http) = { + post: "/v1beta1/{name=organizations/*/sources/*/findings/*}:setState" + body: "*" + }; + } + + // 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: "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy" + body: "*" + }; + } + + // 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: "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions" + body: "*" + }; + } + + // 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: "/v1beta1/{finding.name=organizations/*/sources/*/findings/*}" + body: "finding" + }; + } + + // Updates an organization's settings. + rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) + returns (OrganizationSettings) { + option (google.api.http) = { + patch: "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}" + body: "organization_settings" + }; + } + + // Updates a source. + rpc UpdateSource(UpdateSourceRequest) returns (Source) { + option (google.api.http) = { + patch: "/v1beta1/{source.name=organizations/*/sources/*}" + body: "source" + }; + } + + // Updates security marks. + rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) { + option (google.api.http) = { + patch: "/v1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}" + body: "security_marks" + additional_bindings { + patch: "/v1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}" + body: "security_marks" + } + }; + } +} + +// Request message for creating a finding. +message CreateFindingRequest { + // Resource name of the new finding's parent. Its format should be + // "organizations/[organization_id]/sources/[source_id]". + string parent = 1; + + // 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; + + // 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; +} + +// Request message for creating a source. +message CreateSourceRequest { + // Resource name of the new source's parent. Its format should be + // "organizations/[organization_id]". + string parent = 1; + + // The Source being created, only the display_name and description will be + // used. All other fields will be ignored. + Source source = 2; +} + +// 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; +} + +// Request message for getting a source. +message GetSourceRequest { + // Relative resource name of the source. Its format is + // "organizations/[organization_id]/source/[source_id]". + string name = 1; +} + +// Request message for grouping by assets. +message GroupAssetsRequest { + // Name of the organization to groupBy. Its format is + // "organizations/[organization_id]". + string parent = 1; + + // 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 not 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. + // + // 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: + // "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_type + // * security_center_properties.resource_parent + // + // The following fields are supported when compare_duration is set: + // + // * security_center_properties.resource_type + string group_by = 3; + + // When compare_duration is set, the Asset's "state" 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 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" values when compare_duration is specified: + // + // * "ADDED": indicates that the asset was not present before + // 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. + // + // This field is ignored if `state` is not a 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; + + // 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; +} + +// Request message for grouping by findings. +message GroupFindingsRequest { + // 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; + + // 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 not 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. + // + // 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`). 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 + string group_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; + + // 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 = 5; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 6; +} + +// 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; +} + +// 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 sources. +message ListSourcesRequest { + // Resource name of the parent of sources to list. Its format should be + // "organizations/[organization_id]". + string parent = 1; + + // 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 { + // Name of the organization assets should belong to. Its format is + // "organizations/[organization_id]". + string parent = 1; + + // 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 not 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. + // + // 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. + 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 ListAssetResult's "state" 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 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" values when compare_duration is specified: + // + // * "ADDED": indicates that the asset was not present before + // 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 is + // "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 + // response. + // An empty field mask will list all fields. + google.protobuf.FieldMask field_mask = 7; + + // 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 { + // 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 should + // be: UNUSED + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Request did not specify use of this field in the result. + UNUSED = 1; + + // Asset was added between the points in time. + ADDED = 2; + + // Asset was removed between the points in time. + REMOVED = 3; + + // Asset was active at both point(s) in time. + ACTIVE = 4; + } + + // Asset matching the search request. + Asset asset = 1; + + // State of the asset. + State state = 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 { + // 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; + + // 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 not 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. + // + // 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. + 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; + + // 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; + + // 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 = 6; + + // 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 findings. +message ListFindingsResponse { + // Findings matching the list request. + repeated Finding findings = 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 { + // 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; + + // The desired State of the finding. + Finding.State state = 2; + + // The time at which the updated state takes effect. + google.protobuf.Timestamp start_time = 3; +} + +// 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; +} + +// 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. + // + // 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; + + // The FieldMask to use when updating the finding resource. This field should + // not be specified when creating a finding. + 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; + + // The FieldMask to use when updating the settings resource. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating a source. +message UpdateSourceRequest { + // The source resource to update. + Source source = 1; + + // The FieldMask to use when updating the source resource. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for updating a SecurityMarks resource. +message UpdateSecurityMarksRequest { + // The security marks resource to update. + SecurityMarks security_marks = 1; + + // The FieldMask to use when updating the security marks resource. + google.protobuf.FieldMask update_mask = 2; + + // The time at which the updated SecurityMarks take effect. + google.protobuf.Timestamp start_time = 3; +} diff --git a/google/cloud/securitycenter/v1beta1/source.proto b/google/cloud/securitycenter/v1beta1/source.proto new file mode 100644 index 000000000..cc1fae6ea --- /dev/null +++ b/google/cloud/securitycenter/v1beta1/source.proto @@ -0,0 +1,53 @@ +// 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.cloud.securitycenter.v1beta1; + +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"; + +// 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 { + // The relative resource name of this source. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // Example: + // "organizations/123/sources/456" + 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}])?. + 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/speech/BUILD.bazel b/google/cloud/speech/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/speech/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/speech/artman_speech_v1.yaml b/google/cloud/speech/artman_speech_v1.yaml index 6e0212ecf..c781940ea 100644 --- a/google/cloud/speech/artman_speech_v1.yaml +++ b/google/cloud/speech/artman_speech_v1.yaml @@ -2,109 +2,33 @@ common: api_name: speech api_version: v1 organization_name: google-cloud - service_yaml: speech_v1.yaml - gapic_yaml: v1/cloud_speech_gapic.yaml + proto_deps: + - name: google-common-protos src_proto_paths: - v1 - proto_deps: - - name: google-common-protos + service_yaml: speech_v1.yaml + gapic_yaml: v1/speech_gapic.yaml artifacts: +- name: gapic_config + type: GAPIC_CONFIG - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-speech-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-speech-v1 - - name: proto - dest: generated/java/proto-google-cloud-speech-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-speech - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-speech-v1 - - name: grpc - dest: generated/python/proto-google-cloud-speech-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/speech_v1 - dest: speech/google/cloud/speech_v1 - - src: tests/unit/gapic/v1 - dest: speech/tests/gapic - - name: grpc - src: google/cloud/proto - dest: speech/google/cloud/proto +- name: nodejs_gapic + type: GAPIC + language: NODEJS - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-speech-v1 -- name: ruby_gapic - type: GAPIC - language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-speech-v1 - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/speech/v1 - dest: google-cloud-speech/lib/google/cloud/speech/v1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-speech-v1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: speech/apiv1 +- name: ruby_gapic + type: GAPIC + language: RUBY - name: csharp_gapic type: GAPIC language: CSHARP -- name: nodejs_gapic - type: GAPIC - language: NODEJS - release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/speech/src/v1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/speech -- name: gapic_config - type: GAPIC_CONFIG diff --git a/google/cloud/speech/artman_speech_v1beta1.yaml b/google/cloud/speech/artman_speech_v1beta1.yaml deleted file mode 100644 index f6927a9ac..000000000 --- a/google/cloud/speech/artman_speech_v1beta1.yaml +++ /dev/null @@ -1,97 +0,0 @@ -common: - api_name: speech - api_version: v1beta1 - organization_name: google-cloud - service_yaml: speech_v1beta1.yaml - gapic_yaml: v1beta1/cloud_speech_gapic.yaml - src_proto_paths: - - v1beta1 - proto_deps: - - name: google-common-protos -artifacts: -- name: java_gapic - type: GAPIC - language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-speech-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-speech-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-speech-v1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-speech -- name: python_gapic - type: GAPIC - language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-speech-v1beta1 - - name: grpc - dest: generated/python/proto-google-cloud-speech-v1beta1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/speech_v1beta1 - dest: speech/google/cloud/speech_v1beta1 - - src: tests/unit/gapic/v1beta1 - dest: speech/tests/gapic - - name: grpc - src: google/cloud/proto/speech/v1beta1 - dest: speech/google/cloud/proto/speech/v1beta1 -- name: php_gapic - type: GAPIC - language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-speech-v1beta1 -- name: ruby_gapic - type: GAPIC - language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-speech-v1beta1 -- name: go_gapic - type: GAPIC - language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: speech/apiv1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-speech-v1beta1/vendor -- name: csharp_gapic - type: GAPIC - language: CSHARP -- name: nodejs_gapic - type: GAPIC - language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/speech-v1beta1 -- 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 c9f1de28d..fa2685425 100644 --- a/google/cloud/speech/artman_speech_v1p1beta1.yaml +++ b/google/cloud/speech/artman_speech_v1p1beta1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-speech-v1p1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-speech-v1p1beta1 - - name: proto - dest: generated/java/proto-google-cloud-speech-v1p1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-speech - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-speech-v1p1beta1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/speech/sample_resources.yaml b/google/cloud/speech/sample_resources.yaml new file mode 100644 index 000000000..5c00fc694 --- /dev/null +++ b/google/cloud/speech/sample_resources.yaml @@ -0,0 +1,26 @@ +# Canonical GCS paths to resource files used by samples and sample system tests +sample_resources: +- uri: gs://cloud-samples-data/speech/brooklyn_bridge.raw + description: | + 16000 Hz, 1 channel, English, "How old is the Brooklyn Bridge?" +- uri: gs://cloud-samples-data/speech/brooklyn_bridge.flac + description: | + 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?" +- uri: gs://cloud-samples-data/speech/hello.raw + description: | + 16000 Hz, 1 channel, English, "Hello" +- uri: gs://cloud-samples-data/speech/hello.wav + description: | + 16000 Hz, 1 channel, English, "Hello" +- uri: gs://cloud-samples-data/speech/multi.flac + description: | + 44100 Hz, 1 channel, 2 speakers, English and Spanish, "How are you doing? Estoy bien, y tu?" +- uri: gs://cloud-samples-data/speech/multi.wav + description: | + 44100 Hz, 2 channels, 2 speakers, English and Spanish, "How are you doing? Estoy bien, y tu?" +- uri: gs://cloud-samples-data/speech/commercial_mono.wav + description: | + 8000 Hz, 1 channel, 2 speakers, English, Exerpt "I'd like to buy a Chromecast" diff --git a/google/cloud/speech/speech_v1.yaml b/google/cloud/speech/speech_v1.yaml index 1ffe20725..4cb4b7b2c 100644 --- a/google/cloud/speech/speech_v1.yaml +++ b/google/cloud/speech/speech_v1.yaml @@ -1,35 +1,65 @@ -# Google Cloud Speech API service configuration - type: google.api.Service config_version: 3 name: speech.googleapis.com +title: Cloud Speech API -title: Google Cloud Speech API +apis: +- name: google.cloud.speech.v1.Speech + +types: +- name: google.cloud.speech.v1.LongRunningRecognizeMetadata +- name: google.cloud.speech.v1.LongRunningRecognizeResponse documentation: - summary: - Google Cloud Speech API. + summary: Converts audio to text by applying powerful neural network models. + overview: |- + # Introduction -apis: -- name: google.cloud.speech.v1.Speech + Google Cloud Speech API provides speech recognition as a service. -authentication: +backend: rules: - - selector: '*' - oauth: - canonical_scopes: https://www.googleapis.com/auth/cloud-platform + - 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 http: rules: - selector: google.longrunning.Operations.ListOperations - get: '/v1/operations' + 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=*}' + get: '/v1/operations/{name=**}' + additional_bindings: + - get: '/v1beta1/operations/{name=**}' + + - get: '/v1p1beta1/operations/{name=**}' - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1/operations/{name=*}' + - get: '/v1/{name=projects/*/locations/*/operations/*}' - - selector: google.longrunning.Operations.CancelOperation - post: '/v1/operations/{name=*}:cancel' - body: '*' + - get: '/v1p1beta1/{name=projects/*/locations/*/operations/*}' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/speech/speech_v1beta1.yaml b/google/cloud/speech/speech_v1beta1.yaml deleted file mode 100644 index fcd1676ad..000000000 --- a/google/cloud/speech/speech_v1beta1.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Google Cloud Speech API service configuration - -type: google.api.Service -config_version: 3 -name: speech.googleapis.com - -title: Google Cloud Speech API - -documentation: - summary: - Google Cloud Speech API. - -apis: -- name: google.cloud.speech.v1beta1.Speech - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: https://www.googleapis.com/auth/cloud-platform - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v1beta1/operations' - - - selector: google.longrunning.Operations.GetOperation - get: '/v1beta1/operations/{name=*}' - - - selector: google.longrunning.Operations.DeleteOperation - delete: '/v1beta1/operations/{name=*}' - - - selector: google.longrunning.Operations.CancelOperation - post: '/v1beta1/operations/{name=*}:cancel' - body: '*' diff --git a/google/cloud/speech/speech_v1p1beta1.yaml b/google/cloud/speech/speech_v1p1beta1.yaml index 3bea15f45..8fefdf6ff 100644 --- a/google/cloud/speech/speech_v1p1beta1.yaml +++ b/google/cloud/speech/speech_v1p1beta1.yaml @@ -15,8 +15,12 @@ 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.v1p1beta1.Speech.Recognize deadline: 200.0 - selector: google.cloud.speech.v1p1beta1.Speech.LongRunningRecognize @@ -26,8 +30,16 @@ backend: http: rules: + - selector: google.longrunning.Operations.ListOperations + get: /v1/operations + additional_bindings: + - get: /v1beta1/operations - selector: google.longrunning.Operations.GetOperation - get: '/v1p1beta1/operations/{name=*}' + get: '/v1/operations/{name=*}' + additional_bindings: + - get: '/v1beta1/operations/{name=*}' + + - get: '/v1p1beta1/operations/{name=*}' authentication: diff --git a/google/cloud/speech/v1/BUILD.bazel b/google/cloud/speech/v1/BUILD.bazel new file mode 100644 index 000000000..06dafe724 --- /dev/null +++ b/google/cloud/speech/v1/BUILD.bazel @@ -0,0 +1,155 @@ +# 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 = "speech_proto", + srcs = [ + "cloud_speech.proto", + ], + deps = [ + "//google/api:annotations_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"], +) + +############################################################################## +# 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 = "speech_java_proto", + deps = [":speech_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.speech.v1.SpeechClientTest", +]] + +# Opensource 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 = [ + ":speech_java_proto", + ":speech_proto", + ":speech_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 = "speech_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/speech/v1", + protos = [":speech_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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", + deps = [ + ":speech_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "speech_go_gapic_test", + srcs = [":speech_go_gapic_srcjar_test"], + embed = [":speech_go_gapic"], + importpath = "cloud.google.com/go/speech/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/speech/v1/cloud_speech.proto b/google/cloud/speech/v1/cloud_speech.proto index b1bac7df2..90ff515b5 100644 --- a/google/cloud/speech/v1/cloud_speech.proto +++ b/google/cloud/speech/v1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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,7 +19,6 @@ package google.cloud.speech.v1; import "google/api/annotations.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"; @@ -29,26 +29,33 @@ option java_multiple_files = true; option java_outer_classname = "SpeechProto"; option java_package = "com.google.cloud.speech.v1"; - // Service that implements Google Cloud Speech API. service Speech { // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. rpc Recognize(RecognizeRequest) returns (RecognizeResponse) { - option (google.api.http) = { post: "/v1/speech:recognize" body: "*" }; + option (google.api.http) = { + post: "/v1/speech:recognize" + body: "*" + }; } // 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) { - option (google.api.http) = { post: "/v1/speech:longrunningrecognize" body: "*" }; + rpc LongRunningRecognize(LongRunningRecognizeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/speech:longrunningrecognize" + body: "*" + }; } // 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. @@ -92,7 +99,7 @@ message StreamingRecognizeRequest { // `audio_content` data. The audio bytes must be encoded as specified in // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a // pure binary representation (not base64). See - // [audio limits](https://cloud.google.com/speech/limits#content). + // [content limits](/speech-to-text/quotas#content). bytes audio_content = 2; } } @@ -127,24 +134,35 @@ message StreamingRecognitionConfig { // Provides information to the recognizer that specifies how to process the // request. message RecognitionConfig { - // Audio encoding of the data sent in the audio message. All encodings support - // only 1 channel (mono) audio. Only `FLAC` and `WAV` include a header that - // describes the bytes of audio that follow the header. The other encodings - // are raw audio bytes with no header. + // The encoding of the audio data sent in the request. + // + // All encodings support only 1 channel (mono) audio. // // For best results, the audio source should be captured and transmitted using - // a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be - // reduced if lossy codecs, which include the other codecs listed in - // this section, are used to capture or transmit the audio, particularly if - // background noise is present. + // 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`. + // + // The `FLAC` and `WAV` audio file formats include a header that describes the + // included audio content. You can request recognition for `WAV` files that + // contain either `LINEAR16` or `MULAW` encoded audio. + // If you send `FLAC` or `WAV` audio file format in + // your request, you do not need to specify an `AudioEncoding`; the audio + // encoding format is determined from the file header. If you specify + // 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. enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + // Not specified. ENCODING_UNSPECIFIED = 0; // Uncompressed 16-bit signed little-endian samples (Linear PCM). LINEAR16 = 1; - // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // `FLAC` (Free Lossless Audio // Codec) is the recommended encoding because it is // lossless--therefore recognition is not compromised--and // requires only about half the bandwidth of `LINEAR16`. `FLAC` stream @@ -163,7 +181,7 @@ message RecognitionConfig { // Opus encoded audio frames in Ogg container // ([OggOpus](https://wiki.xiph.org/OggOpus)). - // `sample_rate_hertz` must be 16000. + // `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. OGG_OPUS = 6; // Although the use of lossy encodings is not recommended, if a very low @@ -182,20 +200,45 @@ message RecognitionConfig { SPEEX_WITH_HEADER_BYTE = 7; } - // *Required* Encoding of audio data sent in all `RecognitionAudio` messages. + // 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]. AudioEncoding encoding = 1; - // *Required* Sample rate in Hertz of the audio data sent in all + // Sample rate in Hertz of the audio data sent in all // `RecognitionAudio` messages. 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 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]. int32 sample_rate_hertz = 2; + // *Optional* 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'. + // Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. + // If `0` or omitted, defaults to one channel (mono). + // Note: We only recognize the first channel by default. + // To perform independent recognition on each channel set + // `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 + // 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 + // request is billed cumulatively for all channels recognized: + // `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 // [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) + // See [Language Support](/speech-to-text/docs/languages) // for a list of the currently supported language codes. string language_code = 3; @@ -213,7 +256,9 @@ message RecognitionConfig { // won't be filtered out. bool profanity_filter = 5; - // *Optional* A means to provide context to assist the speech recognition. + // *Optional* 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). repeated SpeechContext speech_contexts = 6; // *Optional* If `true`, the top result includes a list of words and @@ -221,6 +266,189 @@ message RecognitionConfig { // `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. + // 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* Metadata regarding this request. + RecognitionMetadata metadata = 9; + + // *Optional* 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. + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // + //
ModelDescription
command_and_searchBest for short queries such as voice commands or voice search.
phone_callBest for audio that originated from a phone call (typically + // recorded at an 8khz sampling rate).
videoBest for audio that originated from from video or includes multiple + // speakers. Ideally the audio is recorded at a 16khz or greater + // sampling rate. This is a premium model that costs more than the + // standard rate.
defaultBest for audio that is not one of the specific audio models. + // For example, long-form audio. Ideally the audio is high-fidelity, + // recorded at a 16khz or greater sampling rate.
+ string model = 13; + + // *Optional* 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. + // + // If `use_enhanced` is true and an enhanced version of the specified model + // does not exist, then the speech is recognized using the standard version + // of the specified model. + bool use_enhanced = 14; +} + +// Description of audio data to be recognized. +message RecognitionMetadata { + // Use case categories that the audio recognition request can be described + // by. + enum InteractionType { + // Use case is either unknown or is something other than one of the other + // values below. + INTERACTION_TYPE_UNSPECIFIED = 0; + + // Multiple people in a conversation or discussion. For example in a + // meeting with two or more people actively participating. Typically + // all the primary people speaking would be in the same room (if not, + // see PHONE_CALL) + DISCUSSION = 1; + + // One or more persons lecturing or presenting to others, mostly + // uninterrupted. + PRESENTATION = 2; + + // A phone-call or video-conference in which two or more people, who are + // not in the same room, are actively participating. + PHONE_CALL = 3; + + // A recorded message intended for another person to listen to. + VOICEMAIL = 4; + + // Professionally produced audio (eg. TV Show, Podcast). + PROFESSIONALLY_PRODUCED = 5; + + // Transcribe spoken questions and queries into text. + VOICE_SEARCH = 6; + + // Transcribe voice commands, such as for controlling a device. + VOICE_COMMAND = 7; + + // Transcribe speech to text to create a written document, such as a + // text-message, email or report. + 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. + MICROPHONE_DISTANCE_UNSPECIFIED = 0; + + // The audio was captured from a closely placed microphone. Eg. phone, + // dictaphone, or handheld microphone. Generally if there speaker is within + // 1 meter of the microphone. + NEARFIELD = 1; + + // The speaker if within 3 meters of the microphone. + MIDFIELD = 2; + + // The speaker is more than 3 meters away from the microphone. + 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. + ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0; + + // The speech data is an audio recording. + AUDIO = 1; + + // The speech data originally recorded on a video. + 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. + RECORDING_DEVICE_TYPE_UNSPECIFIED = 0; + + // Speech was recorded on a smartphone. + SMARTPHONE = 1; + + // Speech was recorded using a personal computer or tablet. + PC = 2; + + // Speech was recorded over a phone line. + PHONE_LINE = 3; + + // Speech was recorded in a vehicle. + VEHICLE = 4; + + // Speech was recorded outdoors. + OTHER_OUTDOOR_DEVICE = 5; + + // Speech was recorded indoors. + OTHER_INDOOR_DEVICE = 6; + } + + // The type of device the speech was recorded with. + RecordingDeviceType recording_device_type = 6; + + // The device used to make the recording. Examples 'Nexus 5X' or + // 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or + // 'Cardioid Microphone'. + string recording_device_name = 7; + + // Mime type of the original audio file. For example `audio/m4a`, + // `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. + // A list of possible audio mime types is maintained at + // http://www.iana.org/assignments/media-types/media-types.xhtml#audio + string original_mime_type = 8; + + // Description of the content. Eg. "Recordings of federal supreme court + // hearings from 2012". + string audio_topic = 10; } // Provides "hints" to the speech recognizer to favor specific words and phrases @@ -231,14 +459,14 @@ message SpeechContext { // 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). + // [usage limits](/speech-to-text/quotas#content). 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 -// [audio limits](https://cloud.google.com/speech/limits#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. +// See [content limits](/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. @@ -249,11 +477,13 @@ message RecognitionAudio { bytes content = 1; // URI that points to a file that contains audio data bytes as specified in - // `RecognitionConfig`. Currently, only Google Cloud Storage URIs are + // `RecognitionConfig`. The file must not be compressed (for example, gzip). + // 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; } } @@ -262,7 +492,7 @@ message RecognitionAudio { // contains the result as zero or more sequential `SpeechRecognitionResult` // messages. message RecognizeResponse { - // *Output-only* Sequential list of transcription results corresponding to + // Output only. Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -273,7 +503,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 + // Output only. Sequential list of transcription results corresponding to // sequential portions of audio. repeated SpeechRecognitionResult results = 2; } @@ -358,73 +588,96 @@ 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. + // 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; - // *Output-only* This repeated list contains zero or more results that + // Output only. This repeated list contains zero or more results that // correspond to consecutive portions of the audio currently being processed. - // It contains zero or more `is_final=false` results followed by zero or one - // `is_final=true` result (the newly settled portion). + // 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. + // Output only. 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 + // 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. repeated SpeechRecognitionAlternative alternatives = 1; - // *Output-only* If `false`, this `StreamingRecognitionResult` represents an + // Output only. 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 + // Output only. 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 + // beginning of the audio. + google.protobuf.Duration result_end_time = 4; + + // For multi-channel audio, this is the channel number corresponding to the + // recognized result for the audio from that channel. + // 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; } // 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 + // 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. repeated SpeechRecognitionAlternative alternatives = 1; + + // For multi-channel audio, this is the channel number corresponding to the + // recognized result for the audio from that channel. + // For audio_channel_count = N, its output values can range from '1' to 'N'. + int32 channel_tag = 2; } // Alternative hypotheses (a.k.a. n-best list). message SpeechRecognitionAlternative { - // *Output-only* Transcript text representing the words that the user spoke. + // Output only. 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 + // 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 of a non-streaming + // result or, of a streaming result where `is_final=true`. + // 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; - // *Output-only* A list of word-specific information for each recognized word. + // 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; } -// Word-specific information for recognized words. Word information is only -// included in the response when certain request parameters are set, such -// as `enable_word_time_offsets`. +// Word-specific information for recognized words. message WordInfo { - // *Output-only* Time offset relative to the beginning of the audio, + // Output only. 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. @@ -432,7 +685,7 @@ message WordInfo { // vary. google.protobuf.Duration start_time = 1; - // *Output-only* Time offset relative to the beginning of the audio, + // Output only. 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. @@ -440,6 +693,6 @@ message WordInfo { // vary. google.protobuf.Duration end_time = 2; - // *Output-only* The word corresponding to this set of information. + // Output only. The word corresponding to this set of information. string word = 3; } diff --git a/google/cloud/speech/v1/cloud_speech_gapic.yaml b/google/cloud/speech/v1/cloud_speech_gapic.yaml deleted file mode 100644 index acdfc9f2e..000000000 --- a/google/cloud/speech/v1/cloud_speech_gapic.yaml +++ /dev/null @@ -1,98 +0,0 @@ -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 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt -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 - request_object_method: true - 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 - request_object_method: true - 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 - request_object_method: false - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 1000000 diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml new file mode 100644 index 000000000..387e4b7e2 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Transcribe Audio File using Long Running Operation (Local File) (LRO) + cases: + + # This sample should default to using brooklyn_bridge.raw + # with explicitly configured sample_rate_hertz and encoding + - name: speech_transcribe_async (no arguments) + spec: + - call: + sample: speech_transcribe_async + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + + # Confirm that another file can be transcribed (use another .raw PCM file) + - name: speech_transcribe_async (--local_file_path) + spec: + - call: + sample: speech_transcribe_async + params: + local_file_path: + literal: "resources/hello.raw" + - assert_contains: + - literal: "hello" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async.yaml new file mode 100644 index 000000000..97cd71095 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async.yaml @@ -0,0 +1,35 @@ +samples: +- 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 + 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: + - 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/v1/samples/speech_transcribe_async_gcs.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml new file mode 100644 index 000000000..146fb5c51 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Transcript Audio File using Long Running Operation (Cloud Storage) (LRO) + cases: + + # This sample should default to using gs://cloud-samples-data/brooklyn_bridge.raw + # with explicitly configured sample_rate_hertz and encoding + - name: speech_transcribe_async_gcs (no arguments) + spec: + - call: + sample: speech_transcribe_async_gcs + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + + # Confirm that another file can be transcribed (use another .raw PCM file) + - name: speech_transcribe_async_gcs (--storage_uri) + spec: + - call: + sample: speech_transcribe_async_gcs + params: + storage_uri: + literal: "gs://cloud-samples-data/speech/hello.raw" + - assert_contains: + - literal: "hello" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml new file mode 100644 index 000000000..f4bce2bc7 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_gcs.yaml @@ -0,0 +1,35 @@ +samples: +- 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 + 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: + - 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/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml new file mode 100644 index 000000000..5528d025c --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.test.yaml @@ -0,0 +1,35 @@ +test: + suites: + - name: Getting word timestamps (Cloud Storage) (LRO) + cases: + + # This sample should default to using gs://cloud-samples-data/speech/brooklyn_bridge.flac + - name: speech_transcribe_async_word_time_offsets_gcs (no arguments) + spec: + - call: + sample: speech_transcribe_async_word_time_offsets_gcs + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + - literal: "Word: how" + - literal: "Word: old" + - literal: "Word: is" + - literal: "Start time: 0 seconds" + - literal: "End time: 1 seconds" + + # Confirm that another file can be transcribed (use another file) + - name: speech_transcribe_async_word_time_offsets_gcs (--storage_uri) + spec: + - call: + sample: speech_transcribe_async_word_time_offsets_gcs + params: + storage_uri: + literal: "gs://cloud-samples-data/speech/multi.flac" + - assert_contains: + - literal: "how are you doing" + - literal: "Word: how" + - literal: "Word: are" + - literal: "Word: you" + - literal: "Start time: 0 seconds" + - literal: "End time: 1 seconds" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" 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 new file mode 100644 index 000000000..e40d83d8b --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_async_word_time_offsets_gcs.yaml @@ -0,0 +1,38 @@ +samples: +- 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 + 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] + - 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] diff --git a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml new file mode 100644 index 000000000..36ee3f348 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.test.yaml @@ -0,0 +1,27 @@ +test: + suites: + - name: Using Enhanced Models (Local File) + cases: + + # This sample should default to using hello.wav + # and the phone_call model (only currently available enhanced model) + # + # Note: if the project used to run these tests isn't eligible for + # enhanced models, you will receive an error. + - name: speech_transcribe_enhanced_model (no arguments) + spec: + - call: + sample: speech_transcribe_enhanced_model + - assert_contains: + - literal: "hello" + + # Confirm that another file can be transcribed (use another .wav file) + - name: speech_transcribe_enhanced_model (--local_file_path) + spec: + - call: + sample: speech_transcribe_enhanced_model + params: + local_file_path: + literal: "resources/commercial_mono.wav" + - assert_contains: + - literal: "Chrome" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml new file mode 100644 index 000000000..adfb7ccaa --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_enhanced_model.yaml @@ -0,0 +1,38 @@ +samples: +- id: 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: + - 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/v1/samples/speech_transcribe_model_selection.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml new file mode 100644 index 000000000..d5f3ff577 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.test.yaml @@ -0,0 +1,50 @@ +test: + suites: + - name: Selecting a Transcription Model (Local File) + cases: + + # This sample should default to using hello.wav + # and the phone_call model + - name: speech_transcribe_model_selection (no arguments) + spec: + - call: + sample: speech_transcribe_model_selection + - assert_contains: + - literal: "Hello" + + # Confirm that another file can be transcribed (use another .wav file) + - name: speech_transcribe_model_selection (--local_file_path) + spec: + - call: + sample: speech_transcribe_model_selection + params: + local_file_path: + literal: "resources/commercial_mono.wav" + - assert_contains: + - literal: "Chrome" + + # Confirm that --model can be specified and the sample does not blow up + # + # Note: we are not using example audio files which result in deterministically + # different results when using different models. so we simply test + # that regular transcription continues to work. + - name: speech_transcribe_model_selection (--model) + spec: + - call: + sample: speech_transcribe_model_selection + params: + model: + literal: video + - assert_contains: + - literal: "hello" + + # Confirm that --model is being passed through by providing an invalid model + - name: speech_transcribe_model_selection (invalid --model) + spec: + - call_may_fail: + sample: speech_transcribe_model_selection + params: + model: + literal: I_DONT_EXIST + - assert_contains: + - literal: "Incorrect model specified" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml new file mode 100644 index 000000000..1ff649a6d --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection.yaml @@ -0,0 +1,34 @@ +samples: +- id: 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: + - 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/v1/samples/speech_transcribe_model_selection_gcs.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml new file mode 100644 index 000000000..323079da3 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.test.yaml @@ -0,0 +1,50 @@ +test: + suites: + - name: Selecting a Transcription Model (Cloud Storage) + cases: + + # This sample should default to using gs://cloud-samples-data/speech/hello.wav + # and the phone_call model + - name: speech_transcribe_model_selection_gcs (no arguments) + spec: + - call: + sample: speech_transcribe_model_selection_gcs + - assert_contains: + - literal: "Hello" + + # Confirm that another file can be transcribed (use another .wav file) + - name: speech_transcribe_model_selection_gcs (--local_file_path) + spec: + - call: + sample: speech_transcribe_model_selection_gcs + params: + storage_uri: + literal: "gs://cloud-samples-data/speech/commercial_mono.wav" + - assert_contains: + - literal: "Chrome" + + # Confirm that --model can be specified and the sample does not blow up + # + # Note: we are not using example audio files which result in deterministically + # different results when using different models. so we simply test + # that regular transcription continues to work. + - name: speech_transcribe_model_selection_gcs (--model) + spec: + - call: + sample: speech_transcribe_model_selection_gcs + params: + model: + literal: video + - assert_contains: + - literal: "hello" + + # Confirm that --model is being passed through by providing an invalid model + - name: speech_transcribe_model_selection_gcs (invalid --model) + spec: + - call_may_fail: + sample: speech_transcribe_model_selection_gcs + params: + model: + literal: I_DONT_EXIST + - assert_contains: + - literal: "Incorrect model specified" 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 new file mode 100644 index 000000000..a16c37444 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_model_selection_gcs.yaml @@ -0,0 +1,34 @@ +samples: +- 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 + 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: + - 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/v1/samples/speech_transcribe_multichannel.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml new file mode 100644 index 000000000..18e77c69b --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.test.yaml @@ -0,0 +1,29 @@ +test: + suites: + - name: Multi-Channel Audio Transcription (Local File) + cases: + + # This sample should default to using multi.wav (2 channels) + - name: speech_transcribe_multichannel (no arguments) + spec: + - call: + sample: speech_transcribe_multichannel + - assert_contains: + - literal: "Channel tag: 1" + - literal: "Channel tag: 2" + - literal: "how are you doing" + + # Confirm that another file can be transcribed (use another 2 channel .wav file) + - name: speech_transcribe_multichannel (--local_file_path) + spec: + - call: + sample: speech_transcribe_multichannel + params: + local_file_path: + literal: "resources/brooklyn_bridge.wav" + - assert_contains: + # Only one channel of data is present in brooklyn_bridge.wav + - literal: "Channel tag:" + - literal: "how old is the Brooklyn Bridge" + - assert_not_contains: + - literal: "how are you doing" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml new file mode 100644 index 000000000..68d56a786 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel.yaml @@ -0,0 +1,40 @@ +samples: +- id: 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: + - 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 diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml new file mode 100644 index 000000000..6186121b8 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.test.yaml @@ -0,0 +1,30 @@ +test: + suites: + - name: Multi-Channel Audio Transcription (Cloud Storage) + cases: + + # This sample should default to using gs://cloud-samples-data/speech/multi.wav + # with 2 audio channels of data + - name: speech_transcribe_multichannel_gcs (no arguments) + spec: + - call: + sample: speech_transcribe_multichannel_gcs + - assert_contains: + - literal: "Channel tag: 1" + - literal: "Channel tag: 2" + - literal: "how are you doing" + + # Confirm that another file can be transcribed (use another 2 channel .wav file) + - name: speech_transcribe_multichannel_gcs (--storage_uri) + spec: + - call: + sample: speech_transcribe_multichannel_gcs + params: + storage_uri: + literal: "gs://cloud-samples-data/speech/brooklyn_bridge.wav" + - assert_contains: + # Only one channel of data is present in brooklyn_bridge.wav + - literal: "Channel tag:" + - literal: "how old is the Brooklyn Bridge" + - assert_not_contains: + - literal: "how are you doing" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml new file mode 100644 index 000000000..f09b7cdd0 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_multichannel_gcs.yaml @@ -0,0 +1,40 @@ +samples: +- id: speech_transcribe_multichannel_gcs + title: Multi-Channel Audio Transcription (Cloud Storage) + 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: + - 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 diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml new file mode 100644 index 000000000..aeb321194 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Transcribe Audio File (Local File) + cases: + + # This sample should default to using brooklyn_bridge.raw + # with explicitly configured sample_rate_hertz and encoding + - name: speech_transcribe_sync (no arguments) + spec: + - call: + sample: speech_transcribe_sync + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + + # Confirm that another file can be transcribed (use another .raw PCM file) + - name: speech_transcribe_sync (--local_file_path) + spec: + - call: + sample: speech_transcribe_sync + params: + local_file_path: + literal: "resources/hello.raw" + - assert_contains: + - literal: "hello" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml new file mode 100644 index 000000000..0529a2874 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync.yaml @@ -0,0 +1,35 @@ +samples: +- id: 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: + - 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/v1/samples/speech_transcribe_sync_gcs.test.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml new file mode 100644 index 000000000..2e50f3602 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Transcript Audio File (Cloud Storage) + cases: + + # This sample should default to using gs://cloud-samples-data/speech/brooklyn_bridge.raw + # with explicitly configured sample_rate_hertz and encoding + - name: speech_transcribe_sync_gcs (no arguments) + spec: + - call: + sample: speech_transcribe_sync_gcs + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + + # Confirm that another file can be transcribed (use another .raw PCM file) + - name: speech_transcribe_sync_gcs (--storage_uri) + spec: + - call: + sample: speech_transcribe_sync_gcs + params: + storage_uri: + literal: "gs://cloud-samples-data/speech/hello.raw" + - assert_contains: + - literal: "hello" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml new file mode 100644 index 000000000..6ebb1d2a5 --- /dev/null +++ b/google/cloud/speech/v1/samples/speech_transcribe_sync_gcs.yaml @@ -0,0 +1,35 @@ +samples: +- id: speech_transcribe_sync_gcs + title: Transcript Audio File (Cloud Storage) + 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: + - 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/v1/speech_gapic.yaml b/google/cloud/speech/v1/speech_gapic.yaml new file mode 100644 index 000000000..1edeb9984 --- /dev/null +++ b/google/cloud/speech/v1/speech_gapic.yaml @@ -0,0 +1,499 @@ +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 + 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/v1beta1/cloud_speech.proto b/google/cloud/speech/v1beta1/cloud_speech.proto deleted file mode 100644 index 82b82d3c0..000000000 --- a/google/cloud/speech/v1beta1/cloud_speech.proto +++ /dev/null @@ -1,421 +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.speech.v1beta1; - -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1beta1;speech"; -option java_multiple_files = true; -option java_outer_classname = "SpeechProto"; -option java_package = "com.google.cloud.speech.v1beta1"; - - -// Service that implements Google Cloud Speech API. -service Speech { - // Performs synchronous speech recognition: receive results after all audio - // has been sent and processed. - rpc SyncRecognize(SyncRecognizeRequest) returns (SyncRecognizeResponse) { - option (google.api.http) = { post: "/v1beta1/speech:syncrecognize" body: "*" }; - } - - // Performs asynchronous speech recognition: receive results via the - // [google.longrunning.Operations] - // (/speech/reference/rest/v1beta1/operations#Operation) - // interface. Returns either an - // `Operation.error` or an `Operation.response` which contains - // an `AsyncRecognizeResponse` message. - rpc AsyncRecognize(AsyncRecognizeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1beta1/speech:asyncrecognize" body: "*" }; - } - - // 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); -} - -// The top-level message sent by the client for the `SyncRecognize` method. -message SyncRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// The top-level message sent by the client for the `AsyncRecognize` method. -message AsyncRecognizeRequest { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Required* The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// 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. -message StreamingRecognizeRequest { - // The streaming request, which is either a streaming config or audio content. - oneof streaming_request { - // Provides information to the recognizer that specifies how to process the - // request. The first `StreamingRecognizeRequest` message must contain a - // `streaming_config` message. - StreamingRecognitionConfig streaming_config = 1; - - // The audio data to be recognized. Sequential chunks of audio data are sent - // in sequential `StreamingRecognizeRequest` messages. The first - // `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 - // pure binary representation (not base64). See - // [audio limits](https://cloud.google.com/speech/limits#content). - bytes audio_content = 2; - } -} - -// Provides information to the recognizer that specifies how to process the -// request. -message StreamingRecognitionConfig { - // *Required* Provides information to the recognizer that specifies how to - // process the request. - RecognitionConfig config = 1; - - // *Optional* 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 - // `StreamingRecognitionResult`s with the `is_final` flag set to `true`. - // - // If `true`, the recognizer will detect a single spoken utterance. When it - // detects that the user has paused or stopped speaking, it will return an - // `END_OF_UTTERANCE` event and cease recognition. It will return no more than - // one `StreamingRecognitionResult` with the `is_final` flag set to `true`. - bool single_utterance = 2; - - // *Optional* 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. - bool interim_results = 3; -} - -// Provides information to the recognizer that specifies how to process the -// request. -message RecognitionConfig { - // Audio encoding of the data sent in the audio message. All encodings support - // only 1 channel (mono) audio. Only `FLAC` includes a header that describes - // the bytes of audio that follow the header. The other encodings are raw - // audio bytes with no header. - // - // For best results, the audio source should be captured and transmitted using - // a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be - // reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture - // or transmit the audio, particularly if background noise is present. - enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples (Linear PCM). - // This is the only encoding that may be used by `AsyncRecognize`. - LINEAR16 = 1; - - // This is the recommended encoding for `SyncRecognize` and - // `StreamingRecognize` because it uses lossless compression; therefore - // recognition accuracy is not compromised by a lossy codec. - // - // The stream FLAC (Free Lossless Audio Codec) encoding is specified at: - // http://flac.sourceforge.net/documentation.html. - // 16-bit and 24-bit samples are supported. - // Not all fields in STREAMINFO are supported. - FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz. - AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz. - AMR_WB = 5; - } - - // *Required* Encoding of audio data sent in all `RecognitionAudio` messages. - AudioEncoding encoding = 1; - - // *Required* Sample rate in Hertz of the audio data sent in all - // `RecognitionAudio` messages. 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). - int32 sample_rate = 2; - - // *Optional* The language of the supplied audio as a BCP-47 language tag. - // Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt - // If omitted, defaults to "en-US". See - // [Language Support](https://cloud.google.com/speech/docs/languages) - // for a list of the currently supported language codes. - string language_code = 3; - - // *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 `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 = 4; - - // *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 profanity_filter = 5; - - // *Optional* A means to provide context to assist the speech recognition. - SpeechContext speech_context = 6; -} - -// 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 - // 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; -} - -// 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 -// [audio limits](https://cloud.google.com/speech/limits#content). -message RecognitionAudio { - // The audio source, which is either inline content or a GCS uri. - oneof audio_source { - // The audio data bytes encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - // pure binary representation, whereas JSON representations use base64. - bytes content = 1; - - // URI that points to a file that contains audio data bytes as specified in - // `RecognitionConfig`. 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). - string uri = 2; - } -} - -// The only message returned to the client by `SyncRecognize`. method. It -// contains the result as zero or more sequential `SpeechRecognitionResult` -// messages. -message SyncRecognizeResponse { - // *Output-only* Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// The only message returned to the client by `AsyncRecognize`. It contains the -// result as zero or more sequential `SpeechRecognitionResult` messages. It is -// included in the `result.response` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message AsyncRecognizeResponse { - // *Output-only* Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// Describes the progress of a long-running `AsyncRecognize` call. It is -// included in the `metadata` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message AsyncRecognizeMetadata { - // Approximate percentage of audio processed thus far. Guaranteed to be 100 - // when the audio is fully processed and the results are available. - int32 progress_percent = 1; - - // Time when the request was received. - google.protobuf.Timestamp start_time = 2; - - // Time of the most recent processing update. - google.protobuf.Timestamp last_update_time = 3; -} - -// `StreamingRecognizeResponse` is the only message returned to the client by -// `StreamingRecognize`. A series of one or more `StreamingRecognizeResponse` -// messages are streamed back to the client. -// -// Here's an example of a series of ten `StreamingRecognizeResponse`s that might -// be returned while processing audio: -// -// 1. endpointer_type: START_OF_SPEECH -// -// 2. results { alternatives { transcript: "tube" } stability: 0.01 } -// result_index: 0 -// -// 3. results { alternatives { transcript: "to be a" } stability: 0.01 } -// result_index: 0 -// -// 4. results { alternatives { transcript: "to be" } stability: 0.9 } -// results { alternatives { transcript: " or not to be" } stability: 0.01 } -// result_index: 0 -// -// 5. results { alternatives { transcript: "to be or not to be" -// confidence: 0.92 } -// alternatives { transcript: "to bee or not to bee" } -// is_final: true } -// result_index: 0 -// -// 6. results { alternatives { transcript: " that's" } stability: 0.01 } -// result_index: 1 -// -// 7. results { alternatives { transcript: " that is" } stability: 0.9 } -// results { alternatives { transcript: " the question" } stability: 0.01 } -// result_index: 1 -// -// 8. endpointer_type: END_OF_SPEECH -// -// 9. results { alternatives { transcript: " that is the question" -// confidence: 0.98 } -// alternatives { transcript: " that was the question" } -// is_final: true } -// result_index: 1 -// -// 10. endpointer_type: END_OF_AUDIO -// -// Notes: -// -// - Only two of the above responses #5 and #9 contain final results, they are -// indicated by `is_final: true`. Concatenating these together generates the -// full transcript: "to be or not to be that is the question". -// -// - The others contain interim `results`. #4 and #7 contain two interim -// `results`, the first portion has a high stability and is less likely to -// change, the second portion has a low stability and is very likely to -// change. A UI designer might choose to show only high stability `results`. -// -// - The specific `stability` and `confidence` values shown above are only for -// illustrative purposes. Actual values may vary. -// -// - The `result_index` indicates the portion of audio that has had final -// results returned, and is no longer being processed. For example, the -// `results` in #6 and later correspond to the portion of audio after -// "to be or not to be". -message StreamingRecognizeResponse { - // Indicates the type of endpointer event. - enum EndpointerType { - // No endpointer event specified. - ENDPOINTER_EVENT_UNSPECIFIED = 0; - - // Speech has been detected in the audio stream, and the service is - // beginning to process it. - START_OF_SPEECH = 1; - - // Speech has ceased to be detected in the audio stream. (For example, the - // user may have paused after speaking.) If `single_utterance` is `false`, - // the service will continue to process audio, and if subsequent speech is - // detected, will send another START_OF_SPEECH event. - END_OF_SPEECH = 2; - - // This event is sent after the client has half-closed the input stream gRPC - // connection and the server has received all of the audio. (The server may - // still be processing the audio and may subsequently return additional - // results.) - END_OF_AUDIO = 3; - - // This event is only sent when `single_utterance` is `true`. It 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). The client should stop sending additional audio data, - // half-close the gRPC connection, and wait for any additional results - // until the server closes the gRPC connection. - END_OF_UTTERANCE = 4; - } - - // *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; - - // *Output-only* 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. - repeated StreamingRecognitionResult results = 2; - - // *Output-only* Indicates the lowest index in the `results` array that has - // changed. The repeated `StreamingRecognitionResult` results overwrite past - // results at this index and higher. - int32 result_index = 3; - - // *Output-only* Indicates the type of endpointer event. - EndpointerType endpointer_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 - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; - - // *Output-only* 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 - // 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; -} - -// 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 - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; -} - -// Alternative hypotheses (a.k.a. n-best list). -message SpeechRecognitionAlternative { - // *Output-only* 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 - // 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 even set, in - // any of the results. - // The default of 0.0 is a sentinel value indicating `confidence` was not set. - float confidence = 2; -} diff --git a/google/cloud/speech/v1beta1/cloud_speech_gapic.yaml b/google/cloud/speech/v1beta1/cloud_speech_gapic.yaml deleted file mode 100644 index c7553e156..000000000 --- a/google/cloud/speech/v1beta1/cloud_speech_gapic.yaml +++ /dev/null @@ -1,93 +0,0 @@ -type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 -language_settings: - java: - package_name: com.google.cloud.speech.v1beta1 - python: - package_name: google.cloud.speech_v1beta1.gapic - go: - package_name: cloud.google.com/go/speech/apiv1beta1 - csharp: - package_name: Google.Cloud.Speech.V1Beta1 - ruby: - package_name: Google::Cloud::Speech::V1beta1 - php: - package_name: Google\Cloud\Speech\V1beta1 - nodejs: - package_name: speech.v1beta1 - domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt -interfaces: -- name: google.cloud.speech.v1beta1.Speech - smoke_test: - method: SyncRecognize - init_fields: - - config.language_code="en-US" - - config.sample_rate=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: 190000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 190000 - total_timeout_millis: 600000 - methods: - - name: SyncRecognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio - sample_code_init_fields: - - config.encoding=FLAC - - config.sample_rate=44100 - - audio.uri=gs://bucket_name/file_name.flac - request_object_method: true - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: AsyncRecognize - flattening: - groups: - - parameters: - - config - - audio - required_fields: - - config - - audio - sample_code_init_fields: - - config.encoding=FLAC - - config.sample_rate=44100 - - audio.uri=gs://bucket_name/file_name.flac - request_object_method: true - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - long_running: - return_type: google.cloud.speech.v1beta1.AsyncRecognizeResponse - metadata_type: google.cloud.speech.v1beta1.AsyncRecognizeMetadata - 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: non_idempotent - retry_params_name: default - timeout_millis: 190000 diff --git a/google/cloud/speech/v1p1beta1/BUILD.bazel b/google/cloud/speech/v1p1beta1/BUILD.bazel new file mode 100644 index 000000000..e2001e02f --- /dev/null +++ b/google/cloud/speech/v1p1beta1/BUILD.bazel @@ -0,0 +1,155 @@ +# 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 = "speech_proto", + srcs = [ + "cloud_speech.proto", + ], + deps = [ + "//google/api:annotations_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"], +) + +############################################################################## +# 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 = "speech_java_proto", + deps = [":speech_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.speech.v1p1beta1.SpeechClientTest", +]] + +# Opensource 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 = [ + ":speech_java_proto", + ":speech_proto", + ":speech_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 = "speech_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1", + protos = [":speech_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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", + deps = [ + ":speech_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "speech_go_gapic_test", + srcs = [":speech_go_gapic_srcjar_test"], + embed = [":speech_go_gapic"], + importpath = "cloud.google.com/go/speech/apiv1p1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/speech/v1p1beta1/cloud_speech.proto b/google/cloud/speech/v1p1beta1/cloud_speech.proto index 208f53633..dd557c5fd 100644 --- a/google/cloud/speech/v1p1beta1/cloud_speech.proto +++ b/google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -20,6 +21,7 @@ import "google/api/annotations.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"; @@ -29,7 +31,6 @@ option java_multiple_files = true; option java_outer_classname = "SpeechProto"; option java_package = "com.google.cloud.speech.v1p1beta1"; - // Service that implements Google Cloud Speech API. service Speech { // Performs synchronous speech recognition: receive results after all audio @@ -45,7 +46,8 @@ service Speech { // 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) { + rpc LongRunningRecognize(LongRunningRecognizeRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p1beta1/speech:longrunningrecognize" body: "*" @@ -54,7 +56,8 @@ service Speech { // 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. @@ -98,7 +101,7 @@ message StreamingRecognizeRequest { // `audio_content` data. The audio bytes must be encoded as specified in // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a // pure binary representation (not base64). See - // [audio limits](https://cloud.google.com/speech/limits#content). + // [content limits](/speech-to-text/quotas#content). bytes audio_content = 2; } } @@ -152,7 +155,8 @@ 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; @@ -196,11 +200,17 @@ message RecognitionConfig { // is replaced with a single byte containing the block length. Only Speex // wideband is supported. `sample_rate_hertz` must be 16000. 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. + MP3 = 8; } // 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.v1p1beta1.RecognitionConfig.AudioEncoding]. + // for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. AudioEncoding encoding = 1; // Sample rate in Hertz of the audio data sent in all @@ -209,7 +219,8 @@ message RecognitionConfig { // 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.v1p1beta1.RecognitionConfig.AudioEncoding]. + // 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. @@ -218,36 +229,36 @@ message RecognitionConfig { // Valid values for OGG_OPUS are '1'-'254'. // Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. // If `0` or omitted, defaults to one channel (mono). - // NOTE: We only recognize the first channel by default. + // Note: We only recognize the first channel by default. // To perform independent recognition on each channel set - // enable_separate_recognition_per_channel to 'true'. + // `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. - // NOTE: The request is also billed cumulatively for all channels recognized: - // (audio_channel_count times the audio length) + // 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 + // request is billed cumulatively for all channels recognized: + // `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 // [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) + // See [Language Support](/speech-to-text/docs/languages) // for a list of the currently supported language codes. string language_code = 3; // *Optional* 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](https://cloud.google.com/speech/docs/languages) + // 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 + // 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; @@ -266,7 +277,10 @@ message RecognitionConfig { // won't be filtered out. bool profanity_filter = 5; - // *Optional* A means to provide context to assist the speech recognition. + // *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). repeated SpeechContext speech_contexts = 6; // *Optional* If `true`, the top result includes a list of words and @@ -284,18 +298,20 @@ message RecognitionConfig { // 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 + // 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." + // premium feature. bool enable_automatic_punctuation = 11; // *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 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* @@ -342,16 +358,13 @@ message RecognitionConfig { string model = 13; // *Optional* Set to true to use an enhanced model for speech recognition. - // You must also set the `model` field to a valid, enhanced model. If - // `use_enhanced` is set to true and the `model` field is not set, then - // `use_enhanced` is ignored. If `use_enhanced` is true and an enhanced - // version of the specified model does not exist, then the speech is - // recognized using the standard version of the specified model. + // 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. // - // Enhanced speech models require that you opt-in to the audio logging using - // instructions in the [alpha documentation](/speech/data-sharing). If you set - // `use_enhanced` to true and you have not enabled audio logging, then you - // will receive an error. + // If `use_enhanced` is true and an enhanced version of the specified model + // does not exist, then the speech is recognized using the standard version + // of the specified model. bool use_enhanced = 14; } @@ -494,14 +507,30 @@ message SpeechContext { // 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). + // [usage limits](/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; + + // 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 and 20. We recommend using a binary search approach to + // finding the optimal value for your use case. + float boost = 4; } // 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 -// [audio limits](https://cloud.google.com/speech/limits#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. +// See [content limits](/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. @@ -512,11 +541,13 @@ message RecognitionAudio { bytes content = 1; // URI that points to a file that contains audio data bytes as specified in - // `RecognitionConfig`. Currently, only Google Cloud Storage URIs are + // `RecognitionConfig`. The file must not be compressed (for example, gzip). + // 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; } } @@ -621,8 +652,8 @@ 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. + // 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; // Output only. This repeated list contains zero or more results that @@ -658,6 +689,10 @@ message StreamingRecognitionResult { // 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 + // beginning of the audio. + google.protobuf.Duration result_end_time = 4; + // For multi-channel audio, this is the channel number corresponding to the // recognized result for the audio from that channel. // For audio_channel_count = N, its output values can range from '1' to 'N'. @@ -705,7 +740,7 @@ message SpeechRecognitionAlternative { float confidence = 2; // 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 + // Note: When `enable_speaker_diarization` is true, you will see all the words // from the beginning of the audio. repeated WordInfo words = 3; } @@ -746,5 +781,4 @@ message WordInfo { // speaker_tag is set if enable_speaker_diarization = 'true' and only in the // top alternative. int32 speaker_tag = 5; - } diff --git a/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml new file mode 100644 index 000000000..a5be2cba3 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_adaptation_beta.test.yaml @@ -0,0 +1,9 @@ +test: + suites: + - name: Speech-to-Text Sample Tests For Speech Adaptation + cases: + - name: speech_adaptation_beta + spec: + - call: {sample: speech_adaptation_beta} + - assert_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml new file mode 100644 index 000000000..6525a4beb --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_contexts_classes_beta.test.yaml @@ -0,0 +1,9 @@ +test: + suites: + - name: Speech-to-Text Sample Tests For Speech Contexts Static Classes + cases: + - name: speech_contexts_classes_beta + spec: + - call: {sample: speech_contexts_classes_beta} + - assert_contains: + - literal: "the time is 5:45 p.m." diff --git a/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml new file mode 100644 index 000000000..10ec749de --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_quickstart_beta.test.yaml @@ -0,0 +1,9 @@ +test: + suites: + - name: Speech-to-Text Sample Tests For Quickstart + cases: + - name: speech_quickstart_beta + spec: + - call: {sample: speech_quickstart_beta} + - assert_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml new file mode 100644 index 000000000..cb49b8c76 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.test.yaml @@ -0,0 +1,26 @@ +test: + suites: + - name: Getting punctuation in results (Local File) (Beta) + cases: + + # This sample should default to using commercial_mono.wav + - name: speech_transcribe_auto_punctuation_beta (no arguments) + spec: + - call: + sample: speech_transcribe_auto_punctuation_beta + - assert_contains: + # Simply assert that actual punctuation is present from commercial_mono.wav + - literal: "?" + - literal: "," + - literal: "'" + + # Confirm that another file can be transcribed (use another file) + - name: speech_transcribe_auto_punctuation_beta (--local_file_path) + spec: + - call: + sample: speech_transcribe_auto_punctuation_beta + params: + local_file_path: + literal: "resources/brooklyn_bridge.flac" + - assert_contains: + - literal: "How old is the Brooklyn Bridge?" 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 new file mode 100644 index 000000000..2093ab0d3 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_auto_punctuation_beta.yaml @@ -0,0 +1,34 @@ +samples: +- id: speech_transcribe_auto_punctuation_beta + title: Getting punctuation in results (Local File) (Beta) + 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: + - 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_diarization_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml new file mode 100644 index 000000000..f752efa53 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.test.yaml @@ -0,0 +1,38 @@ +test: + suites: + - name: Separating different speakers (Local File) (LRO) (Beta) + cases: + + # This sample should default to using commercial_mono.wav + - name: speech_transcribe_diarization_beta (no arguments) + spec: + - call: + sample: speech_transcribe_diarization_beta + - assert_contains: + - literal: "Word: Chrome" + # The identifier given to each speaker is non-deterministic. + # For two speakers, it can be 0 and 1, 0 and 2, or other variations. + # + # The example audio file has two speakers, but this test is + # not verifying that greater than one speaker is detected. + - literal: "Speaker tag:" + + # Confirm that another file can be transcribed (use another .flac file) + - name: speech_transcribe_diarization_beta (--local_file_path) + spec: + - call: + sample: speech_transcribe_diarization_beta + params: + local_file_path: + literal: "resources/multi.flac" + - assert_contains: + - literal: "how are you doing" + - literal: "Word: doing" + # The identifier given to each speaker is non-deterministic. + # For two speakers, it can be 0 and 1, 0 and 2, or other variations. + # + # The example audio file has two speakers, but this test is + # not verifying that greater than one speaker is detected. + - literal: "Speaker tag:" + - assert_not_contains: + - literal: "Chrome" diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml new file mode 100644 index 000000000..4e2eb66ba --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_diarization_beta.yaml @@ -0,0 +1,46 @@ +samples: +# TODO: this id should include "async" (calls LongRunningRecognize async rpc) +- 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 + 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: + - 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] diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml new file mode 100644 index 000000000..a9b0dd547 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.test.yaml @@ -0,0 +1,31 @@ +test: + suites: + - name: Detecting language spoken automatically (Local File) (Beta) + cases: + + # This sample should default to using brooklyn_bridge.flac + - name: speech_transcribe_multilanguage_beta (no arguments) + spec: + - call: + sample: speech_transcribe_multilanguage_beta + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + # Note: the primary language_code given was not English, but + # English was provided in the list of alternative_language_codes + - literal: "Detected language: en-us" + + # Confirm that another file can be transcribed (use another .flac file) + - name: speech_transcribe_multilanguage_beta (--local_file_path) + spec: + - call: + sample: speech_transcribe_multilanguage_beta + params: + local_file_path: + literal: "resources/multi.flac" + - assert_contains: + - literal: "how are you doing" + # Note: the primary language_code given was not English, but + # English was provided in the list of alternative_language_codes + - literal: "Detected language: en-us" + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml new file mode 100644 index 000000000..7852d51e8 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_multilanguage_beta.yaml @@ -0,0 +1,37 @@ +samples: +- 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 + 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: + - 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 diff --git a/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml new file mode 100644 index 000000000..7bcf7740c --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.test.yaml @@ -0,0 +1,25 @@ +test: + suites: + - name: Adding recognition metadata (Local File) (Beta) + cases: + + # This sample should default to using commercial_mono.wav + - name: speech_transcribe_recognition_metadata_beta (no arguments) + spec: + - call: + sample: speech_transcribe_recognition_metadata_beta + - assert_contains: + - literal: "Chrome" + + # Confirm that another file can be transcribed (use another file) + - name: speech_transcribe_recognition_metadata_beta (--local_file_path) + spec: + - call: + sample: speech_transcribe_recognition_metadata_beta + params: + local_file_path: + literal: "resources/brooklyn_bridge.flac" + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + - assert_not_contains: + - literal: "Chrome" 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 new file mode 100644 index 000000000..70dba7257 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_recognition_metadata_beta.yaml @@ -0,0 +1,42 @@ +samples: +- 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 + 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: + - 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_word_level_confidence_beta.test.yaml b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml new file mode 100644 index 000000000..d5ab8f18c --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.test.yaml @@ -0,0 +1,33 @@ +test: + suites: + - name: Enabling word-level confidence (Local File) (Beta) + cases: + + # This sample should default to using brooklyn_bridge.flac + - name: speech_transcribe_word_level_confidence_beta (no arguments) + spec: + - call: + sample: speech_transcribe_word_level_confidence_beta + - assert_contains: + - literal: "how old is the Brooklyn Bridge" + - literal: "Word: how" + - literal: "Word: old" + - literal: "Word: is" + - literal: "Confidence: 0." + + # Confirm that another file can be transcribed (use another .flac file) + - name: speech_transcribe_word_level_confidence_beta (--local_file_path) + spec: + - call: + sample: speech_transcribe_word_level_confidence_beta + params: + local_file_path: + literal: "resources/multi.flac" + - assert_contains: + - literal: "how are you doing" + - literal: "Word: how" + - literal: "Word: are" + - literal: "Word: you" + - literal: "Confidence: 0." + - assert_not_contains: + - literal: "how old is the Brooklyn Bridge" 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 new file mode 100644 index 000000000..66978a5d9 --- /dev/null +++ b/google/cloud/speech/v1p1beta1/samples/speech_transcribe_word_level_confidence_beta.yaml @@ -0,0 +1,38 @@ +samples: +- 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 + 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] + - 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] diff --git a/google/cloud/speech/v1p1beta1/speech_gapic.yaml b/google/cloud/speech/v1p1beta1/speech_gapic.yaml index 0ab006e38..d5312d129 100644 --- a/google/cloud/speech/v1p1beta1/speech_gapic.yaml +++ b/google/cloud/speech/v1p1beta1/speech_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. language_settings: java: package_name: com.google.cloud.speech.v1p1beta1 @@ -16,15 +15,8 @@ language_settings: package_name: Google\Cloud\Speech\V1p1beta1 nodejs: package_name: speech.v1p1beta1 -# 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. + domain_layer_location: google-cloud interfaces: - # The fully qualified name of the API interface. - name: google.cloud.speech.v1p1beta1.Speech smoke_test: method: Recognize @@ -34,15 +26,13 @@ interfaces: - config.encoding=FLAC - audio.uri="gs://gapic-toolkit/hello.flac" collections: [] - # 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. retry_params_def: - name: default initial_retry_delay_millis: 100 @@ -67,10 +57,292 @@ interfaces: - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - request_object_method: true 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: @@ -85,7 +357,6 @@ interfaces: - config.sample_rate_hertz=44100 - config.language_code="en-US" - audio.uri=gs://bucket_name/file_name.flac - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -96,8 +367,64 @@ interfaces: 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 - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 1000000 diff --git a/google/cloud/support/common.proto b/google/cloud/support/common.proto index 374d69c1f..3b667e6fb 100644 --- a/google/cloud/support/common.proto +++ b/google/cloud/support/common.proto @@ -23,7 +23,6 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/support/common; option java_outer_classname = "CloudSupportProto"; option java_package = "com.google.cloud.support.common"; - // A Google Cloud Platform account that identifies support eligibility for a // Cloud resource. Currently the Cloud resource can only be an Organization // but this might change in future. diff --git a/google/cloud/support/v1alpha1/cloud_support.proto b/google/cloud/support/v1alpha1/cloud_support.proto index 101298c96..c81bb03f1 100644 --- a/google/cloud/support/v1alpha1/cloud_support.proto +++ b/google/cloud/support/v1alpha1/cloud_support.proto @@ -25,37 +25,48 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/support/v1alpha option java_outer_classname = "CloudSupportProto"; option java_package = "com.google.cloud.support.v1alpha1"; - // Retrieves the list of Google Cloud Platform Support accounts and manages // support cases associated with them. service CloudSupport { // Retrieves the support account details given an account identifier. // The authenticated user calling this method must be the account owner. - rpc GetSupportAccount(GetSupportAccountRequest) returns (google.cloud.support.common.SupportAccount) { - option (google.api.http) = { get: "/v1alpha1/{name=supportAccounts/*}" }; + rpc GetSupportAccount(GetSupportAccountRequest) + returns (google.cloud.support.common.SupportAccount) { + option (google.api.http) = { + get: "/v1alpha1/{name=supportAccounts/*}" + }; } // Retrieves the list of accounts the current authenticated user has access // to. - rpc ListSupportAccounts(ListSupportAccountsRequest) returns (ListSupportAccountsResponse) { - option (google.api.http) = { get: "/v1alpha1/supportAccounts" }; + rpc ListSupportAccounts(ListSupportAccountsRequest) + returns (ListSupportAccountsResponse) { + option (google.api.http) = { + get: "/v1alpha1/supportAccounts" + }; } // Retrieves the details for a support case. The current authenticated user // calling this method must have permissions to view this case. rpc GetCase(GetCaseRequest) returns (google.cloud.support.common.Case) { - option (google.api.http) = { get: "/v1alpha1/{name=supportAccounts/*/cases/*}" }; + option (google.api.http) = { + get: "/v1alpha1/{name=supportAccounts/*/cases/*}" + }; } // Retrieves the list of support cases associated with an account. The current // authenticated user must have the permission to list and view these cases. rpc ListCases(ListCasesRequest) returns (ListCasesResponse) { - option (google.api.http) = { get: "/v1alpha1/{name=supportAccounts/*}/cases" }; + option (google.api.http) = { + get: "/v1alpha1/{name=supportAccounts/*}/cases" + }; } // Lists all comments from a case. rpc ListComments(ListCommentsRequest) returns (ListCommentsResponse) { - option (google.api.http) = { get: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments" }; + option (google.api.http) = { + get: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments" + }; } // Creates a case and associates it with a @@ -63,24 +74,37 @@ service CloudSupport { // authenticated user attempting this action must have permissions to create a // `Case` under that [SupportAccount]. rpc CreateCase(CreateCaseRequest) returns (google.cloud.support.common.Case) { - option (google.api.http) = { post: "/v1alpha1/{parent=supportAccounts/*}/cases" body: "case" }; + option (google.api.http) = { + post: "/v1alpha1/{parent=supportAccounts/*}/cases" + body: "case" + }; } // Updates a support case. Only a small set of details (priority, subject and // cc_address) can be update after a case is created. rpc UpdateCase(UpdateCaseRequest) returns (google.cloud.support.common.Case) { - option (google.api.http) = { patch: "/v1alpha1/{case.name=supportAccounts/*/cases/*}" body: "case" }; + option (google.api.http) = { + patch: "/v1alpha1/{case.name=supportAccounts/*/cases/*}" + body: "case" + }; } // Adds a new comment to a case. - rpc CreateComment(CreateCommentRequest) returns (google.cloud.support.common.Comment) { - option (google.api.http) = { post: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments" body: "comment" }; + rpc CreateComment(CreateCommentRequest) + returns (google.cloud.support.common.Comment) { + option (google.api.http) = { + post: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments" + body: "comment" + }; } // Retrieves the taxonomy of product categories and components to be used // while creating a support case. - rpc GetIssueTaxonomy(GetIssueTaxonomyRequest) returns (google.cloud.support.common.IssueTaxonomy) { - option (google.api.http) = { get: "/v1alpha1:getIssueTaxonomy" }; + rpc GetIssueTaxonomy(GetIssueTaxonomyRequest) + returns (google.cloud.support.common.IssueTaxonomy) { + option (google.api.http) = { + get: "/v1alpha1:getIssueTaxonomy" + }; } } @@ -195,5 +219,4 @@ message CreateCommentRequest { } // The request message for `GetIssueTaxonomy` method. -message GetIssueTaxonomyRequest { -} +message GetIssueTaxonomyRequest {} diff --git a/google/cloud/talent/artman_talent_v4beta1.yaml b/google/cloud/talent/artman_talent_v4beta1.yaml new file mode 100644 index 000000000..5cdcce085 --- /dev/null +++ b/google/cloud/talent/artman_talent_v4beta1.yaml @@ -0,0 +1,36 @@ +# The API producer can manually edit it. Remove all the FIXMEs +# before sending this file out for review. +common: + api_name: talent + api_version: v4beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v4beta1 + service_yaml: talent_v4beta1.yaml + gapic_yaml: v4beta1/talent_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/talent/talent_v4beta1.yaml b/google/cloud/talent/talent_v4beta1.yaml new file mode 100644 index 000000000..01a300b79 --- /dev/null +++ b/google/cloud/talent/talent_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/application.proto b/google/cloud/talent/v4beta1/application.proto new file mode 100644 index 000000000..30ce2fed8 --- /dev/null +++ b/google/cloud/talent/v4beta1/application.proto @@ -0,0 +1,176 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/talent/v4beta1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "ApplicationResourceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// Resource that represents a job application record of a candidate. +message Application { + // Enum that represents the application status. + enum ApplicationState { + // Default value. + APPLICATION_STATE_UNSPECIFIED = 0; + + // The current stage is in progress or pending, for example, interviews in + // progress. + IN_PROGRESS = 1; + + // The current stage was terminated by a candidate decision. + CANDIDATE_WITHDREW = 2; + + // The current stage was terminated by an employer or agency decision. + EMPLOYER_WITHDREW = 3; + + // The current stage is successfully completed, but the next stage (if + // applicable) has not begun. + COMPLETED = 4; + + // The current stage was closed without an exception, or terminated for + // reasons unrealated to the candidate. + CLOSED = 5; + } + + // The stage of the application. + enum ApplicationStage { + // Default value. + APPLICATION_STAGE_UNSPECIFIED = 0; + + // Candidate has applied or a recruiter put candidate into consideration but + // candidate is not yet screened / no decision has been made to move or not + // move the candidate to the next stage. + NEW = 1; + + // A recruiter decided to screen the candidate for this role. + SCREEN = 2; + + // Candidate is being / was sent to the customer / hiring manager for + // detailed review. + HIRING_MANAGER_REVIEW = 3; + + // Candidate was approved by the client / hiring manager and is being / was + // interviewed for the role. + INTERVIEW = 4; + + // Candidate will be / has been given an offer of employment. + OFFER_EXTENDED = 5; + + // Candidate has accepted their offer of employment. + OFFER_ACCEPTED = 6; + + // Candidate has begun (or completed) their employment or assignment with + // the employer. + STARTED = 7; + } + + // Required during application update. + // + // 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". + 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; + + // 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; + + // One of either a job or a company is 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; + + // 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; + + // Optional. 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; + + // Optional. 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, + // timestamp, feedback, and so on). + repeated Interview interviews = 16; + + // Optional. 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; + + // Optional. 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). + // + // Number of characters allowed is 100. + string outcome_notes = 21; + + // Optional. 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; + + // 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; +} diff --git a/google/cloud/talent/v4beta1/application_service.proto b/google/cloud/talent/v4beta1/application_service.proto new file mode 100644 index 000000000..48e4f9500 --- /dev/null +++ b/google/cloud/talent/v4beta1/application_service.proto @@ -0,0 +1,169 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/talent/v4beta1/application.proto"; +import "google/cloud/talent/v4beta1/common.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "ApplicationServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service that handles application management, including CRUD and +// enumeration. +service ApplicationService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new application entity. + rpc CreateApplication(CreateApplicationRequest) returns (Application) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications" + body: "*" + }; + } + + // Retrieves specified application. + rpc GetApplication(GetApplicationRequest) returns (Application) { + option (google.api.http) = { + get: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}" + }; + } + + // Updates specified application. + rpc UpdateApplication(UpdateApplicationRequest) returns (Application) { + option (google.api.http) = { + patch: "/v4beta1/{application.name=projects/*/tenants/*/profiles/*/applications/*}" + body: "*" + }; + } + + // Deletes specified application. + rpc DeleteApplication(DeleteApplicationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}" + }; + } + + // Lists all applications associated with the profile. + rpc ListApplications(ListApplicationsRequest) + returns (ListApplicationsResponse) { + option (google.api.http) = { + get: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications" + }; + } +} + +// The Request of the CreateApplication method. +message CreateApplicationRequest { + // 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; + + // Required. The application to be created. + Application application = 2; +} + +// Request for getting a application by name. +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; +} + +// Request for updating a specified application. +message UpdateApplicationRequest { + // Required. The application resource to replace the current resource in the + // system. + Application application = 1; + + // Optional but 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. + // + // A field mask to specify the application fields to be updated. Only + // top level fields of [Application][google.cloud.talent.v4beta1.Application] + // are supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete a application. +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; +} + +// List applications for which the client has ACL visibility. +message ListApplicationsRequest { + // 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. + string page_token = 2; + + // Optional. 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. + repeated Application applications = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} diff --git a/google/cloud/talent/v4beta1/batch.proto b/google/cloud/talent/v4beta1/batch.proto new file mode 100644 index 000000000..5eeeff57c --- /dev/null +++ b/google/cloud/talent/v4beta1/batch.proto @@ -0,0 +1,121 @@ +// 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.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 new file mode 100644 index 000000000..1513d795c --- /dev/null +++ b/google/cloud/talent/v4beta1/common.proto @@ -0,0 +1,1006 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/date.proto"; +import "google/type/latlng.proto"; +import "google/type/money.proto"; +import "google/type/postal_address.proto"; +import "google/type/timeofday.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// Message representing a period of time between two timestamps. +message TimestampRange { + // Begin of the period (inclusive). + google.protobuf.Timestamp start_time = 1; + + // End of the period (exclusive). + google.protobuf.Timestamp end_time = 2; +} + +// Output only. A resource that represents a location with full geographic +// information. +message Location { + // An enum which represents the type of a location. + enum LocationType { + // Default value if the type isn't specified. + LOCATION_TYPE_UNSPECIFIED = 0; + + // A country level location. + COUNTRY = 1; + + // A state or equivalent level location. + ADMINISTRATIVE_AREA = 2; + + // A county or equivalent level location. + SUB_ADMINISTRATIVE_AREA = 3; + + // A city or equivalent level location. + LOCALITY = 4; + + // A postal code level location. + POSTAL_CODE = 5; + + // A sublocality is a subdivision of a locality, for example a city borough, + // ward, or arrondissement. Sublocalities are usually recognized by a local + // political authority. For example, Manhattan and Brooklyn are recognized + // as boroughs by the City of New York, and are therefore modeled as + // sublocalities. + SUB_LOCALITY = 6; + + // A district or equivalent level location. + SUB_LOCALITY_1 = 7; + + // A smaller district or equivalent level display. + SUB_LOCALITY_2 = 8; + + // A neighborhood level location. + NEIGHBORHOOD = 9; + + // A street address level location. + STREET_ADDRESS = 10; + } + + // 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]. + LocationType location_type = 1; + + // Postal address of the location that includes human readable information, + // such as postal delivery and payments addresses. Given a postal address, + // a postal service can deliver items to a premises, P.O. Box, or other + // delivery location. + google.type.PostalAddress postal_address = 2; + + // An object representing a latitude/longitude pair. + google.type.LatLng lat_lng = 3; + + // 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. + double radius_miles = 4; +} + +// An enum that represents the size of the company. +enum CompanySize { + // Default value if the size isn't specified. + COMPANY_SIZE_UNSPECIFIED = 0; + + // The company has less than 50 employees. + MINI = 1; + + // The company has between 50 and 99 employees. + SMALL = 2; + + // The company has between 100 and 499 employees. + SMEDIUM = 3; + + // The company has between 500 and 999 employees. + MEDIUM = 4; + + // The company has between 1,000 and 4,999 employees. + BIG = 5; + + // The company has between 5,000 and 9,999 employees. + BIGGER = 6; + + // The company has 10,000 or more employees. + GIANT = 7; +} + +// An enum that represents employee benefits included with the job. +enum JobBenefit { + // Default value if the type isn't specified. + JOB_BENEFIT_UNSPECIFIED = 0; + + // The job includes access to programs that support child care, such + // as daycare. + CHILD_CARE = 1; + + // The job includes dental services covered by a dental + // insurance plan. + DENTAL = 2; + + // The job offers specific benefits to domestic partners. + DOMESTIC_PARTNER = 3; + + // The job allows for a flexible work schedule. + FLEXIBLE_HOURS = 4; + + // The job includes health services covered by a medical insurance plan. + MEDICAL = 5; + + // The job includes a life insurance plan provided by the employer or + // available for purchase by the employee. + LIFE_INSURANCE = 6; + + // The job allows for a leave of absence to a parent to care for a newborn + // child. + PARENTAL_LEAVE = 7; + + // The job includes a workplace retirement plan provided by the + // employer or available for purchase by the employee. + RETIREMENT_PLAN = 8; + + // The job allows for paid time off due to illness. + SICK_DAYS = 9; + + // The job includes paid time off for vacation. + VACATION = 10; + + // The job includes vision services covered by a vision + // insurance plan. + VISION = 11; +} + +// Educational degree level defined in International Standard Classification +// of Education (ISCED). +enum DegreeType { + // Default value. Represents no degree, or early childhood education. + // Maps to ISCED code 0. + // Ex) Kindergarten + DEGREE_TYPE_UNSPECIFIED = 0; + + // Primary education which is typically the first stage of compulsory + // education. ISCED code 1. + // Ex) Elementary school + PRIMARY_EDUCATION = 1; + + // Lower secondary education; First stage of secondary education building on + // primary education, typically with a more subject-oriented curriculum. + // ISCED code 2. + // Ex) Middle school + LOWER_SECONDARY_EDUCATION = 2; + + // Middle education; Second/final stage of secondary education preparing for + // tertiary education and/or providing skills relevant to employment. + // Usually with an increased range of subject options and streams. ISCED + // code 3. + // Ex) High school + UPPER_SECONDARY_EDUCATION = 3; + + // Adult Remedial Education; Programmes providing learning experiences that + // build on secondary education and prepare for labour market entry and/or + // tertiary education. The content is broader than secondary but not as + // complex as tertiary education. ISCED code 4. + ADULT_REMEDIAL_EDUCATION = 4; + + // Associate's or equivalent; Short first tertiary programmes that are + // typically practically-based, occupationally-specific and prepare for + // labour market entry. These programmes may also provide a pathway to other + // tertiary programmes. ISCED code 5. + ASSOCIATES_OR_EQUIVALENT = 5; + + // Bachelor's or equivalent; Programmes designed to provide intermediate + // academic and/or professional knowledge, skills and competencies leading + // to a first tertiary degree or equivalent qualification. ISCED code 6. + BACHELORS_OR_EQUIVALENT = 6; + + // Master's or equivalent; Programmes designed to provide advanced academic + // and/or professional knowledge, skills and competencies leading to a + // second tertiary degree or equivalent qualification. ISCED code 7. + MASTERS_OR_EQUIVALENT = 7; + + // Doctoral or equivalent; Programmes designed primarily to lead to an + // advanced research qualification, usually concluding with the submission + // and defense of a substantive dissertation of publishable quality based on + // original research. ISCED code 8. + DOCTORAL_OR_EQUIVALENT = 8; +} + +// An enum that represents the employment type of a job. +enum EmploymentType { + // The default value if the employment type isn't specified. + EMPLOYMENT_TYPE_UNSPECIFIED = 0; + + // The job requires working a number of hours that constitute full + // time employment, typically 40 or more hours per week. + FULL_TIME = 1; + + // The job entails working fewer hours than a full time job, + // typically less than 40 hours a week. + PART_TIME = 2; + + // The job is offered as a contracted, as opposed to a salaried employee, + // position. + CONTRACTOR = 3; + + // 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. + CONTRACT_TO_HIRE = 4; + + // The job is offered as a temporary employment opportunity, usually + // a short-term engagement. + TEMPORARY = 5; + + // The job is a fixed-term opportunity for students or entry-level job + // seekers to obtain on-the-job training, typically offered as a summer + // position. + INTERN = 6; + + // The is an opportunity for an individual to volunteer, where there's no + // expectation of compensation for the provided services. + VOLUNTEER = 7; + + // The job requires an employee to work on an as-needed basis with a + // flexible schedule. + PER_DIEM = 8; + + // The job involves employing people in remote areas and flying them + // temporarily to the work site instead of relocating employees and their + // families permanently. + FLY_IN_FLY_OUT = 9; + + // The job does not fit any of the other listed types. + OTHER_EMPLOYMENT_TYPE = 10; +} + +// An enum that represents the required experience level required for the job. +enum JobLevel { + // The default value if the level isn't specified. + JOB_LEVEL_UNSPECIFIED = 0; + + // Entry-level individual contributors, typically with less than 2 years of + // experience in a similar role. Includes interns. + ENTRY_LEVEL = 1; + + // Experienced individual contributors, typically with 2+ years of + // experience in a similar role. + EXPERIENCED = 2; + + // Entry- to mid-level managers responsible for managing a team of people. + MANAGER = 3; + + // Senior-level managers responsible for managing teams of managers. + DIRECTOR = 4; + + // Executive-level managers and above, including C-level positions. + EXECUTIVE = 5; +} + +// An enum that represents the categorization or primary focus of specific +// role. This value is different than the "industry" associated with a role, +// which is related to the categorization of the company listing the job. +enum JobCategory { + // The default value if the category isn't specified. + JOB_CATEGORY_UNSPECIFIED = 0; + + // An accounting and finance job, such as an Accountant. + ACCOUNTING_AND_FINANCE = 1; + + // An administrative and office job, such as an Administrative Assistant. + ADMINISTRATIVE_AND_OFFICE = 2; + + // An advertising and marketing job, such as Marketing Manager. + ADVERTISING_AND_MARKETING = 3; + + // An animal care job, such as Veterinarian. + ANIMAL_CARE = 4; + + // An art, fashion, or design job, such as Designer. + ART_FASHION_AND_DESIGN = 5; + + // A business operations job, such as Business Operations Manager. + BUSINESS_OPERATIONS = 6; + + // A cleaning and facilities job, such as Custodial Staff. + CLEANING_AND_FACILITIES = 7; + + // A computer and IT job, such as Systems Administrator. + COMPUTER_AND_IT = 8; + + // A construction job, such as General Laborer. + CONSTRUCTION = 9; + + // A customer service job, such s Cashier. + CUSTOMER_SERVICE = 10; + + // An education job, such as School Teacher. + EDUCATION = 11; + + // An entertainment and travel job, such as Flight Attendant. + ENTERTAINMENT_AND_TRAVEL = 12; + + // A farming or outdoor job, such as Park Ranger. + FARMING_AND_OUTDOORS = 13; + + // A healthcare job, such as Registered Nurse. + HEALTHCARE = 14; + + // A human resources job, such as Human Resources Director. + HUMAN_RESOURCES = 15; + + // An installation, maintenance, or repair job, such as Electrician. + INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + + // A legal job, such as Law Clerk. + LEGAL = 17; + + // A management job, often used in conjunction with another category, + // such as Store Manager. + MANAGEMENT = 18; + + // A manufacturing or warehouse job, such as Assembly Technician. + MANUFACTURING_AND_WAREHOUSE = 19; + + // A media, communications, or writing job, such as Media Relations. + MEDIA_COMMUNICATIONS_AND_WRITING = 20; + + // An oil, gas or mining job, such as Offshore Driller. + OIL_GAS_AND_MINING = 21; + + // A personal care and services job, such as Hair Stylist. + PERSONAL_CARE_AND_SERVICES = 22; + + // A protective services job, such as Security Guard. + PROTECTIVE_SERVICES = 23; + + // A real estate job, such as Buyer's Agent. + REAL_ESTATE = 24; + + // A restaurant and hospitality job, such as Restaurant Server. + RESTAURANT_AND_HOSPITALITY = 25; + + // A sales and/or retail job, such Sales Associate. + SALES_AND_RETAIL = 26; + + // A science and engineering job, such as Lab Technician. + SCIENCE_AND_ENGINEERING = 27; + + // A social services or non-profit job, such as Case Worker. + SOCIAL_SERVICES_AND_NON_PROFIT = 28; + + // A sports, fitness, or recreation job, such as Personal Trainer. + SPORTS_FITNESS_AND_RECREATION = 29; + + // A transportation or logistics job, such as Truck Driver. + TRANSPORTATION_AND_LOGISTICS = 30; +} + +// An enum that represents the job posting region. In most cases, job postings +// don't need to specify a region. If a region is given, jobs are +// eligible for searches in the specified region. +enum PostingRegion { + // If the region is unspecified, the job is only returned if it + // matches the [LocationFilter][google.cloud.talent.v4beta1.LocationFilter]. + 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". + // + // Administrative area refers to top-level administrative subdivision of this + // country. For example, US state, IT region, UK constituent nation and + // JP prefecture. + 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'. + NATION = 2; + + // Job allows employees to work remotely (telecommute). + // If locations are provided with this value, the job is + // considered as having a location, but telecommuting is allowed. + TELECOMMUTE = 3; +} + +// An enum that represents who has view access to the resource. +enum Visibility { + // Default value. + VISIBILITY_UNSPECIFIED = 0; + + // The resource is only visible to the GCP account who owns it. + ACCOUNT_ONLY = 1; + + // The resource is visible to the owner and may be visible to other + // applications and processes at Google. + SHARED_WITH_GOOGLE = 2; + + // The resource is visible to the owner and may be visible to all other API + // clients. + SHARED_WITH_PUBLIC = 3; +} + +// Enum that represents the usage of the contact information. +enum ContactInfoUsage { + // Default value. + CONTACT_INFO_USAGE_UNSPECIFIED = 0; + + // Personal use. + PERSONAL = 1; + + // Work use. + WORK = 2; + + // School use. + 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. +enum HtmlSanitization { + // Default value. + HTML_SANITIZATION_UNSPECIFIED = 0; + + // Disables sanitization on HTML input. + HTML_SANITIZATION_DISABLED = 1; + + // Sanitizes HTML input, only accepts bold, italic, ordered list, and + // unordered list markup tags. + SIMPLE_FORMATTING_ONLY = 2; +} + +// Method for commute. +enum CommuteMethod { + // Commute method isn't specified. + COMMUTE_METHOD_UNSPECIFIED = 0; + + // Commute time is calculated based on driving time. + DRIVING = 1; + + // Commute time is calculated based on public transit including bus, metro, + // subway, and so on. + TRANSIT = 2; + + // Commute time is calculated based on walking time. + WALKING = 3; + + // Commute time is calculated based on biking time. + 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`. + // + // The client-defined scope or source of the service call, which typically + // is the domain on + // which the service has been implemented and is currently being run. + // + // For example, if the service is being run by client Foo, Inc., on + // job board www.foo.com and career site www.bar.com, then this field is + // set to "foo.com" for use on the job board, and "bar.com" for use on the + // career site. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique domain. + // + // 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`. + // + // A unique session identification string. A session is defined as the + // duration of an end user's interaction with the service over a certain + // period. + // Obfuscate this field for privacy concerns before + // providing it to the service. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique session ID. + // + // 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`. + // + // A unique user identification string, as determined by the client. + // To have the strongest positive impact on search quality + // make sure the client-level is unique. + // Obfuscate this field for privacy concerns before + // providing it to the service. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique user ID. + // + // 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. + bool allow_missing_ids = 4; + + // Optional. 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. +message ResponseMetadata { + // A unique id associated with this call. + // This id is logged for tracking purposes. + string request_id = 1; +} + +// Device information collected from the job seeker, candidate, or +// other entity conducting the job search. Providing this information improves +// the quality of the search results across devices. +message DeviceInfo { + // An enumeration describing an API access portal and exposure mechanism. + enum DeviceType { + // The device type isn't specified. + DEVICE_TYPE_UNSPECIFIED = 0; + + // A desktop web browser, such as, Chrome, Firefox, Safari, or Internet + // Explorer) + WEB = 1; + + // A mobile device web browser, such as a phone or tablet with a Chrome + // browser. + MOBILE_WEB = 2; + + // An Android device native application. + ANDROID = 3; + + // An iOS device native application. + IOS = 4; + + // A bot, as opposed to a device operated by human beings, such as a web + // crawler. + BOT = 5; + + // Other devices types. + OTHER = 6; + } + + // Optional. Type of the device. + DeviceType device_type = 1; + + // Optional. 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. + // + // 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 + // 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. + // + // 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. + repeated int64 long_values = 2; + + // Optional. 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. +message SpellingCorrection { + // Indicates if the query was corrected by the spell checker. + bool corrected = 1; + + // Correction output consisting of the corrected keyword string. + string corrected_text = 2; + + // Corrected output with html tags to highlight the corrected words. + // Corrected words are called out with the "..." html tags. + // + // For example, the user input query is "software enginear", where the second + // word, "enginear," is incorrect. It should be "engineer". When spelling + // correction is enabled, this value is + // "software engineer". + string corrected_html = 3; +} + +// Job compensation details. +message CompensationInfo { + // A compensation entry that represents one component of compensation, such + // 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 + // [expected_units_per_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected_units_per_year]. + message CompensationEntry { + // Optional. Compensation type. + // + // Default is + // [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + CompensationType type = 1; + + // Optional. Frequency of the specified amount. + // + // 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. + google.type.Money amount = 3; + + // Optional. Compensation range. + CompensationRange range = 4; + } + + // Optional. 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: + // - HOURLY: 2080 + // - DAILY: 260 + // - WEEKLY: 52 + // - MONTHLY: 12 + // - ANNUAL: 1 + google.protobuf.DoubleValue expected_units_per_year = 6; + } + + // 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. + 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. + 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]. + // + // 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] + // (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. + enum CompensationType { + // Default value. + COMPENSATION_TYPE_UNSPECIFIED = 0; + + // Base compensation: Refers to the fixed amount of money paid to an + // employee by an employer in return for work performed. Base compensation + // does not include benefits, bonuses or any other potential compensation + // from an employer. + BASE = 1; + + // Bonus. + BONUS = 2; + + // Signing bonus. + SIGNING_BONUS = 3; + + // Equity. + EQUITY = 4; + + // Profit sharing. + PROFIT_SHARING = 5; + + // Commission. + COMMISSIONS = 6; + + // Tips. + TIPS = 7; + + // Other compensation type. + OTHER_COMPENSATION_TYPE = 8; + } + + // Pay frequency. + enum CompensationUnit { + // Default value. + COMPENSATION_UNIT_UNSPECIFIED = 0; + + // Hourly. + HOURLY = 1; + + // Daily. + DAILY = 2; + + // Weekly + WEEKLY = 3; + + // Monthly. + MONTHLY = 4; + + // Yearly. + YEARLY = 5; + + // One time. + ONE_TIME = 6; + + // Other compensation units. + OTHER_COMPENSATION_UNIT = 7; + } + + // Optional. 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. + 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 + // [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; + + // 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; +} + +// Resource that represents a license or certification. +message Certification { + // Optional. 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. + google.type.Date acquire_date = 2; + + // Optional. Expiration date of license of certification. + google.type.Date expire_date = 3; + + // Optional. Authority of license, such as government. + // + // Number of characters allowed is 100. + string authority = 4; + + // Optional. Description of license or certification. + // + // Number of characters allowed is 100,000. + string description = 5; +} + +// Resource that represents a skill of a candidate. +message Skill { + // Optional. 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. + google.type.Date last_used_date = 2; + + // Optional. Skill proficiency level which indicates how proficient the + // candidate is at this skill. + SkillProficiencyLevel level = 3; + + // Optional. 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; +} + +// Details of an interview. +message Interview { + // Optional. The rating on this interview. + Rating rating = 6; + + // Required. The overall decision resulting from this interview (positive, + // negative, nuetral). + Outcome outcome = 7; +} + +// The details of the score received for an assessment or interview. +message Rating { + // Overall score. + double overall = 1; + + // The minimum value for the score. + double min = 2; + + // The maximum value for the score. + double max = 3; + + // The steps within the score (for example, interval = 1 max = 5 + // min = 1 indicates that the score can be 1, 2, 3, 4, or 5) + double interval = 4; +} + +// Enum that represents the skill proficiency level. +enum SkillProficiencyLevel { + // Default value. + SKILL_PROFICIENCY_LEVEL_UNSPECIFIED = 0; + + // Lacks any proficiency in this skill. + UNSKILLED = 6; + + // Have a common knowledge or an understanding of basic techniques and + // concepts. + FUNDAMENTAL_AWARENESS = 1; + + // Have the level of experience gained in a classroom and/or experimental + // scenarios or as a trainee on-the-job. + NOVICE = 2; + + // Be able to successfully complete tasks in this skill as requested. Help + // from an expert may be required from time to time, but can usually perform + // skill independently. + INTERMEDIATE = 3; + + // Can perform the actions associated with this skill without assistance. + ADVANCED = 4; + + // Known as an expert in this area. + EXPERT = 5; +} + +// The overall outcome /decision / result indicator. +enum Outcome { + // Default value. + OUTCOME_UNSPECIFIED = 0; + + // A positive outcome / passing indicator (for example, candidate was + // recommended for hiring or to be moved forward in the hiring process, + // candidate passed a test). + POSITIVE = 1; + + // A neutral outcome / no clear indicator (for example, no strong + // reccommendation either to move forward / not move forward, neutral score). + NEUTRAL = 2; + + // A negative outcome / failing indicator (for example, candidate was + // recommended to NOT move forward in the hiring process, failed a test). + NEGATIVE = 3; + + // The assessment outcome is not available or otherwise unknown (for example, + // candidate did not complete assessment). + OUTCOME_NOT_AVAILABLE = 4; +} diff --git a/google/cloud/talent/v4beta1/company.proto b/google/cloud/talent/v4beta1/company.proto new file mode 100644 index 000000000..928a43822 --- /dev/null +++ b/google/cloud/talent/v4beta1/company.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.cloud.talent.v4beta1; + +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; +option java_outer_classname = "CompanyResourceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A Company resource represents a company in the service. A company is the +// entity that owns job postings, that is, the hiring entity responsible for +// employing applicants for the job position. +message 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. + Location headquarters_location = 1; + } + + // Required during company update. + // + // The resource name for a company. This is generated by the service when a + // company is created. + // + // 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 name = 1; + + // Required. The display name of the company, for example, "Google, LLC". + string display_name = 2; + + // Required. Client side company identifier, used to uniquely identify the + // company. + // + // The maximum number of allowed characters is 255. + string external_id = 3; + + // Optional. 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]. + string headquarters_address = 5; + + // Optional. 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 + // 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, + // 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". + string career_site_uri = 9; + + // Optional. 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 + // `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 those keyword queries must be surrounded by quotes. + repeated string keyword_searchable_job_custom_attributes = 11; + + // Output only. Derived details about the company. + DerivedInfo derived_info = 12; + + // 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; +} diff --git a/google/cloud/talent/v4beta1/company_service.proto b/google/cloud/talent/v4beta1/company_service.proto new file mode 100644 index 000000000..1e48a46cd --- /dev/null +++ b/google/cloud/talent/v4beta1/company_service.proto @@ -0,0 +1,193 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/talent/v4beta1/common.proto"; +import "google/cloud/talent/v4beta1/company.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "CompanyServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service that handles company management, including CRUD and enumeration. +service CompanyService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new company entity. + rpc CreateCompany(CreateCompanyRequest) returns (Company) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/companies" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/companies" + body: "*" + } + }; + } + + // 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/*}" } + }; + } + + // Updates specified company. + rpc UpdateCompany(UpdateCompanyRequest) returns (Company) { + option (google.api.http) = { + patch: "/v4beta1/{company.name=projects/*/tenants/*/companies/*}" + body: "*" + additional_bindings { + patch: "/v4beta1/{company.name=projects/*/companies/*}" + body: "*" + } + }; + } + + // Deletes specified company. + // Prerequisite: The company has no jobs associated with it. + rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4beta1/{name=projects/*/tenants/*/companies/*}" + additional_bindings { delete: "/v4beta1/{name=projects/*/companies/*}" } + }; + } + + // 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" } + }; + } +} + +// The Request of the CreateCompany method. +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; + + // Required. The company to be created. + Company company = 2; +} + +// Request for getting a company by name. +message GetCompanyRequest { + // Required. The resource name of the company to be retrieved. + // + // 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 name = 1; +} + +// Request for updating a specified company. +message UpdateCompanyRequest { + // Required. The company resource to replace the current resource in the + // system. + Company company = 1; + + // Optional but 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. + // + // A field mask to specify the company fields to be updated. Only + // top level fields of [Company][google.cloud.talent.v4beta1.Company] are + // supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete a company. +message DeleteCompanyRequest { + // Required. The resource name of the company to be deleted. + // + // 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 name = 1; +} + +// List companies for which the client has ACL visibility. +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". + // + // 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. + string page_token = 2; + + // Optional. 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. + // + // 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. + bool require_open_jobs = 4; +} + +// Output only. +// +// The List companies response object. +message ListCompaniesResponse { + // Companies for the current client. + repeated Company companies = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} diff --git a/google/cloud/talent/v4beta1/completion_service.proto b/google/cloud/talent/v4beta1/completion_service.proto new file mode 100644 index 000000000..2b105c24b --- /dev/null +++ b/google/cloud/talent/v4beta1/completion_service.proto @@ -0,0 +1,170 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.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; +option java_outer_classname = "CompletionServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service handles auto completion. +service Completion { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Completes the specified prefix with keyword suggestions. + // Intended for use by a job search auto-complete search box. + rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { + option (google.api.http) = { + get: "/v4beta1/{parent=projects/*/tenants/*}:complete" + additional_bindings { get: "/v4beta1/{parent=projects/*}:complete" } + }; + } +} + +// Input only. +// +// Auto-complete parameters. +message CompleteQueryRequest { + // Enum to specify the scope of completion. + enum CompletionScope { + // Default value. + COMPLETION_SCOPE_UNSPECIFIED = 0; + + // Suggestions are based only on the data provided by the client. + TENANT = 1; + + // Suggestions are based on all jobs data in the system that's visible to + // the client + PUBLIC = 2; + } + + // Enum to specify auto-completion topics. + enum CompletionType { + // Default value. + COMPLETION_TYPE_UNSPECIFIED = 0; + + // Only suggest job titles. + JOB_TITLE = 1; + + // Only suggest company names. + COMPANY_NAME = 2; + + // Suggest both job titles and company names. + 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". + // + // Tenant id is optional and the default tenant is used if unspecified, for + // example, "projects/api-test-project". + string parent = 1; + + // Required. The query used to generate suggestions. + // + // The maximum number of allowed characters is 255. + string query = 2; + + // Optional. 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; + + // Optional. 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". + // + // Tenant id is optional and the default tenant is used if unspecified, for + // example, "projects/api-test-project/companies/bar". + string company = 5; + + // Optional. 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]. + 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. + string suggestion = 1; + + // The completion topic. + CompleteQueryRequest.CompletionType type = 2; + + // The URI of the company image for + // [COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + string image_uri = 3; + } + + // Results of the matching job/company candidates. + repeated CompletionResult completion_results = 1; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 2; +} diff --git a/google/cloud/talent/v4beta1/event.proto b/google/cloud/talent/v4beta1/event.proto new file mode 100644 index 000000000..c8ea12581 --- /dev/null +++ b/google/cloud/talent/v4beta1/event.proto @@ -0,0 +1,303 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "EventProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// An event issued when an end user interacts with the application that +// implements Cloud Talent Solution. Providing this information improves the +// quality of results for the API clients, enabling the +// 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. + // + // 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; + + // Required. The timestamp of the event. + google.protobuf.Timestamp create_time = 4; + + // Required. + // + // The detail information of a specific event type. + oneof event { + // An event issued when a job seeker interacts with the application that + // implements Cloud Talent Solution. + JobEvent job_event = 5; + + // An event issued when a profile searcher interacts with the application + // that implements Cloud Talent Solution. + ProfileEvent profile_event = 6; + } + + // Optional. Notes about the event provided by recruiters or other users, for + // example, feedback on why a profile was bookmarked. + string event_notes = 9; +} + +// An event issued when a job seeker interacts with the application that +// implements Cloud Talent Solution. +message JobEvent { + // An enumeration of an event attributed to the behavior of the end user, + // such as a job seeker. + enum JobEventType { + // The event is unspecified by other provided values. + JOB_EVENT_TYPE_UNSPECIFIED = 0; + + // The job seeker or other entity interacting with the service has + // had a job rendered in their view, such as in a list of search results in + // a compressed or clipped format. This event is typically associated with + // the viewing of a jobs list on a single page by a job seeker. + IMPRESSION = 1; + + // The job seeker, or other entity interacting with the service, has + // viewed the details of a job, including the full description. This + // event doesn't apply to the viewing a snippet of a job appearing as a + // part of the job search results. Viewing a snippet is associated with an + // [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]). + VIEW = 2; + + // The job seeker or other entity interacting with the service + // performed an action to view a job and was redirected to a different + // website for job. + VIEW_REDIRECT = 3; + + // The job seeker or other entity interacting with the service + // began the process or demonstrated the intention of applying for a job. + APPLICATION_START = 4; + + // The job seeker or other entity interacting with the service + // submitted an application for a job. + APPLICATION_FINISH = 5; + + // The job seeker or other entity interacting with the service + // 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] + // events. + APPLICATION_QUICK_SUBMISSION = 6; + + // The job seeker or other entity interacting with the service + // performed an action to apply to a job and was redirected to a different + // website to complete the application. + APPLICATION_REDIRECT = 7; + + // The job seeker or other entity interacting with the service began the + // process or demonstrated the intention of applying for a job from the + // search results page without viewing the details of the job posting. + // If sending this event, JobEventType.VIEW event shouldn't be sent. + APPLICATION_START_FROM_SEARCH = 8; + + // The job seeker, or other entity interacting with the service, performs an + // action with a single click from the search results page to apply to a job + // (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. + APPLICATION_REDIRECT_FROM_SEARCH = 9; + + // This event should be used when a company submits an application + // on behalf of a job seeker. This event is intended for use by staffing + // agencies attempting to place candidates. + APPLICATION_COMPANY_SUBMIT = 10; + + // The job seeker or other entity interacting with the service demonstrated + // an interest in a job by bookmarking or saving it. + BOOKMARK = 11; + + // The job seeker or other entity interacting with the service was + // sent a notification, such as an email alert or device notification, + // containing one or more jobs listings generated by the service. + NOTIFICATION = 12; + + // The job seeker or other entity interacting with the service was + // employed by the hiring entity (employer). Send this event + // only if the job seeker was hired through an application that was + // initiated by a search conducted through the Cloud Talent Solution + // service. + HIRED = 13; + + // A recruiter or staffing agency submitted an application on behalf of the + // candidate after interacting with the service to identify a suitable job + // posting. + SENT_CV = 14; + + // The entity interacting with the service (for example, the job seeker), + // was granted an initial interview by the hiring entity (employer). This + // event should only be sent if the job seeker was granted an interview as + // part of an application that was initiated by a search conducted through / + // recommendation provided by the Cloud Talent Solution service. + 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. + // + // 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; + + // Optional. 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". + string profile = 3; +} + +// An event issued when a profile searcher interacts with the application +// that implements Cloud Talent Solution. +message ProfileEvent { + // The enum represents types of client events for a candidate profile. + enum ProfileEventType { + // 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. + 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. + // + // 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. + // + // 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. + BOOKMARK = 3; + } + + // Required. Type of event. + ProfileEventType type = 1; + + // 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; + + // 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 format is + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + // example, "projects/api-test-project/tenants/foo/jobs/1234". + repeated string jobs = 6; +} diff --git a/google/cloud/talent/v4beta1/event_service.proto b/google/cloud/talent/v4beta1/event_service.proto new file mode 100644 index 000000000..966632e57 --- /dev/null +++ b/google/cloud/talent/v4beta1/event_service.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.cloud.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/talent/v4beta1/event.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "EventServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service handles client event report. +service EventService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Report events issued when end user interacts with customer's application + // that uses Cloud Talent Solution. You may inspect the created events in + // [self service + // tools](https://console.cloud.google.com/talent-solution/overview). + // [Learn + // more](https://cloud.google.com/talent-solution/docs/management-tools) + // about self service tools. + rpc CreateClientEvent(CreateClientEventRequest) returns (ClientEvent) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/clientEvents" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/clientEvents" + body: "*" + } + }; + } +} + +// The report event request. +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; + + // Required. Events issued when end user interacts with customer's application + // that uses Cloud Talent Solution. + ClientEvent client_event = 2; +} diff --git a/google/cloud/talent/v4beta1/filters.proto b/google/cloud/talent/v4beta1/filters.proto new file mode 100644 index 000000000..0f86b2df6 --- /dev/null +++ b/google/cloud/talent/v4beta1/filters.proto @@ -0,0 +1,740 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/talent/v4beta1/application.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/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/date.proto"; +import "google/type/latlng.proto"; +import "google/type/timeofday.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +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 maximum number of allowed characters is 255. + string query = 1; + + // Optional. This filter specifies the company entities to search against. + // + // If a value isn't specified, jobs are searched for against all + // companies. + // + // If multiple values are specified, jobs are searched against the + // companies specified. + // + // 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". + // + // 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. + // + // 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. + // + // 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. + // + // If a value isn't specified, jobs from any category are searched against. + // + // If multiple values are specified, jobs from any of the specified + // categories are searched against. + repeated JobCategory job_categories = 4; + + // Optional. 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. + // + // 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. + // + // If a value isn't specified, jobs within the search results are + // associated with any company. + // + // If multiple values are specified, jobs within the search results may be + // associated with any of the specified companies. + // + // 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. + 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`. + // + // The syntax for this expression is a subset of SQL syntax. + // + // Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + // left of the operator is a custom field key and the right of the operator + // is a number or a quoted string. You must escape backslash (\\) and + // quote (\") characters. + // + // Supported functions are `LOWER([field_name])` to + // perform a case insensitive match and `EMPTY([field_name])` to filter on the + // existence of a key. + // + // 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. + // + // 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 + // 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]. + // + // If a value isn't specified, jobs in the search results includes any + // employment type. + // + // If multiple values are specified, jobs in the search results include + // any of the specified employment types. + repeated EmploymentType employment_types = 10; + + // Optional. 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 + // locale. + // + // + // Language codes 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). + // + // 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. + TimestampRange publish_time_range = 12; + + // Optional. 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; +} + +// Filters to apply when performing the search query. +message ProfileQuery { + // Optional. 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. + // + // 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". + repeated LocationFilter location_filters = 2; + + // Optional. 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. + // + // 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. + // + // If an employer filter isn't specified, profiles with any employers are + // retrieved. + // + // 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. + // + // 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. + // + // If an education filter isn't specified, profiles with any education are + // retrieved. + // + // 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. + // + // For example, search for profiles with a master degree. + repeated EducationFilter education_filters = 5; + + // Optional. 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. + // + // 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. + // + // If a work experience filter isn't specified, profiles with any + // professional experience are retrieved. + // + // If multiple work experience filters are specified, profiles that match any + // work experience filters are retrieved. + // + // 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. + // + // 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. + google.protobuf.BoolValue hirable_filter = 9; + + // Optional. 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. + repeated ApplicationOutcomeNotesFilter application_outcome_notes_filters = 11; + + // Optional. 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`. + // + // The syntax for this expression is a subset of Google SQL syntax. + // + // String custom attributes: supported operators are =, != where the left of + // the operator is a custom field key and the right of the operator is a + // string (surrounded by quotes) value. + // + // Numeric custom attributes: Supported operators are '>', '<' or '=' + // operators where the left of the operator is a custom field key and the + // right of the operator is a numeric value. + // + // Supported functions are LOWER() to + // perform case insensitive match and EMPTY() to filter on the + // existence of a key. + // + // 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"), and there can be + // a maximum of 50 comparisons/functions in the expression. The expression + // must be < 2000 characters in length. + // + // Sample Query: + // (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. + // + // 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. + // + // Signal 2: Number of days since last profile update. See + // [Availability.ProfileUpdateAvailabilitySignal][google.cloud.talent.v4beta1.Availability.ProfileUpdateAvailabilitySignal] + // for the details of this signal. + // + // The candidate 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. + CandidateAvailabilityFilter candidate_availability_filter = 16; +} + +// Input only. +// +// Geographic region of the search. +message LocationFilter { + // Specify whether including telecommute jobs. + enum TelecommutePreference { + // Default value if the telecommute preference isn't specified. + TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + + // Exclude telecommute jobs. + TELECOMMUTE_EXCLUDED = 1; + + // Allow telecommute jobs. + TELECOMMUTE_ALLOWED = 2; + } + + // Optional. 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". + // + // 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. + // + // See http://cldr.unicode.org/ and + // http://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. + 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. + double distance_in_miles = 4; + + // Optional. 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. + // + // This filter can be used by itself to search exclusively for telecommuting + // jobs, or it can be combined with another location + // filter to search for a combination of job locations, + // 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. + TelecommutePreference telecommute_preference = 5; + + // Optional. 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. + enum FilterType { + // Filter type unspecified. Position holder, INVALID, should never be used. + FILTER_TYPE_UNSPECIFIED = 0; + + // 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]. + // + // 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 + // [CompensationRange][google.cloud.talent.v4beta1.CompensationInfo.CompensationRange]. + // + // 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]. + 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]. + 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]. + ANNUALIZED_TOTAL_AMOUNT = 4; + } + + // Required. Type of filter. + FilterType type = 1; + + // Required. Specify desired `base compensation entry's` + // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit]. + repeated CompensationInfo.CompensationUnit units = 2; + + // Optional. Compensation range. + CompensationInfo.CompensationRange range = 3; + + // Optional. 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. + enum RoadTraffic { + // Road traffic situation isn't specified. + ROAD_TRAFFIC_UNSPECIFIED = 0; + + // Optimal commute time without considering any traffic impact. + TRAFFIC_FREE = 1; + + // Commute time calculation takes in account the peak traffic impact. + BUSY_HOUR = 2; + } + + // Required. The method of transportation for which to calculate the commute + // time. + CommuteMethod commute_method = 1; + + // Required. The latitude and longitude of the location from which to + // calculate the commute time. + google.type.LatLng start_coordinates = 2; + + // Required. The maximum travel time in seconds. The maximum allowed value is + // `3600s` (one hour). Format is `123s`. + google.protobuf.Duration travel_duration = 3; + + // 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. + 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. + 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. + // + // 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; + + // Optional. 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; + + // Optional. 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 EmployerFilterMode { + // Default value. + EMPLOYER_FILTER_MODE_UNSPECIFIED = 0; + + // 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]. + CURRENT_EMPLOYMENT_RECORDS_ONLY = 2; + + // Apply only to past (not current) employers in + // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]. + PAST_EMPLOYMENT_RECORDS_ONLY = 3; + } + + // Required. The name of the employer, for example "Google", "Alphabet". + string employer = 1; + + // Optional. 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]. + EmployerFilterMode mode = 2; + + // Optional. 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". + string school = 1; + + // Optional. 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. + DegreeType degree_type = 3; + + // Optional. 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]. +message WorkExperienceFilter { + // Optional. The minimum duration of the work experience (inclusive). + google.protobuf.Duration min_experience = 1; + + // Optional. 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. +message ApplicationDateFilter { + // Optional. 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. + 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. + 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. + 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. + 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. + bool negated = 4; +} + +// Input only. +// +// Filter on create timestamp or update timestamp of profiles. +message TimeFilter { + // Time fields can be used in TimeFilter. + enum TimeField { + // Default value. + TIME_FIELD_UNSPECIFIED = 0; + + // Earliest profile create time. + CREATE_TIME = 1; + + // Latest profile update time. + 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. + google.protobuf.Timestamp start_time = 1; + + // Optional. 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. + // + // Defaults to + // [TimeField.CREATE_TIME][google.cloud.talent.v4beta1.TimeFilter.TimeField.CREATE_TIME]. + TimeField time_field = 3; +} + +// Input only +// +// Filter on availability signals. +message CandidateAvailabilityFilter { + // Optional. It is false by default. If true, API excludes all the potential + // available profiles. + bool negated = 1; +} diff --git a/google/cloud/talent/v4beta1/histogram.proto b/google/cloud/talent/v4beta1/histogram.proto new file mode 100644 index 000000000..a4dfdd4e6 --- /dev/null +++ b/google/cloud/talent/v4beta1/histogram.proto @@ -0,0 +1,64 @@ +// 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.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; +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. + string histogram_query = 1; +} + +// Output only. +// +// Histogram result that matches +// [HistogramQuery][google.cloud.talent.v4beta1.HistogramQuery] specified in +// searches. +message HistogramQueryResult { + // Requested histogram expression. + string histogram_query = 1; + + // A map from the values of the facet associated with distinct values to the + // number of matching entries with corresponding value. + // + // The key format is: + // + // * (for string histogram) string values stored in the field. + // * (for named numeric bucket) name specified in `bucket()` function, like + // for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + // * (for anonymous numeric bucket) range formatted as `-`, for + // example, `0-1000`, `MIN-0`, and `0-MAX`. + map histogram = 2; +} diff --git a/google/cloud/talent/v4beta1/job.proto b/google/cloud/talent/v4beta1/job.proto new file mode 100644 index 000000000..711a4b5be --- /dev/null +++ b/google/cloud/talent/v4beta1/job.proto @@ -0,0 +1,376 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/talent/v4beta1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/postal_address.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "JobResourceProto"; +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. +message Job { + // Application related details of a job posting. + message ApplicationInfo { + // Optional. 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. + // + // 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 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. + // + // 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]. + // + // [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]. + 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 + // more precise address for the job. + bool disable_street_address_resolution = 1; + + // Optional. Option for job HTML content sanitization. Applied fields are: + // + // * description + // * applicationInfo.instruction + // * incentives + // * qualifications + // * responsibilities + // + // 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]. + HtmlSanitization html_sanitization = 2; + } + + // Required during job update. + // + // The resource name for the job. This is generated by the service when a + // 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". + // + // Tenant id is optional and the default tenant is used if unspecified, for + // example, "projects/api-test-project/jobs/1234". + // + // 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. + 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]. + // + // The maximum number of allowed characters is 255. + string requisition_id = 3; + + // Required. The title of the job, such as "Software Engineer" + // + // The maximum number of allowed characters is 500. + string title = 4; + + // 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; + + // Optional but strongly recommended for the best service experience. + // + // Location(s) where the employer is looking to hire for this job posting. + // + // Specifying the full street address(es) of the hiring location enables + // better API results, especially job searches by commute time. + // + // 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. + // + // The maximum number of allowed characters is 500. + repeated string addresses = 6; + + // Optional. Job application information. + ApplicationInfo application_info = 7; + + // Optional. 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. + 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. + // + // 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 + // KEY_1_LIKE_THIS. + // + // At most 100 filterable and at most 100 unfilterable keys are supported. + // For filterable `string_values`, across all keys at most 200 values are + // allowed, with each string no more than 255 characters. For unfilterable + // `string_values`, the maximum total size of `string_values` across all keys + // is 50KB. + map custom_attributes = 10; + + // Optional. 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 maximum number of allowed characters is 255. + string department = 12; + + // Optional. 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 + // 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 + // 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". + // For more information, see + // [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'. + string language_code = 15; + + // Optional. 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. + // 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 + // jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + // + // 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 + // job. 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. + // + // 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. + // + // 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 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. + PostingRegion posting_region = 20; + + // Optional. The visibility of the job. + // + // Defaults to + // [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4beta1.Visibility.ACCOUNT_ONLY] + // if not specified. + Visibility visibility = 21; + + // Optional. 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. + 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. + google.protobuf.Timestamp posting_publish_time = 24; + + // Optional but 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]. + // + // 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 + // open jobs over previous 7 days. If this threshold is exceeded, + // expired jobs are cleaned out in order of earliest expire time. + // Expired jobs are no longer accessible after they are cleaned + // out. + // + // Invalid timestamps are ignored, and treated as expire time not provided. + // + // 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. + // + // 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 + // example, if the job was created on 2017/01/01 13:00AM UTC with an + // 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. + google.protobuf.Timestamp posting_expire_time = 25; + + // Output only. The timestamp when this job posting was created. + google.protobuf.Timestamp posting_create_time = 26; + + // Output only. The timestamp when this job posting was last updated. + google.protobuf.Timestamp posting_update_time = 27; + + // Output only. Display name of the company listing the job. + string company_display_name = 28; + + // Output only. Derived details about the job posting. + DerivedInfo derived_info = 29; + + // Optional. 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 new file mode 100644 index 000000000..1b0d8bfeb --- /dev/null +++ b/google/cloud/talent/v4beta1/job_service.proto @@ -0,0 +1,927 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/talent/v4beta1/batch.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/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "JobServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service handles job management, including job CRUD, enumeration and search. +service JobService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new job. + // + // Typically, the job becomes searchable within 10 seconds, but it may take + // up to 5 minutes. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs" + body: "*" + } + }; + } + + // Retrieves the specified job, whose status is OPEN or recently EXPIRED + // within the last 90 days. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v4beta1/{name=projects/*/tenants/*/jobs/*}" + additional_bindings { get: "/v4beta1/{name=projects/*/jobs/*}" } + }; + } + + // Updates specified job. + // + // Typically, updated contents become visible in search results within 10 + // seconds, but it may take up to 5 minutes. + rpc UpdateJob(UpdateJobRequest) returns (Job) { + option (google.api.http) = { + patch: "/v4beta1/{job.name=projects/*/tenants/*/jobs/*}" + body: "*" + additional_bindings { + patch: "/v4beta1/{job.name=projects/*/jobs/*}" + body: "*" + } + }; + } + + // Deletes the specified job. + // + // Typically, the job becomes unsearchable within 10 seconds, but it may take + // up to 5 minutes. + 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" } + }; + } + + // Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. + rpc BatchDeleteJobs(BatchDeleteJobsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchDelete" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs:batchDelete" + } + }; + } + + // 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. + rpc SearchJobs(SearchJobsRequest) returns (SearchJobsResponse) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:search" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs:search" + body: "*" + } + }; + } + + // 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. + rpc SearchJobsForAlert(SearchJobsRequest) returns (SearchJobsResponse) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert" + body: "*" + additional_bindings { + post: "/v4beta1/{parent=projects/*}/jobs:searchForAlert" + body: "*" + } + }; + } + + // 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; + + // Required. The Job to be created. + Job job = 2; +} + +// 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; +} + +// Input only. +// +// Update job request. +message UpdateJobRequest { + // Required. The Job to be updated. + Job job = 1; + + // Optional but strongly recommended to be provided 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. + // + // 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; +} + +// 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; + + // Required. The filter string specifies the jobs to be deleted. + // + // Supported operator: =, AND + // + // The fields eligible for filtering are: + // + // * `companyName` (Required) + // * `requisitionId` (Required) + // + // Sample Query: companyName = "projects/api-test-project/companies/123" AND + // requisitionId = "req-1" + string filter = 2; +} + +// 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; + + // Required. The filter string specifies the jobs to be enumerated. + // + // Supported operator: =, AND + // + // The fields eligible for filtering are: + // + // * `companyName` (Required) + // * `requisitionId` (Optional) + // * `status` (Optional) 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 + // requisitionId = "req-1" + // * companyName = "projects/api-test-project/tenants/foo/companies/bar" AND + // status = "EXPIRED" + string filter = 2; + + // Optional. The starting point of a query result. + string page_token = 3; + + // Optional. 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. + // + // 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. + 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. +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_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_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]. + 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. + // + // The maximum number of items returned is based on the limit field + // provided in the request. + repeated Job jobs = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + 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]. + message CustomRankingInfo { + // 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; + + // The given ranking expression is of None importance, existing relevance + // score (determined by API algorithm) dominates job's final ranking + // position. + NONE = 1; + + // The given ranking expression is of Low importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + LOW = 2; + + // The given ranking expression is of Mild importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + MILD = 3; + + // The given ranking expression is of Medium importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + MEDIUM = 4; + + // The given ranking expression is of High importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + HIGH = 5; + + // The given ranking expression is of Extreme importance, and dominates + // job's final ranking position with existing relevance + // score (determined by API algorithm) ignored. + EXTREME = 6; + } + + // 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. + // + // An error is thrown if not specified. + ImportanceLevel importance_level = 1; + + // Required. Controls over how job documents get ranked on top of existing + // relevance score (determined by API algorithm). The product of 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. + // + // Parenthesis are supported to adjust calculation precedence. The + // expression must be < 100 characters in length. + // + // Sample ranking expression + // (year + 25) * 0.25 - (freshness / 0.5) + string ranking_expression = 2; + } + + // 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. + SEARCH_MODE_UNSPECIFIED = 0; + + // The job search matches against all jobs, and featured jobs + // (jobs with promotionValue > 0) are not specially handled. + JOB_SEARCH = 1; + + // The job search matches only against featured jobs (jobs with a + // promotionValue > 0). This method doesn't return any jobs having a + // promotionValue <= 0. The search results order is determined by the + // promotionValue (jobs with a higher promotionValue are returned higher up + // in the search results), with relevance being used as a tiebreaker. + FEATURED_JOB_SEARCH = 2; + } + + // 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. + enum DiversificationLevel { + // The diversification level isn't specified. + DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + + // Disables diversification. Jobs that would normally be pushed to the last + // page would not have their positions altered. This may result in highly + // similar jobs appearing in sequence in the search results. + DISABLED = 1; + + // 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. + 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; + + // Optional. Mode of a 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; + + // Optional. 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. + // + // 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 + // 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. + // + // Enabling this flag may adversely impact performance. + // + // Defaults to false. + bool require_precise_result_size = 6; + + // Optional. An expression specifies a histogram request against matching + // jobs. + // + // Expression syntax is an aggregation function call with histogram facets and + // other options. + // + // Available aggregation function calls are: + // * `count(string_histogram_facet)`: Count the number of matching entities, + // for each distinct attribute value. + // * `count(numeric_histogram_facet, list of buckets)`: Count the number of + // matching entities within each bucket. + // + // Data types: + // + // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+. + // * String: string like "any string with backslash escape for quote(\")." + // * Number: whole number and floating point number like 10, -1 and -0.01. + // * List: list of elements with comma(,) separator surrounded by square + // brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + // + // Built-in constants: + // + // * MIN (minimum number similar to java Double.MIN_VALUE) + // * MAX (maximum number similar to java Double.MAX_VALUE) + // + // Built-in functions: + // + // * bucket(start, end[, label]): bucket built-in function creates a bucket + // with range of [start, end). Note that the end is exclusive, for example, + // bucket(1, MAX, "positive number") or bucket(1, 10). + // + // 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, + // "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] + // 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] + // 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, + // "Bachelors", "Masters". + // * 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 + // placeholder referring to the state, province, or the particular term a + // country uses to define the geographic structure below the country level, + // for example, "CA", "IL". + // * city: histogram by a combination of the "city name, admin1 code". For + // example, "Mountain View, CA", "New York, NY". + // * admin1_country: histogram by a combination of the "admin1 code, country", + // for example, "CA, US", "IL, US". + // * city_coordinate: histogram by the city center's GPS coordinates (latitude + // 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", + // "fr-FR". + // * 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, + // "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". + // * 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]. + // 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]. + // Values can be accessed via square bracket notations like + // numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + // group results by. + // + // Example expressions: + // + // * `count(admin1)` + // * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + // bucket(100000, MAX)])` + // * `count(string_custom_attribute["some-string-custom-attribute"])` + // * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + // [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. + 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. + // + // 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 + // pagination, (for example, pageSize = 10 and offset = 10 means to return + // from the second page). + int32 offset = 9; + + // Optional. 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. + string page_token = 11; + + // Optional. The criteria determining how search results are sorted. Default + // is + // `"relevance desc"`. + // + // Supported options are: + // + // * `"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] + // descending. + // * `"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. + // * `"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. + // * `"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. + // * `"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. + // * `"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. + // * `"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. + // * 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.
+ // `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + // multiple locations. See details below.
+ // `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + // multiple locations. See details below.
+ // The string can have a maximum of 256 characters. When multiple distance + // centers are provided, a job that is close to any of the distance centers + // would have a high rank. When a job has multiple locations, the job + // location closest to one of the distance centers will be used. Jobs that + // don't have locations will be ranked at the bottom. Distance is calculated + // with a precision of 11.3 meters (37.4 feet). Diversification strategy is + // still applied unless explicitly disabled in + // [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 + // 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. + DiversificationLevel diversification_level = 13; + + // Optional. 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. + // + // 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 + // 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]. + message MatchingJob { + // 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. + 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. + string search_text_snippet = 4; + + // Commute information which is generated based on specified + // [CommuteFilter][google.cloud.talent.v4beta1.CommuteFilter]. + CommuteInfo commute_info = 5; + } + + // Output only. + // + // Commute details related to this job. + message CommuteInfo { + // Location used as the destination in the commute calculation. + Location job_location = 1; + + // The number of seconds required to travel to the job location from the + // query location. A duration of 0 seconds indicates that the job isn't + // reachable within the requested duration, but was returned as part of an + // expanded query. + google.protobuf.Duration travel_duration = 2; + } + + // 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 + // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries]. + repeated HistogramQueryResult histogram_query_results = 2; + + // The token that specifies the starting position of the next page of results. + // This field is empty if there are no more results. + 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 + // [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]. + 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`. + int32 total_size = 6; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 7; + + // If query broadening is enabled, we may append additional results from the + // broadened query. This number indicates how many of the jobs returned in the + // jobs field are from the broadened query. These results are always at the + // end of the jobs list. In particular, a value of 0, or if the field isn't + // set, all the jobs in the jobs list are from the original + // (without broadening) query. If this field is non-zero, subsequent requests + // with offset after this result set should contain all broadened results. + int32 broadened_query_jobs_count = 8; + + // The spell checking result, and correction. + SpellingCorrection spell_correction = 9; +} + +// Request to create a batch of jobs. +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; + + // Required. The jobs to be created. + repeated Job jobs = 2; +} + +// 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; + + // Required. The jobs to be updated. + repeated Job jobs = 2; + + // Optional but strongly recommended to be provided for the best service + // experience, also increase latency when checking status of 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. + // + // 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. + google.protobuf.FieldMask update_mask = 3; +} diff --git a/google/cloud/talent/v4beta1/profile.proto b/google/cloud/talent/v4beta1/profile.proto new file mode 100644 index 000000000..268bb433a --- /dev/null +++ b/google/cloud/talent/v4beta1/profile.proto @@ -0,0 +1,735 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "ProfileResourceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// Cloud Profile Discovery API definition + +// A resource that represents the profile for a job candidate (also referred to +// as a "single-source profile"). +message 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". + string name = 1; + + // Optional. Profile's id in client system if available. + // + // The maximum number of bytes allowed is 100. + string external_id = 2; + + // Optional. 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. + // + // 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 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. + // + // 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. + // + // This is used to link multiple profiles to the same candidate. For example, + // 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. + string group_id = 5; + + // Optional. 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. + google.protobuf.Timestamp create_time = 7; + + // Optional. The timestamp when the profile was last updated at this source. + google.protobuf.Timestamp update_time = 8; + + // Optional. The resume representing this profile. + Resume resume = 53; + + // Optional. 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. + repeated Address addresses = 12; + + // Optional. The candidate's email addresses. + repeated Email email_addresses = 13; + + // Optional. The candidate's phone number(s). + repeated Phone phone_numbers = 14; + + // Optional. 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. + 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: + // + // * 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. + 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: + // + // * 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. + 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. + 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]. + repeated Activity activities = 20; + + // Optional. The publications published by the candidate. + repeated Publication publications = 21; + + // Optional. The patents acquired by the candidate. + repeated Patent patents = 22; + + // Optional. The certifications acquired by the candidate. + repeated Certification certifications = 23; + + // Output only. The resource names of the candidate's applications. + repeated string applications = 47; + + // Output only. The resource names of the candidate's assignments. + repeated string assignments = 48; + + // 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. + // + // At most 100 filterable and at most 100 unfilterable keys are supported. If + // limit is exceeded, an error is thrown. Custom attributes are `unfilterable` + // by default. These are filterable when the `filterable` flag is set to + // `true`. + // + // Numeric custom attributes: each key can only map to one numeric value, + // otherwise an error is thrown. Client can also filter on numeric custom + // attributes using '>', '<' or '=' operators. + // + // String custom attributes: each key can map up to 50 string values. For + // filterable string value, each value has a byte size of no more than 256B. + // For unfilterable string values, the maximum byte size of a single key is + // 64B. An error is thrown for any request exceeding the limit. + // The maximum total byte size is 10KB. + map custom_attributes = 26; + + // 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; + + // 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; +} + +// Resource that represents a resume. +message Resume { + // The format of a structured resume. + enum ResumeType { + // Default value. + RESUME_TYPE_UNSPECIFIED = 0; + + // The profile contents in HR-XML format. + // See http://schemas.liquid-technologies.com/hr-xml/2007-04-15/ for more + // information about Human Resources XML. + HRXML = 1; + + // Resume type not specified. + 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. + string structured_resume = 1; + + // Optional. The format of + // [structured_resume][google.cloud.talent.v4beta1.Resume.structured_resume]. + ResumeType resume_type = 2; +} + +// Resource that represents the name of a person. +message PersonName { + // Resource that represents a person's structured name. + message PersonStructuredName { + // Optional. Given/first name. + // + // 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. + // + // Number of characters allowed is 100. + string preferred_name = 6; + + // Optional. Middle initial. + // + // 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. + // + // 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. + // + // Number of characters allowed is 20. + repeated string suffixes = 4; + + // Optional. Prefixes. + // + // Number of characters allowed is 20. + repeated string prefixes = 5; + } + + // The name of a person. It can be one of + // [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". + // + // 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.) + PersonStructuredName structured_name = 2; + } + + // Optional. 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. + string preferred_name = 3; +} + +// Resource that represents a address. +message Address { + // Optional. 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 + // [structured_address][google.cloud.talent.v4beta1.Address.structured_address]. + oneof address { + // Optional. Unstructured address. + // + // For example, "1600 Amphitheatre Pkwy, Mountain View, CA 94043", + // "Sunnyvale, California". + // + // Number of characters allowed is 100. + string unstructured_address = 2; + + // Optional. 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. + 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. + ContactInfoUsage usage = 1; + + // Optional. Email address. + // + // Number of characters allowed is 4,000. + string email_address = 2; +} + +// Resource that represents a person's telephone number. +message Phone { + // Enum that represents the type of the telephone. + enum PhoneType { + // Default value. + PHONE_TYPE_UNSPECIFIED = 0; + + // A landline. + LANDLINE = 1; + + // A mobile. + MOBILE = 2; + + // A fax. + FAX = 3; + + // A pager. + PAGER = 4; + + // A TTY (test telephone) or TDD (telecommunication device for the deaf). + TTY_OR_TDD = 5; + + // A voicemail. + VOICEMAIL = 6; + + // 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 + VIRTUAL = 7; + + // Voice over IP numbers. This includes TSoIP (Telephony Service over IP). + VOIP = 8; + + // In some regions (e.g. the USA), it is impossible to distinguish between + // fixed-line and mobile numbers by looking at the phone number itself. + MOBILE_OR_LANDLINE = 9; + } + + // Optional. The usage of the phone. For example, SCHOOL, WORK, PERSONAL. + ContactInfoUsage usage = 1; + + // Optional. The phone type. For example, LANDLINE, MOBILE, FAX. + PhoneType type = 2; + + // Optional. 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 + // format of "(xxx)xxx-xxxx", in profile searches the same phone format + // has to be provided. + // + // Number of characters allowed is 20. + string number = 3; + + // Optional. When this number is available. Any descriptive string is + // expected. + // + // Number of characters allowed is 100. + string when_available = 4; +} + +// Resource that represents a valid URI for a personal use. +message PersonalUri { + // Optional. The personal URI. + // + // Number of characters allowed is 4,000. + string uri = 1; +} + +// 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. + ContactInfoUsage usage = 1; + + // Optional. The name of the contact method. + // + // For example, "hangout", "skype". + // + // Number of characters allowed is 100. + string name = 2; + + // Optional. The contact id. + // + // Number of characters allowed is 100. + string contact_id = 3; +} + +// Resource that represents an employment record of a candidate. +message EmploymentRecord { + // Optional. Start date of the employment. + google.type.Date start_date = 1; + + // Optional. End date of the employment. + google.type.Date end_date = 2; + + // Optional. The name of the employer company/organization. + // + // For example, "Google", "Alphabet", and so on. + // + // Number of characters allowed is 100. + string employer_name = 3; + + // Optional. 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. + Address address = 5; + + // Optional. The job title of the employment. + // + // For example, "Software Engineer", "Data Scientist", and so on. + // + // Number of characters allowed is 100. + string job_title = 6; + + // Optional. The description of job content. + // + // Number of characters allowed is 100,000. + string job_description = 7; + + // Optional. If the jobs is a supervisor position. + google.protobuf.BoolValue is_supervisor = 8; + + // Optional. If this employment is self-employed. + google.protobuf.BoolValue is_self_employed = 9; + + // Optional. 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 + // 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; +} + +// Resource that represents an education record of a candidate. +message EducationRecord { + // Optional. The start date of the education. + google.type.Date start_date = 1; + + // Optional. The end date of the education. + google.type.Date end_date = 2; + + // Optional. The expected graduation date if currently pursuing a degree. + google.type.Date expected_graduation_date = 3; + + // Optional. The name of the school or institution. + // + // For example, "Stanford University", "UC Berkeley", and so on. + // + // Number of characters allowed is 100. + string school_name = 4; + + // Optional. 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 + // [structured_degree][google.cloud.talent.v4beta1.EducationRecord.structured_degree]. + oneof degree { + // Optional. 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. + Degree structured_degree = 7; + } + + // Optional. The description of the education. + // + // Number of characters allowed is 100,000. + string description = 8; + + // Optional. 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; +} + +// Resource that represents a degree pursuing or acquired by a candidate. +message Degree { + // Optional. ISCED degree type. + DegreeType degree_type = 1; + + // Optional. 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. + // + // For example, "Computer science", "engineering". + // + // Number of characters allowed is 100. + repeated string fields_of_study = 3; +} + +// Resource that represents an individual or collaborative activity participated +// in by a candidate, for example, an open-source project, a class assignment, +// and so on. +message Activity { + // Optional. Activity display name. + // + // Number of characters allowed is 100. + string display_name = 1; + + // Optional. Activity description. + // + // Number of characters allowed is 100,000. + string description = 2; + + // Optional. Activity URI. + // + // Number of characters allowed is 4,000. + string uri = 3; + + // Optional. The first creation date of the activity. + google.type.Date create_date = 4; + + // Optional. The last update date of the activity. + google.type.Date update_date = 5; + + // Optional. A list of team members involved in this activity. + // + // Number of characters allowed is 100. + repeated string team_members = 6; + + // Optional. A list of skills used in this activity. + 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 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; + + // 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; +} + +// Resource that represents a publication resource of a candidate. +message Publication { + // Optional. A list of author names. + // + // Number of characters allowed is 100. + repeated string authors = 1; + + // Optional. The title of the publication. + // + // Number of characters allowed is 100. + string title = 2; + + // Optional. The description of the publication. + // + // Number of characters allowed is 100,000. + string description = 3; + + // Optional. The journal name of the publication. + // + // Number of characters allowed is 100. + string journal = 4; + + // Optional. Volume number. + // + // Number of characters allowed is 100. + string volume = 5; + + // Optional. The publisher of the journal. + // + // Number of characters allowed is 100. + string publisher = 6; + + // Optional. The publication date. + google.type.Date publication_date = 7; + + // Optional. The publication type. + // + // Number of characters allowed is 100. + string publication_type = 8; + + // Optional. ISBN number. + // + // Number of characters allowed is 100. + string isbn = 9; +} + +// Resource that represents the patent acquired by a candidate. +message Patent { + // Optional. Name of the patent. + // + // Number of characters allowed is 100. + string display_name = 1; + + // Optional. A list of inventors' names. + // + // Number of characters allowed for each is 100. + repeated string inventors = 2; + + // Optional. 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. + google.type.Date patent_status_date = 4; + + // Optional. The date that the patent was filed. + google.type.Date patent_filing_date = 5; + + // Optional. The name of the patent office. + // + // Number of characters allowed is 100. + string patent_office = 6; + + // Optional. The number of the patent. + // + // Number of characters allowed is 100. + string patent_number = 7; + + // Optional. The description of the patent. + // + // Number of characters allowed is 100,000. + string patent_description = 8; + + // Optional. 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 new file mode 100644 index 000000000..4c759f7e3 --- /dev/null +++ b/google/cloud/talent/v4beta1/profile_service.proto @@ -0,0 +1,463 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.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/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "ProfileServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service that handles profile management, including profile CRUD, +// enumeration and search. +service ProfileService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Lists profiles by filter. The order is unspecified. + rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse) { + option (google.api.http) = { + get: "/v4beta1/{parent=projects/*/tenants/*}/profiles" + }; + } + + // Creates and returns a new profile. + rpc CreateProfile(CreateProfileRequest) returns (Profile) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}/profiles" + body: "*" + }; + } + + // Gets the specified profile. + rpc GetProfile(GetProfileRequest) returns (Profile) { + option (google.api.http) = { + get: "/v4beta1/{name=projects/*/tenants/*/profiles/*}" + }; + } + + // Updates the specified profile and returns the updated result. + rpc UpdateProfile(UpdateProfileRequest) returns (Profile) { + option (google.api.http) = { + patch: "/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}" + body: "*" + }; + } + + // Deletes the specified profile. + // Prerequisite: The profile has no associated applications or assignments + // associated. + rpc DeleteProfile(DeleteProfileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*}" + }; + } + + // Searches for profiles within a tenant. + // + // 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. + rpc SearchProfiles(SearchProfilesRequest) returns (SearchProfilesResponse) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*/tenants/*}:search" + body: "*" + }; + } +} + +// List profiles request. +message ListProfilesRequest { + // 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; + + // Optional. 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. + // + // 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. + // + // Valid values are: + // + // * name + google.protobuf.FieldMask read_mask = 4; +} + +// The List profiles response object. +message ListProfilesResponse { + // Profiles for the specific tenant. + repeated Profile profiles = 1; + + // A token to retrieve the next page of results. This is empty if there are no + // more results. + string next_page_token = 2; +} + +// Create profile request. +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; + + // Required. The profile to be created. + Profile profile = 2; +} + +// Get profile request. +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; +} + +// Update profile request +message UpdateProfileRequest { + // Required. Profile to be updated. + Profile profile = 1; + + // Optional. 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; +} + +// Delete profile request. +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; +} + +// 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. + ProfileQuery profile_query = 3; + + // Optional. 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. + 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. + // + // The maximum allowed value is 5000. Otherwise an error is thrown. + // + // For example, 0 means to search from the first profile, and 10 means to + // search from the 11th profile. This can be used for pagination, for example + // 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 + // 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. + // 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 + // (recently updated profiles first). + // * "create_time 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 + // ascending order. + // * "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 + // ascending order. + // * "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). + bool case_sensitive_sort = 9; + + // Optional. 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. + // + // Function syntax: function_name(histogram_facet[, list of buckets]) + // + // Data types: + // + // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+. + // * String: string like "any string with backslash escape for quote(\")." + // * Number: whole number and floating point number like 10, -1 and -0.01. + // * List: list of elements with comma(,) separator surrounded by square + // brackets. For example, [1, 2, 3] and ["one", "two", "three"]. + // + // Built-in constants: + // + // * MIN (minimum number similar to java Double.MIN_VALUE) + // * MAX (maximum number similar to java Double.MAX_VALUE) + // + // Built-in functions: + // + // * bucket(start, end[, label]) + // Bucket build-in function creates a bucket with range of [start, end). Note + // that the end is exclusive. + // For example, bucket(1, MAX, "positive number") or bucket(1, 10). + // + // Histogram Facets: + // + // * admin1: Admin1 is a global placeholder for referring to state, province, + // or the particular term a country uses to define the geographic structure + // below the country level. Examples include states codes such as "CA", "IL", + // "NY", and provinces, such as "BC". + // * locality: Locality is a global placeholder for referring to city, town, + // or the particular term a country uses to define the geographic structure + // below the admin1 level. Examples include city names such as + // "Mountain View" and "New York". + // * extended_locality: Extended locality is concatenated version of admin1 + // and locality with comma separator. For example, "Mountain View, CA" and + // "New York, NY". + // * postal_code: Postal code of profile which follows locale code. + // * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US, + // JP, GB. + // * job_title: Normalized job titles specified in EmploymentHistory. + // * company_name: Normalized company name of profiles to match on. + // * institution: The school name. For example, "MIT", + // "University of California, Berkeley" + // * degree: Highest 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. + // * 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. + // * 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. + // * 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. + // * 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"]. + // * numeric_custom_attribute: Numeric custom attributes. Values can be + // accessed via square bracket notation like numeric_custom_attribute["key1"]. + // + // Example expressions: + // + // * count(admin1) + // * count(experience_in_months, [bucket(0, 12, "1 year"), + // bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")]) + // * count(string_custom_attribute["assigned_recruiter"]) + // * count(numeric_custom_attribute["favorite_number"], + // [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][]. + // + // 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. + // + // 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. + string result_set_id = 12; +} + +// Response of SearchProfiles method. +message SearchProfilesResponse { + // An estimation of the number of profiles that match the specified query. + // + // This number isn't guaranteed to be accurate. + int64 estimated_total_size = 1; + + // The spell checking result, and correction. + SpellingCorrection spell_correction = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; + + // A token to retrieve the next page of results. This is empty if there are no + // more results. + string next_page_token = 4; + + // The histogram results that match with specified + // [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]. + 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. + string result_set_id = 7; +} + +// Output only. +// +// 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]. + 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. + // + // 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 + // "University of California at Berkeley" and the field study is "CS". The API + // merges these two inputs into one and selects one value for each field. For + // example, the school name in summary is set to "University of California at + // Berkeley" and the field of study is set to "Computer Science". + Profile summary = 2; +} diff --git a/google/cloud/talent/v4beta1/talent_gapic.yaml b/google/cloud/talent/v4beta1/talent_gapic.yaml new file mode 100644 index 000000000..d21ea292f --- /dev/null +++ b/google/cloud/talent/v4beta1/talent_gapic.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: 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 + 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: 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: 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/tenant.proto b/google/cloud/talent/v4beta1/tenant.proto new file mode 100644 index 000000000..88deddeca --- /dev/null +++ b/google/cloud/talent/v4beta1/tenant.proto @@ -0,0 +1,79 @@ +// 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.talent.v4beta1; + +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; +option java_outer_classname = "TenantResourceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A Tenant resource represents a tenant in the service. A tenant is a group or +// entity that shares common access with specific privileges for resources like +// profiles. Customer may create multiple tenants to provide data isolation for +// different groups. +message Tenant { + // Enum that represents how user data owned by the tenant is used. + enum DataUsageType { + // Default value. + DATA_USAGE_TYPE_UNSPECIFIED = 0; + + // Data owned by this tenant is used to improve search/recommendation + // quality across tenants. + AGGREGATED = 1; + + // Data owned by this tenant is used to improve search/recommendation + // quality for this tenant only. + ISOLATED = 2; + } + + // Required during tenant update. + // + // The resource name for a tenant. This is generated by the service when a + // tenant is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/api-test-project/tenants/foo". + string name = 1; + + // Required. Client side tenant identifier, used to uniquely identify the + // tenant. + // + // The maximum number of allowed characters is 255. + string external_id = 2; + + // Optional. 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. + 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 + // 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. + repeated string keyword_searchable_profile_custom_attributes = 4; +} diff --git a/google/cloud/talent/v4beta1/tenant_service.proto b/google/cloud/talent/v4beta1/tenant_service.proto new file mode 100644 index 000000000..33b7f5384 --- /dev/null +++ b/google/cloud/talent/v4beta1/tenant_service.proto @@ -0,0 +1,158 @@ +// 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.talent.v4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/talent/v4beta1/common.proto"; +import "google/cloud/talent/v4beta1/tenant.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; +option java_multiple_files = true; +option java_outer_classname = "TenantServiceProto"; +option java_package = "com.google.cloud.talent.v4beta1"; +option objc_class_prefix = "CTS"; + +// A service that handles tenant management, including CRUD and enumeration. +service TenantService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new tenant entity. + rpc CreateTenant(CreateTenantRequest) returns (Tenant) { + option (google.api.http) = { + post: "/v4beta1/{parent=projects/*}/tenants" + body: "*" + }; + } + + // Retrieves specified tenant. + rpc GetTenant(GetTenantRequest) returns (Tenant) { + option (google.api.http) = { + get: "/v4beta1/{name=projects/*/tenants/*}" + }; + } + + // Updates specified tenant. + rpc UpdateTenant(UpdateTenantRequest) returns (Tenant) { + option (google.api.http) = { + patch: "/v4beta1/{tenant.name=projects/*/tenants/*}" + body: "*" + }; + } + + // Deletes specified tenant. + rpc DeleteTenant(DeleteTenantRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4beta1/{name=projects/*/tenants/*}" + }; + } + + // Lists all tenants associated with the project. + rpc ListTenants(ListTenantsRequest) returns (ListTenantsResponse) { + option (google.api.http) = { + get: "/v4beta1/{parent=projects/*}/tenants" + }; + } +} + +// The Request of the CreateTenant method. +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; + + // Required. The tenant to be created. + Tenant tenant = 2; +} + +// Request for getting a tenant by name. +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; +} + +// Request for updating a specified tenant. +message UpdateTenantRequest { + // Required. The tenant resource to replace the current resource in the + // system. + Tenant tenant = 1; + + // Optional but 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. + // + // A field mask to specify the tenant fields to be updated. Only + // top level fields of [Tenant][google.cloud.talent.v4beta1.Tenant] are + // supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete a tenant. +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; +} + +// List tenants for which the client has ACL visibility. +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. + string page_token = 2; + + // Optional. 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. + repeated Tenant tenants = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} diff --git a/google/cloud/tasks/BUILD.bazel b/google/cloud/tasks/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/tasks/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/tasks/artman_cloudtasks_v2.yaml b/google/cloud/tasks/artman_cloudtasks_v2.yaml new file mode 100644 index 000000000..f3af7e6d4 --- /dev/null +++ b/google/cloud/tasks/artman_cloudtasks_v2.yaml @@ -0,0 +1,36 @@ +common: + api_name: tasks + api_version: v2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 + src_proto_paths: + - v2 + service_yaml: cloudtasks_v2.yaml + gapic_yaml: v2/cloudtasks_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/tasks/artman_cloudtasks_v2beta2.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml new file mode 100644 index 000000000..f19712010 --- /dev/null +++ b/google/cloud/tasks/artman_cloudtasks_v2beta2.yaml @@ -0,0 +1,34 @@ +common: + api_name: tasks + api_version: v2beta2 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v2beta2 + service_yaml: cloudtasks_v2beta2.yaml + gapic_yaml: v2beta2/cloudtasks_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/tasks/artman_cloudtasks_v2beta3.yaml b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml new file mode 100644 index 000000000..d72d92d8f --- /dev/null +++ b/google/cloud/tasks/artman_cloudtasks_v2beta3.yaml @@ -0,0 +1,36 @@ +common: + api_name: tasks + api_version: v2beta3 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 + src_proto_paths: + - v2beta3 + service_yaml: cloudtasks_v2beta3.yaml + gapic_yaml: v2beta3/cloudtasks_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/tasks/cloudtasks_v2.yaml b/google/cloud/tasks/cloudtasks_v2.yaml new file mode 100644 index 000000000..3e3ea2ec5 --- /dev/null +++ b/google/cloud/tasks/cloudtasks_v2.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.v2.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.v2.CloudTasks.*' + deadline: 10.0 + - selector: google.cloud.tasks.v2.CloudTasks.ListQueues + deadline: 15.0 + +authentication: + rules: + - selector: 'google.cloud.tasks.v2.CloudTasks.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/tasks/cloudtasks.yaml b/google/cloud/tasks/cloudtasks_v2beta2.yaml similarity index 97% rename from google/cloud/tasks/cloudtasks.yaml rename to google/cloud/tasks/cloudtasks_v2beta2.yaml index fe1f56857..65a96d45c 100644 --- a/google/cloud/tasks/cloudtasks.yaml +++ b/google/cloud/tasks/cloudtasks_v2beta2.yaml @@ -14,7 +14,7 @@ documentation: overview: |- Cloud Tasks manages the execution of large numbers of distributed requests. - For more information, see https://cloud.google.com/cloud-tasks/. + For more information, see https://cloud.google.com/tasks/. backend: rules: diff --git a/google/cloud/tasks/cloudtasks_v2beta3.yaml b/google/cloud/tasks/cloudtasks_v2beta3.yaml new file mode 100644 index 000000000..53e5c4ef8 --- /dev/null +++ b/google/cloud/tasks/cloudtasks_v2beta3.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.v2beta3.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.v2beta3.CloudTasks.*' + deadline: 10.0 + - selector: google.cloud.tasks.v2beta3.CloudTasks.ListQueues + deadline: 15.0 + +authentication: + rules: + - selector: 'google.cloud.tasks.v2beta3.CloudTasks.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/tasks/v2/cloudtasks.proto b/google/cloud/tasks/v2/cloudtasks.proto new file mode 100644 index 000000000..e287880c3 --- /dev/null +++ b/google/cloud/tasks/v2/cloudtasks.proto @@ -0,0 +1,605 @@ +// 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.tasks.v2; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/tasks/v2/queue.proto"; +import "google/cloud/tasks/v2/task.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/rpc/code.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "CloudTasksProto"; +option java_package = "com.google.cloud.tasks.v2"; +option objc_class_prefix = "TASKS"; + +// Cloud Tasks allows developers to manage the execution of background +// work in their applications. +service CloudTasks { + // Lists queues. + // + // Queues are returned in lexicographical order. + rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/queues" + }; + } + + // Gets a queue. + rpc GetQueue(GetQueueRequest) returns (Queue) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/queues/*}" + }; + } + + // 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. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc CreateQueue(CreateQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/queues" + body: "queue" + }; + } + + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // 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. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc UpdateQueue(UpdateQueueRequest) returns (Queue) { + option (google.api.http) = { + patch: "/v2/{queue.name=projects/*/locations/*/queues/*}" + body: "queue" + }; + } + + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/queues/*}" + }; + } + + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + rpc PurgeQueue(PurgeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/queues/*}:purge" + body: "*" + }; + } + + // 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.v2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + rpc PauseQueue(PauseQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/queues/*}:pause" + body: "*" + }; + } + + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + rpc ResumeQueue(ResumeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/queues/*}:resume" + body: "*" + }; + } + + // Gets the access control policy for a [Queue][google.cloud.tasks.v2.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) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" + body: "*" + }; + } + + // Sets the access control policy for a [Queue][google.cloud.tasks.v2.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. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" + body: "*" + }; + } + + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.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) { + option (google.api.http) = { + post: "/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" + body: "*" + }; + } + + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2.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. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*/queues/*}/tasks" + }; + } + + // Gets a task. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * The maximum task size is 100KB. + rpc CreateTask(CreateTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*/queues/*}/tasks" + body: "*" + }; + } + + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has executed successfully or permanently + // failed. + rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // 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.v2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2.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][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.v2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + rpc RunTask(RunTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run" + body: "*" + }; + } +} + +// Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. +message ListQueuesRequest { + // 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.v2.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 "state: PAUSED". + // + // Note that using filters might cause fewer queues than the + // requested page_size to be returned. + string filter = 2; + + // Requested page size. + // + // 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.v2.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.v2.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + string page_token = 4; +} + +// Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. +message ListQueuesResponse { + // The list of queues. + repeated Queue queues = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + string next_page_token = 2; +} + +// Request message for [GetQueue][google.cloud.tasks.v2.CloudTasks.GetQueue]. +message GetQueueRequest { + // Required. + // + // The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue]. +message CreateQueueRequest { + // 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; + + // 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; +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue]. +message UpdateQueueRequest { + // 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; + + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. +message DeleteQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue]. +message PurgeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue]. +message PauseQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. +message ResumeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. +message ListTasksRequest { + // 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.v2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2.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.v2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2.Task] resource. + Task.View response_view = 2; + + // Maximum page size. + // + // Fewer tasks than requested might be returned, even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2.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 = 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.v2.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + string page_token = 4; +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. +message ListTasksResponse { + // The list of tasks. + repeated Task tasks = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2.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.v2.CloudTasks.GetTask]. +message GetTaskRequest { + // 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.v2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2.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.v2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2.Task] resource. + Task.View response_view = 2; +} + +// Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. +message CreateTaskRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + string parent = 1; + + // 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.v2.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.v2.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or executed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or executed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or executed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2.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; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2.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.v2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2.Task] resource. + Task.View response_view = 3; +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2.CloudTasks.DeleteTask]. +message DeleteTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; +} + +// 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: + // `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.v2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2.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.v2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2.Task] resource. + Task.View response_view = 2; +} diff --git a/google/cloud/tasks/v2/cloudtasks_gapic.yaml b/google/cloud/tasks/v2/cloudtasks_gapic.yaml new file mode 100644 index 000000000..e0453b952 --- /dev/null +++ b/google/cloud/tasks/v2/cloudtasks_gapic.yaml @@ -0,0 +1,440 @@ +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: + # 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/queue.proto b/google/cloud/tasks/v2/queue.proto new file mode 100644 index 000000000..05dd03d07 --- /dev/null +++ b/google/cloud/tasks/v2/queue.proto @@ -0,0 +1,341 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "QueueProto"; +option java_package = "com.google.cloud.tasks.v2"; + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, queue types, and others. +message Queue { + // State of the queue. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + RUNNING = 1; + + // 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. + PAUSED = 2; + + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. + DISABLED = 3; + } + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], + // after which it becomes output only. + // + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + string name = 1; + + // Overrides for + // [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. + // + // 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 + // setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting app_engine_routing_override = 2; + + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2.Queue.retry_config] are + // related because they both control task attempts. However they control task + // attempts in different ways: + // + // * [rate_limits][google.cloud.tasks.v2.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.v2.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + // + // The queue's actual dispatch rate is the result of: + // + // * Number of tasks in the queue + // * User-specified throttling: [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + // [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the + // [queue's state][google.cloud.tasks.v2.Queue.state]. + // * System throttling due to `429` (Too Many Requests) or `503` (Service + // Unavailable) responses from the worker, high error rates, or to smooth + // sudden large traffic spikes. + RateLimits rate_limits = 3; + + // Settings that determine the retry behavior. + // + // * For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // * For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine + // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig retry_config = 4; + + // Output only. The state of the queue. + // + // `state` can only be changed by called + // [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used to change `state`. + State state = 5; + + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2.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 + // time will be unset if the queue has never been purged. + google.protobuf.Timestamp purge_time = 6; +} + +// Rate limits. +// +// 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.v2.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2.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.v2.AppEngineHttpQueue], the maximum allowed value + // is 500. + // + // + // This field has the same meaning as + // [rate in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + double max_dispatches_per_second = 1; + + // Output only. The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + // + // Cloud Tasks will pick the value of `max_burst_size` based on the + // 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 + // `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.v2.CloudTasks.UpdateQueue] is called on a queue + // created by `queue.yaml/xml`, `max_burst_size` will be reset based + // on the value of + // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], + // regardless of whether + // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] + // is updated. + // + int32 max_burst_size = 2; + + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // The maximum allowed value is 5,000. + // + // + // This field has the same meaning as + // [max_concurrent_requests in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + int32 max_concurrent_dispatches = 3; +} + +// Retry config. +// +// These settings determine when a failed task attempt is retried. +message RetryConfig { + // Number of attempts per task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that is, if the + // first attempt fails, then there will be `max_attempts - 1` retries). Must + // be >= -1. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // -1 indicates unlimited attempts. + // + // This field has the same meaning as + // [task_retry_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + int32 max_attempts = 1; + + // 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.v2.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. + // + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_retry_duration = 2; + + // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration min_backoff = 3; + + // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_backoff = 4; + + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2.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.v2.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2.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 has the same meaning as + // [max_doublings in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + int32 max_doublings = 5; +} diff --git a/google/cloud/tasks/v2/target.proto b/google/cloud/tasks/v2/target.proto new file mode 100644 index 000000000..2943a4058 --- /dev/null +++ b/google/cloud/tasks/v2/target.proto @@ -0,0 +1,274 @@ +// 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.tasks.v2; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TargetProto"; +option java_package = "com.google.cloud.tasks.v2"; + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2.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: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are +// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) +// 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.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]. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` [host][google.cloud.tasks.v2.AppEngineRouting.host] `+` +// [relative_uri][google.cloud.tasks.v2.AppEngineHttpRequest.relative_uri] +// +// 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][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed +// tasks will be retried according to the +// [retry configuration][Queue.RetryConfig]. `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. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt will fail + // with error code 405 (Method Not Allowed). See + // [Writing a push task request + // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the documentation for the request handlers in the language your app is + // written in e.g. + // [Python Request + // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + HttpMethod http_method = 1; + + // 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]. + AppEngineRouting app_engine_routing = 2; + + // The relative URI. + // + // The relative URI must begin with "/" and must be a valid HTTP relative URI. + // It can contain a path and query string arguments. + // If the relative URI is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + string relative_uri = 3; + + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud + // Tasks sets the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // 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). + // 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. + // + // 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.v2.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + map headers = 4; + + // HTTP request body. + // + // A request body is allowed only if the HTTP method is POST or PUT. It is + // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + bytes body = 5; +} + +// 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), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// 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). +message AppEngineRouting { + // App service. + // + // By default, the task is sent to the service which is the default + // 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.v2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2.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.v2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string. + string service = 1; + + // App version. + // + // By default, the task is sent to the version which is the default + // 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.v2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2.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.v2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string. + string version = 2; + + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // 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). + string instance = 3; + + // Output only. The host that the task is sent to. + // + // The host is constructed from the domain name of the app associated with + // the queue's project ID (for example .appspot.com), and the + // [service][google.cloud.tasks.v2.AppEngineRouting.service], [version][google.cloud.tasks.v2.AppEngineRouting.version], + // and [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which were created using + // the App Engine SDK might have a custom domain name. + // + // For more information, see + // [How Requests are + // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + string host = 4; +} + +// The HTTP method used to deliver the task. +enum HttpMethod { + // HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0; + + // HTTP POST + POST = 1; + + // HTTP GET + GET = 2; + + // HTTP HEAD + HEAD = 3; + + // HTTP PUT + PUT = 4; + + // HTTP DELETE + DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // HTTP OPTIONS + OPTIONS = 7; +} diff --git a/google/cloud/tasks/v2/task.proto b/google/cloud/tasks/v2/task.proto new file mode 100644 index 000000000..eefcb378c --- /dev/null +++ b/google/cloud/tasks/v2/task.proto @@ -0,0 +1,181 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TaskProto"; +option java_package = "com.google.cloud.tasks.v2"; + +// A unit of scheduled work. +message Task { + // The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data. + // + // When a task is returned in a response, 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. + enum View { + // Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0; + + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // [body in AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. + // Bodies 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.v2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2.Queue] resource. + FULL = 2; + } + + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + // + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + string name = 1; + + // Required. The message to send to the worker. + oneof message_type { + // HTTP request that is sent to the App Engine app handler. + // + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. + AppEngineHttpRequest app_engine_http_request = 2; + } + + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 4; + + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + google.protobuf.Timestamp create_time = 5; + + // The deadline for requests sent to the worker. If the worker does not + // respond by this deadline then the request is cancelled and the attempt + // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + // task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + // + // Note that when the request is cancelled, Cloud Tasks will stop listing for + // the response, but whether the worker stops processing depends on the + // worker. For example, if the worker is stuck, it may not react to cancelled + // requests. + // + // The default and maximum values depend on the type of request: + // + // + // * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the + // request has the default deadline. The default deadline depends on the + // [scaling + // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + // of the service: 10 minutes for standard apps with automatic scaling, 24 + // hours for standard apps with manual and basic scaling, and 60 minutes for + // flex apps. If the request deadline is set, it must be in the interval [15 + // seconds, 24 hours 15 seconds]. Regardless of the task's + // `dispatch_deadline`, the app handler will not run for longer than than + // the service's timeout. We recommend setting the `dispatch_deadline` to + // at most a few seconds more than the app handler's timeout. For more + // information see + // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // + // `dispatch_deadline` will be truncated to the nearest millisecond. The + // deadline is an approximate deadline. + google.protobuf.Duration dispatch_deadline = 6; + + // Output only. The number of attempts dispatched. + // + // This count includes attempts which have been dispatched but haven't + // received a response. + int32 dispatch_count = 7; + + // Output only. The number of attempts which have received a response. + int32 response_count = 8; + + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be set. + // The other [Attempt][google.cloud.tasks.v2.Attempt] information is not retained by Cloud Tasks. + Attempt first_attempt = 9; + + // Output only. The status of the task's last attempt. + Attempt last_attempt = 10; + + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2.Task] has + // been returned. + View view = 11; +} + +// The status of a task attempt. +message Attempt { + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 1; + + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp dispatch_time = 2; + + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp response_time = 3; + + // Output only. The response from the worker for this attempt. + // + // If `response_time` is unset, then the task has not been attempted or is + // currently running and the `response_status` field is meaningless. + google.rpc.Status response_status = 4; +} diff --git a/google/cloud/tasks/v2beta2/BUILD.bazel b/google/cloud/tasks/v2beta2/BUILD.bazel new file mode 100644 index 000000000..f10c5e203 --- /dev/null +++ b/google/cloud/tasks/v2beta2/BUILD.bazel @@ -0,0 +1,161 @@ +# 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 = "tasks_proto", + srcs = [ + "cloudtasks.proto", + "queue.proto", + "target.proto", + "task.proto", + ], + deps = [ + "//google/api:annotations_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", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "tasks_proto_with_info", + deps = [":tasks_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +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_GRPC_DEPS, +) + +java_resource_name_proto_library( + name = "tasks_resource_name_java_proto", + gapic_yaml = "cloudtasks_gapic.yaml", + deps = [":tasks_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"], + deps = [ + ":tasks_java_proto", + ":tasks_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":tasks_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.tasks.v2beta2.CloudTasksClientTest", +]] + +# Opensource 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 = [ + ":tasks_java_proto", + ":tasks_proto", + ":tasks_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 = "tasks_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2", + protos = [":tasks_proto"], + 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", + deps = [ + ":tasks_go_proto", + "//google/iam/v1:iam_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_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/apiv2beta2", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/tasks/v2beta2/cloudtasks.proto b/google/cloud/tasks/v2beta2/cloudtasks.proto index 06f1b65b9..61a6ecdc9 100644 --- a/google/cloud/tasks/v2beta2/cloudtasks.proto +++ b/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -33,7 +33,6 @@ option java_outer_classname = "CloudTasksProto"; option java_package = "com.google.cloud.tasks.v2beta2"; option objc_class_prefix = "TASKS"; - // Cloud Tasks allows developers to manage the execution of background // work in their applications. service CloudTasks { @@ -56,14 +55,15 @@ service CloudTasks { // 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. // Read - // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) - // before using this method. + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. rpc CreateQueue(CreateQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2beta2/{parent=projects/*/locations/*}/queues" @@ -77,14 +77,15 @@ 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. // Read - // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) - // before using this method. + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. rpc UpdateQueue(UpdateQueueRequest) returns (Queue) { option (google.api.http) = { patch: "/v2beta2/{queue.name=projects/*/locations/*/queues/*}" @@ -102,8 +103,9 @@ service CloudTasks { // 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. // Read - // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) - // before using this method. + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2beta2/{name=projects/*/locations/*/queues/*}" @@ -127,9 +129,10 @@ service CloudTasks { // // 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" @@ -141,14 +144,17 @@ service CloudTasks { // // 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 // queues, follow the 500/50/5 pattern described in - // [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). rpc ResumeQueue(ResumeQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*}:resume" @@ -156,46 +162,52 @@ service CloudTasks { }; } - // 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](/iam) permission on the - // specified resource parent: + // 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: "*" }; } - // 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. // - // Authorization requires the following [Google IAM](/iam) permission on the - // specified resource parent: + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // 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: "*" }; } - // 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: "*" @@ -204,10 +216,13 @@ service CloudTasks { // 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. rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { option (google.api.http) = { get: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" @@ -225,10 +240,11 @@ service CloudTasks { // // 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 100KB. - // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this - // the maximum task size is 1MB. + // * 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. rpc CreateTask(CreateTaskRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" @@ -252,18 +268,19 @@ 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 @@ -279,12 +296,13 @@ service CloudTasks { // 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 @@ -300,7 +318,8 @@ service CloudTasks { // // 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" @@ -311,9 +330,9 @@ service CloudTasks { // 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" @@ -324,30 +343,33 @@ service CloudTasks { // 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" @@ -356,7 +378,8 @@ service CloudTasks { } } -// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +// Request message for +// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. message ListQueuesRequest { // Required. // @@ -364,11 +387,11 @@ message ListQueuesRequest { // 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 Filters](/logging/docs/view/advanced_filters). + // `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: *". // @@ -381,22 +404,25 @@ 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; @@ -404,7 +430,8 @@ 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. @@ -413,7 +440,8 @@ 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. // @@ -422,7 +450,8 @@ message GetQueueRequest { string name = 1; } -// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +// Request message for +// [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. message CreateQueueRequest { // Required. // @@ -438,21 +467,25 @@ message CreateQueueRequest { // // The queue to create. // - // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + // an existing queue. Queue queue = 2; } -// 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. // - // 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. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + // changed. Queue queue = 1; // A mask used to specify which fields of the queue are being updated. @@ -461,7 +494,8 @@ 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. // @@ -470,7 +504,8 @@ message DeleteQueueRequest { string name = 1; } -// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +// Request message for +// [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. message PurgeQueueRequest { // Required. // @@ -479,7 +514,8 @@ message PurgeQueueRequest { string name = 1; } -// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +// Request message for +// [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. message PauseQueueRequest { // Required. // @@ -488,7 +524,8 @@ message PauseQueueRequest { string name = 1; } -// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +// Request message for +// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. message ResumeQueueRequest { // Required. // @@ -497,7 +534,8 @@ message ResumeQueueRequest { string name = 1; } -// 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. // @@ -505,48 +543,44 @@ message ListTasksRequest { // `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. + // 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](/iam/) permission on the + // 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; - // Sort order used for the query. The only fields supported for sorting - // are `schedule_time` and `pull_message.tag`. All results will be - // returned in approximately ascending order. The default ordering is by - // `schedule_time`. - string order_by = 3; - // Requested page size. Fewer tasks than requested might be returned. // // 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. + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + // in the response to determine if more tasks exist. 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; @@ -554,14 +588,16 @@ 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. // @@ -569,22 +605,24 @@ message GetTaskRequest { // `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. + // 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](/iam/) permission on the + // 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. // @@ -600,13 +638,13 @@ message CreateTaskRequest { // // 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: // @@ -621,27 +659,28 @@ 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; - // 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](/iam/) permission on the + // 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; } @@ -656,7 +695,8 @@ message DeleteTaskRequest { string name = 1; } -// 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. // @@ -675,39 +715,42 @@ message LeaseTasksRequest { // // 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; - // 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](/iam/) permission on the + // 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: // @@ -722,15 +765,17 @@ message LeaseTasksRequest { // // SDK compatibility: Although the SDK allows tags to be either // string or - // [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // [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; @@ -750,8 +795,8 @@ message AcknowledgeTaskRequest { // 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. + // [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; } @@ -769,8 +814,8 @@ message RenewLeaseRequest { // 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. + // [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; // Required. @@ -782,17 +827,18 @@ message RenewLeaseRequest { // `lease_duration` will be truncated to the nearest second. google.protobuf.Duration lease_duration = 3; - // 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](/iam/) permission on the + // 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; } @@ -811,21 +857,22 @@ message CancelLeaseRequest { // 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. + // [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. + // 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](/iam/) permission on the + // 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; } @@ -839,17 +886,18 @@ message RunTaskRequest { // `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. + // 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](/iam/) permission on the + // 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.yaml b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml index ed345830f..d0693fe5f 100644 --- a/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml +++ b/google/cloud/tasks/v2beta2/cloudtasks_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Tasks\V2beta2 nodejs: package_name: tasks.v2beta2 -# 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. @@ -39,6 +33,9 @@ interfaces: 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} @@ -79,10 +76,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -132,7 +125,6 @@ interfaces: - parent header_request_params: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -155,7 +147,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -173,7 +164,6 @@ interfaces: - queue header_request_params: - parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -190,7 +180,6 @@ interfaces: - queue header_request_params: - queue.name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -206,7 +195,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -222,7 +210,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -238,7 +225,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -254,7 +240,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -270,7 +255,6 @@ interfaces: - resource header_request_params: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -288,7 +272,6 @@ interfaces: - policy header_request_params: - resource - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -306,7 +289,6 @@ interfaces: - permissions header_request_params: - resource - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -322,7 +304,6 @@ interfaces: - parent header_request_params: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -345,7 +326,6 @@ interfaces: - name header_request_params: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -363,7 +343,6 @@ interfaces: - task header_request_params: - parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -379,7 +358,6 @@ interfaces: - name header_request_params: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -392,7 +370,6 @@ interfaces: - lease_duration header_request_params: - parent - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -410,7 +387,6 @@ interfaces: - schedule_time header_request_params: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -430,7 +406,6 @@ interfaces: - lease_duration header_request_params: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -448,7 +423,6 @@ interfaces: - schedule_time header_request_params: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -464,7 +438,6 @@ interfaces: - name header_request_params: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/cloud/tasks/v2beta2/queue.proto b/google/cloud/tasks/v2beta2/queue.proto index 4495cade1..3aa4b80b3 100644 --- a/google/cloud/tasks/v2beta2/queue.proto +++ b/google/cloud/tasks/v2beta2/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "QueueProto"; option java_package = "com.google.cloud.tasks.v2beta2"; - // A queue is a container of related tasks. Queues are configured to manage // how those tasks are dispatched. Configurable properties include rate limits, // retry options, target types, and others. @@ -49,29 +48,32 @@ 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. // // A queue becomes `DISABLED` when - // [queue.yaml](/appengine/docs/python/config/queueref) or - // [queue.xml](appengine/docs/standard/java/config/queueref) is uploaded - // which does not contain the queue. You cannot directly disable a queue. + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a 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. // @@ -81,7 +83,8 @@ message Queue { // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), // hyphens (-), colons (:), or periods (.). // For more information, see - // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) // * `LOCATION_ID` is the canonical ID for the queue's location. // The list of available locations can be obtained by calling // [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -90,9 +93,10 @@ 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. // @@ -100,30 +104,34 @@ 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. @@ -134,25 +142,30 @@ message Queue { // * For tasks created using the App Engine SDK: the queue-level retry // settings apply to all tasks in the queue which do not have retry settings // explicitly set on the task and were created by the App Engine SDK. See - // [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + // [App Engine + // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). RetryConfig retry_config = 6; // Output only. The state of the queue. // // `state` can only be changed by called // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading - // [queue.yaml/xml](/appengine/docs/python/config/queueref). - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. + // [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`. 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 Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + // 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 // time will be unset if the queue has never been purged. @@ -164,23 +177,29 @@ 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, the maximum allowed value is 500. - // * 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. + // * 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 + // `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. // // // This field has the same meaning as - // [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate). + // [rate in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). double max_tasks_dispatched_per_second = 1; // Output only. The max burst size. @@ -206,11 +225,11 @@ message RateLimits { // // For App Engine queues that were created or updated using // `queue.yaml/xml`, `max_burst_size` is equal to - // [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size). + // [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] @@ -230,13 +249,14 @@ 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 + // [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 - // [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + // [max_concurrent_requests in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). int32 max_concurrent_tasks = 3; } @@ -252,7 +272,8 @@ message RetryConfig { // // // This field has the same meaning as - // [task_retry_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // [task_retry_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). oneof num_attempts { // The maximum number of attempts for a task. // @@ -268,90 +289,100 @@ 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. // // This field has the same meaning as - // [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // [task_age_limit in + // 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](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. // // This field has the same meaning as - // [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // [min_backoff_seconds in + // 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](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. // // This field has the same meaning as - // [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // [max_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration max_backoff = 5; // 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 - // [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // [max_doublings in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). int32 max_doublings = 6; } diff --git a/google/cloud/tasks/v2beta2/target.proto b/google/cloud/tasks/v2beta2/target.proto index f259694c3..ae1b5555d 100644 --- a/google/cloud/tasks/v2beta2/target.proto +++ b/google/cloud/tasks/v2beta2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -24,14 +24,12 @@ option java_multiple_files = true; 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. @@ -43,10 +41,11 @@ 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]. @@ -54,7 +53,8 @@ message PullMessage { // The tag must be less than 500 characters. // // SDK compatibility: Although the SDK allows tags to be either - // string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // string or + // [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. If a tag isn't UTF-8 // encoded, the tag will be empty when the task is returned by Cloud Tasks. string tag = 2; @@ -63,23 +63,29 @@ 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 -// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// 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: // // `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; } @@ -89,10 +95,12 @@ 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 -// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// 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: // @@ -100,18 +108,22 @@ message AppEngineHttpTarget { // // The task will be delivered to the App Engine app which belongs to the same // project as the queue. For more information, see -// [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed) +// [How Requests are +// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) // and how routing is affected by -// [dispatch files](/appengine/docs/python/config/dispatchref). +// [dispatch +// files](https://cloud.google.com/appengine/docs/python/config/dispatchref). // -// 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: @@ -132,10 +144,12 @@ message AppEngineHttpRequest { // The app's request handler for the task's target URL must be able to handle // HTTP requests with this http_method, otherwise the task attempt will fail // with error code 405 (Method Not Allowed). See - // [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // [Writing a push task request + // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) // and the documentation for the request handlers in the language your app is // written in e.g. - // [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass). + // [Python Request + // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). HttpMethod http_method = 1; // Task-level setting for App Engine routing. @@ -143,7 +157,8 @@ 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. @@ -158,7 +173,7 @@ message AppEngineHttpRequest { // // This map contains the header field names and values. // Headers can be set when the - // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. // Repeated headers are not supported but a header value can contain commas. // // Cloud Tasks sets some headers to default values: @@ -169,13 +184,14 @@ 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 // `"application/octet-stream"`. The default can be overridden by explicitly // setting `Content-Type` to a particular media type when the - // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. // For example, `Content-Type` can be set to `"application/json"`. // * `Content-Length`: This is computed by Cloud Tasks. This value is // output only. It cannot be changed. @@ -188,13 +204,16 @@ 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](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // [request + // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-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. // // 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. @@ -209,10 +228,14 @@ message AppEngineHttpRequest { // App Engine Routing. // // For more information about services, versions, and instances see -// [An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine), -// [Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine), -// [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed), -// and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). +// [An Overview of App +// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// 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). message AppEngineRouting { // App service. // @@ -220,16 +243,18 @@ 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], - // [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 + // 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] are the empty string. + // [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. string service = 1; // App version. @@ -238,16 +263,18 @@ 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], - // [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 + // 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] are the empty string. + // [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. string version = 2; // App instance. @@ -256,16 +283,20 @@ message AppEngineRouting { // the task is attempted. // // Requests can only be sent to a specific instance if - // [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). // App Engine Flex does not support instances. For more information, see - // [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed) - // and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). + // [App Engine Standard request + // 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). string instance = 3; // Output only. The host that the task is sent to. // // For more information, see - // [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed). + // [How Requests are + // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). // // The host is constructed as: // @@ -284,44 +315,49 @@ 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; } @@ -330,18 +366,18 @@ enum HttpMethod { // HTTP method unspecified HTTP_METHOD_UNSPECIFIED = 0; - // HTTP Post + // HTTP POST POST = 1; - // HTTP Get + // HTTP GET GET = 2; - // HTTP Head + // HTTP HEAD HEAD = 3; - // HTTP Put + // HTTP PUT PUT = 4; - // HTTP Delete + // HTTP DELETE DELETE = 5; } diff --git a/google/cloud/tasks/v2beta2/task.proto b/google/cloud/tasks/v2beta2/task.proto index 6afd5895b..f9e18be49 100644 --- a/google/cloud/tasks/v2beta2/task.proto +++ b/google/cloud/tasks/v2beta2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -26,10 +26,10 @@ option java_multiple_files = true; option java_outer_classname = "TaskProto"; 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. + // 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,22 +44,26 @@ 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. // @@ -69,7 +73,8 @@ message Task { // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), // hyphens (-), colons (:), or periods (.). // For more information, see - // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) // * `LOCATION_ID` is the canonical ID for the task's location. // The list of available locations can be obtained by calling // [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -87,16 +92,21 @@ 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; } @@ -107,7 +117,8 @@ 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; @@ -120,8 +131,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; } @@ -135,23 +146,26 @@ message TaskStatus { // Output only. The number of attempts which have received a response. // - // This field is not calculated for - // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + // 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.PullTaskTarget). + // 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.PullTaskTarget). + // 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 new file mode 100644 index 000000000..2af528f0e --- /dev/null +++ b/google/cloud/tasks/v2beta3/BUILD.bazel @@ -0,0 +1,162 @@ +# 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 = "tasks_proto", + srcs = [ + "cloudtasks.proto", + "queue.proto", + "target.proto", + "task.proto", + ], + deps = [ + "//google/api:annotations_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", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "tasks_proto_with_info", + deps = [":tasks_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +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_GRPC_DEPS, +) + +java_resource_name_proto_library( + name = "tasks_resource_name_java_proto", + gapic_yaml = "cloudtasks_gapic.yaml", + deps = [":tasks_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"], + deps = [ + ":tasks_java_proto", + ":tasks_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":tasks_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.tasks.v2beta3.CloudTasksClientTest", +]] + +# Opensource 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 = [ + ":tasks_java_proto", + ":tasks_proto", + ":tasks_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 = "tasks_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3", + protos = [":tasks_proto"], + 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", + deps = [ + ":tasks_go_proto", + "//google/iam/v1:iam_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_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/apiv2beta3", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/tasks/v2beta3/cloudtasks.proto b/google/cloud/tasks/v2beta3/cloudtasks.proto new file mode 100644 index 000000000..66971c3e6 --- /dev/null +++ b/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -0,0 +1,605 @@ +// 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.tasks.v2beta3; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/cloud/tasks/v2beta3/queue.proto"; +import "google/cloud/tasks/v2beta3/task.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/rpc/code.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; +option java_multiple_files = true; +option java_outer_classname = "CloudTasksProto"; +option java_package = "com.google.cloud.tasks.v2beta3"; +option objc_class_prefix = "TASKS"; + +// Cloud Tasks allows developers to manage the execution of background +// work in their applications. +service CloudTasks { + // Lists queues. + // + // Queues are returned in lexicographical order. + rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) { + option (google.api.http) = { + get: "/v2beta3/{parent=projects/*/locations/*}/queues" + }; + } + + // Gets a queue. + rpc GetQueue(GetQueueRequest) returns (Queue) { + option (google.api.http) = { + get: "/v2beta3/{name=projects/*/locations/*/queues/*}" + }; + } + + // 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. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc CreateQueue(CreateQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta3/{parent=projects/*/locations/*}/queues" + body: "queue" + }; + } + + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // 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. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc UpdateQueue(UpdateQueueRequest) returns (Queue) { + option (google.api.http) = { + patch: "/v2beta3/{queue.name=projects/*/locations/*/queues/*}" + body: "queue" + }; + } + + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // 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. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta3/{name=projects/*/locations/*/queues/*}" + }; + } + + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + rpc PurgeQueue(PurgeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta3/{name=projects/*/locations/*/queues/*}:purge" + body: "*" + }; + } + + // 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.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + rpc PauseQueue(PauseQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta3/{name=projects/*/locations/*/queues/*}:pause" + body: "*" + }; + } + + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + rpc ResumeQueue(ResumeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta3/{name=projects/*/locations/*/queues/*}:resume" + body: "*" + }; + } + + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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) { + option (google.api.http) = { + post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy" + body: "*" + }; + } + + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy" + body: "*" + }; + } + + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.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) { + option (google.api.http) = { + post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions" + body: "*" + }; + } + + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta3.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. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks" + }; + } + + // Gets a task. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * The maximum task size is 100KB. + rpc CreateTask(CreateTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks" + body: "*" + }; + } + + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has executed successfully or permanently + // failed. + rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // 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.v2beta3.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta3.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][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.v2beta3.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + rpc RunTask(RunTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run" + body: "*" + }; + } +} + +// Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +message ListQueuesRequest { + // 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.v2beta3.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 "state: PAUSED". + // + // Note that using filters might cause fewer queues than the + // requested page_size to be returned. + string filter = 2; + + // Requested page size. + // + // 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.v2beta3.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.v2beta3.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + string page_token = 4; +} + +// Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +message ListQueuesResponse { + // The list of queues. + repeated Queue queues = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + string next_page_token = 2; +} + +// Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. +message GetQueueRequest { + // Required. + // + // The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. +message CreateQueueRequest { + // 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; + + // 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; +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. +message UpdateQueueRequest { + // 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; + + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. +message DeleteQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. +message PurgeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. +message PauseQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. +message ResumeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +message ListTasksRequest { + // 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.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.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.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + Task.View response_view = 2; + + // Maximum page size. + // + // Fewer tasks than requested might be returned, even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta3.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 = 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.v2beta3.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + string page_token = 4; +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +message ListTasksResponse { + // The list of tasks. + repeated Task tasks = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2beta3.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.v2beta3.CloudTasks.GetTask]. +message GetTaskRequest { + // 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.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.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.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + Task.View response_view = 2; +} + +// Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. +message CreateTaskRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + string parent = 1; + + // 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.v2beta3.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.v2beta3.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or executed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or executed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or executed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2beta3.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; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.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.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + Task.View response_view = 3; +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2beta3.CloudTasks.DeleteTask]. +message DeleteTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; +} + +// 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: + // `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.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.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.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + Task.View response_view = 2; +} diff --git a/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml new file mode 100644 index 000000000..eb88c15fe --- /dev/null +++ b/google/cloud/tasks/v2beta3/cloudtasks_gapic.yaml @@ -0,0 +1,435 @@ +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: + # 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/queue.proto b/google/cloud/tasks/v2beta3/queue.proto new file mode 100644 index 000000000..264a19eed --- /dev/null +++ b/google/cloud/tasks/v2beta3/queue.proto @@ -0,0 +1,352 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; +option java_multiple_files = true; +option java_outer_classname = "QueueProto"; +option java_package = "com.google.cloud.tasks.v2beta3"; + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, queue types, and others. +message Queue { + // State of the queue. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + RUNNING = 1; + + // 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. + PAUSED = 2; + + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. + DISABLED = 3; + } + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], + // after which it becomes output only. + // + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + string name = 1; + + oneof queue_type { + // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to + // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto. + AppEngineHttpQueue app_engine_http_queue = 3; + } + + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are + // related because they both control task attempts. However they control task + // attempts in different ways: + // + // * [rate_limits][google.cloud.tasks.v2beta3.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.v2beta3.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + // + // The queue's actual dispatch rate is the result of: + // + // * Number of tasks in the queue + // * User-specified throttling: [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + // [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + // * System throttling due to `429` (Too Many Requests) or `503` (Service + // Unavailable) responses from the worker, high error rates, or to smooth + // sudden large traffic spikes. + RateLimits rate_limits = 4; + + // Settings that determine the retry behavior. + // + // * For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // * For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine + // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig retry_config = 5; + + // Output only. The state of the queue. + // + // `state` can only be changed by called + // [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be used to change `state`. + State state = 6; + + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta3.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 + // time will be unset if the queue has never been purged. + google.protobuf.Timestamp purge_time = 7; + + // 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 = 10; +} + +// Rate limits. +// +// 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.v2beta3.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.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.v2beta3.AppEngineHttpQueue], the maximum allowed value + // is 500. + // + // + // This field has the same meaning as + // [rate in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + double max_dispatches_per_second = 1; + + // Output only. The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + // + // Cloud Tasks will pick the value of `max_burst_size` based on the + // value of + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + // + // For App Engine 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 + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue + // created by `queue.yaml/xml`, `max_burst_size` will be reset based + // on the value of + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second], + // regardless of whether + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second] + // is updated. + // + int32 max_burst_size = 2; + + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // The maximum allowed value is 5,000. + // + // + // This field has the same meaning as + // [max_concurrent_requests in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + int32 max_concurrent_dispatches = 3; +} + +// Retry config. +// +// These settings determine when a failed task attempt is retried. +message RetryConfig { + // Number of attempts per task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that is, if the + // first attempt fails, then there will be `max_attempts - 1` retries). Must + // be >= -1. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // -1 indicates unlimited attempts. + // + // This field has the same meaning as + // [task_retry_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + int32 max_attempts = 1; + + // 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.v2beta3.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. + // + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_retry_duration = 2; + + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration min_backoff = 3; + + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_backoff = 4; + + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta3.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.v2beta3.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.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 has the same meaning as + // [max_doublings in + // 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/v2beta3/target.proto b/google/cloud/tasks/v2beta3/target.proto new file mode 100644 index 000000000..48d7df55f --- /dev/null +++ b/google/cloud/tasks/v2beta3/target.proto @@ -0,0 +1,440 @@ +// 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.tasks.v2beta3; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TargetProto"; +option java_package = "com.google.cloud.tasks.v2beta3"; + +// 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 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]. +// +// * 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 backoffs on all errors. Normally the backoff specified in +// [rate limits][Queue.RateLimits] 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, +// 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; + + // 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.v2beta3.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.v2beta3.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.v2beta3.HttpMethod]. + bytes body = 4; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the [HttpTarget.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 queue. +// +// The task will be delivered to the App Engine application hostname +// specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] explains how the +// task's host URL is constructed. +// +// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] 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 AppEngineHttpQueue { + // Overrides for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta3.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.v2beta3.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting app_engine_routing_override = 1; +} + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.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: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are +// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) +// 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.v2beta3.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.v2beta3.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.v2beta3.AppEngineHttpRequest.app_engine_routing]. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] `+` +// [relative_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative_uri] +// +// 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][google.cloud.tasks.v2beta3.Task.dispatch_deadline]. Failed +// tasks will be retried according to the +// [retry configuration][Queue.RetryConfig]. `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. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt will fail + // with error code 405 (Method Not Allowed). See + // [Writing a push task request + // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the documentation for the request handlers in the language your app is + // written in e.g. + // [Python Request + // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + HttpMethod http_method = 1; + + // Task-level setting for App Engine routing. + // + // If set, + // [app_engine_routing_override][google.cloud.tasks.v2beta3.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.v2beta3.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting app_engine_routing = 2; + + // The relative URI. + // + // The relative URI must begin with "/" and must be a valid HTTP relative URI. + // It can contain a path and query string arguments. + // If the relative URI is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + string relative_uri = 3; + + // 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]. + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud + // Tasks sets the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // 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). + // 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. + // + // 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.v2beta3.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] documentation. + map headers = 4; + + // HTTP request body. + // + // A request body is allowed only if the HTTP method is POST or PUT. It is + // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + bytes body = 5; +} + +// 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), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// 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). +message AppEngineRouting { + // App service. + // + // By default, the task is sent to the service which is the default + // 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.v2beta3.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.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.v2beta3.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + string service = 1; + + // App version. + // + // By default, the task is sent to the version which is the default + // 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.v2beta3.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.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.v2beta3.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + string version = 2; + + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // 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). + string instance = 3; + + // Output only. The host that the task is sent to. + // + // The host is constructed from the domain name of the app associated with + // the queue's project ID (for example .appspot.com), and the + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], + // and [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks which were created using + // the App Engine SDK might have a custom domain name. + // + // For more information, see + // [How Requests are + // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + string host = 4; +} + +// The HTTP method used to execute the task. +enum HttpMethod { + // HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0; + + // HTTP POST + POST = 1; + + // HTTP GET + GET = 2; + + // HTTP HEAD + HEAD = 3; + + // HTTP PUT + PUT = 4; + + // HTTP DELETE + DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // 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/v2beta3/task.proto b/google/cloud/tasks/v2beta3/task.proto new file mode 100644 index 000000000..10213ad85 --- /dev/null +++ b/google/cloud/tasks/v2beta3/task.proto @@ -0,0 +1,188 @@ +// 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.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TaskProto"; +option java_package = "com.google.cloud.tasks.v2beta3"; + +// A unit of scheduled work. +message Task { + // The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data. + // + // When a task is returned in a response, 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. + enum View { + // Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0; + + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. + // Bodies 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.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta3.Queue] resource. + FULL = 2; + } + + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + string name = 1; + + // Required. The message to send to the worker. + oneof payload_type { + // HTTP request that is sent to the App Engine app handler. + // + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set. + AppEngineHttpRequest app_engine_http_request = 3; + + // HTTP request that is sent to the task's target. + // + // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + HttpRequest http_request = 11; + } + + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 4; + + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + google.protobuf.Timestamp create_time = 5; + + // The deadline for requests sent to the worker. If the worker does not + // respond by this deadline then the request is cancelled and the attempt + // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // Note that when the request is cancelled, Cloud Tasks will stop listing for + // the response, but whether the worker stops processing depends on the + // worker. For example, if the worker is stuck, it may not react to cancelled + // requests. + // + // The default and maximum values depend on the type of request: + // + // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 10 minutes. The deadline + // must be in the interval [15 seconds, 30 minutes]. + // + // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the + // request has the default deadline. The default deadline depends on the + // [scaling + // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + // of the service: 10 minutes for standard apps with automatic scaling, 24 + // hours for standard apps with manual and basic scaling, and 60 minutes for + // flex apps. If the request deadline is set, it must be in the interval [15 + // seconds, 24 hours 15 seconds]. Regardless of the task's + // `dispatch_deadline`, the app handler will not run for longer than than + // the service's timeout. We recommend setting the `dispatch_deadline` to + // at most a few seconds more than the app handler's timeout. For more + // information see + // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // + // `dispatch_deadline` will be truncated to the nearest millisecond. The + // deadline is an approximate deadline. + google.protobuf.Duration dispatch_deadline = 12; + + // Output only. The number of attempts dispatched. + // + // This count includes attempts which have been dispatched but haven't + // received a response. + int32 dispatch_count = 6; + + // Output only. The number of attempts which have received a response. + int32 response_count = 7; + + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set. + // The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks. + Attempt first_attempt = 8; + + // Output only. The status of the task's last attempt. + Attempt last_attempt = 9; + + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has + // been returned. + View view = 10; +} + +// The status of a task attempt. +message Attempt { + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 1; + + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp dispatch_time = 2; + + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp response_time = 3; + + // Output only. The response from the worker for this attempt. + // + // If `response_time` is unset, then the task has not been attempted or is + // currently running and the `response_status` field is meaningless. + google.rpc.Status response_status = 4; +} diff --git a/google/cloud/texttospeech/BUILD.bazel b/google/cloud/texttospeech/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/texttospeech/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/texttospeech/artman_texttospeech.yaml b/google/cloud/texttospeech/artman_texttospeech.yaml index 4964c62f5..83b8d2fd2 100644 --- a/google/cloud/texttospeech/artman_texttospeech.yaml +++ b/google/cloud/texttospeech/artman_texttospeech.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-texttospeech-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-texttospeech-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-texttospeech-v1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-texttospeech - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-texttospeech-v1beta1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/texttospeech/artman_texttospeech_v1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1.yaml index 1fb4cbe70..b5f3d6d28 100644 --- a/google/cloud/texttospeech/artman_texttospeech_v1.yaml +++ b/google/cloud/texttospeech/artman_texttospeech_v1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-texttospeech-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-texttospeech-v1 - - name: proto - dest: generated/java/proto-google-cloud-texttospeech-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-texttospeech - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-texttospeech-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml index 3d3e1ede7..91280d64e 100644 --- a/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml +++ b/google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-texttospeech-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-texttospeech-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-texttospeech-v1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-texttospeech - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-texttospeech-v1beta1 - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/texttospeech/v1/BUILD.bazel b/google/cloud/texttospeech/v1/BUILD.bazel new file mode 100644 index 000000000..dd89685fe --- /dev/null +++ b/google/cloud/texttospeech/v1/BUILD.bazel @@ -0,0 +1,127 @@ +# 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 = "texttospeech_proto", + srcs = [ + "cloud_tts.proto", + ], + deps = [ + "//google/api:annotations_proto", + ], +) + +proto_library_with_info( + name = "texttospeech_proto_with_info", + deps = [":texttospeech_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 = "texttospeech_java_proto", + deps = [":texttospeech_proto"], +) + +java_grpc_library( + name = "texttospeech_java_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, +) + +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, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":texttospeech_java_gapic_test"], +) for test_name in [ + "com.google.cloud.texttospeech.v1.TextToSpeechClientTest", +]] + +# Opensource 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 = [ + ":texttospeech_java_proto", + ":texttospeech_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 = "texttospeech_go_proto", + 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"], +) + +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"], +) + +go_test( + name = "texttospeech_go_gapic_test", + srcs = [":texttospeech_go_gapic_srcjar_test"], + embed = [":texttospeech_go_gapic"], + importpath = "cloud.google.com/go/texttospeech/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/texttospeech/v1/cloud_tts.proto b/google/cloud/texttospeech/v1/cloud_tts.proto index 0ccbde389..dd9fa6ce2 100644 --- a/google/cloud/texttospeech/v1/cloud_tts.proto +++ b/google/cloud/texttospeech/v1/cloud_tts.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -26,11 +27,9 @@ option java_outer_classname = "TextToSpeechProto"; option java_package = "com.google.cloud.texttospeech.v1"; option php_namespace = "Google\\Cloud\\TextToSpeech\\V1"; - // Service that implements Google Cloud Text-to-Speech API. service TextToSpeech { - // Returns a list of [Voice][google.cloud.texttospeech.v1.Voice] - // supported for synthesis. + // Returns a list of Voice supported for synthesis. rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) { option (google.api.http) = { get: "/v1/voices" @@ -39,7 +38,8 @@ service TextToSpeech { // 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: "*" @@ -173,6 +173,16 @@ message AudioConfig { // 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; } // The message returned to the client by the `SynthesizeSpeech` method. diff --git a/google/cloud/texttospeech/v1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml index 274a06abd..5f35fcdd4 100644 --- a/google/cloud/texttospeech/v1/texttospeech_gapic.yaml +++ b/google/cloud/texttospeech/v1/texttospeech_gapic.yaml @@ -16,16 +16,17 @@ language_settings: package_name: Google\Cloud\TextToSpeech\V1 nodejs: package_name: text-to-speech.v1 -# 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 + 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 @@ -71,10 +72,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -119,7 +116,6 @@ interfaces: groups: - parameters: - language_code - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -134,7 +130,6 @@ interfaces: - input - voice - audio_config - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/cloud/texttospeech/v1beta1/BUILD.bazel b/google/cloud/texttospeech/v1beta1/BUILD.bazel new file mode 100644 index 000000000..5a9557a2e --- /dev/null +++ b/google/cloud/texttospeech/v1beta1/BUILD.bazel @@ -0,0 +1,127 @@ +# 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 = "texttospeech_proto", + srcs = [ + "cloud_tts.proto", + ], + deps = [ + "//google/api:annotations_proto", + ], +) + +proto_library_with_info( + name = "texttospeech_proto_with_info", + deps = [":texttospeech_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 = "texttospeech_java_proto", + deps = [":texttospeech_proto"], +) + +java_grpc_library( + name = "texttospeech_java_grpc", + srcs = [":texttospeech_proto"], + deps = [":texttospeech_java_proto"] + _JAVA_GRPC_DEPS, +) + +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, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":texttospeech_java_gapic_test"], +) for test_name in [ + "com.google.cloud.texttospeech.v1beta1.TextToSpeechClientTest", +]] + +# Opensource 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 = [ + ":texttospeech_java_proto", + ":texttospeech_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 = "texttospeech_go_proto", + 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"], +) + +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"], +) + +go_test( + name = "texttospeech_go_gapic_test", + srcs = [":texttospeech_go_gapic_srcjar_test"], + embed = [":texttospeech_go_gapic"], + importpath = "cloud.google.com/go/texttospeech/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/google/cloud/texttospeech/v1beta1/cloud_tts.proto index 2afe1a8b7..791499c4d 100644 --- a/google/cloud/texttospeech/v1beta1/cloud_tts.proto +++ b/google/cloud/texttospeech/v1beta1/cloud_tts.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "TextToSpeechProto"; option java_package = "com.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] @@ -37,7 +36,8 @@ service TextToSpeech { // 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: "*" diff --git a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml index c89f221cd..276f9ed83 100644 --- a/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml +++ b/google/cloud/texttospeech/v1beta1/texttospeech_gapic.yaml @@ -16,16 +16,17 @@ language_settings: package_name: Google\Cloud\TextToSpeech\V1beta1 nodejs: package_name: text-to-speech.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 + 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 @@ -71,10 +72,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -119,7 +116,6 @@ interfaces: groups: - parameters: - language_code - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 @@ -134,7 +130,6 @@ interfaces: - input - voice - audio_config - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/cloud/translate/artman_translate_v3beta1.yaml b/google/cloud/translate/artman_translate_v3beta1.yaml new file mode 100644 index 000000000..5b5e1b8c7 --- /dev/null +++ b/google/cloud/translate/artman_translate_v3beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: translate + api_version: v3beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v3beta1 + service_yaml: translate_v3beta1.yaml + gapic_yaml: v3beta1/translate_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/translate/translate_v3beta1.yaml b/google/cloud/translate/translate_v3beta1.yaml new file mode 100644 index 000000000..2df789463 --- /dev/null +++ b/google/cloud/translate/translate_v3beta1.yaml @@ -0,0 +1,68 @@ +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/v3beta1/translate_gapic.yaml b/google/cloud/translate/v3beta1/translate_gapic.yaml new file mode 100644 index 000000000..5a4e25638 --- /dev/null +++ b/google/cloud/translate/v3beta1/translate_gapic.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/translation_service.proto b/google/cloud/translate/v3beta1/translation_service.proto new file mode 100644 index 000000000..fa20f0169 --- /dev/null +++ b/google/cloud/translate/v3beta1/translation_service.proto @@ -0,0 +1,790 @@ +// 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.v3beta1; + +import "google/api/annotations.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"; +option go_package = "google.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate"; +option java_multiple_files = true; +option java_outer_classname = "TranslationServiceProto"; +option java_package = "com.google.cloud.translate.v3beta1"; +option php_namespace = "Google\\Cloud\\Translate\\V3beta1"; +option ruby_package = "Google::Cloud::Translate::V3beta1"; + +// Proto file for the Cloud Translation API (v3beta1). + +// Provides natural language translation operations. +service TranslationService { + option (google.api.default_host) = "translation.googleapis.com"; + + // Translates input text and returns translated text. + rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}:translateText" + body: "*" + additional_bindings { + post: "/v3beta1/{parent=projects/*}:translateText" + body: "*" + } + }; + } + + // Detects the language of text within a request. + rpc DetectLanguage(DetectLanguageRequest) returns (DetectLanguageResponse) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}:detectLanguage" + body: "*" + additional_bindings { + post: "/v3beta1/{parent=projects/*}:detectLanguage" + body: "*" + } + }; + } + + // Returns a list of supported languages for translation. + rpc GetSupportedLanguages(GetSupportedLanguagesRequest) returns (SupportedLanguages) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*}/supportedLanguages" + additional_bindings { + get: "/v3beta1/{parent=projects/*}/supportedLanguages" + } + }; + } + + // 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: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateText" + body: "*" + }; + } + + // 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: "/v3beta1/{parent=projects/*/locations/*}/glossaries" + body: "glossary" + }; + } + + // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + // exist. + rpc ListGlossaries(ListGlossariesRequest) returns (ListGlossariesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*}/glossaries" + }; + } + + // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + // exist. + rpc GetGlossary(GetGlossaryRequest) returns (Glossary) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" + }; + } + + // 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: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" + }; + } +} + +// 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; + + // Optional. Indicates match is case-insensitive. + // Default value is false if missing. + bool ignore_case = 2; +} + +// 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; + + // 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; + + // 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; + + // 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; + + // Required. Location to make a regional or global call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // For global calls, use `projects/{project-id}/locations/global`. + // + // Models and glossaries must be within the same region (have same + // location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 8; + + // Optional. The `model` type requested for this translation. + // + // The format depends on model type: + // + // - AutoML Translation models: + // `projects/{project-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-id}/locations/{location-id}/models/general/base` + // + // + // For global (non-regionalized) requests, use `location-id` `global`. + // For example, + // `projects/{project-id}/locations/global/models/general/nmt`. + // + // If missing, the system decides which google base model to use. + string model = 6; + + // 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; +} + +message TranslateTextResponse { + // Text translation responses with no glossary applied. + // This field has the same length as + // [`contents`][google.cloud.translation.v3beta1.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.v3beta1.TranslateTextResponse.translations] if no terms apply. + // This field has the same length as + // [`contents`][google.cloud.translation.v3beta1.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. + // This is same as `model` provided in the request. + 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. Location to make a regional or global call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // For global calls, use `projects/{project-id}/locations/global`. + // + // Only models within the same region (has same location-id) can be used. + // Otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 5; + + // Optional. The language detection model to be used. + // + // Format: + // `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + // + // Only one language detection model is currently supported: + // `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + // + // If not specified, the default model is used. + string model = 4; + + // 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; +} + +// 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. Location to make a regional or global call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // For global calls, use `projects/{project-id}/locations/global`. + // + // Only models within the same region (have same location-id) can be used, + // otherwise an INVALID_ARGUMENT (400) error is returned. + string parent = 3; + + // 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; + + // Optional. Get supported languages of this model. + // + // The format depends on model type: + // + // - AutoML Translation models: + // `projects/{project-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-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; +} + +// 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; + + // 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 "/", 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 regional call. + // + // Format: `projects/{project-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; + + // Required. Source language code. + string source_language_code = 2; + + // Required. Specify up to 10 language codes here. + repeated string target_language_codes = 3; + + // 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-id}/locations/{location-id}/models/{model-id}` + // + // - General (built-in) models: + // `projects/{project-id}/locations/{location-id}/models/general/nmt`, + // `projects/{project-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; + + // 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; + + // 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; + + // Optional. Glossaries to be applied for translation. + // It's keyed by target language code. + map glossaries = 7; +} + +// 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 { + // 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-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; + + // Output only. When CreateGlossary was called. + google.protobuf.Timestamp submit_time = 7; + + // Output only. When the glossary creation was finished. + google.protobuf.Timestamp end_time = 8; +} + +// Request message for CreateGlossary. +message CreateGlossaryRequest { + // Required. The project name. + string parent = 1; + + // Required. The glossary to create. + Glossary glossary = 2; +} + +// Request message for GetGlossary. +message GetGlossaryRequest { + // Required. The name of the glossary to retrieve. + string name = 1; +} + +// Request message for DeleteGlossary. +message DeleteGlossaryRequest { + // Required. The name of the glossary to delete. + string name = 1; +} + +// Request message for ListGlossaries. +message ListGlossariesRequest { + // Required. The name of the project from which to list all of the glossaries. + string parent = 1; + + // Optional. Requested page size. The server may return fewer glossaries than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2; + + // 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; + + // 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; +} + +// 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/videointelligence/BUILD.bazel b/google/cloud/videointelligence/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/videointelligence/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/videointelligence/artman_videointelligence_v1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1.yaml index dedc316b2..7f9520ad5 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1.yaml +++ b/google/cloud/videointelligence/artman_videointelligence_v1.yaml @@ -12,83 +12,18 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-videointelligence - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-video-intelligence-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-video-intelligence-v1 - - name: proto - dest: generated/java/proto-google-cloud-video-intelligence-v1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-video-intelligence-v1 - - name: grpc - dest: generated/python/proto-google-cloud-video-intelligence-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/gapic - dest: videointelligence/google/cloud/gapic - - src: tests/unit/gapic/v1 - dest: videointelligence/tests/gapic - - name: grpc - src: google/cloud/proto - dest: videointelligence/google/cloud/proto - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-video-intelligence-v1 - - name: grpc - dest: generated/php/google-cloud-video-intelligence-v1/proto - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/video_intelligence/v1 - dest: google-cloud-video_intelligence/lib/google/cloud/video_intelligence/v1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-ruby/google-cloud-video_intelligence - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: video-intelligence/apiv1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-videointelligence-v1/vendor - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +31,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/video-intelligence/src/v1 - - src: test/gapic-v1.js - dest: packages/video-intelligence/test/gapic-v1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/videointelligence - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml index cfb20365f..2f1f114a6 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml +++ b/google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml @@ -12,83 +12,18 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-videointelligence - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-video-intelligence-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-video-intelligence-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-video-intelligence-v1beta1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/gapic - dest: videointelligence/google/cloud/gapic - - src: tests/unit/gapic/v1beta1 - dest: videointelligence/tests/gapic - - name: grpc - src: google/cloud/proto - dest: videointelligence/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-video-intelligence-v1beta1 - - name: grpc - dest: generated/python/proto-google-cloud-video-intelligence-v1beta1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-video-intelligence-v1beta1 - - name: grpc - dest: generated/php/google-cloud-video-intelligence-v1beta1/proto - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/video_intelligence/v1beta1 - dest: google-cloud-video_intelligence/lib/google/cloud/video_intelligence/v1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-ruby/google-cloud-video_intelligence - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-videointelligence-v1beta1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: video-intelligence/apiv1beta1 - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +31,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1beta1 - dest: packages/video-intelligence/src/v1beta1 - - src: test/gapic-v1beta1.js - dest: packages/video-intelligence/test/gapic-v1beta1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/videointelligence - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml b/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml index e9e713c91..32c5a7dba 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml +++ b/google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml @@ -12,83 +12,18 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-videointelligence - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-video-intelligence-v1beta2 - - name: grpc - dest: generated/java/grpc-google-cloud-video-intelligence-v1beta2 - - name: proto - dest: generated/java/proto-google-cloud-video-intelligence-v1beta2 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-video-intelligence-v1beta2 - - name: grpc - dest: generated/python/proto-google-cloud-video-intelligence-v1beta2 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/gapic - dest: videointelligence/google/cloud/gapic - - src: tests/unit/gapic/v1beta2 - dest: videointelligence/tests/gapic - - name: grpc - src: google/cloud/proto - dest: videointelligence/google/cloud/proto - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-video-intelligence-v1beta2 - - name: grpc - dest: generated/php/google-cloud-video-intelligence-v1beta2/proto - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/video_intelligence/v1beta2 - dest: google-cloud-video_intelligence/lib/google/cloud/video_intelligence/v1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-ruby/google-cloud-video_intelligence - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: video-intelligence/apiv1beta2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-videointelligence-v1beta2/vendor - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +31,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1beta2 - dest: packages/video-intelligence/src/v1beta2 - - src: test/gapic-v1beta2.js - dest: packages/video-intelligence/test/gapic-v1beta2.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/videointelligence - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml index a53ee6583..5679b612c 100644 --- a/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml +++ b/google/cloud/videointelligence/artman_videointelligence_v1p1beta1.yaml @@ -12,83 +12,18 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-video-intelligence - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-video-intelligence-v1p1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-video-intelligence-v1p1beta1 - - name: proto - dest: generated/java/proto-google-cloud-video-intelligence-v1p1beta1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-video-intelligence-v1p1beta1 - - name: grpc - dest: generated/python/proto-google-cloud-video-intelligence-v1p1beta1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/gapic - dest: videointelligence/google/cloud/gapic - - src: tests/unit/gapic/v1p1beta1 - dest: videointelligence/tests/gapic - - name: grpc - src: google/cloud/proto - dest: videointelligence/google/cloud/proto - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-video-intelligence-v1p1beta1 - - name: grpc - dest: generated/php/google-cloud-video-intelligence-v1p1beta1/proto - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/video_intelligence/v1p1beta1 - dest: google-cloud-video_intelligence/lib/google/cloud/video_intelligence/v1p1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-ruby/google-cloud-video_intelligence - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: video-intelligence/apiv1p1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-videointelligence-v1p1beta1/vendor - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +31,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1p1beta1 - dest: packages/video-intelligence/src/v1p1beta1 - - src: test/gapic-v1p1beta1.js - dest: packages/video-intelligence/test/gapic-v1p1beta1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/videointelligence - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml new file mode 100644 index 000000000..3e62e85e3 --- /dev/null +++ b/google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml @@ -0,0 +1,35 @@ +common: + api_name: video-intelligence + api_version: v1p2beta1 + organization_name: google-cloud + service_yaml: videointelligence_v1p2beta1.yaml + gapic_yaml: v1p2beta1/videointelligence_gapic.yaml + src_proto_paths: + - v1p2beta1 + 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 + release_level: BETA +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml new file mode 100644 index 000000000..5a8a2a5bc --- /dev/null +++ b/google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml @@ -0,0 +1,35 @@ +common: + api_name: video-intelligence + api_version: v1p3beta1 + organization_name: google-cloud + service_yaml: videointelligence_v1p3beta1.yaml + gapic_yaml: v1p3beta1/videointelligence_gapic.yaml + src_proto_paths: + - v1p3beta1 + 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 + release_level: BETA +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/cloud/videointelligence/v1/BUILD.bazel b/google/cloud/videointelligence/v1/BUILD.bazel new file mode 100644 index 000000000..b9a3ca592 --- /dev/null +++ b/google/cloud/videointelligence/v1/BUILD.bazel @@ -0,0 +1,153 @@ +# 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//:duration_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_v1.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.v1.VideoIntelligenceServiceClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# 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/v1", + 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/apiv1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1.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/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-intelligence-v1-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/v1/video_intelligence.proto b/google/cloud/videointelligence/v1/video_intelligence.proto index 67d9168ff..ce3d8f8c2 100644 --- a/google/cloud/videointelligence/v1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1/video_intelligence.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -28,7 +29,7 @@ option java_multiple_files = true; option java_outer_classname = "VideoIntelligenceServiceProto"; option java_package = "com.google.cloud.videointelligence.v1"; option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1"; - +option ruby_package = "Google::Cloud::VideoIntelligence::V1"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { @@ -36,8 +37,12 @@ service VideoIntelligenceService { // 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: "/v1/videos:annotate" body: "*" }; + rpc AnnotateVideo(AnnotateVideoRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/videos:annotate" + body: "*" + }; } } @@ -47,10 +52,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](/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; @@ -70,8 +75,8 @@ message AnnotateVideoRequest { // 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). + // [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 @@ -83,8 +88,8 @@ message AnnotateVideoRequest { // 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. @@ -98,6 +103,15 @@ message VideoContext { // 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 OBJECT_TRACKING. + ObjectTrackingConfig object_tracking_config = 13; } // Config for LABEL_DETECTION. @@ -116,6 +130,22 @@ message LabelDetectionConfig { // Supported values: "builtin/stable" (the default if unset) and // "builtin/latest". string model = 3; + + // The confidence threshold we perform filtering on the labels from + // 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 + // 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 + // 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 + // the default threshold everytime when we release a new model. + float video_confidence_threshold = 5; } // Config for SHOT_CHANGE_DETECTION. @@ -145,6 +175,29 @@ message FaceDetectionConfig { bool include_bounding_boxes = 2; } +// 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; +} + +// Config for TEXT_DETECTION. +message TextDetectionConfig { + // Language hint can be specified if the language to be detected is known a + // priori. It can increase the accuracy of the detection. Language hint must + // be language code in BCP-47 format. + // + // Automatic language detection is performed if no hint is provided. + repeated string language_hints = 1; + + // Model to use for text detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 2; +} + // Video segment. message VideoSegment { // Time-offset, relative to the beginning of the video, @@ -299,6 +352,17 @@ message VideoAnnotationResults { // Explicit content annotation. ExplicitContentAnnotation explicit_annotation = 7; + // Speech transcription. + repeated SpeechTranscription speech_transcriptions = 11; + + // OCR text detection and tracking. + // Annotations for list of detected text snippets. Each will have list of + // frame information associated with it. + repeated TextAnnotation text_annotations = 12; + + // Annotations for list of objects detected and tracked in video. + repeated ObjectTrackingAnnotation object_annotations = 14; + // If set, indicates an error. Note that for a single `AnnotateVideoRequest` // some videos may succeed and some may fail. google.rpc.Status error = 9; @@ -318,8 +382,8 @@ message VideoAnnotationProgress { // [Google Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; - // Approximate percentage processed thus far. - // Guaranteed to be 100 when fully processed. + // Approximate percentage processed thus far. Guaranteed to be + // 100 when fully processed. int32 progress_percent = 2; // Time when the request was received. @@ -337,6 +401,251 @@ message AnnotateVideoProgress { repeated VideoAnnotationProgress annotation_progress = 1; } +// Config for SPEECH_TRANSCRIPTION. +message SpeechTranscriptionConfig { + // *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; + + // *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; + + // *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; + + // *Optional* A means to provide context to assist the speech recognition. + repeated SpeechContext speech_contexts = 4; + + // *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; + + // *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; + + // *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; + + // *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 `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; +} + +// 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 + // 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; +} + +// A speech recognition result corresponding to a portion of the audio. +message SpeechTranscription { + // 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. 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; +} + +// Alternative hypotheses (a.k.a. n-best list). +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 + // 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. + // The default of 0.0 is a sentinel value indicating `confidence` was not set. + float confidence = 2; + + // A list of word-specific information for each recognized word. + repeated WordInfo words = 3; +} + +// Word-specific information for recognized words. Word information is only +// included in the response when certain request parameters are set, such +// as `enable_word_time_offsets`. +message WordInfo { + // 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. This is an + // experimental feature and the accuracy of the time offset can vary. + google.protobuf.Duration start_time = 1; + + // 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. This is an + // experimental feature and the accuracy of the time offset can vary. + google.protobuf.Duration end_time = 2; + + // 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 + // indicates an estimated greater likelihood that the recognized words are + // 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 = 4; + + // 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; +} + +// 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; +} + +// Normalized bounding polygon for text (that might not be aligned with axis). +// Contains list of the corner points in clockwise order starting from +// top-left corner. For example, for a rectangular bounding box: +// When the text is horizontal it might look like: +// 0----1 +// | | +// 3----2 +// +// When it's clockwise rotated 180 degrees around the top-left corner it +// becomes: +// 2----3 +// | | +// 1----0 +// +// and the vertex order will still be (0, 1, 2, 3). Note that values can be less +// than 0, or greater than 1 due to trignometric calculations for location of +// the box. +message NormalizedBoundingPoly { + // Normalized vertices of the bounding polygon. + repeated NormalizedVertex vertices = 1; +} + +// Video segment level annotation results for text detection. +message TextSegment { + // Video segment where a text snippet was detected. + VideoSegment segment = 1; + + // Confidence for the track of detected text. It is calculated as the highest + // over all frames where OCR detected text appears. + float confidence = 2; + + // Information related to the frames where OCR detected text appears. + repeated TextFrame frames = 3; +} + +// Video frame level annotation results for text annotation (OCR). +// Contains information regarding timestamp and bounding box locations for the +// frames containing detected OCR text snippets. +message TextFrame { + // Bounding polygon of the detected text for this frame. + NormalizedBoundingPoly rotated_bounding_box = 1; + + // Timestamp of this frame. + google.protobuf.Duration time_offset = 2; +} + +// Annotations related to one detected OCR text snippet. This will contain the +// corresponding text, confidence value, and frame level information for each +// detection. +message TextAnnotation { + // The detected text. + string text = 1; + + // All video segments where OCR detected text appears. + repeated TextSegment segments = 2; +} + +// Video frame level annotations for object detection and tracking. This field +// stores per frame location, time offset, and confidence. +message ObjectTrackingFrame { + // The normalized bounding box location of this object track for the frame. + NormalizedBoundingBox normalized_bounding_box = 1; + + // The timestamp of the frame in microseconds. + google.protobuf.Duration time_offset = 2; +} + +// Annotations corresponding to one tracked object. +message ObjectTrackingAnnotation { + // 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. + // Instead, we provide a unique identifiable integer track_id so that + // the customers can correlate the results of the ongoing + // 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; +} + // Video annotation feature. enum Feature { // Unspecified. @@ -353,6 +662,15 @@ enum Feature { // 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. diff --git a/google/cloud/videointelligence/v1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml index 4909cdc48..20843a355 100644 --- a/google/cloud/videointelligence/v1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1/videointelligence_gapic.yaml @@ -17,15 +17,12 @@ language_settings: nodejs: package_name: video-intelligence.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.videointelligence.v1.VideoIntelligenceService smoke_test: method: AnnotateVideo init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION collections: [] retry_codes_def: @@ -58,10 +55,9 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1beta1/BUILD.bazel b/google/cloud/videointelligence/v1beta1/BUILD.bazel new file mode 100644 index 000000000..4e2efa857 --- /dev/null +++ b/google/cloud/videointelligence/v1beta1/BUILD.bazel @@ -0,0 +1,152 @@ +# 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 index 9ec2a5e9f..430776bf0 100644 --- a/google/cloud/videointelligence/v1beta1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1beta1/video_intelligence.proto @@ -27,6 +27,7 @@ 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 { @@ -34,8 +35,12 @@ service VideoIntelligenceService { // 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: "*" }; + rpc AnnotateVideo(AnnotateVideoRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/videos:annotate" + body: "*" + }; } } @@ -45,10 +50,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](/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; @@ -67,8 +72,8 @@ message AnnotateVideoRequest { // 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). + // [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 diff --git a/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml index 6119b40de..931cc445e 100644 --- a/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1beta1/videointelligence_gapic.yaml @@ -17,9 +17,6 @@ language_settings: nodejs: package_name: videointelligence.v1beta1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.videointelligence.v1beta1.VideoIntelligenceService collections: [] @@ -56,10 +53,9 @@ interfaces: required_fields: - input_uri - features - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1beta2/BUILD.bazel b/google/cloud/videointelligence/v1beta2/BUILD.bazel new file mode 100644 index 000000000..acd3c583e --- /dev/null +++ b/google/cloud/videointelligence/v1beta2/BUILD.bazel @@ -0,0 +1,153 @@ +# 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//:duration_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_v1beta2.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.v1beta2.VideoIntelligenceServiceClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# 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/v1beta2", + 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/apiv1beta2", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1beta2.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/apiv1beta2", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-intelligence-v1beta2-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/v1beta2/video_intelligence.proto b/google/cloud/videointelligence/v1beta2/video_intelligence.proto index 6099e97d5..a69c25791 100644 --- a/google/cloud/videointelligence/v1beta2/video_intelligence.proto +++ b/google/cloud/videointelligence/v1beta2/video_intelligence.proto @@ -28,7 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "VideoIntelligenceServiceProto"; option java_package = "com.google.cloud.videointelligence.v1beta2"; option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1beta2"; - +option ruby_package = "Google::Cloud::VideoIntelligence::V1beta2"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { @@ -36,8 +36,12 @@ service VideoIntelligenceService { // 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: "/v1beta2/videos:annotate" body: "*" }; + rpc AnnotateVideo(AnnotateVideoRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/videos:annotate" + body: "*" + }; } } @@ -47,10 +51,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](/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; @@ -70,8 +74,8 @@ message AnnotateVideoRequest { // 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). + // [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 diff --git a/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml index c3bfad119..8f4de6e6d 100644 --- a/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1beta2/videointelligence_gapic.yaml @@ -17,9 +17,6 @@ language_settings: nodejs: package_name: video-intelligence.v1beta2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.videointelligence.v1beta2.VideoIntelligenceService collections: [] @@ -53,10 +50,9 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p1beta1/BUILD.bazel b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel new file mode 100644 index 000000000..6d5193091 --- /dev/null +++ b/google/cloud/videointelligence/v1p1beta1/BUILD.bazel @@ -0,0 +1,153 @@ +# 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//:duration_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_v1p1beta1.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.v1p1beta1.VideoIntelligenceServiceClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# 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/v1p1beta1", + 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/apiv1p1beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p1beta1.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/apiv1p1beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-intelligence-v1p1beta1-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/v1p1beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto index 24bdb8eeb..115f362be 100644 --- a/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto +++ b/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto @@ -28,7 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "VideoIntelligenceServiceProto"; option java_package = "com.google.cloud.videointelligence.v1p1beta1"; option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p1beta1"; - +option ruby_package = "Google::Cloud::VideoIntelligence::V1p1beta1"; // Service that implements Google Cloud Video Intelligence API. service VideoIntelligenceService { @@ -36,7 +36,8 @@ service VideoIntelligenceService { // 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: "*" @@ -50,10 +51,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](/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; @@ -73,8 +74,8 @@ message AnnotateVideoRequest { // 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). + // [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 diff --git a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml index af28060c1..dbf690434 100644 --- a/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml +++ b/google/cloud/videointelligence/v1p1beta1/videointelligence_gapic.yaml @@ -10,22 +10,19 @@ language_settings: csharp: package_name: Google.Cloud.VideoIntelligence.V1P1Beta1 ruby: - package_name: Google::Cloud::VideoIntelligence::V1P1Beta1 + 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 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService smoke_test: method: AnnotateVideo init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION collections: [] retry_codes_def: @@ -58,10 +55,9 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: - - input_uri=gs://demomaker/cat.mp4 + - input_uri=gs://cloud-samples-data/video/cat.mp4 - features[0]=LABEL_DETECTION diff --git a/google/cloud/videointelligence/v1p2beta1/BUILD.bazel b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel new file mode 100644 index 000000000..2de852107 --- /dev/null +++ b/google/cloud/videointelligence/v1p2beta1/BUILD.bazel @@ -0,0 +1,153 @@ +# 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//:duration_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_v1p2beta1.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.v1p2beta1.VideoIntelligenceServiceClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# 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/v1p2beta1", + 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/apiv1p2beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p2beta1.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/apiv1p2beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-intelligence-v1p2beta1-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/v1p2beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto new file mode 100644 index 000000000..0a16e7afd --- /dev/null +++ b/google/cloud/videointelligence/v1p2beta1/video_intelligence.proto @@ -0,0 +1,467 @@ +// 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.cloud.videointelligence.v1p2beta1; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P2Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p2beta1;videointelligence"; +option java_multiple_files = true; +option java_outer_classname = "VideoIntelligenceServiceProto"; +option java_package = "com.google.cloud.videointelligence.v1p2beta1"; +option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p2beta1"; +option ruby_package = "Google::Cloud::VideoIntelligence::V1p2beta1"; + +// 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: "/v1p2beta1/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. + // If unset, the input video(s) should be specified via `input_uri`. + // If set, `input_uri` should be unset. + bytes 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; + + // Config for LABEL_DETECTION. + LabelDetectionConfig label_detection_config = 2; + + // Config for SHOT_CHANGE_DETECTION. + ShotChangeDetectionConfig shot_change_detection_config = 3; + + // Config for EXPLICIT_CONTENT_DETECTION. + ExplicitContentDetectionConfig explicit_content_detection_config = 4; + + // Config for TEXT_DETECTION. + TextDetectionConfig text_detection_config = 8; +} + +// Config for LABEL_DETECTION. +message LabelDetectionConfig { + // What labels should be detected with LABEL_DETECTION, in addition to + // video-level labels or segment-level labels. + // 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. + bool stationary_camera = 2; + + // Model to use for label detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 3; +} + +// Config for SHOT_CHANGE_DETECTION. +message ShotChangeDetectionConfig { + // Model to use for shot change detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 1; +} + +// 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; +} + +// Config for TEXT_DETECTION. +message TextDetectionConfig { + // Language hint can be specified if the language to be detected is known a + // priori. It can increase the accuracy of the detection. Language hint must + // be language code in BCP-47 format. + // + // Automatic language detection is performed if no hint is provided. + repeated string language_hints = 1; +} + +// Video segment. +message VideoSegment { + // Time-offset, relative to the beginning of the video, + // corresponding to the start of the segment (inclusive). + google.protobuf.Duration start_time_offset = 1; + + // Time-offset, relative to the beginning of the video, + // corresponding to the end of the segment (inclusive). + google.protobuf.Duration end_time_offset = 2; +} + +// Video segment level annotation results for label detection. +message LabelSegment { + // Video segment where a label was detected. + VideoSegment segment = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Video frame level annotation results for label detection. +message LabelFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Detected entity from video analysis. +message Entity { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string entity_id = 1; + + // Textual description, e.g. `Fixed-gear bicycle`. + string description = 2; + + // Language code for `description` in BCP-47 format. + string language_code = 3; +} + +// Label annotation. +message LabelAnnotation { + // Detected entity. + 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`. + repeated Entity category_entities = 2; + + // All video segments where a label was detected. + repeated LabelSegment segments = 3; + + // All video frames where a label was detected. + repeated LabelFrame frames = 4; +} + +// Video frame level annotation results for explicit content. +message ExplicitContentFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Likelihood of the pornography content.. + Likelihood pornography_likelihood = 2; +} + +// Explicit content annotation (based on per-frame visual signals only). +// If no explicit content has been detected in a frame, no annotations are +// present for that frame. +message ExplicitContentAnnotation { + // All video frames where explicit content was detected. + repeated ExplicitContentFrame frames = 1; +} + +// Normalized bounding box. +// The normalized vertex coordinates are relative to the original image. +// Range: [0, 1]. +message NormalizedBoundingBox { + // Left X coordinate. + float left = 1; + + // Top Y coordinate. + float top = 2; + + // Right X coordinate. + float right = 3; + + // Bottom Y coordinate. + float bottom = 4; +} + +// 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. + // There is exactly one element for each unique label. + repeated LabelAnnotation segment_label_annotations = 2; + + // Label annotations on shot level. + // There is exactly one element for each unique label. + repeated LabelAnnotation shot_label_annotations = 3; + + // Label annotations on frame level. + // There is exactly one element for each unique label. + repeated LabelAnnotation frame_label_annotations = 4; + + // Shot annotations. Each shot is represented as a video segment. + repeated VideoSegment shot_annotations = 6; + + // Explicit content annotation. + ExplicitContentAnnotation explicit_annotation = 7; + + // OCR text detection and tracking. + // Annotations for list of detected text snippets. Each will have list of + // frame information associated with it. + repeated TextAnnotation text_annotations = 12; + + // Annotations for list of objects detected and tracked in video. + repeated ObjectTrackingAnnotation object_annotations = 14; + + // If set, indicates an error. Note that for a single `AnnotateVideoRequest` + // some videos may succeed and some may fail. + google.rpc.Status error = 9; +} + +// 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; +} + +// 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; +} + +// Normalized bounding polygon for text (that might not be aligned with axis). +// Contains list of the corner points in clockwise order starting from +// top-left corner. For example, for a rectangular bounding box: +// When the text is horizontal it might look like: +// 0----1 +// | | +// 3----2 +// +// When it's clockwise rotated 180 degrees around the top-left corner it +// becomes: +// 2----3 +// | | +// 1----0 +// +// and the vertex order will still be (0, 1, 2, 3). Note that values can be less +// than 0, or greater than 1 due to trignometric calculations for location of +// the box. +message NormalizedBoundingPoly { + // Normalized vertices of the bounding polygon. + repeated NormalizedVertex vertices = 1; +} + +// Video segment level annotation results for text detection. +message TextSegment { + // Video segment where a text snippet was detected. + VideoSegment segment = 1; + + // Confidence for the track of detected text. It is calculated as the highest + // over all frames where OCR detected text appears. + float confidence = 2; + + // Information related to the frames where OCR detected text appears. + repeated TextFrame frames = 3; +} + +// Video frame level annotation results for text annotation (OCR). +// Contains information regarding timestamp and bounding box locations for the +// frames containing detected OCR text snippets. +message TextFrame { + // Bounding polygon of the detected text for this frame. + NormalizedBoundingPoly rotated_bounding_box = 1; + + // Timestamp of this frame. + google.protobuf.Duration time_offset = 2; +} + +// Annotations related to one detected OCR text snippet. This will contain the +// corresponding text, confidence value, and frame level information for each +// detection. +message TextAnnotation { + // The detected text. + string text = 1; + + // All video segments where OCR detected text appears. + repeated TextSegment segments = 2; +} + +// Video frame level annotations for object detection and tracking. This field +// stores per frame location, time offset, and confidence. +message ObjectTrackingFrame { + // The normalized bounding box location of this object track for the frame. + NormalizedBoundingBox normalized_bounding_box = 1; + + // The timestamp of the frame in microseconds. + google.protobuf.Duration time_offset = 2; +} + +// 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. + repeated ObjectTrackingFrame frames = 2; + + // Each object track corresponds to one video segment where it appears. + VideoSegment segment = 3; +} + +// 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; + + // 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; + + // Likely. + LIKELY = 4; + + // Very likely. + VERY_LIKELY = 5; +} diff --git a/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.yaml new file mode 100644 index 000000000..c627a5d1c --- /dev/null +++ b/google/cloud/videointelligence/v1p2beta1/videointelligence_gapic.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/v1p3beta1/BUILD.bazel b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel new file mode 100644 index 000000000..17c796d5c --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/BUILD.bazel @@ -0,0 +1,154 @@ +# 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//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "video_intelligence_proto_with_info", + deps = [":video_intelligence_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", +#) + +############################################################################## +# 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/v1p3beta1", + 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/apiv1p3beta1", + service_yaml = "//google/cloud/videointelligence:videointelligence_v1p3beta1.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/apiv1p3beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-intelligence-v1p3beta1-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/v1p3beta1/video_intelligence.proto b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto new file mode 100644 index 000000000..e37726e0b --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto @@ -0,0 +1,897 @@ +// 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.cloud.videointelligence.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p3beta1;videointelligence"; +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 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: "/v1p3beta1/videos:annotate" + body: "*" + }; + } +} + +// Service that implements Google Cloud Video Intelligence Streaming API. +service StreamingVideoIntelligenceService { + // 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); +} + +// 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. + // If unset, the input video(s) should be specified via `input_uri`. + // If set, `input_uri` should be unset. + bytes 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; + + // Config for LABEL_DETECTION. + LabelDetectionConfig label_detection_config = 2; + + // Config for SHOT_CHANGE_DETECTION. + ShotChangeDetectionConfig shot_change_detection_config = 3; + + // Config for EXPLICIT_CONTENT_DETECTION. + ExplicitContentDetectionConfig explicit_content_detection_config = 4; + + // Config for SPEECH_TRANSCRIPTION. + SpeechTranscriptionConfig speech_transcription_config = 6; + + // Config for TEXT_DETECTION. + TextDetectionConfig text_detection_config = 8; + + // Config for OBJECT_TRACKING. + ObjectTrackingConfig object_tracking_config = 13; +} + +// Config for LABEL_DETECTION. +message LabelDetectionConfig { + // What labels should be detected with LABEL_DETECTION, in addition to + // video-level labels or segment-level labels. + // 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. + bool stationary_camera = 2; + + // Model to use for label detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 3; + + // The confidence threshold we perform filtering on the labels from + // 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 + // 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 + // 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 + // the default threshold everytime when we release a new model. + float video_confidence_threshold = 5; +} + +// Config for SHOT_CHANGE_DETECTION. +message ShotChangeDetectionConfig { + // Model to use for shot change detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 1; +} + +// 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; +} + +// 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; +} + +// Config for TEXT_DETECTION. +message TextDetectionConfig { + // Language hint can be specified if the language to be detected is known a + // priori. It can increase the accuracy of the detection. Language hint must + // be language code in BCP-47 format. + // + // Automatic language detection is performed if no hint is provided. + repeated string language_hints = 1; + + // Model to use for text detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 2; +} + +// Video segment. +message VideoSegment { + // Time-offset, relative to the beginning of the video, + // corresponding to the start of the segment (inclusive). + google.protobuf.Duration start_time_offset = 1; + + // Time-offset, relative to the beginning of the video, + // corresponding to the end of the segment (inclusive). + google.protobuf.Duration end_time_offset = 2; +} + +// Video segment level annotation results for label detection. +message LabelSegment { + // Video segment where a label was detected. + VideoSegment segment = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Video frame level annotation results for label detection. +message LabelFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Detected entity from video analysis. +message Entity { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string entity_id = 1; + + // Textual description, e.g. `Fixed-gear bicycle`. + string description = 2; + + // Language code for `description` in BCP-47 format. + string language_code = 3; +} + +// Label annotation. +message LabelAnnotation { + // Detected entity. + 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`. + repeated Entity category_entities = 2; + + // All video segments where a label was detected. + repeated LabelSegment segments = 3; + + // All video frames where a label was detected. + repeated LabelFrame frames = 4; +} + +// Video frame level annotation results for explicit content. +message ExplicitContentFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Likelihood of the pornography content.. + Likelihood pornography_likelihood = 2; +} + +// Explicit content annotation (based on per-frame visual signals only). +// If no explicit content has been detected in a frame, no annotations are +// present for that frame. +message ExplicitContentAnnotation { + // All video frames where explicit content was detected. + repeated ExplicitContentFrame frames = 1; +} + +// Normalized bounding box. +// The normalized vertex coordinates are relative to the original image. +// Range: [0, 1]. +message NormalizedBoundingBox { + // Left X coordinate. + float left = 1; + + // Top Y coordinate. + float top = 2; + + // Right X coordinate. + float right = 3; + + // Bottom Y coordinate. + float bottom = 4; +} + +// For tracking related features, such as LOGO_RECOGNITION, FACE_DETECTION, +// CELEBRITY_RECOGNITION, PERSON_DETECTION. +// 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; +} + +// 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; + + // Optional. The confidence score of the tracked object. + float confidence = 4; +} + +// 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; +} + +// 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. + // There is exactly one element for each unique label. + repeated LabelAnnotation segment_label_annotations = 2; + + // Label annotations on shot level. + // There is exactly one element for each unique label. + repeated LabelAnnotation shot_label_annotations = 3; + + // Label annotations on frame level. + // There is exactly one element for each unique label. + repeated LabelAnnotation frame_label_annotations = 4; + + // Shot annotations. Each shot is represented as a video segment. + repeated VideoSegment shot_annotations = 6; + + // Explicit content annotation. + ExplicitContentAnnotation explicit_annotation = 7; + + // Speech transcription. + repeated SpeechTranscription speech_transcriptions = 11; + + // OCR text detection and tracking. + // Annotations for list of detected text snippets. Each will have list of + // frame information associated with it. + repeated TextAnnotation text_annotations = 12; + + // 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; +} + +// 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; +} + +// Config for SPEECH_TRANSCRIPTION. +message SpeechTranscriptionConfig { + // *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; + + // *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; + + // *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; + + // *Optional* A means to provide context to assist the speech recognition. + repeated SpeechContext speech_contexts = 4; + + // *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; + + // *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; + + // *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; + + // *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 `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; +} + +// 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 + // 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; +} + +// A speech recognition result corresponding to a portion of the audio. +message SpeechTranscription { + // 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. 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; +} + +// Alternative hypotheses (a.k.a. n-best list). +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 + // 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. + // The default of 0.0 is a sentinel value indicating `confidence` was not set. + float confidence = 2; + + // A list of word-specific information for each recognized word. + repeated WordInfo words = 3; +} + +// Word-specific information for recognized words. Word information is only +// included in the response when certain request parameters are set, such +// as `enable_word_time_offsets`. +message WordInfo { + // 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. This is an + // experimental feature and the accuracy of the time offset can vary. + google.protobuf.Duration start_time = 1; + + // 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. This is an + // experimental feature and the accuracy of the time offset can vary. + google.protobuf.Duration end_time = 2; + + // 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 + // indicates an estimated greater likelihood that the recognized words are + // 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 = 4; + + // 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; +} + +// 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; +} + +// Normalized bounding polygon for text (that might not be aligned with axis). +// Contains list of the corner points in clockwise order starting from +// top-left corner. For example, for a rectangular bounding box: +// When the text is horizontal it might look like: +// 0----1 +// | | +// 3----2 +// +// When it's clockwise rotated 180 degrees around the top-left corner it +// becomes: +// 2----3 +// | | +// 1----0 +// +// and the vertex order will still be (0, 1, 2, 3). Note that values can be less +// than 0, or greater than 1 due to trignometric calculations for location of +// the box. +message NormalizedBoundingPoly { + // Normalized vertices of the bounding polygon. + repeated NormalizedVertex vertices = 1; +} + +// Video segment level annotation results for text detection. +message TextSegment { + // Video segment where a text snippet was detected. + VideoSegment segment = 1; + + // Confidence for the track of detected text. It is calculated as the highest + // over all frames where OCR detected text appears. + float confidence = 2; + + // Information related to the frames where OCR detected text appears. + repeated TextFrame frames = 3; +} + +// Video frame level annotation results for text annotation (OCR). +// Contains information regarding timestamp and bounding box locations for the +// frames containing detected OCR text snippets. +message TextFrame { + // Bounding polygon of the detected text for this frame. + NormalizedBoundingPoly rotated_bounding_box = 1; + + // Timestamp of this frame. + google.protobuf.Duration time_offset = 2; +} + +// Annotations related to one detected OCR text snippet. This will contain the +// corresponding text, confidence value, and frame level information for each +// detection. +message TextAnnotation { + // The detected text. + string text = 1; + + // All video segments where OCR detected text appears. + repeated TextSegment segments = 2; +} + +// Video frame level annotations for object detection and tracking. This field +// stores per frame location, time offset, and confidence. +message ObjectTrackingFrame { + // The normalized bounding box location of this object track for the frame. + NormalizedBoundingBox normalized_bounding_box = 1; + + // The timestamp of the frame in microseconds. + google.protobuf.Duration time_offset = 2; +} + +// 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. + // Instead, we provide a unique identifiable integer track_id so that + // the customers can correlate the results of the ongoing + // ObjectTrackAnnotation of the same track_id over time. + int64 track_id = 5; + } +} + +// 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; + + // All logo tracks where the recognized logo appears. Each track corresponds + // to one logo instance appearing in consecutive frames. + repeated Track tracks = 2; + + // 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; +} + +// The top-level message sent by the client for the `StreamingAnnotateVideo` +// method. Multiple `StreamingAnnotateVideoRequest` messages are sent. +// The first message must only contain a `StreamingVideoConfig` message. +// All subsequent messages must only contain `input_content` data. +message StreamingAnnotateVideoRequest { + // *Required* The streaming request, which is either a streaming config or + // video content. + oneof streaming_request { + // Provides information to the annotator, specifing how to process the + // request. The first `AnnotateStreamingVideoRequest` message must only + // contain a `video_config` message. + StreamingVideoConfig video_config = 1; + + // The video data to be annotated. Chunks of video data are sequentially + // sent in `StreamingAnnotateVideoRequest` messages. Except the initial + // `StreamingAnnotateVideoRequest` message containing only + // `video_config`, all subsequent `AnnotateStreamingVideoRequest` + // messages must only contain `input_content` field. + // Note: as with all bytes fields, protobuffers use a pure binary + // representation (not base64). + bytes input_content = 2; + } +} + +// `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. + StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + + // Config for STREAMING_LABEL_DETECTION. + StreamingLabelDetectionConfig label_detection_config = 3; + + // Config for STREAMING_EXPLICIT_CONTENT_DETECTION. + StreamingExplicitContentDetectionConfig explicit_content_detection_config = + 4; + + // Config for STREAMING_OBJECT_TRACKING. + StreamingObjectTrackingConfig object_tracking_config = 5; + + // Config for STREAMING_AUTOML_CLASSIFICATION. + StreamingAutomlClassificationConfig automl_classification_config = 21; + + // Config for STREAMING_AUTOML_OBJECT_TRACKING. + StreamingAutomlObjectTrackingConfig automl_object_tracking_config = 22; + } + + // 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; + + // Shot change detection. + SHOT_CHANGE_DETECTION = 2; + + // Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3; + + // 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; +} + +// 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; +} diff --git a/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml new file mode 100644 index 000000000..9a06190e7 --- /dev/null +++ b/google/cloud/videointelligence/v1p3beta1/videointelligence_gapic.yaml @@ -0,0 +1,91 @@ +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 +# 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/videointelligence_v1p2beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml new file mode 100644 index 000000000..df5da4297 --- /dev/null +++ b/google/cloud/videointelligence/videointelligence_v1p2beta1.yaml @@ -0,0 +1,52 @@ +type: google.api.Service +config_version: 3 +name: videointelligence.googleapis.com +title: Cloud Video Intelligence API + +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.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.v1p2beta1.VideoIntelligenceService.AnnotateVideo + deadline: 600.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: /v1p2beta1/operations + + - selector: google.longrunning.Operations.GetOperation + get: '/v1p2beta1/operations/{name=*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1p2beta1/operations/{name=*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1p2beta1/operations/{name=*}:cancel' + body: '*' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml new file mode 100644 index 000000000..6d33be286 --- /dev/null +++ b/google/cloud/videointelligence/videointelligence_v1p3beta1.yaml @@ -0,0 +1,55 @@ +type: google.api.Service +config_version: 3 +name: videointelligence.googleapis.com +title: Cloud Video Intelligence API + +apis: +- name: google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService +- name: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService + +types: +- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse +- name: google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress +- name: google.cloud.videointelligence.v1p3beta1.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.v1p3beta1.VideoIntelligenceService.AnnotateVideo + deadline: 600.0 + - selector: google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService.AnnotateVideo + deadline: 900.0 + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: /v1p3beta1/operations + + - selector: google.longrunning.Operations.GetOperation + get: '/v1p3beta1/operations/{name=*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1p3beta1/operations/{name=*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1p3beta1/operations/{name=*}:cancel' + body: '*' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/vision/BUILD.bazel b/google/cloud/vision/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/cloud/vision/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/cloud/vision/artman_vision_v1.yaml b/google/cloud/vision/artman_vision_v1.yaml index 45c76c520..6b037447e 100644 --- a/google/cloud/vision/artman_vision_v1.yaml +++ b/google/cloud/vision/artman_vision_v1.yaml @@ -13,82 +13,19 @@ artifacts: type: GAPIC language: JAVA release_level: GA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-vision-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-vision-v1 - - name: proto - dest: generated/java/proto-google-cloud-vision-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-vision - name: python_gapic type: GAPIC language: PYTHON release_level: BETA - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/vision_v1 - dest: vision/google/cloud/vision_v1 - - src: tests/unit/gapic/v1 - dest: vision/tests/gapic - - name: grpc - src: google/cloud/proto - dest: vision/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-vision-v1 - - name: grpc - dest: generated/python/proto-google-cloud-vision-v1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-vision-v1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-vision - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/vision/v1 - dest: google-cloud-vision/lib/google/cloud/vision/v1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-vision-v1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: vision/apiv1 - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +33,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/vision/src/v1 - - src: test/test.js - dest: packages/vision/test/gapic-v1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/vision - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/vision/artman_vision_v1p1beta1.yaml b/google/cloud/vision/artman_vision_v1p1beta1.yaml index f3c42a3f8..c1c6a3f86 100644 --- a/google/cloud/vision/artman_vision_v1p1beta1.yaml +++ b/google/cloud/vision/artman_vision_v1p1beta1.yaml @@ -12,82 +12,19 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-vision-v1p1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-vision-v1p1beta1 - - name: proto - dest: generated/java/proto-google-cloud-vision-v1p1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-vision - name: python_gapic type: GAPIC language: PYTHON release_level: BETA - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/vision_v1p1beta1 - dest: vision/google/cloud/vision_v1p1beta1 - - src: tests/unit/gapic/v1p1beta1 - dest: vision/tests/gapic - - name: grpc - src: google/cloud/proto - dest: vision/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-vision-v1p1beta1 - - name: grpc - dest: generated/python/proto-google-cloud-vision-v1p1beta1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-vision-v1p1beta1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-vision - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/vision/v1p1beta1 - dest: google-cloud-vision/lib/google/cloud/vision/v1p1beta1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-vision-v1p1beta1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: vision/apiv1p1beta1 - name: csharp_gapic type: GAPIC language: CSHARP @@ -95,19 +32,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1p1beta1 - dest: packages/vision/src/v1p1beta1 - - src: test/test.js - dest: packages/vision/test/gapic-v1p1beta1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/vision - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/vision/artman_vision_v1p2beta1.yaml b/google/cloud/vision/artman_vision_v1p2beta1.yaml index 640f5339c..02967283c 100644 --- a/google/cloud/vision/artman_vision_v1p2beta1.yaml +++ b/google/cloud/vision/artman_vision_v1p2beta1.yaml @@ -12,83 +12,19 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - release_level: GA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-vision-v1p2beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-vision-v1p2beta1 - - name: proto - dest: generated/java/proto-google-cloud-vision-v1p2beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-vision - name: python_gapic type: GAPIC language: PYTHON release_level: BETA - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/vision_v1p2beta1 - dest: vision/google/cloud/vision_v1p2beta1 - - src: tests/unit/gapic/v1p2beta1 - dest: vision/tests/gapic - - name: grpc - src: google/cloud/proto - dest: vision/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-vision-v1p2beta1 - - name: grpc - dest: generated/python/proto-google-cloud-vision-v1p2beta1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-vision-v1p2beta1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-vision - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/vision/v1p2beta1 - dest: google-cloud-vision/lib/google/cloud/vision/v1p2beta1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-vision-v1p2beta1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: vision/apiv1p2beta1 - name: csharp_gapic type: GAPIC language: CSHARP @@ -96,19 +32,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1p2beta1 - dest: packages/vision/src/v1p2beta1 - - src: test/test.js - dest: packages/vision/test/gapic-v1p2beta1.js - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/vision - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/vision/artman_vision_v1p3beta1.yaml b/google/cloud/vision/artman_vision_v1p3beta1.yaml new file mode 100644 index 000000000..be0c34b0f --- /dev/null +++ b/google/cloud/vision/artman_vision_v1p3beta1.yaml @@ -0,0 +1,41 @@ +common: + api_name: vision + api_version: v1p3beta1 + organization_name: google-cloud + service_yaml: vision_v1p3beta1.yaml + gapic_yaml: v1p3beta1/vision_gapic.yaml + src_proto_paths: + - v1p3beta1 + proto_deps: + - name: google-common-protos +artifacts: +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON + release_level: BETA + package_version: + grpc_dep_lower_bound: 0.90.3 + grpc_dep_upper_bound: 0.91dev +- 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 + package_version: + grpc_dep_lower_bound: 0.12.0 +- name: gapic_config + type: GAPIC_CONFIG diff --git a/google/cloud/vision/artman_vision_v1p4beta1.yaml b/google/cloud/vision/artman_vision_v1p4beta1.yaml new file mode 100644 index 000000000..b7e00b3a0 --- /dev/null +++ b/google/cloud/vision/artman_vision_v1p4beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: vision + api_version: v1p4beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1p4beta1 + service_yaml: vision_v1p4beta1.yaml + gapic_yaml: v1p4beta1/vision_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/vision/v1/BUILD.bazel b/google/cloud/vision/v1/BUILD.bazel new file mode 100644 index 000000000..049cd6281 --- /dev/null +++ b/google/cloud/vision/v1/BUILD.bazel @@ -0,0 +1,195 @@ +# 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 = "vision_proto", + srcs = [ + "geometry.proto", + "image_annotator.proto", + "product_search.proto", + "product_search_service.proto", + "text_annotation.proto", + "web_detection.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "vision_proto_with_info", + deps = [":vision_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 = "vision_java_proto", + deps = [":vision_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.vision.v1.ImageAnnotatorClientTest", +]] + +# Opensource 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 = [ + ":vision_java_proto", + ":vision_proto", + ":vision_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 = "vision_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1", + 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", + ], +) + +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", + deps = [ + ":vision_go_proto", + "//google/longrunning:longrunning_go_gapic", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + ], +) + +go_test( + name = "vision_go_gapic_test", + srcs = [":vision_go_gapic_srcjar_test"], + embed = [":vision_go_gapic"], + importpath = "cloud.google.com/go/vision/apiv1", +) + +# Opensource 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", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", + "cc_gapic_library", +) + +cc_proto_library( + name = "vision_cc_proto", + deps = [":vision_proto"], +) + +cc_grpc_library( + name = "vision_cc_grpc", + srcs = [":vision_proto"], + deps = [":vision_cc_proto"], + grpc_only = True, +) + +cc_gapic_library( + name = "vision_cc_gapic", + src = ":vision_proto_with_info", + package = "google.cloud.vision.v1", + deps = [ + ":vision_cc_grpc", + ":vision_cc_proto", + ], +) \ No newline at end of file diff --git a/google/cloud/vision/v1/geometry.proto b/google/cloud/vision/v1/geometry.proto index 57e3e2468..881c8f84e 100644 --- a/google/cloud/vision/v1/geometry.proto +++ b/google/cloud/vision/v1/geometry.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,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.cloud.vision.v1; +import "google/api/annotations.proto"; + option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; option java_multiple_files = true; @@ -23,7 +26,6 @@ option java_outer_classname = "GeometryProto"; option java_package = "com.google.cloud.vision.v1"; option objc_class_prefix = "GCVN"; - // A vertex represents a 2D point in the image. // NOTE: the vertex coordinates are in the same scale as the original image. message Vertex { @@ -43,7 +45,7 @@ message NormalizedVertex { // Y coordinate. float y = 2; -}; +} // A bounding polygon for the detected image annotation. message BoundingPoly { diff --git a/google/cloud/vision/v1/image_annotator.proto b/google/cloud/vision/v1/image_annotator.proto index acd7b2686..3375345e2 100644 --- a/google/cloud/vision/v1/image_annotator.proto +++ b/google/cloud/vision/v1/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,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,9 +19,11 @@ package google.cloud.vision.v1; import "google/api/annotations.proto"; import "google/cloud/vision/v1/geometry.proto"; +import "google/cloud/vision/v1/product_search.proto"; import "google/cloud/vision/v1/text_annotation.proto"; import "google/cloud/vision/v1/web_detection.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/type/color.proto"; @@ -38,13 +41,46 @@ option objc_class_prefix = "GCVN"; // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { // 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: "*" }; } + // 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 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: "/v1/files:annotate" + body: "*" + }; + } + + // Run asynchronous image detection and annotation for a list of images. + // + // Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + // + // 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) { + option (google.api.http) = { + post: "/v1/images:asyncBatchAnnotate" + body: "*" + }; + } + // Run asynchronous image detection and annotation for a list of generic // files, such as PDF files, which may contain multiple pages and multiple // images per page. Progress and results can be retrieved through the @@ -103,6 +139,12 @@ message Feature { // Run web detection. WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; } // The feature type. @@ -118,6 +160,28 @@ 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.** @@ -284,7 +348,7 @@ message FaceAnnotation { } // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale, as returned in `ImageParams`. + // are in the original image's scale. // The bounding box is computed to "frame" the face in accordance with human // expectations. It is based on the landmarker results. // Note that one or more x and/or y coordinates may not be generated in the @@ -385,7 +449,7 @@ message EntityAnnotation { // For example, for an image in which the "Eiffel Tower" entity is detected, // this field represents the confidence that there is a tower in the query // image. Range [0, 1]. - float confidence = 5; + float confidence = 5 [deprecated = true]; // The relevancy of the ICA (Image Content Annotation) label to the // image. For example, the relevancy of "tower" is likely higher to an image @@ -410,6 +474,26 @@ message EntityAnnotation { repeated Property properties = 9; } +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // 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; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + // Set of features pertaining to the image, computed by computer vision // methods over safe-search verticals (for example, adult, spoof, medical, // violence). @@ -475,7 +559,7 @@ message ImageProperties { // Single crop hint that is used to generate a new crop when serving an image. message CropHint { // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale, as returned in `ImageParams`. + // box are in the original image's scale. BoundingPoly bounding_poly = 1; // Confidence of this being a salient region. Range [0, 1]. @@ -527,12 +611,15 @@ message ImageContext { // Parameters for crop hints annotation request. CropHintsParams crop_hints_params = 4; + // Parameters for product search. + ProductSearchParams product_search_params = 5; + // Parameters for web detection. WebDetectionParams web_detection_params = 6; } // Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features. +// image, with user-requested features, and with context information. message AnnotateImageRequest { // The image to be processed. Image image = 1; @@ -569,6 +656,10 @@ message AnnotateImageResponse { // If present, label detection has completed successfully. repeated EntityAnnotation label_annotations = 4; + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + // If present, text (OCR) detection has completed successfully. repeated EntityAnnotation text_annotations = 5; @@ -590,6 +681,9 @@ message AnnotateImageResponse { // If present, web detection has completed successfully. WebDetection web_detection = 13; + // If present, product search has completed successfully. + ProductSearchResults product_search_results = 14; + // If set, represents the error message for the operation. // Note that filled-in image annotations are guaranteed to be // correct, even when `error` is set. @@ -608,6 +702,9 @@ message AnnotateFileResponse { // 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. @@ -622,6 +719,48 @@ message BatchAnnotateImagesResponse { repeated AnnotateImageResponse responses = 1; } +// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. +message AnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Pages of the file to perform image annotation. + // + // Pages starts from 1, we assume the first page of the file is page 1. + // At most 5 pages are supported per request. Pages can be negative. + // + // Page 1 means the first page. + // Page 2 means the second page. + // Page -1 means the last page. + // Page -2 means the second to the last page. + // + // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + // + // If this field is empty, by default the service performs image annotation + // for the first 5 pages of the file. + repeated int32 pages = 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; +} + +// A list of file annotation responses. +message BatchAnnotateFilesResponse { + // The list of file annotation responses, each response corresponding to each + // AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileResponse responses = 1; +} + // An offline file annotation request. message AsyncAnnotateFileRequest { // Required. Information about the input file. @@ -643,6 +782,21 @@ message AsyncAnnotateFileResponse { OutputConfig output_config = 1; } +// Request for async image annotation for a list of images. +message AsyncBatchAnnotateImagesRequest { + // Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 2; +} + +// Response to an async batch image annotation request. +message AsyncBatchAnnotateImagesResponse { + // The output location and metadata from AsyncBatchAnnotateImagesRequest. + OutputConfig output_config = 1; +} + // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { @@ -662,8 +816,16 @@ message InputConfig { // The Google Cloud Storage location to read the input from. GcsSource gcs_source = 1; - // The type of the file. Currently only "application/pdf" and "image/tiff" - // are supported. Wildcards are not supported. + // File content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + // + // Currently, this field only works for BatchAnnotateFiles requests. It does + // not work for AsyncBatchAnnotateFiles requests. + bytes content = 3; + + // The type of the file. Currently only "application/pdf", "image/tiff" and + // "image/gif" are supported. Wildcards are not supported. string mime_type = 2; } @@ -695,16 +857,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. @@ -742,25 +911,3 @@ message OperationMetadata { // The time when the operation result was last updated. google.protobuf.Timestamp update_time = 6; } - -// 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; -} diff --git a/google/cloud/vision/v1/product_search.proto b/google/cloud/vision/v1/product_search.proto new file mode 100644 index 000000000..9d981ff77 --- /dev/null +++ b/google/cloud/vision/v1/product_search.proto @@ -0,0 +1,104 @@ +// 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.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"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1"; +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. + BoundingPoly bounding_poly = 9; + + // 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; + + // 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. + 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. An + // '=' should be used to connect the key and value. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // 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; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Information about the products similar to a single product in a query + // image. + message GroupedResult { + // The bounding polygon around the product detected in the query image. + BoundingPoly bounding_poly = 1; + + // List of results, one for each product match. + repeated Result results = 2; + } + + // 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. + repeated Result results = 5; + + // List of results grouped by products detected in the query image. Each entry + // corresponds to one bounding polygon in the query image, and contains the + // matching products specific to that region. There may be duplicate product + // matches in the union of all the per-product results. + repeated GroupedResult product_grouped_results = 6; +} diff --git a/google/cloud/vision/v1/product_search_service.proto b/google/cloud/vision/v1/product_search_service.proto new file mode 100644 index 000000000..5b36591c2 --- /dev/null +++ b/google/cloud/vision/v1/product_search_service.proto @@ -0,0 +1,838 @@ +// 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.v1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1/geometry.proto"; +import "google/longrunning/operations.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; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +option java_package = "com.google.cloud.vision.v1"; +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. +// +// In parallel, +// +// - 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 +// `projects/*/locations/*/products/*/referenceImages/*` +service ProductSearch { + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) + returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/productSets" + }; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/productSets/*}" + }; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + } + + // 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) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/productSets/*}" + }; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/products" + body: "product" + }; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/products" + }; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*}" + }; + } + + // Makes changes to a Product resource. + // Only the `display_name`, `description`, and `labels` fields can be updated + // right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + } + + // Permanently deletes a product and its reference images. + // + // 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. + rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/products/*}" + }; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * 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) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // caches are refreshed. + // + // The actual image files are not deleted from Google Cloud Storage. + rpc DeleteReferenceImage(DeleteReferenceImageRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + } + + // Lists reference images. + // + // Possible errors: + // + // * 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) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + } + + // Removes a Product from the specified ProductSet. + rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct" + body: "*" + }; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) + returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/productSets/*}/products" + }; + } + + // 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. + // `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) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + } +} + +// A Product contains ReferenceImages. +message 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 + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // characters long. + string description = 3; + + // 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; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 100 product_labels. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this timestamp is the default value + // "1970-01-01T00:00:00Z". + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3; + + // 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; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + // The resource name of the reference image. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + // + // Required. + string uri = 2; + + // 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 + // 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; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The product to create. + Product product = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 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 message for the `GetProduct` method. +message GetProductRequest { + // Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1; + + // 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 + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The ProductSet to create. + ProductSet product_set = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_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; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1; + + // 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 path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // 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. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2; + + // 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 + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // 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; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // 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; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 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 Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // The URI must start with `gs://`. + // + // The format of the input csv file should be one image per line. + // In each line, there are 8 columns. + // + // 1. image-uri + // 2. image-id + // 3. product-set-id + // 4. product-id + // 5. product-category + // 6. product-display-name + // 7. labels + // 8. bounding-poly + // + // The `image-uri`, `product-set-id`, `product-id`, and `product-category` + // columns are required. All other columns are optional. + // + // If the `ProductSet` or `Product` specified by the `product-set-id` and + // `product-id` values does not exist, then the system will create a new + // `ProductSet` or `Product` for the image. In this case, the + // `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]. + // + // 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. + // + // If a `Product` with the specified `product-id` already exists, then the + // system ignores the `product-display-name`, `product-category`, and `labels` + // columns. + // + // The `labels` column (optional) is a line containing a list of + // comma-separated key-value pairs, in the following format: + // + // "key_1=value_1,key_2=value_2,...,key_n=value_n" + // + // The `bounding-poly` column (optional) identifies one region of + // interest from the image in the same manner as `CreateReferenceImage`. If + // you do not specify the `bounding-poly` column, then the system will try to + // detect regions of interest automatically. + // + // At most one `bounding-poly` column is allowed per line. If the image + // contains multiple regions of interest, add a line to the CSV file that + // includes the same product information, and the `bounding-poly` values for + // each region of interest. + // + // The `bounding-poly` column must contain an even number of comma-separated + // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + // non-negative integers for absolute bounding polygons, and float values + // in [0, 1] for normalized bounding polygons. + // + // The system will resize the image if the image resolution is too + // large to process (larger than 20MP). + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // 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; +} + +// 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. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + 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.protobuf.Timestamp end_time = 3; +} diff --git a/google/cloud/vision/v1/samples/vision_async_batch_annotate_images_test.yaml b/google/cloud/vision/v1/samples/vision_async_batch_annotate_images_test.yaml new file mode 100644 index 000000000..1f07c86b4 --- /dev/null +++ b/google/cloud/vision/v1/samples/vision_async_batch_annotate_images_test.yaml @@ -0,0 +1,18 @@ +test: + suites: + - name: Vision V1 Sample Tests + cases: + - name: vision_async_batch_annotate_images + spec: + - env: + name: GCS_BUCKET + variable: gcs_bucket + - call: + sample: vision_async_batch_annotate_images + params: + input_image_uri: + literal: gs://cloud-samples-data/vision/label/wakeupcat.jpg + output_uri: + variable: gcs_bucket + - assert_contains: + - variable: gcs_bucket diff --git a/google/cloud/vision/v1/samples/vision_batch_annotate_files_gcs_test.yaml b/google/cloud/vision/v1/samples/vision_batch_annotate_files_gcs_test.yaml new file mode 100644 index 000000000..61e27fc3a --- /dev/null +++ b/google/cloud/vision/v1/samples/vision_batch_annotate_files_gcs_test.yaml @@ -0,0 +1,41 @@ +test: + suites: + - name: Vision V1 Sample Tests + cases: + - name: vision_batch_annotate_files_gcs + spec: + - call: + sample: vision_batch_annotate_files_gcs + params: + storage_uri: + literal: gs://cloud-samples-data/vision/document_understanding/kafka.pdf + # Page 1 + - assert_contains_any: + - literal: "Gregor Samsa woke" + - literal: "he found himself transformed in his bed" + - literal: "What’s happened to me?" + - literal: "Gregor then turned to look out the window" + - literal: "Drops of rain could be heard " + + # Page 2 + - assert_contains_any: + - literal: "Getting up early" + - literal: "He must have tried it a hundred times" + - literal: "look at the floundering legs" + - literal: "travelling salesmen live a life" + - literal: "the best thing for me" + + # The pages not included in the API request should not + # be included in the results (Page 3 texts) + - assert_not_contains: + - literal: "the boss is hard of hearing" + - literal: "even if he did catch the train" + - literal: "fifteen years of service" + + # Page 9 (The last page, -1) + - assert_contains_any: + - literal: "There was a loud thump" + - literal: "Gregor tried to imagine" + - literal: "please open up this door" + - literal: "The lad only ever thinks about the business" + - literal: "Good morning, Mr. Samsa" diff --git a/google/cloud/vision/v1/samples/vision_batch_annotate_files_test.yaml b/google/cloud/vision/v1/samples/vision_batch_annotate_files_test.yaml new file mode 100644 index 000000000..7a8724677 --- /dev/null +++ b/google/cloud/vision/v1/samples/vision_batch_annotate_files_test.yaml @@ -0,0 +1,41 @@ +test: + suites: + - name: Vision V1 Sample Tests + cases: + - name: vision_batch_annotate_files + spec: + - call: + sample: vision_batch_annotate_files + params: + file_path: + literal: resources/kafka.pdf + # Page 1 + - assert_contains_any: + - literal: "Gregor Samsa woke" + - literal: "he found himself transformed in his bed" + - literal: "What’s happened to me?" + - literal: "Gregor then turned to look out the window" + - literal: "Drops of rain could be heard " + + # Page 2 + - assert_contains_any: + - literal: "Getting up early" + - literal: "He must have tried it a hundred times" + - literal: "look at the floundering legs" + - literal: "travelling salesmen live a life" + - literal: "the best thing for me" + + # The pages not included in the API request should not + # be included in the results (Page 3 texts) + - assert_not_contains: + - literal: "the boss is hard of hearing" + - literal: "even if he did catch the train" + - literal: "fifteen years of service" + + # Page 9 (The last page, -1) + - assert_contains_any: + - literal: "There was a loud thump" + - literal: "Gregor tried to imagine" + - literal: "please open up this door" + - literal: "The lad only ever thinks about the business" + - literal: "Good morning, Mr. Samsa" diff --git a/google/cloud/vision/v1/text_annotation.proto b/google/cloud/vision/v1/text_annotation.proto index aa506b981..afbebea51 100644 --- a/google/cloud/vision/v1/text_annotation.proto +++ b/google/cloud/vision/v1/text_annotation.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"; @@ -26,14 +27,14 @@ option java_outer_classname = "TextAnnotationProto"; option java_package = "com.google.cloud.vision.v1"; option objc_class_prefix = "GCVN"; - // TextAnnotation contains a structured representation of OCR extracted text. // The hierarchy of an OCR extracted text structure is like this: // 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 { @@ -158,7 +159,7 @@ message Block { // | | // 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; // List of paragraphs in this block (if this blocks is of type text). @@ -190,7 +191,7 @@ message Paragraph { // 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; // List of words in this paragraph. @@ -219,7 +220,7 @@ message Word { // 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; // List of symbols in the word. diff --git a/google/cloud/vision/v1/vision_gapic.yaml b/google/cloud/vision/v1/vision_gapic.yaml index b2b6b150d..bf83ed511 100644 --- a/google/cloud/vision/v1/vision_gapic.yaml +++ b/google/cloud/vision/v1/vision_gapic.yaml @@ -3,6 +3,7 @@ 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: @@ -18,9 +19,6 @@ language_settings: nodejs: package_name: vision.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.vision.v1.ImageAnnotator smoke_test: @@ -32,8 +30,8 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] retry_params_def: @@ -53,10 +51,167 @@ interfaces: - requests required_fields: - requests - request_object_method: false 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: @@ -64,6 +219,8 @@ interfaces: - 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 @@ -71,7 +228,390 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - request_object_method: false + 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 +# 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/web_detection.proto b/google/cloud/vision/v1/web_detection.proto index 574755981..f4a22019c 100644 --- a/google/cloud/vision/v1/web_detection.proto +++ b/google/cloud/vision/v1/web_detection.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"; @@ -49,6 +50,17 @@ 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. @@ -71,17 +83,6 @@ 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; @@ -100,6 +101,7 @@ message WebDetection { // The visually similar image results. repeated WebImage visually_similar_images = 6; - // Best guess text labels for the request image. + // The service's best guess as to the topic of the request image. + // Inferred from similar images on the open web. repeated WebLabel best_guess_labels = 8; } diff --git a/google/cloud/vision/v1p1beta1/BUILD.bazel b/google/cloud/vision/v1p1beta1/BUILD.bazel new file mode 100644 index 000000000..9e0c8f78c --- /dev/null +++ b/google/cloud/vision/v1p1beta1/BUILD.bazel @@ -0,0 +1,158 @@ +# 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 = "vision_proto", + srcs = [ + "geometry.proto", + "image_annotator.proto", + "text_annotation.proto", + "web_detection.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + ], +) + +proto_library_with_info( + name = "vision_proto_with_info", + deps = [":vision_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 = "vision_java_proto", + deps = [":vision_proto"], +) + +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"], +) + +java_gapic_library( + name = "vision_java_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + service_yaml = "//google/cloud/vision:vision_v1p1beta1.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", + ], +) for test_name in [ + "com.google.cloud.vision.v1p1beta1.ImageAnnotatorClientTest", +]] + +# Opensource 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 = [ + ":vision_java_proto", + ":vision_proto", + ":vision_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 = "vision_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1", + 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", + ], +) + +go_gapic_library( + name = "vision_go_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + importpath = "cloud.google.com/go/vision/apiv1p1beta1", + 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", + ], +) + +go_test( + name = "vision_go_gapic_test", + srcs = [":vision_go_gapic_srcjar_test"], + embed = [":vision_go_gapic"], + importpath = "cloud.google.com/go/vision/apiv1p1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/vision/v1p1beta1/image_annotator.proto b/google/cloud/vision/v1p1beta1/image_annotator.proto index 73b8db853..4869a3311 100644 --- a/google/cloud/vision/v1p1beta1/image_annotator.proto +++ b/google/cloud/vision/v1p1beta1/image_annotator.proto @@ -339,7 +339,8 @@ message Property { // Set of detected entity features. message EntityAnnotation { // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/). + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). string mid = 1; // The language code for the locale in which the entity textual diff --git a/google/cloud/vision/v1p1beta1/vision_gapic.yaml b/google/cloud/vision/v1p1beta1/vision_gapic.yaml index 54aaf92bf..07b9bd9d4 100644 --- a/google/cloud/vision/v1p1beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p1beta1/vision_gapic.yaml @@ -12,15 +12,12 @@ language_settings: package_name: Google.Cloud.Vision.V1P1Beta1 release_level: BETA ruby: - package_name: Google::Cloud::Vision::V1P1Beta1 + package_name: Google::Cloud::Vision::V1p1beta1 php: package_name: Google\Cloud\Vision\V1p1beta1 nodejs: package_name: vision.v1p1beta1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.vision.v1p1beta1.ImageAnnotator smoke_test: @@ -53,7 +50,6 @@ interfaces: - requests required_fields: - requests - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/cloud/vision/v1p2beta1/BUILD.bazel b/google/cloud/vision/v1p2beta1/BUILD.bazel new file mode 100644 index 000000000..8511d499b --- /dev/null +++ b/google/cloud/vision/v1p2beta1/BUILD.bazel @@ -0,0 +1,159 @@ +# 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 = "vision_proto", + srcs = [ + "geometry.proto", + "image_annotator.proto", + "text_annotation.proto", + "web_detection.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "//google/type:color_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "vision_proto_with_info", + deps = [":vision_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 = "vision_java_proto", + deps = [":vision_proto"], +) + +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"], +) + +java_gapic_library( + name = "vision_java_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + service_yaml = "//google/cloud/vision:vision_v1p2beta1.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", + ], +) for test_name in [ + "com.google.cloud.vision.v1p2beta1.ImageAnnotatorClientTest", +]] + +# Opensource 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 = [ + ":vision_java_proto", + ":vision_proto", + ":vision_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 = "vision_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1", + 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", + ], +) + +go_gapic_library( + name = "vision_go_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + importpath = "cloud.google.com/go/vision/apiv1p2beta1", + 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", + ], +) + +go_test( + name = "vision_go_gapic_test", + srcs = [":vision_go_gapic_srcjar_test"], + embed = [":vision_go_gapic"], + importpath = "cloud.google.com/go/vision/apiv1p2beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/vision/v1p2beta1/geometry.proto b/google/cloud/vision/v1p2beta1/geometry.proto index 9add6ce84..e9fec20bd 100644 --- a/google/cloud/vision/v1p2beta1/geometry.proto +++ b/google/cloud/vision/v1p2beta1/geometry.proto @@ -22,7 +22,6 @@ option java_multiple_files = true; option java_outer_classname = "GeometryProto"; option java_package = "com.google.cloud.vision.v1p2beta1"; - // A vertex represents a 2D point in the image. // NOTE: the vertex coordinates are in the same scale as the original image. message Vertex { diff --git a/google/cloud/vision/v1p2beta1/image_annotator.proto b/google/cloud/vision/v1p2beta1/image_annotator.proto index c145a38d5..c5fce50f9 100644 --- a/google/cloud/vision/v1p2beta1/image_annotator.proto +++ b/google/cloud/vision/v1p2beta1/image_annotator.proto @@ -32,13 +32,13 @@ option java_multiple_files = true; option java_outer_classname = "ImageAnnotatorProto"; option java_package = "com.google.cloud.vision.v1p2beta1"; - // Service that performs Google Cloud Vision API detection tasks over client // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { // 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: "*" @@ -51,7 +51,8 @@ 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: "*" diff --git a/google/cloud/vision/v1p2beta1/text_annotation.proto b/google/cloud/vision/v1p2beta1/text_annotation.proto index a8c5b869a..b35eb47e8 100644 --- a/google/cloud/vision/v1p2beta1/text_annotation.proto +++ b/google/cloud/vision/v1p2beta1/text_annotation.proto @@ -25,14 +25,14 @@ option java_multiple_files = true; option java_outer_classname = "TextAnnotationProto"; option java_package = "com.google.cloud.vision.v1p2beta1"; - // TextAnnotation contains a structured representation of OCR extracted text. // The hierarchy of an OCR extracted text structure is like this: // 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.v1p2beta1.TextAnnotation.TextProperty] message definition below for more -// detail. +// to the +// [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] +// message definition below for more detail. message TextAnnotation { // Detected language for a structural component. message DetectedLanguage { diff --git a/google/cloud/vision/v1p2beta1/vision_gapic.yaml b/google/cloud/vision/v1p2beta1/vision_gapic.yaml index bbbc032c6..41d5c49b4 100644 --- a/google/cloud/vision/v1p2beta1/vision_gapic.yaml +++ b/google/cloud/vision/v1p2beta1/vision_gapic.yaml @@ -12,15 +12,12 @@ language_settings: package_name: Google.Cloud.Vision.V1P2Beta1 release_level: BETA ruby: - package_name: Google::Cloud::Vision::V1P2Beta1 + package_name: Google::Cloud::Vision::V1p2beta1 php: package_name: Google\Cloud\Vision\V1p2beta1 nodejs: package_name: vision.v1p2beta1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.cloud.vision.v1p2beta1.ImageAnnotator smoke_test: @@ -53,7 +50,6 @@ interfaces: - requests required_fields: - requests - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -71,7 +67,6 @@ interfaces: poll_delay_multiplier: 1.5 max_poll_delay_millis: 45000 total_poll_timeout_millis: 86400000 - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/cloud/vision/v1p2beta1/web_detection.proto b/google/cloud/vision/v1p2beta1/web_detection.proto index aeb2e2a87..f2b9dfef0 100644 --- a/google/cloud/vision/v1p2beta1/web_detection.proto +++ b/google/cloud/vision/v1p2beta1/web_detection.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "WebDetectionProto"; option java_package = "com.google.cloud.vision.v1p2beta1"; - // Relevant information for the image from the Internet. message WebDetection { // Entity deduced from similar images on the Internet. diff --git a/google/cloud/vision/v1p3beta1/BUILD.bazel b/google/cloud/vision/v1p3beta1/BUILD.bazel new file mode 100644 index 000000000..371594f03 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/BUILD.bazel @@ -0,0 +1,163 @@ +# 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 = "vision_proto", + srcs = [ + "geometry.proto", + "image_annotator.proto", + "product_search.proto", + "product_search_service.proto", + "text_annotation.proto", + "web_detection.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "vision_proto_with_info", + deps = [":vision_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 = "vision_java_proto", + deps = [":vision_proto"], +) + +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"], +) + +java_gapic_library( + name = "vision_java_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + service_yaml = "//google/cloud/vision:vision_v1p3beta1.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", + ], +) for test_name in [ + "com.google.cloud.vision.v1p3beta1.ImageAnnotatorClientTest", +]] + +# Opensource 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 = [ + ":vision_java_proto", + ":vision_proto", + ":vision_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 = "vision_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1", + 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", + ], +) + +go_gapic_library( + name = "vision_go_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + importpath = "cloud.google.com/go/vision/apiv1p3beta1", + 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", + ], +) + +go_test( + name = "vision_go_gapic_test", + srcs = [":vision_go_gapic_srcjar_test"], + embed = [":vision_go_gapic"], + importpath = "cloud.google.com/go/vision/apiv1p3beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/vision/v1p3beta1/geometry.proto b/google/cloud/vision/v1p3beta1/geometry.proto new file mode 100644 index 000000000..28b768eaa --- /dev/null +++ b/google/cloud/vision/v1p3beta1/geometry.proto @@ -0,0 +1,75 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// 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; +} + +// A normalized bounding polygon around a portion of an image. +message NormalizedBoundingPoly { + // Normalized vertices of the bounding polygon. + repeated NormalizedVertex vertices = 1; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/google/cloud/vision/v1p3beta1/image_annotator.proto b/google/cloud/vision/v1p3beta1/image_annotator.proto new file mode 100644 index 000000000..2ac3ddb8b --- /dev/null +++ b/google/cloud/vision/v1p3beta1/image_annotator.proto @@ -0,0 +1,803 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/cloud/vision/v1p3beta1/product_search.proto"; +import "google/cloud/vision/v1p3beta1/text_annotation.proto"; +import "google/cloud/vision/v1p3beta1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) + returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p3beta1/images:annotate" + body: "*" + }; + } + + // Run asynchronous image detection and annotation for a list of generic + // files, such as PDF files, which may contain multiple pages and multiple + // images per page. Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p3beta1/files:asyncBatchAnnotate" + body: "*" + }; + } +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The 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 gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A 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. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // 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 content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + ImageSource source = 2; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale, as returned in `ImageParams`. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // 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; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale, as returned in `ImageParams`. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. 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). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for product search. + google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If present, product search has completed successfully. + google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = + 14; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + 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; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// 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; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // The type of the file. Currently only "application/pdf" and "image/tiff" + // are supported. Wildcards are not supported. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file 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 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a + // Google Cloud Storage object. Wildcards are not currently supported. + string uri = 1; +} + +// 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 `/`. + // + // Examples: + // + // * File: gs://bucket-name/filename.json + // * Prefix: gs://bucket-name/prefix/here/ + // * File: gs://bucket-name/prefix/here + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// 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; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} diff --git a/google/cloud/vision/v1p3beta1/product_search.proto b/google/cloud/vision/v1p3beta1/product_search.proto new file mode 100644 index 000000000..6a30c0875 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/product_search.proto @@ -0,0 +1,162 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/cloud/vision/v1p3beta1/product_search_service.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Parameters for a product search request. +message ProductSearchParams { + // The resource name of the catalog to search. + // + // Format is: `productSearch/catalogs/CATALOG_NAME`. + string catalog_name = 1; + + // The category to search in. + // Optional. It is inferred by the system if it is not specified. + // [Deprecated] Use `product_category`. + ProductSearchCategory category = 2; + + // The product category to search in. + // Optional. It is inferred by the system if it is not specified. + // Supported values are `bag`, `shoe`, `sunglasses`, `dress`, `outerwear`, + // `skirt`, `top`, `shorts`, and `pants`. + string product_category = 5; + + // The bounding polygon around the area of interest in the image. + // Optional. If it is not specified, system discretion will be applied. + // [Deprecated] Use `bounding_poly`. + NormalizedBoundingPoly normalized_bounding_poly = 3; + + // The bounding polygon around the area of interest in the image. + // Optional. If it is not specified, system discretion will be applied. + BoundingPoly bounding_poly = 9; + + // Specifies the verbosity of the product search results. + // Optional. Defaults to `BASIC`. + ProductSearchResultsView view = 4; + + // The resource name of a + // [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for + // similar images. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + string product_set = 6; + + // The list of product categories to search in. Currently, we only consider + // the first category, and either "homegoods" or "apparel" should be + // specified. + 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. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // acceptable, but not "(color = red OR brand = Google)" or "color: red". + string filter = 8; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message ProductInfo { + // Product ID. + string product_id = 1; + + // The URI of the image which matched the query image. + // + // This field is returned only if `view` is set to `FULL` in + // the request. + string image_uri = 2; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + // + // This field is returned only if `view` is set to `FULL` in + // the request. + float score = 3; + } + + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + // + // This field is returned only if `view` is set to `FULL` in + // the request. + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Product category. + // [Deprecated] Use `product_category`. + ProductSearchCategory category = 1; + + // Product category. + // Supported values are `bag` and `shoe`. + // [Deprecated] `product_category` is provided in each Product. + string product_category = 4; + + // Timestamp of the index which provided these results. Changes made after + // this time are not reflected in the current results. + google.protobuf.Timestamp index_time = 2; + + // List of detected products. + repeated ProductInfo products = 3; + + // List of results, one for each product match. + repeated Result results = 5; +} + +// Supported product search categories. +enum ProductSearchCategory { + // Default value used when a category is not specified. + PRODUCT_SEARCH_CATEGORY_UNSPECIFIED = 0; + + // Shoes category. + SHOES = 1; + + // Bags category. + BAGS = 2; +} + +// Specifies the fields to include in product search results. +enum ProductSearchResultsView { + // Product search results contain only `product_category` and `product_id`. + // Default value. + BASIC = 0; + + // Product search results contain `product_category`, `product_id`, + // `image_uri`, and `score`. + FULL = 1; +} diff --git a/google/cloud/vision/v1p3beta1/product_search_service.proto b/google/cloud/vision/v1p3beta1/product_search_service.proto new file mode 100644 index 000000000..23919ee7e --- /dev/null +++ b/google/cloud/vision/v1p3beta1/product_search_service.proto @@ -0,0 +1,842 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/longrunning/operations.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; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +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 +// `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 +// `projects/*/locations/*/products/*` +// +// - 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 { + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) + returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" + }; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" + }; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + } + + // Permanently deletes a ProductSet. All Products and ReferenceImages in the + // ProductSet will be 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: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" + }; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/products" + body: "product" + }; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*}/products" + }; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/products/*}" + }; + } + + // Makes changes to a Product resource. + // Only display_name, description and labels can be updated right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + } + + // Permanently deletes a product and its reference images. + // + // 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: "/v1p3beta1/{name=projects/*/locations/*/products/*}" + }; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * 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) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // 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: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + } + + // Lists reference images. + // + // Possible errors: + // + // * 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) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + } + + // 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: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" + body: "*" + }; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) + returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" + }; + } + + // 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. + // `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.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + rpc ImportProductSets(ImportProductSetsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + } +} + +// A Product contains ReferenceImages. +message 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 + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // 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; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 100 product_labels. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this field is 0. + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3; + + // 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; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + // The resource name of the reference image. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + // + // Required. + string uri = 2; + + // 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 + // 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; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The product to create. + Product product = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 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 message for the `GetProduct` method. +message GetProductRequest { + // Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1; + + // 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 + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The ProductSet to create. + ProductSet product_set = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_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; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1; + + // 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 path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // 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. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2; + + // 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 + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // 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; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // 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; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 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 Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // 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. + // 1. image_uri + // 2, image_id + // 3. product_set_id + // 4. product_id + // 5, product_category + // 6, product_display_name + // 7, labels + // 8. bounding_poly + // + // Columns 1, 3, 4, and 5 are required, other columns are optional. A new + // ProductSet/Product with the same id will be created on the fly + // if the ProductSet/Product specified by product_set_id/product_id does not + // exist. + // + // The image_id field is optional but has to be unique if provided. If it is + // empty, we will automatically assign an unique id to the image. + // + // The product_display_name field is optional. If it is empty, a space (" ") + // is used as the place holder for the product display_name, which can + // be updated later through the realtime API. + // + // If the Product with product_id already exists, the fields + // product_display_name, product_category and labels are ignored. + // + // If a Product doesn't exist and needs to be created on the fly, the + // product_display_name field refers to + // [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name], + // the product_category field refers to + // [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category], + // and the labels field refers to [Product.labels][]. + // + // Labels (optional) should be a line containing a list of comma-separated + // key-value pairs, with the format + // "key_1=value_1,key_2=value_2,...,key_n=value_n". + // + // The bounding_poly (optional) field is used to identify one region of + // interest from the image in the same manner as CreateReferenceImage. If no + // bounding_poly is specified, the system will try to detect regions of + // interest automatically. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 20MP). + // + // Also note that at most one bounding_poly is allowed per line. If the image + // contains multiple regions of interest, the csv should contain one line per + // region of interest. + // + // The bounding_poly column should contain an even number of comma-separated + // numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative + // integers should be used for absolute bounding polygons, and float values + // in [0, 1] should be used for normalized bounding polygons. + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // 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; +} + +// 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. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + 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.protobuf.Timestamp end_time = 3; +} diff --git a/google/cloud/vision/v1p3beta1/text_annotation.proto b/google/cloud/vision/v1p3beta1/text_annotation.proto new file mode 100644 index 000000000..3c256c577 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/text_annotation.proto @@ -0,0 +1,259 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// 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.v1p3beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // 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; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/google/cloud/vision/v1p3beta1/vision_gapic.yaml b/google/cloud/vision/v1p3beta1/vision_gapic.yaml new file mode 100644 index 000000000..59c695328 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/vision_gapic.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://gapic-toolkit/President_Barack_Obama.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/web_detection.proto b/google/cloud/vision/v1p3beta1/web_detection.proto new file mode 100644 index 000000000..cf9a22612 --- /dev/null +++ b/google/cloud/vision/v1p3beta1/web_detection.proto @@ -0,0 +1,104 @@ +// 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.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + 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; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // Best guess text labels for the request image. + repeated WebLabel best_guess_labels = 8; +} diff --git a/google/cloud/vision/v1p4beta1/BUILD.bazel b/google/cloud/vision/v1p4beta1/BUILD.bazel new file mode 100644 index 000000000..1b263fa0f --- /dev/null +++ b/google/cloud/vision/v1p4beta1/BUILD.bazel @@ -0,0 +1,163 @@ +# 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 = "vision_proto", + srcs = [ + "geometry.proto", + "image_annotator.proto", + "product_search.proto", + "product_search_service.proto", + "text_annotation.proto", + "web_detection.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "vision_proto_with_info", + deps = [":vision_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 = "vision_java_proto", + deps = [":vision_proto"], +) + +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"], +) + +java_gapic_library( + name = "vision_java_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + service_yaml = "//google/cloud/vision:vision_v1p4beta1.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", + ], +) for test_name in [ + "com.google.cloud.vision.v1p4beta1.ImageAnnotatorClientTest", +]] + +# Opensource 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 = [ + ":vision_java_proto", + ":vision_proto", + ":vision_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 = "vision_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1", + 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", + ], +) + +go_gapic_library( + name = "vision_go_gapic", + src = ":vision_proto_with_info", + gapic_yaml = "vision_gapic.yaml", + importpath = "cloud.google.com/go/vision/apiv1p4beta1", + 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", + ], +) + +go_test( + name = "vision_go_gapic_test", + srcs = [":vision_go_gapic_srcjar_test"], + embed = [":vision_go_gapic"], + importpath = "cloud.google.com/go/vision/apiv1p4beta1", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/vision/v1p4beta1/geometry.proto b/google/cloud/vision/v1p4beta1/geometry.proto new file mode 100644 index 000000000..b0abd329c --- /dev/null +++ b/google/cloud/vision/v1p4beta1/geometry.proto @@ -0,0 +1,71 @@ +// 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.cloud.vision.v1p4beta1; + +import "google/api/annotations.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 = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// 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; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/google/cloud/vision/v1p4beta1/image_annotator.proto b/google/cloud/vision/v1p4beta1/image_annotator.proto new file mode 100644 index 000000000..ebbf92c35 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/image_annotator.proto @@ -0,0 +1,905 @@ +// 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.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/cloud/vision/v1p4beta1/product_search.proto"; +import "google/cloud/vision/v1p4beta1/text_annotation.proto"; +import "google/cloud/vision/v1p4beta1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.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 = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) + returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p4beta1/images:annotate" + body: "*" + }; + } + + // 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. + rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) + returns (BatchAnnotateFilesResponse) { + option (google.api.http) = { + post: "/v1p4beta1/files:annotate" + body: "*" + }; + } + + // Run asynchronous image detection and annotation for a list of images. + // + // Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + // + // 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) { + option (google.api.http) = { + post: "/v1p4beta1/images:asyncBatchAnnotate" + body: "*" + }; + } + + // Run asynchronous image detection and annotation for a list of generic + // files, such as PDF files, which may contain multiple pages and multiple + // images per page. Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/files:asyncBatchAnnotate" + body: "*" + }; + } +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The 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 gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A 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. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // 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 content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + 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 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; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5 [deprecated = true]; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // 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; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. 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). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for product search. + ProductSearchParams product_search_params = 5; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features, and with context information. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If present, product search has completed successfully. + ProductSearchResults product_search_results = 14; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + 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; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. +message AnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Pages of the file to perform image annotation. + // + // Pages starts from 1, we assume the first page of the file is page 1. + // At most 5 pages are supported per request. Pages can be negative. + // + // Page 1 means the first page. + // Page 2 means the second page. + // Page -1 means the last page. + // Page -2 means the second to the last page. + // + // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + // + // If this field is empty, by default the service performs image annotation + // for the first 5 pages of the file. + repeated int32 pages = 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; +} + +// A list of file annotation responses. +message BatchAnnotateFilesResponse { + // The list of file annotation responses, each response corresponding to each + // AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// Request for async image annotation for a list of images. +message AsyncBatchAnnotateImagesRequest { + // Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 2; +} + +// Response to an async batch image annotation request. +message AsyncBatchAnnotateImagesResponse { + // The output location and metadata from AsyncBatchAnnotateImagesRequest. + OutputConfig output_config = 1; +} + +// 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; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // File content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + // + // Currently, this field only works for BatchAnnotateFiles requests. It does + // 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. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file 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 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a + // Google Cloud Storage object. Wildcards are not currently supported. + string uri = 1; +} + +// 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 `/`. + // + // Examples: + // + // * File: gs://bucket-name/filename.json + // * Prefix: gs://bucket-name/prefix/here/ + // * File: gs://bucket-name/prefix/here + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} diff --git a/google/cloud/vision/v1p4beta1/product_search.proto b/google/cloud/vision/v1p4beta1/product_search.proto new file mode 100644 index 000000000..1caf30194 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/product_search.proto @@ -0,0 +1,102 @@ +// 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.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/cloud/vision/v1p4beta1/product_search_service.proto"; +import "google/protobuf/timestamp.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 = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +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. + BoundingPoly bounding_poly = 9; + + // The resource name of a + // [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for + // similar images. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + string product_set = 6; + + // 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. + 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. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // acceptable, but not "(color = red OR brand = Google)" or "color: red". + string filter = 8; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Information about the products similar to a single product in a query + // image. + message GroupedResult { + // The bounding polygon around the product detected in the query image. + BoundingPoly bounding_poly = 1; + + // List of results, one for each product match. + repeated Result results = 2; + } + + // Timestamp of the index which provided these results. Changes made after + // this time are not reflected in the current results. + google.protobuf.Timestamp index_time = 2; + + // List of results, one for each product match. + repeated Result results = 5; + + // List of results grouped by products detected in the query image. Each entry + // corresponds to one bounding polygon in the query image, and contains the + // matching products specific to that region. There may be duplicate product + // matches in the union of all the per-product results. + repeated GroupedResult product_grouped_results = 6; +} diff --git a/google/cloud/vision/v1p4beta1/product_search_service.proto b/google/cloud/vision/v1p4beta1/product_search_service.proto new file mode 100644 index 000000000..3cbc53573 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/product_search_service.proto @@ -0,0 +1,857 @@ +// 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.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/longrunning/operations.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; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +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.v1p4beta1.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.v1p4beta1.Product] resources, named +// `projects/*/locations/*/products/*` +// +// - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of +// [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, +// named +// `projects/*/locations/*/products/*/referenceImages/*` +service ProductSearch { + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) + returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" + }; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" + }; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + } + + // 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/*}" + }; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/products" + body: "product" + }; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*}/products" + }; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/products/*}" + }; + } + + // Makes changes to a Product resource. + // Only the `display_name`, `description`, and `labels` fields can be updated + // right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + } + + // Permanently deletes a product and its reference images. + // + // 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/*}" + }; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * 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) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // 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/*}" + }; + } + + // Lists reference images. + // + // Possible errors: + // + // * 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) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + } + + // 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: "*" + }; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) + returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" + }; + } + + // 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. + // `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.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + rpc ImportProductSets(ImportProductSetsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + } +} + +// A Product contains ReferenceImages. +message 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 + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // 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; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 100 product_labels. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this timestamp is the default value + // "1970-01-01T00:00:00Z". + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3; + + // 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; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + // The resource name of the reference image. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + // + // Required. + string uri = 2; + + // 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 + // 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; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The product to create. + Product product = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 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 message for the `GetProduct` method. +message GetProductRequest { + // Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1; + + // 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 + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The ProductSet to create. + ProductSet product_set = 2; + + // 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 + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_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; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1; + + // 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 path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // 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. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2; + + // 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 + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // 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; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // 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; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // 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; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 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 Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // The URI must start with `gs://`. + // + // The format of the input csv file should be one image per line. + // In each line, there are 8 columns. + // + // 1. image-uri + // 2. image-id + // 3. product-set-id + // 4. product-id + // 5. product-category + // 6. product-display-name + // 7. labels + // 8. bounding-poly + // + // The `image-uri`, `product-set-id`, `product-id`, and `product-category` + // columns are required. All other columns are optional. + // + // If the `ProductSet` or `Product` specified by the `product-set-id` and + // `product-id` values does not exist, then the system will create a new + // `ProductSet` or `Product` for the image. In this case, the + // `product-display-name` column refers to + // [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the + // `product-category` column refers to + // [product_category][google.cloud.vision.v1p4beta1.Product.product_category], + // and the `labels` column refers to + // [product_labels][google.cloud.vision.v1p4beta1.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.v1p4beta1.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` + // columns. + // + // The `labels` column (optional) is a line containing a list of + // comma-separated key-value pairs, in the following format: + // + // "key_1=value_1,key_2=value_2,...,key_n=value_n" + // + // The `bounding-poly` column (optional) identifies one region of + // interest from the image in the same manner as `CreateReferenceImage`. If + // you do not specify the `bounding-poly` column, then the system will try to + // detect regions of interest automatically. + // + // At most one `bounding-poly` column is allowed per line. If the image + // contains multiple regions of interest, add a line to the CSV file that + // includes the same product information, and the `bounding-poly` values for + // each region of interest. + // + // The `bounding-poly` column must contain an even number of comma-separated + // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + // non-negative integers for absolute bounding polygons, and float values + // in [0, 1] for normalized bounding polygons. + // + // The system will resize the image if the image resolution is too + // large to process (larger than 20MP). + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // 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; +} + +// 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. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + 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.protobuf.Timestamp end_time = 3; +} diff --git a/google/cloud/vision/v1p4beta1/text_annotation.proto b/google/cloud/vision/v1p4beta1/text_annotation.proto new file mode 100644 index 000000000..542677f27 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/text_annotation.proto @@ -0,0 +1,261 @@ +// 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.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 = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// 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.v1p4beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // 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; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/google/cloud/vision/v1p4beta1/vision_gapic.yaml b/google/cloud/vision/v1p4beta1/vision_gapic.yaml new file mode 100644 index 000000000..90d6f5000 --- /dev/null +++ b/google/cloud/vision/v1p4beta1/vision_gapic.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/web_detection.proto b/google/cloud/vision/v1p4beta1/web_detection.proto new file mode 100644 index 000000000..15822563b --- /dev/null +++ b/google/cloud/vision/v1p4beta1/web_detection.proto @@ -0,0 +1,107 @@ +// 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.cloud.vision.v1p4beta1; + +import "google/api/annotations.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 = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + 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. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // The service's best guess as to the topic of the request image. + // Inferred from similar images on the open web. + repeated WebLabel best_guess_labels = 8; +} diff --git a/google/cloud/vision/vision_v1.yaml b/google/cloud/vision/vision_v1.yaml index 7875bdabb..4169dafe9 100644 --- a/google/cloud/vision/vision_v1.yaml +++ b/google/cloud/vision/vision_v1.yaml @@ -5,26 +5,32 @@ title: Cloud Vision API apis: - name: google.cloud.vision.v1.ImageAnnotator +- name: google.cloud.vision.v1.ProductSearch types: - name: google.cloud.vision.v1.AnnotateFileResponse - name: google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse +- name: google.cloud.vision.v1.BatchAnnotateFilesResponse +- name: google.cloud.vision.v1.BatchOperationMetadata +- name: google.cloud.vision.v1.ImportProductSetsResponse - name: google.cloud.vision.v1.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. + Integrates Google Vision features, including image labeling, face, logo, + and landmark detection, optical character recognition (OCR), and detection + of explicit content, into applications. http: rules: - selector: google.longrunning.Operations.GetOperation - get: '/v1/{name=operations/*}' + get: '/v1/{name=projects/*/operations/*}' additional_bindings: + - get: '/v1/{name=projects/*/locations/*/operations/*}' + - get: '/v1/{name=operations/*}' - get: '/v1/{name=locations/*/operations/*}' - authentication: rules: - selector: '*' diff --git a/google/cloud/vision/vision_v1p3beta1.yaml b/google/cloud/vision/vision_v1p3beta1.yaml new file mode 100644 index 000000000..8c384f050 --- /dev/null +++ b/google/cloud/vision/vision_v1p3beta1.yaml @@ -0,0 +1,37 @@ +type: google.api.Service +config_version: 3 +name: vision.googleapis.com +title: Cloud Vision API + +apis: +- name: google.cloud.vision.v1p3beta1.ProductSearch +- name: google.cloud.vision.v1p3beta1.ImageAnnotator + +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. + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=operations/*}' + additional_bindings: + - get: '/v1/{name=locations/*/operations/*}' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/vision/vision_v1p4beta1.yaml b/google/cloud/vision/vision_v1p4beta1.yaml new file mode 100644 index 000000000..f5bdd9b9b --- /dev/null +++ b/google/cloud/vision/vision_v1p4beta1.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.v1p4beta1.ProductSearch +- name: google.cloud.vision.v1p4beta1.ImageAnnotator + +types: +- name: google.cloud.vision.v1p4beta1.BatchOperationMetadata +- name: google.cloud.vision.v1p4beta1.ImportProductSetsResponse +- name: google.cloud.vision.v1p4beta1.AnnotateFileResponse +- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse +- name: google.cloud.vision.v1p4beta1.OperationMetadata +- name: google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse +- name: google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse + +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. + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=operations/*}' + additional_bindings: + - get: '/v1/{name=locations/*/operations/*}' + + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-vision diff --git a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml new file mode 100644 index 000000000..4e27f0413 --- /dev/null +++ b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: webrisk + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: webrisk.yaml + gapic_yaml: v1beta1/webrisk_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/webrisk/v1beta1/webrisk.proto b/google/cloud/webrisk/v1beta1/webrisk.proto new file mode 100644 index 000000000..c6b5f7c90 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk.proto @@ -0,0 +1,295 @@ +// 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.webrisk.v1beta1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.WebRisk.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/webrisk/v1beta1;webrisk"; +option java_multiple_files = true; +option java_outer_classname = "WebRiskProto"; +option java_package = "com.google.webrisk.v1beta1"; +option objc_class_prefix = "GCWR"; +option php_namespace = "Google\\Cloud\\WebRisk\\V1beta1"; + +// Web Risk v1beta1 API defines an interface to detect malicious URLs on your +// website and in client applications. +service WebRiskServiceV1Beta1 { + // Gets the most recent threat list diffs. + rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) + returns (ComputeThreatListDiffResponse) { + option (google.api.http) = { + get: "/v1beta1/threatLists:computeDiff" + }; + } + + // This method is used to check whether a URI is on a given threatList. + rpc SearchUris(SearchUrisRequest) returns (SearchUrisResponse) { + option (google.api.http) = { + get: "/v1beta1/uris:search" + }; + } + + // 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: "/v1beta1/hashes:search" + }; + } +} + +// 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 ThreatList to update. + ThreatType threat_type = 1; + + // 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; +} + +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 is required 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. + 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 + // disregard 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 { + // The URI to be checked for matches. + string uri = 1; + + // Required. The ThreatLists to search in. + repeated ThreatType threat_types = 2; +} + +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. + repeated ThreatType threat_types = 2; +} + +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). + 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; +} diff --git a/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml b/google/cloud/webrisk/v1beta1/webrisk_gapic.yaml new file mode 100644 index 000000000..4c6d77dd7 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk_gapic.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.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: + # 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/webrisk.yaml b/google/cloud/webrisk/webrisk.yaml new file mode 100644 index 000000000..f43119679 --- /dev/null +++ b/google/cloud/webrisk/webrisk.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: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/websecurityscanner/BUILD.bazel b/google/cloud/websecurityscanner/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/cloud/websecurityscanner/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml index 3bdb5291b..31dceecef 100644 --- a/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml +++ b/google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-websecurityscanner-v1alpha - - name: grpc - dest: generated/java/grpc-google-cloud-websecurityscanner-v1alpha - - name: proto - dest: generated/java/proto-google-cloud-websecurityscanner-v1alpha - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-websecurityscanner - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-websecurityscanner-v1alpha - name: go_gapic type: GAPIC language: GO diff --git a/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml b/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml new file mode 100644 index 000000000..130084151 --- /dev/null +++ b/google/cloud/websecurityscanner/artman_websecurityscanner_v1beta.yaml @@ -0,0 +1,34 @@ +common: + api_name: websecurityscanner + api_version: v1beta + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta + service_yaml: websecurityscanner_v1beta.yaml + gapic_yaml: v1beta/websecurityscanner_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/websecurityscanner/v1alpha/BUILD.bazel b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel new file mode 100644 index 000000000..33c9e29ff --- /dev/null +++ b/google/cloud/websecurityscanner/v1alpha/BUILD.bazel @@ -0,0 +1,147 @@ +# 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 = "websecurityscanner_proto", + srcs = [ + "crawled_url.proto", + "finding.proto", + "finding_addon.proto", + "finding_type_stats.proto", + "scan_config.proto", + "scan_run.proto", + "web_security_scanner.proto", + ], + deps = [ + "//google/api:annotations_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"], +) + +############################################################################## +# 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 = "websecurityscanner_java_proto", + deps = [":websecurityscanner_proto"], +) + +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"], +) + +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"], + deps = [ + ":websecurityscanner_java_proto", + ":websecurityscanner_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":websecurityscanner_java_gapic_test"], +) for test_name in [ + "com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClientTest", +]] + +# Opensource 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", + ":websecurityscanner_java_proto", + ":websecurityscanner_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 = "websecurityscanner_go_proto", + 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"], +) + +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"], +) + +go_test( + name = "websecurityscanner_go_gapic_test", + srcs = [":websecurityscanner_go_gapic_srcjar_test"], + embed = [":websecurityscanner_go_gapic"], + importpath = "cloud.google.com/go/cloud/websecurityscanner/apiv1alpha", +) + +# Opensource 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", + ], +) diff --git a/google/cloud/websecurityscanner/v1alpha/crawled_url.proto b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto index 8951e50bf..d4c40eae8 100644 --- a/google/cloud/websecurityscanner/v1alpha/crawled_url.proto +++ b/google/cloud/websecurityscanner/v1alpha/crawled_url.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "CrawledUrlProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // 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. diff --git a/google/cloud/websecurityscanner/v1alpha/finding.proto b/google/cloud/websecurityscanner/v1alpha/finding.proto index bdb151526..07140e276 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "FindingProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // A Finding resource represents a vulnerability instance identified during a // ScanRun. message Finding { diff --git a/google/cloud/websecurityscanner/v1alpha/finding_addon.proto b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto index d0777f64d..a7d344b84 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding_addon.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding_addon.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "FindingAddonProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // Information reported for an outdated library. message OutdatedLibrary { // The name of the outdated library. diff --git a/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto index 6b324482b..73115667f 100644 --- a/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto +++ b/google/cloud/websecurityscanner/v1alpha/finding_type_stats.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "FindingTypeStatsProto"; 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 { diff --git a/google/cloud/websecurityscanner/v1alpha/scan_config.proto b/google/cloud/websecurityscanner/v1alpha/scan_config.proto index ffebe6fd7..144f7f2b5 100644 --- a/google/cloud/websecurityscanner/v1alpha/scan_config.proto +++ b/google/cloud/websecurityscanner/v1alpha/scan_config.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "ScanConfigProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // A ScanConfig resource contains the configurations to launch a scan. message ScanConfig { // Scan authentication configuration. diff --git a/google/cloud/websecurityscanner/v1alpha/scan_run.proto b/google/cloud/websecurityscanner/v1alpha/scan_run.proto index 13b7e7578..36e2d0925 100644 --- a/google/cloud/websecurityscanner/v1alpha/scan_run.proto +++ b/google/cloud/websecurityscanner/v1alpha/scan_run.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "ScanRunProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // A ScanRun is a output-only resource representing an actual run of the scan. message ScanRun { // Types of ScanRun execution state. diff --git a/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto index b23375359..b07516aaf 100644 --- a/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto +++ b/google/cloud/websecurityscanner/v1alpha/web_security_scanner.proto @@ -30,7 +30,6 @@ option java_multiple_files = true; option java_outer_classname = "WebSecurityScannerProto"; option java_package = "com.google.cloud.websecurityscanner.v1alpha"; - // Cloud Web Security Scanner Service identifies security vulnerabilities in web // applications hosted on Google Cloud Platform. It crawls your application, and // attempts to exercise as many user inputs and event handlers as possible. @@ -44,7 +43,8 @@ service WebSecurityScanner { } // 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/*}" }; @@ -58,7 +58,8 @@ service WebSecurityScanner { } // 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" }; @@ -104,7 +105,8 @@ service WebSecurityScanner { } // 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" }; @@ -125,7 +127,8 @@ service WebSecurityScanner { } // 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" }; diff --git a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml index e923064f7..3b2c313c6 100644 --- a/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml +++ b/google/cloud/websecurityscanner/v1alpha/websecurityscanner_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Websecurityscanner\V1alpha nodejs: package_name: websecurityscanner.v1alpha -# 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. @@ -82,10 +76,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -134,12 +124,12 @@ interfaces: required_fields: - parent - scan_config - request_object_method: true 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: @@ -147,12 +137,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -160,12 +150,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -173,7 +163,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -186,6 +175,7 @@ interfaces: field_name_patterns: parent: project timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES - name: UpdateScanConfig flattening: groups: @@ -195,7 +185,6 @@ interfaces: required_fields: - scan_config - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -208,12 +197,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -221,12 +210,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -234,7 +223,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -247,6 +235,7 @@ interfaces: field_name_patterns: parent: scan_config timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES - name: StopScanRun flattening: groups: @@ -254,12 +243,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -267,7 +256,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -280,6 +268,7 @@ interfaces: field_name_patterns: parent: scan_run timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES - name: GetFinding flattening: groups: @@ -287,12 +276,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -302,7 +291,6 @@ interfaces: required_fields: - parent - filter - request_object_method: true page_streaming: request: page_size_field: page_size @@ -315,6 +303,7 @@ interfaces: field_name_patterns: parent: scan_run timeout_millis: 60000 + resource_name_treatment: STATIC_TYPES - name: ListFindingTypeStats flattening: groups: @@ -322,9 +311,46 @@ interfaces: - parent required_fields: - parent - request_object_method: false 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/v1beta/crawled_url.proto b/google/cloud/websecurityscanner/v1beta/crawled_url.proto new file mode 100644 index 000000000..92a0dc663 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/crawled_url.proto @@ -0,0 +1,44 @@ +// 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.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"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// 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/v1beta/finding.proto b/google/cloud/websecurityscanner/v1beta/finding.proto new file mode 100644 index 000000000..5e25abb5d --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/finding.proto @@ -0,0 +1,107 @@ +// 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.websecurityscanner.v1beta; + +import "google/api/annotations.proto"; +import "google/cloud/websecurityscanner/v1beta/finding_addon.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "FindingProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// A Finding resource represents a vulnerability instance identified during a +// ScanRun. +message Finding { + // 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-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 new file mode 100644 index 000000000..d2759b831 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/finding_addon.proto @@ -0,0 +1,90 @@ +// 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.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"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// ! 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 { + // 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; +} diff --git a/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto b/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto new file mode 100644 index 000000000..cbace23d3 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/finding_type_stats.proto @@ -0,0 +1,38 @@ +// 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.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"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +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 new file mode 100644 index 000000000..d698bb4f8 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/scan_config.proto @@ -0,0 +1,189 @@ +// 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.websecurityscanner.v1beta; + +import "google/api/annotations.proto"; +import "google/cloud/websecurityscanner/v1beta/scan_run.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanConfigProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// 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; + + // Input only. + // Required. + // 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; + + // Input only. + // Required. + // 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; + } + + // Required. + // Authentication configuration + oneof authentication { + // Authentication using a Google account. + GoogleAccount google_account = 1; + + // Authentication using a custom account. + CustomAccount custom_account = 2; + } + } + + // 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; + } + + // Cloud platforms supported by Cloud Web Security Scanner. + enum TargetPlatform { + // The target platform is unknown. Requests with this enum value will be + // rejected with INVALID_ARGUMENT error. + TARGET_PLATFORM_UNSPECIFIED = 0; + + // Google App Engine service. + APP_ENGINE = 1; + + // Google Compute Engine service. + COMPUTE = 2; + } + + // Scan risk levels supported by Cloud 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 Cloud Security + // Command Center. + enum ExportToSecurityCommandCenter { + // Use default, which is ENABLED. + EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + + // Export results of this scan to Cloud Security Command Center. + ENABLED = 1; + + // Do not export results of this scan to Cloud 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 blacklist URL patterns as described in + // https://cloud.google.com/security-scanner/docs/excluded-urls + repeated string blacklist_patterns = 7; + + // The schedule of the ScanConfig. + Schedule schedule = 8; + + // Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + // used as a default. + repeated TargetPlatform target_platforms = 9; + + // Controls export of scan configurations and results to Cloud Security + // Command Center. + ExportToSecurityCommandCenter export_to_security_command_center = 10; + + // Latest ScanRun if available. + ScanRun latest_run = 11; + + // The risk level selected for the scan + RiskLevel risk_level = 12; +} diff --git a/google/cloud/websecurityscanner/v1beta/scan_config_error.proto b/google/cloud/websecurityscanner/v1beta/scan_config_error.proto new file mode 100644 index 000000000..c55c744c6 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/scan_config_error.proto @@ -0,0 +1,187 @@ +// 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.websecurityscanner.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanConfigErrorProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// 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: 43 + 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; + + // 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 Cloud 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/v1beta/scan_run.proto b/google/cloud/websecurityscanner/v1beta/scan_run.proto new file mode 100644 index 000000000..497edc39b --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/scan_run.proto @@ -0,0 +1,121 @@ +// 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.websecurityscanner.v1beta; + +import "google/api/annotations.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"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +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 { + // 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/v1beta/scan_run_error_trace.proto b/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto new file mode 100644 index 000000000..3d1a391dc --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto @@ -0,0 +1,77 @@ +// 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.websecurityscanner.v1beta; + +import "google/cloud/websecurityscanner/v1beta/scan_config_error.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunErrorTraceProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// 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 + // 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/v1beta/scan_run_warning_trace.proto b/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto new file mode 100644 index 000000000..e461ad0b5 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.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.websecurityscanner.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunWarningTraceProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// 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: 5 + 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/v1beta/web_security_scanner.proto b/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto new file mode 100644 index 000000000..d328a2860 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/web_security_scanner.proto @@ -0,0 +1,347 @@ +// 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.websecurityscanner.v1beta; + +import "google/api/annotations.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"; +import "google/cloud/websecurityscanner/v1beta/scan_config.proto"; +import "google/cloud/websecurityscanner/v1beta/scan_run.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1beta;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "WebSecurityScannerProto"; +option java_package = "com.google.cloud.websecurityscanner.v1beta"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta"; + +// Cloud Web Security Scanner Service identifies security vulnerabilities in web +// 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 { + // Creates a new ScanConfig. + rpc CreateScanConfig(CreateScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + post: "/v1beta/{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: "/v1beta/{name=projects/*/scanConfigs/*}" + }; + } + + // Gets a ScanConfig. + rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/scanConfigs/*}" + }; + } + + // Lists ScanConfigs under a given project. + rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/scanConfigs" + }; + } + + // Updates a ScanConfig. This method support partial update of a ScanConfig. + rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + patch: "/v1beta/{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: "/v1beta/{name=projects/*/scanConfigs/*}:start" + body: "*" + }; + } + + // Gets a ScanRun. + rpc GetScanRun(GetScanRunRequest) returns (ScanRun) { + option (google.api.http) = { + get: "/v1beta/{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: "/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns" + }; + } + + // Stops a ScanRun. The stopped ScanRun is returned. + rpc StopScanRun(StopScanRunRequest) returns (ScanRun) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop" + body: "*" + }; + } + + // List CrawledUrls under a given ScanRun. + rpc ListCrawledUrls(ListCrawledUrlsRequest) returns (ListCrawledUrlsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls" + }; + } + + // Gets a Finding. + rpc GetFinding(GetFindingRequest) returns (Finding) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}" + }; + } + + // List Findings under a given ScanRun. + rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings" + }; + } + + // List all FindingTypeStats under a given ScanRun. + rpc ListFindingTypeStats(ListFindingTypeStatsRequest) returns (ListFindingTypeStatsResponse) { + option (google.api.http) = { + get: "/v1beta/{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/v1beta/websecurityscanner_gapic.yaml b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.yaml new file mode 100644 index 000000000..89cfd29f0 --- /dev/null +++ b/google/cloud/websecurityscanner/v1beta/websecurityscanner_gapic.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/websecurityscanner_v1beta.yaml b/google/cloud/websecurityscanner/websecurityscanner_v1beta.yaml new file mode 100644 index 000000000..8e89581f7 --- /dev/null +++ b/google/cloud/websecurityscanner/websecurityscanner_v1beta.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.v1beta.WebSecurityScanner + +documentation: + summary: Scans your Compute and App Engine apps for common web vulnerabilities. + +backend: + rules: + - selector: 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner.*' + deadline: 60.0 + +authentication: + rules: + - selector: 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/container/BUILD.bazel b/google/container/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/container/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/container/artman_container_v1.yaml b/google/container/artman_container_v1.yaml new file mode 100644 index 000000000..fc01e9631 --- /dev/null +++ b/google/container/artman_container_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: container + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: container_v1.yaml + gapic_yaml: v1/container_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/container/artman_container_v1beta1.yaml b/google/container/artman_container_v1beta1.yaml new file mode 100644 index 000000000..9a81ab4b2 --- /dev/null +++ b/google/container/artman_container_v1beta1.yaml @@ -0,0 +1,34 @@ +common: + api_name: container + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1beta1 + service_yaml: container_v1beta1.yaml + gapic_yaml: v1beta1/container_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/container/container.yaml b/google/container/container.yaml deleted file mode 100644 index 67e44d46d..000000000 --- a/google/container/container.yaml +++ /dev/null @@ -1,19 +0,0 @@ -type: google.api.Service -config_version: 3 -name: container.googleapis.com -title: Google Container 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. - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform diff --git a/google/container/container_v1.yaml b/google/container/container_v1.yaml new file mode 100644 index 000000000..65e5001bd --- /dev/null +++ b/google/container/container_v1.yaml @@ -0,0 +1,82 @@ +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 new file mode 100644 index 000000000..223e518be --- /dev/null +++ b/google/container/container_v1beta1.yaml @@ -0,0 +1,86 @@ +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 new file mode 100644 index 000000000..810fe713b --- /dev/null +++ b/google/container/v1/BUILD.bazel @@ -0,0 +1,126 @@ +# 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 = "container_proto", + srcs = ["cluster_service.proto"], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + ], +) + +proto_library_with_info( + name = "container_proto_with_info", + deps = [":container_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 = "container_java_proto", + deps = [":container_proto"], +) + +java_grpc_library( + name = "container_java_grpc", + srcs = [":container_proto"], + deps = [":container_java_proto"] + _JAVA_GRPC_DEPS, +) + +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, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":container_java_gapic_test"], +) for test_name in [ + "com.google.cloud.container.v1.ClusterManagerClientTest", +]] + +# Opensource 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 = [ + ":container_java_proto", + ":container_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 = "container_go_proto", + 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"], +) + +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"], +) + +go_test( + name = "container_go_gapic_test", + srcs = [":container_go_gapic_srcjar_test"], + embed = [":container_go_gapic"], + importpath = "cloud.google.com/go/container/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/container/v1/cluster_service.proto b/google/container/v1/cluster_service.proto index 4636fdcc5..db7744d04 100644 --- a/google/container/v1/cluster_service.proto +++ b/google/container/v1/cluster_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -27,17 +28,27 @@ option csharp_namespace = "Google.Cloud.Container.V1"; option php_namespace = "Google\\Cloud\\Container\\V1"; -// Google Container Engine Cluster Manager v1 +// Google Kubernetes Engine Cluster Manager v1 service ClusterManager { // Lists all clusters owned by a project in either the specified zone or all // zones. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/clusters" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/clusters" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters" + } + }; } // Gets the details of a specific cluster. rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; } // Creates a cluster, consisting of the specified number and type of Google @@ -54,54 +65,124 @@ service ClusterManager { // Finally, an entry is added to the project's global metadata indicating // which CIDR range is being used by the cluster. rpc CreateCluster(CreateClusterRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters" body: "*" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/clusters" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters" + body: "*" + } + }; } // Updates the settings of a specific cluster. rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { - option (google.api.http) = { put: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" body: "*" }; + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/clusters/*}" + body: "*" + additional_bindings { + put: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + body: "*" + } + }; } - // Updates the version and/or image type of a specific node pool. + // Updates the version and/or image type for a specific node pool. rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" body: "*" }; + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" + body: "*" + } + }; } - // Sets the autoscaling settings of a specific node pool. + // Sets the autoscaling settings for a specific node pool. rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" + body: "*" + } + }; } - // Sets the logging service of a specific cluster. + // Sets the logging service for a specific cluster. rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLogging" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" + body: "*" + } + }; } - // Sets the monitoring service of a specific cluster. + // Sets the monitoring service for a specific cluster. rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" + body: "*" + } + }; } - // Sets the addons of a specific cluster. + // Sets the addons for a specific cluster. rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setAddons" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" + body: "*" + } + }; } - // Sets the locations of a specific cluster. + // Sets the locations for a specific cluster. rpc SetLocations(SetLocationsRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLocations" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" + body: "*" + } + }; } - // Updates the master of a specific cluster. + // Updates the master for a specific cluster. rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" + body: "*" + } + }; } // Used to set master auth materials. Currently supports :- - // Changing the admin password of a specific cluster. + // Changing the admin password for a specific cluster. // This can be either via password generation or explicitly set the password. rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" + body: "*" + } + }; } // Deletes the cluster, including the Kubernetes endpoint and all worker @@ -114,93 +195,205 @@ service ClusterManager { // (e.g. load balancer resources) will not be deleted if they weren't present // at the initial create time. rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { - option (google.api.http) = { delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; } // Lists all operations in a project in a specific zone or all zones. rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/operations" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/operations" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/operations" + } + }; } // Gets the specified operation. rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/operations/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + }; } // Cancels the specified operation. rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/operations/*}:cancel" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" + body: "*" + } + }; } - // Returns configuration info about the Container Engine service. + // Returns configuration info about the Kubernetes Engine service. rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/serverconfig" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*}/serverConfig" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/serverconfig" + } + }; } // Lists the node pools for a cluster. rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" }; + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + }; } // Retrieves the node pool requested. rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { - option (google.api.http) = { get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; } // Creates a node pool for a cluster. rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" body: "*" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + body: "*" + } + }; } // Deletes a node pool from a cluster. rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { - option (google.api.http) = { delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; } // Roll back the previously Aborted or Failed NodePool upgrade. // This will be an no-op if the last upgrade successfully completed. rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" + body: "*" + } + }; } // Sets the NodeManagement options for a node pool. rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" + body: "*" + } + }; } // Sets labels on a cluster. rpc SetLabels(SetLabelsRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" + body: "*" + } + }; } // Enables or disables the ABAC authorization mechanism on a cluster. rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" + body: "*" + } + }; } // Start master IP rotation. rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" + body: "*" + } + }; } // Completes master IP rotation. rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" + body: "*" + } + }; } - // Sets the size of a specific node pool. + // Sets the size for a specific node pool. rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" + body: "*" + } + }; } // Enables/Disables Network Policy for a cluster. rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" + body: "*" + } + }; } // Sets the maintenance policy for a cluster. rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { - option (google.api.http) = { post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" + body: "*" + } + }; } } @@ -245,8 +438,18 @@ message NodeConfig { // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes // in length. These are reflected as part of a URL in the metadata server. // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the four reserved keys: - // "instance-template", "kube-env", "startup-script", and "user-data" + // metadata keys for the project or be one of the reserved keys: + // "cluster-location" + // "cluster-name" + // "cluster-uid" + // "configure-sh" + // "enable-os-login" + // "gci-update-strategy" + // "gci-ensure-gke-docker" + // "instance-template" + // "kube-env" + // "startup-script" + // "user-data" // // 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 @@ -293,12 +496,18 @@ message NodeConfig { // support for GPUs. repeated AcceleratorConfig accelerators = 11; + // Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 12; + // Minimum CPU platform to be used by this instance. The instance may be // scheduled on the specified or newer CPU platform. Applicable values are the // friendly names of CPU platforms, such as // minCpuPlatform: "Intel Haswell" or // 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) + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) string min_cpu_platform = 13; } @@ -317,8 +526,9 @@ message MasterAuth { // must be non-empty. string password = 2; - // Configuration for client certificate authentication on the cluster. If no - // configuration is specified, a client certificate is issued. + // Configuration for client certificate authentication on the cluster. For + // clusters before v1.12, if no configuration is specified, a client + // certificate is issued. ClientCertificateConfig client_certificate_config = 3; // [Output only] Base64-encoded public certificate that is the root of @@ -394,7 +604,29 @@ message NetworkPolicyConfig { bool disabled = 1; } -// Master authorized networks is a Beta feature. +// Configuration options for private clusters. +message PrivateClusterConfig { + // Whether nodes have internal IP addresses only. If enabled, all nodes are + // given only RFC 1918 private addresses and communicate with the master via + // private networking. + bool enable_private_nodes = 1; + + // Whether the master's internal IP address is used as the cluster endpoint. + bool enable_private_endpoint = 2; + + // The IP range in CIDR notation to use for the hosted master network. This + // range will be used for assigning internal IP addresses to the master or + // set of masters, as well as the ILB VIP. This range must not overlap with + // any other ranges in use within the cluster's network. + string master_ipv4_cidr_block = 3; + + // Output only. The internal IP address of this cluster's master endpoint. + string private_endpoint = 4; + + // Output only. The external IP address of this cluster's master endpoint. + string public_endpoint = 5; +} + // 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, @@ -462,13 +694,13 @@ message IPAllocationPolicy { string subnetwork_name = 3; // This field is deprecated, use cluster_ipv4_cidr_block. - string cluster_ipv4_cidr = 4; + string cluster_ipv4_cidr = 4 [deprecated = true]; // This field is deprecated, use node_ipv4_cidr_block. - string node_ipv4_cidr = 5; + string node_ipv4_cidr = 5 [deprecated = true]; // This field is deprecated, use services_ipv4_cidr_block. - string services_ipv4_cidr = 6; + string services_ipv4_cidr = 6 [deprecated = true]; // The name of the secondary range to be used for the cluster CIDR // block. The secondary range will be used for pod IP @@ -539,7 +771,7 @@ message IPAllocationPolicy { string services_ipv4_cidr_block = 11; } -// A Google Container Engine cluster. +// A Google Kubernetes Engine cluster. message Cluster { // The current status of the cluster. enum Status { @@ -564,6 +796,10 @@ message Cluster { // The ERROR state indicates the cluster may be unusable. Details // can be found in the `statusMessage` field. ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to restore + // full functionality. Details can be found in the `statusMessage` field. + DEGRADED = 6; } // The name of this cluster. The name must be unique within this project @@ -672,20 +908,26 @@ message Cluster { // Configuration for cluster IP allocation. IPAllocationPolicy ip_allocation_policy = 20; - // Master authorized networks is a Beta feature. // The configuration options for master authorized networks feature. MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; // Configure the maintenance policy for this cluster. MaintenancePolicy maintenance_policy = 23; + // Configuration for cluster networking. + NetworkConfig network_config = 27; + + // Configuration for private cluster. + PrivateClusterConfig private_cluster_config = 37; + // [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 // resides. - string zone = 101; + // This field is deprecated, use location instead. + string zone = 101 [deprecated = true]; // [Output only] The IP address of this cluster's master endpoint. // The endpoint can be accessed from the internet at @@ -699,15 +941,26 @@ message Cluster { // found in validMasterVersions returned by getServerConfig. The version can // be upgraded over time; such upgrades are reflected in // currentMasterVersion and currentNodeVersion. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 initial_cluster_version = 103; // [Output only] The current software version of the master endpoint. string current_master_version = 104; - // [Output only] 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. - string current_node_version = 105; + // [Output only] Deprecated, use + // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePool) + // 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. + string current_node_version = 105 [deprecated = true]; // [Output only] The time the cluster was created, in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. @@ -733,7 +986,7 @@ message Cluster { string services_ipv4_cidr = 110; // Deprecated. Use node_pools.instance_group_urls. - repeated string instance_group_urls = 111; + repeated string instance_group_urls = 111 [deprecated = true]; // [Output only] The number of nodes currently in the cluster. int32 current_node_count = 112; @@ -741,6 +994,12 @@ message Cluster { // [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 + // the cluster resides. + string location = 114; } // ClusterUpdate describes an update to the cluster. Exactly one update can @@ -748,8 +1007,16 @@ message Cluster { // provided. message ClusterUpdate { // The Kubernetes version to change the nodes to (typically an - // upgrade). Use `-` to upgrade to the latest version supported by - // the server. + // upgrade). + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 desired_node_version = 4; // The monitoring service the cluster should use to write metrics. @@ -787,13 +1054,19 @@ message ClusterUpdate { // This list must always include the cluster's primary zone. repeated string desired_locations = 10; - // Master authorized networks is a Beta feature. // The desired configuration options for master authorized networks feature. MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; - // The Kubernetes version to change the master to. The only valid value is the - // latest supported version. Use "-" to have the server automatically select - // the latest version. + // 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: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 desired_master_version = 100; } @@ -878,7 +1151,8 @@ message Operation { // The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the operation // is taking place. - string zone = 2; + // This field is deprecated, use location instead. + string zone = 2 [deprecated = true]; // The operation type. Type operation_type = 3; @@ -898,6 +1172,12 @@ message Operation { // Server-defined URL for the target of the 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 + // the cluster resides. + string location = 9; + // [Output only] The time the operation started, in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. string start_time = 10; @@ -909,113 +1189,162 @@ message Operation { // CreateClusterRequest creates a cluster. message CreateClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // 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; + + // The parent (project and location) where the cluster will be created. + // Specified in the format 'projects/*/locations/*'. + string parent = 5; } // GetClusterRequest gets the settings of a cluster. message GetClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to retrieve. - string cluster_id = 3; + // 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]; + + // The name (project, location, cluster) of the cluster to retrieve. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 5; } // UpdateClusterRequest updates the settings of a cluster. message UpdateClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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]; // A description of the update. ClusterUpdate update = 4; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 5; } // UpdateNodePoolRequests update a node pool's image and/or version. message UpdateNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 name of the node pool to upgrade. - string node_pool_id = 4; + // 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]; // The Kubernetes version to change the nodes to (typically an - // upgrade). Use `-` to upgrade to the latest version supported by - // the server. + // upgrade). + // + // Users may specify either explicit versions offered by Kubernetes Engine or + // version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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; // The desired image type for the node pool. string image_type = 6; + + // The name (project, location, cluster, node pool) of the node pool to + // update. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 8; } // SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. message SetNodePoolAutoscalingRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 name of the node pool to upgrade. - string node_pool_id = 4; + // 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]; // Autoscaling configuration for the node pool. NodePoolAutoscaling autoscaling = 5; + + // The name (project, location, cluster, node pool) of the node pool to set + // autoscaler settings. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 6; } // SetLoggingServiceRequest sets the logging service of a cluster. message SetLoggingServiceRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. + // This field has been deprecated and replaced by the name field. string zone = 2; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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. // Currently available options: @@ -1023,21 +1352,28 @@ message SetLoggingServiceRequest { // * "logging.googleapis.com" - the Google Cloud Logging service // * "none" - no metrics will be exported from the cluster string logging_service = 4; + + // The name (project, location, cluster) of the cluster to set logging. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 5; } // SetMonitoringServiceRequest sets the monitoring service of a cluster. message SetMonitoringServiceRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 monitoring service the cluster should use to write metrics. // Currently available options: @@ -1045,40 +1381,54 @@ message SetMonitoringServiceRequest { // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster string monitoring_service = 4; + + // The name (project, location, cluster) of the cluster to set monitoring. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 6; } // SetAddonsConfigRequest sets the addons associated with the cluster. message SetAddonsConfigRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 desired configurations for the various addons available to run in the // cluster. AddonsConfig addons_config = 4; + + // The name (project, location, cluster) of the cluster to set addons. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 6; } // SetLocationsRequest sets the locations of the cluster. message SetLocationsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 desired list of Google Compute Engine // [locations](/compute/docs/zones#available) in which the cluster's nodes @@ -1088,26 +1438,44 @@ message SetLocationsRequest { // // This list must always include the cluster's primary zone. repeated string locations = 4; + + // The name (project, location, cluster) of the cluster to set locations. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 6; } // UpdateMasterRequest updates the master of the cluster. message UpdateMasterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 Kubernetes version to change the master to. The only valid value is the - // latest supported version. Use "-" to have the server automatically select - // the latest version. + // 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: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 7; } // SetMasterAuthRequest updates the admin password of a cluster. @@ -1130,50 +1498,71 @@ message SetMasterAuthRequest { SET_USERNAME = 3; } - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - string cluster_id = 3; + // 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 exact form of action to be taken on the master auth. Action action = 4; // A description of the update. MasterAuth update = 5; + + // The name (project, location, cluster) of the cluster to set auth. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 7; } // DeleteClusterRequest deletes a cluster. message DeleteClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to delete. - string cluster_id = 3; + // 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]; + + // The name (project, location, cluster) of the cluster to delete. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 4; } // ListClustersRequest lists clusters. message ListClustersRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides, or "-" for all zones. - string zone = 2; + // 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/*'. + // Location "-" matches all zones and all regions. + string parent = 4; } // ListClustersResponse is the result of ListClustersRequest. @@ -1189,42 +1578,63 @@ message ListClustersResponse { // GetOperationRequest gets a single operation. message GetOperationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; + + // 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]; - // The server-assigned `name` of the operation. - string operation_id = 3; + // The name (project, location, operation id) of the operation to get. + // Specified in the format 'projects/*/locations/*/operations/*'. + string name = 5; } // ListOperationsRequest lists operations. message ListOperationsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; - - // The name of the Google Compute Engine [zone](/compute/docs/zones#available) - // to return operations for, or `-` for all zones. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + 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 + // 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/*'. + // Location "-" matches all zones and all regions. + string parent = 4; } // CancelOperationRequest cancels a single operation. message CancelOperationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the operation resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; + + // 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]; - // The server-assigned `name` of the operation. - string operation_id = 3; + // The name (project, location, operation id) of the operation to cancel. + // Specified in the format 'projects/*/locations/*/operations/*'. + string name = 4; } // ListOperationsResponse is the result of ListOperationsRequest. @@ -1237,18 +1647,24 @@ message ListOperationsResponse { repeated string missing_zones = 2; } -// Gets the current Container Engine service configuration. +// Gets the current Kubernetes Engine service configuration. message GetServerConfigRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine [zone](/compute/docs/zones#available) - // to return operations for. - string zone = 2; + // Deprecated. The name of the Google Compute Engine + // [zone](/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/*'. + string name = 4; } -// Container Engine service configuration. +// Kubernetes Engine service configuration. message ServerConfig { // Version of Kubernetes the service deploys by default. string default_cluster_version = 1; @@ -1268,71 +1684,104 @@ message ServerConfig { // CreateNodePoolRequest creates a node pool for a cluster. message CreateNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; + + // The parent (project, location, cluster id) where the node pool will be + // created. Specified in the format + // 'projects/*/locations/*/clusters/*'. + string parent = 6; } // DeleteNodePoolRequest deletes a node pool for a cluster. message DeleteNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // 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]; - // The name of the node pool to delete. - string node_pool_id = 4; + // The name (project, location, cluster, node pool id) of the node pool to + // delete. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 6; } // ListNodePoolsRequest lists the node pool(s) for a cluster. message ListNodePoolsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + 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/*'. + string parent = 5; } // GetNodePoolRequest retrieves a node pool for a cluster. message GetNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; - // The name of the node pool. - string node_pool_id = 4; + // 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]; + + // The name (project, location, cluster, node pool id) of the node pool to + // get. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 6; } // NodePool contains the name and configuration for a cluster's node pool. @@ -1473,65 +1922,92 @@ message DailyMaintenanceWindow { // SetNodePoolManagementRequest sets the node management properties of a node // pool. message SetNodePoolManagementRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to update. - string cluster_id = 3; + // 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]; - // The name of the node pool to update. - string node_pool_id = 4; + // 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]; // NodeManagement configuration for the node pool. NodeManagement management = 5; + + // The name (project, location, cluster, node pool id) of the node pool to set + // management properties. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 7; } // SetNodePoolSizeRequest sets the size a node // pool. message SetNodePoolSizeRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to update. - string cluster_id = 3; + // 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]; - // The name of the node pool to update. - string node_pool_id = 4; + // 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]; // The desired node count for the pool. int32 node_count = 5; + + // The name (project, location, cluster, node pool id) of the node pool to set + // size. + // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 7; } // RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed // NodePool upgrade. This will be an no-op if the last upgrade successfully // completed. message RollbackNodePoolUpgradeRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to rollback. - string cluster_id = 3; + // 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]; + + // 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]; - // The name of the node pool to rollback. - string node_pool_id = 4; + // The name (project, location, cluster, node pool id) of the node poll to + // rollback upgrade. + // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 6; } // ListNodePoolsResponse is the result of ListNodePoolsRequest. @@ -1559,78 +2035,109 @@ message NodePoolAutoscaling { // Engine cluster, which will in turn set them for Google Compute Engine // resources used by that cluster message SetLabelsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; // The fingerprint of the previous set of labels for this resource, // used to detect conflicts. The fingerprint is initially generated by - // Container Engine and changes after every request to modify or update + // 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; + + // The name (project, location, cluster id) of the cluster to set labels. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 7; } // SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for // a cluster. message SetLegacyAbacRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to update. - string cluster_id = 3; + // 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]; // Whether ABAC authorization will be enabled in the cluster. bool enabled = 4; + + // The name (project, location, cluster id) of the cluster to set legacy abac. + // 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 { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + 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/*'. + string name = 6; + + // Whether to rotate credentials during IP rotation. + bool rotate_credentials = 7; } // CompleteIPRotationRequest moves the cluster master back into single-IP mode. message CompleteIPRotationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + 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/*'. + string name = 7; } // AcceleratorConfig represents a Hardware Accelerator request. @@ -1645,20 +2152,27 @@ message AcceleratorConfig { // SetNetworkPolicyRequest enables/disables network policy for a cluster. message SetNetworkPolicyRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; + + // The name (project, location, cluster id) of the cluster to set networking + // policy. Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 6; } // SetMaintenancePolicyRequest sets the maintenance policy for a cluster. @@ -1678,4 +2192,23 @@ message SetMaintenancePolicyRequest { // The maintenance policy to be set for the cluster. An empty field // clears the existing maintenance policy. MaintenancePolicy maintenance_policy = 4; + + // The name (project, location, cluster id) of the cluster to set maintenance + // policy. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 5; +} + +// 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 + // 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. + // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 2; } diff --git a/google/container/v1/container_gapic.yaml b/google/container/v1/container_gapic.yaml index f19b58d01..020cd74c9 100644 --- a/google/container/v1/container_gapic.yaml +++ b/google/container/v1/container_gapic.yaml @@ -18,12 +18,6 @@ language_settings: nodejs: package_name: container.v1 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. @@ -76,9 +70,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # 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. @@ -123,10 +115,9 @@ interfaces: required_fields: - project_id - zone - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: GetCluster flattening: groups: @@ -138,10 +129,9 @@ interfaces: - project_id - zone - cluster_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: CreateCluster flattening: groups: @@ -153,10 +143,9 @@ interfaces: - project_id - zone - cluster - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 45000 - name: UpdateCluster flattening: groups: @@ -170,10 +159,9 @@ interfaces: - zone - cluster_id - update - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: UpdateNodePool required_fields: - project_id @@ -182,10 +170,9 @@ interfaces: - node_pool_id - node_version - image_type - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetNodePoolAutoscaling required_fields: - project_id @@ -193,10 +180,9 @@ interfaces: - cluster_id - node_pool_id - autoscaling - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetLoggingService flattening: groups: @@ -210,10 +196,9 @@ interfaces: - zone - cluster_id - logging_service - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetMonitoringService flattening: groups: @@ -227,10 +212,9 @@ interfaces: - zone - cluster_id - monitoring_service - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetAddonsConfig flattening: groups: @@ -244,10 +228,9 @@ interfaces: - zone - cluster_id - addons_config - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetLocations flattening: groups: @@ -261,10 +244,9 @@ interfaces: - zone - cluster_id - locations - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: UpdateMaster flattening: groups: @@ -278,10 +260,9 @@ interfaces: - zone - cluster_id - master_version - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetMasterAuth required_fields: - project_id @@ -289,10 +270,9 @@ interfaces: - cluster_id - action - update - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: DeleteCluster flattening: groups: @@ -304,10 +284,9 @@ interfaces: - project_id - zone - cluster_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + timeout_millis: 20000 - name: ListOperations flattening: groups: @@ -317,10 +296,9 @@ interfaces: required_fields: - project_id - zone - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: GetOperation flattening: groups: @@ -332,10 +310,9 @@ interfaces: - project_id - zone - operation_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: CancelOperation flattening: groups: @@ -347,10 +324,9 @@ interfaces: - project_id - zone - operation_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 30000 + timeout_millis: 20000 - name: GetServerConfig flattening: groups: @@ -360,10 +336,9 @@ interfaces: required_fields: - project_id - zone - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: ListNodePools flattening: groups: @@ -375,10 +350,9 @@ interfaces: - project_id - zone - cluster_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: GetNodePool flattening: groups: @@ -392,10 +366,9 @@ interfaces: - zone - cluster_id - node_pool_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 10000 + timeout_millis: 20000 - name: CreateNodePool flattening: groups: @@ -409,10 +382,9 @@ interfaces: - zone - cluster_id - node_pool - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: DeleteNodePool flattening: groups: @@ -426,10 +398,9 @@ interfaces: - zone - cluster_id - node_pool_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default - timeout_millis: 30000 + timeout_millis: 20000 - name: RollbackNodePoolUpgrade flattening: groups: @@ -443,10 +414,9 @@ interfaces: - zone - cluster_id - node_pool_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetNodePoolManagement required_fields: - project_id @@ -454,10 +424,9 @@ interfaces: - cluster_id - node_pool_id - management - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetLabels required_fields: - project_id @@ -465,10 +434,9 @@ interfaces: - cluster_id - resource_labels - label_fingerprint - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetLegacyAbac flattening: groups: @@ -482,10 +450,9 @@ interfaces: - zone - cluster_id - enabled - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: StartIPRotation flattening: groups: @@ -497,10 +464,9 @@ interfaces: - project_id - zone - cluster_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: CompleteIPRotation flattening: groups: @@ -512,10 +478,9 @@ interfaces: - project_id - zone - cluster_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetNodePoolSize required_fields: - project_id @@ -523,10 +488,9 @@ interfaces: - cluster_id - node_pool_id - node_count - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetNetworkPolicy flattening: groups: @@ -540,10 +504,9 @@ interfaces: - zone - cluster_id - network_policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 - name: SetMaintenancePolicy flattening: groups: @@ -557,7 +520,6 @@ interfaces: - zone - cluster_id - maintenance_policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default - timeout_millis: 60000 + timeout_millis: 20000 diff --git a/google/container/v1beta1/cluster_service.proto b/google/container/v1beta1/cluster_service.proto index f9689de2f..37918d7c1 100644 --- a/google/container/v1beta1/cluster_service.proto +++ b/google/container/v1beta1/cluster_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -11,33 +11,46 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// 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/protobuf/empty.proto"; +option csharp_namespace = "Google.Cloud.Container.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/container/v1beta1;container"; option java_multiple_files = true; option java_outer_classname = "ClusterServiceProto"; option java_package = "com.google.container.v1beta1"; -option csharp_namespace = "Google.Cloud.Container.V1Beta1"; option php_namespace = "Google\\Cloud\\Container\\V1beta1"; -// Google Container Engine Cluster Manager v1beta1 +// Google Kubernetes Engine Cluster Manager v1beta1 service ClusterManager { // Lists all clusters owned by a project in either the specified zone or all // zones. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/clusters" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/clusters" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" + } + }; } - // Gets the details of a specific cluster. + // Gets the details for a specific cluster. rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/clusters/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; } // Creates a cluster, consisting of the specified number and type of Google @@ -54,20 +67,125 @@ service ClusterManager { // Finally, an entry is added to the project's global metadata indicating // which CIDR range is being used by the cluster. rpc CreateCluster(CreateClusterRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*}/clusters" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/clusters" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" + body: "*" + } + }; } - // Updates the settings of a specific cluster. + // Updates the settings for a specific cluster. rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { - option (google.api.http) = { put: "/v1beta1/{name=projects/*/locations/*/clusters/*}" body: "*" }; + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + body: "*" + additional_bindings { + put: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + body: "*" + } + }; + } + + // Updates the version and/or image type of a specific node pool. + rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" + body: "*" + } + }; + } + + // Sets the autoscaling settings of a specific node pool. + rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" + body: "*" + } + }; + } + + // Sets the logging service for a specific cluster. + rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" + body: "*" + } + }; + } + + // Sets the monitoring service for a specific cluster. + rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" + body: "*" + } + }; + } + + // Sets the addons for a specific cluster. + rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" + body: "*" + } + }; + } + + // Sets the locations for a specific cluster. + rpc SetLocations(SetLocationsRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" + body: "*" + } + }; + } + + // Updates the master for a specific cluster. + rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" + body: "*" + } + }; } // Used to set master auth materials. Currently supports :- - // Changing the admin password of a specific cluster. + // 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. rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" + body: "*" + } + }; } // Deletes the cluster, including the Kubernetes endpoint and all worker @@ -80,88 +198,219 @@ service ClusterManager { // (e.g. load balancer resources) will not be deleted if they weren't present // at the initial create time. rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; } // Lists all operations in a project in a specific zone or all zones. rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/operations" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/operations" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/operations" + } + }; } // Gets the specified operation. rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/operations/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/operations/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + }; } // Cancels the specified operation. rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" + body: "*" + } + }; } - // Returns configuration info about the Container Engine service. + // Returns configuration info about the Kubernetes Engine service. rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*}/serverConfig" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*}/serverConfig" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" + } + }; } // Lists the node pools for a cluster. rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + }; } // Retrieves the node pool requested. rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; } // Creates a node pool for a cluster. rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + body: "*" + } + }; } // Deletes a node pool from a cluster. rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; } // Roll back the previously Aborted or Failed NodePool upgrade. // This will be an no-op if the last upgrade successfully completed. rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" + body: "*" + } + }; } // Sets the NodeManagement options for a node pool. rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" + body: "*" + } + }; } // Sets labels on a cluster. rpc SetLabels(SetLabelsRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" + body: "*" + } + }; } // Enables or disables the ABAC authorization mechanism on a cluster. rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" + body: "*" + } + }; } // Start master IP rotation. rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" + body: "*" + } + }; } // Completes master IP rotation. rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" + body: "*" + } + }; + } + + // Sets the size for a specific node pool. + rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" + body: "*" + } + }; } // Enables/Disables Network Policy for a cluster. rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" + body: "*" + } + }; } // Sets the maintenance policy for a cluster. rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { - option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" + body: "*" + } + }; + } + + // Lists subnetworks that are usable for creating clusters in a project. + rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) returns (ListUsableSubnetworksResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" + }; + } + + // Used to fetch locations that offer GKE. + rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/locations" + }; } } @@ -206,8 +455,18 @@ message NodeConfig { // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes // in length. These are reflected as part of a URL in the metadata server. // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the four reserved keys: - // "instance-template", "kube-env", "startup-script", and "user-data" + // metadata keys for the project or be one of the reserved keys: + // "cluster-location" + // "cluster-name" + // "cluster-uid" + // "configure-sh" + // "enable-oslogin" + // "gci-ensure-gke-docker" + // "gci-update-strategy" + // "instance-template" + // "kube-env" + // "startup-script" + // "user-data" // // 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 @@ -254,14 +513,23 @@ message NodeConfig { // support for GPUs. repeated AcceleratorConfig accelerators = 11; + // Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 12; + // Minimum CPU platform to be used by this instance. The instance may be // scheduled on the specified or newer CPU platform. Applicable values are the // friendly names of CPU platforms, such as // minCpuPlatform: "Intel Haswell" or // 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) + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) string min_cpu_platform = 13; + // The workload metadata configuration for this node. + WorkloadMetadataConfig workload_metadata_config = 14; + // List of kubernetes taints to be applied to each node. // // For more information, including usage and the valid values, see: @@ -305,8 +573,8 @@ message NodeTaint { // 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. @@ -315,8 +583,9 @@ message MasterAuth { // must be non-empty. string password = 2; - // Configuration for client certificate authentication on the cluster. If no - // configuration is specified, a client certificate is issued. + // Configuration for client certificate authentication on the cluster. For + // clusters before v1.12, if no configuration is specified, a client + // certificate is issued. ClientCertificateConfig client_certificate_config = 3; // [Output only] Base64-encoded public certificate that is the root of @@ -357,6 +626,15 @@ message AddonsConfig { // 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 Istio, an open platform to connect, manage, and secure + // microservices. + IstioConfig istio_config = 5; + + // Configuration for the Cloud Run addon. The `IstioConfig` addon must be + // enabled in order to enable Cloud Run addon. This option can only be enabled + // at cluster creation time. + CloudRunConfig cloud_run_config = 7; } // Configuration options for the HTTP (L7) load balancing controller addon, @@ -392,6 +670,53 @@ message NetworkPolicyConfig { bool disabled = 1; } +// Configuration options for private clusters. +message PrivateClusterConfig { + // Whether nodes have internal IP addresses only. If enabled, all nodes are + // given only RFC 1918 private addresses and communicate with the master via + // private networking. + bool enable_private_nodes = 1; + + // Whether the master's internal IP address is used as the cluster endpoint. + bool enable_private_endpoint = 2; + + // The IP range in CIDR notation to use for the hosted master network. This + // range will be used for assigning internal IP addresses to the master or + // set of masters, as well as the ILB VIP. This range must not overlap with + // any other ranges in use within the cluster's network. + string master_ipv4_cidr_block = 3; + + // Output only. The internal IP address of this cluster's master endpoint. + string private_endpoint = 4; + + // Output only. The external IP address of this cluster's master endpoint. + string public_endpoint = 5; +} + +// Configuration options for Istio addon. +message IstioConfig { + // Istio auth mode, https://istio.io/docs/concepts/security/mutual-tls.html + enum IstioAuthMode { + // auth not enabled + AUTH_NONE = 0; + + // auth mutual TLS enabled + AUTH_MUTUAL_TLS = 1; + } + + // Whether Istio is enabled for this cluster. + bool disabled = 1; + + // The specified Istio auth mode, either none, or mutual TLS. + IstioAuthMode auth = 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, @@ -414,6 +739,16 @@ message MasterAuthorizedNetworksConfig { repeated CidrBlock cidr_blocks = 2; } +// Configuration for the legacy Attribute Based Access Control authorization +// mode. +message LegacyAbac { + // Whether the ABAC authorizer is enabled for this cluster. When enabled, + // identities in the system, including service accounts, nodes, and + // controllers, will have statically granted permissions beyond those + // provided by the RBAC configuration or IAM. + bool enabled = 1; +} + // Configuration options for the NetworkPolicy feature. // https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ message NetworkPolicy { @@ -449,13 +784,13 @@ message IPAllocationPolicy { string subnetwork_name = 3; // This field is deprecated, use cluster_ipv4_cidr_block. - string cluster_ipv4_cidr = 4; + string cluster_ipv4_cidr = 4 [deprecated = true]; // This field is deprecated, use node_ipv4_cidr_block. - string node_ipv4_cidr = 5; + string node_ipv4_cidr = 5 [deprecated = true]; // This field is deprecated, use services_ipv4_cidr_block. - string services_ipv4_cidr = 6; + string services_ipv4_cidr = 6 [deprecated = true]; // The name of the secondary range to be used for the cluster CIDR // block. The secondary range will be used for pod IP @@ -524,6 +859,44 @@ 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; + + // If true, allow allocation of cluster CIDR ranges that overlap with certain + // kinds of network routes. By default we do not allow cluster CIDR ranges to + // intersect with any user declared routes. With allow_route_overlap == true, + // we allow overlapping with CIDR ranges that are larger than the cluster CIDR + // range. + // + // If this field is set to true, then cluster and services CIDRs must be + // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means: + // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and + // `services_ipv4_cidr_block` must be fully-specified. + // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse be + // fully-specified. + bool allow_route_overlap = 12; + + // 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; +} + +// Configuration for Binary Authorization. +message BinaryAuthorization { + // Enable Binary Authorization for this cluster. If enabled, all container + // images will be validated by Google Binauthz. + bool enabled = 1; } // Configuration for the PodSecurityPolicy feature. @@ -533,7 +906,7 @@ message PodSecurityPolicyConfig { bool enabled = 1; } -// A Google Container Engine cluster. +// A Google Kubernetes Engine cluster. message Cluster { // The current status of the cluster. enum Status { @@ -558,6 +931,10 @@ message Cluster { // The ERROR state indicates the cluster may be unusable. Details // can be found in the `statusMessage` field. ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to restore + // full functionality. Details can be found in the `statusMessage` field. + DEGRADED = 6; } // The name of this cluster. The name must be unique within this project @@ -594,6 +971,10 @@ message Cluster { NodeConfig node_config = 4; // 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. @@ -615,7 +996,8 @@ message Cluster { // The name of the Google Compute Engine // [network](/compute/docs/networks-and-firewalls#networks) to which the // cluster is connected. If left unspecified, the `default` network - // will be used. + // will be used. On output this shows the network ID instead of + // the name. string network = 8; // The IP address range of the container pods in this cluster, in @@ -629,7 +1011,8 @@ message Cluster { // The name of the Google Compute Engine // [subnetwork](/compute/docs/subnetworks) to which the - // cluster is connected. + // cluster is connected. On output this shows the subnetwork ID instead of + // the name. string subnetwork = 11; // The node pools associated with this cluster. @@ -638,7 +1021,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](/compute/docs/zones#available) in which the cluster's nodes // should be located. repeated string locations = 13; @@ -650,6 +1033,16 @@ message Cluster { // creation. bool enable_kubernetes_alpha = 14; + // The resource labels for the cluster to use to annotate any related + // Google Compute Engine resources. + map resource_labels = 15; + + // The fingerprint of the set of labels for this cluster. + string label_fingerprint = 16; + + // Configuration for the legacy ABAC authorization mode. + LegacyAbac legacy_abac = 18; + // Configuration options for the NetworkPolicy feature. NetworkPolicy network_policy = 19; @@ -662,9 +1055,47 @@ message Cluster { // Configure the maintenance policy for this cluster. MaintenancePolicy maintenance_policy = 23; + // Configuration for Binary Authorization. + BinaryAuthorization binary_authorization = 24; + // Configuration for the PodSecurityPolicy feature. PodSecurityPolicyConfig pod_security_policy_config = 25; + // Cluster-level autoscaling configuration. + ClusterAutoscaling autoscaling = 26; + + // Configuration for cluster networking. + NetworkConfig network_config = 27; + + // If this is a private cluster setup. Private clusters are clusters that, by + // default have no external IP addresses on the nodes and where nodes and the + // master communicate over private IP addresses. + // This field is deprecated, use private_cluster_config.enable_private_nodes + // instead. + bool private_cluster = 28 [deprecated = true]; + + // The IP prefix in CIDR notation to use for the hosted master network. + // This prefix will be used for assigning private IP addresses to the + // master or set of masters, as well as the ILB VIP. + // This field is deprecated, use + // private_cluster_config.master_ipv4_cidr_block instead. + string master_ipv4_cidr_block = 29 [deprecated = true]; + + // 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 unspecified. + ResourceUsageExportConfig resource_usage_export_config = 33; + + // Configuration for private cluster. + PrivateClusterConfig private_cluster_config = 37; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling vertical_pod_autoscaling = 39; + // [Output only] Server-defined URL for the resource. string self_link = 100; @@ -672,7 +1103,7 @@ message Cluster { // [zone](/compute/docs/zones#available) in which the cluster // resides. // This field is deprecated, use location instead. - string zone = 101; + string zone = 101 [deprecated = true]; // [Output only] The IP address of this cluster's master endpoint. // The endpoint can be accessed from the internet at @@ -686,15 +1117,26 @@ message Cluster { // found in validMasterVersions returned by getServerConfig. The version can // be upgraded over time; such upgrades are reflected in // currentMasterVersion and currentNodeVersion. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 initial_cluster_version = 103; // [Output only] The current software version of the master endpoint. string current_master_version = 104; - // [Output only] The current version of the node software components. + // [Output only] Deprecated, use + // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/projects.zones.clusters.nodePool) + // 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. - string current_node_version = 105; + string current_node_version = 105 [deprecated = true]; // [Output only] The time the cluster was created, in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. @@ -719,13 +1161,12 @@ message Cluster { // typically put in the last `/16` from the container CIDR. string services_ipv4_cidr = 110; - // [Output only] The resource URLs of [instance - // groups](/compute/docs/instance-groups/) associated with this - // cluster. - repeated string instance_group_urls = 111; + // 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. @@ -736,6 +1177,17 @@ message Cluster { // [region](/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 @@ -743,13 +1195,23 @@ message Cluster { // provided. message ClusterUpdate { // The Kubernetes version to change the nodes to (typically an - // upgrade). Use `-` to upgrade to the latest version supported by - // the server. + // upgrade). + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 desired_node_version = 4; // 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 in Stackdriver // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster string desired_monitoring_service = 5; @@ -774,7 +1236,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](/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. @@ -788,9 +1250,38 @@ message ClusterUpdate { // The desired configuration options for the PodSecurityPolicy feature. PodSecurityPolicyConfig desired_pod_security_policy_config = 14; + // 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 metrics. + // Currently available options: + // + // * "logging.googleapis.com/kubernetes" - the Google Cloud Logging + // service with Kubernetes-native resource model in Stackdriver + // * "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 Kubernetes version to change the master to. The only valid value is the - // latest supported version. Use "-" to have the server automatically select - // the latest version. + // latest supported version. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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 desired_master_version = 100; } @@ -876,7 +1367,7 @@ message Operation { // [zone](/compute/docs/zones#available) in which the operation // is taking place. // This field is deprecated, use location instead. - string zone = 2; + string zone = 2 [deprecated = true]; // The operation type. Type operation_type = 3; @@ -909,20 +1400,70 @@ message Operation { // [Output only] The time the operation completed, in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. string end_time = 11; + + // [Output only] Progress information for an operation. + OperationProgress progress = 12; + + // 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; +} + +// Information about operation (or operation stage) progress. +message OperationProgress { + // Progress metric is (string, int|float|string) pair. + message Metric { + // Metric name, required. + // e.g., "nodes total", "percent done" + string name = 1; + + // Strictly one of the values is required. + oneof value { + // For metrics with integer value. + int64 int_value = 2; + + // For metrics with floating point value. + double double_value = 3; + + // For metrics with custom values (ratios, visual progress, etc.). + string string_value = 4; + } + } + + // A non-parameterized string describing an operation stage. + // Unset for single-stage operations. + string name = 1; + + // Status of an operation stage. + // Unset for single-stage operations. + Operation.Status status = 2; + + // Progress metric bundle, for example: + // metrics: [{name: "nodes done", int_value: 15}, + // {name: "nodes total", int_value: 32}] + // or + // metrics: [{name: "progress", double_value: 0.56}, + // {name: "progress scale", double_value: 1.0}] + repeated Metric metrics = 3; + + // Substages of an operation or a stage. + repeated OperationProgress stages = 4; } // CreateClusterRequest creates a cluster. message CreateClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use parent instead. - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use parent instead. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + string zone = 2 [deprecated = true]; // A [cluster // resource](/container-engine/reference/rest/v1beta1/projects.zones.clusters) @@ -935,20 +1476,20 @@ message CreateClusterRequest { // GetClusterRequest gets the settings of a cluster. message GetClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to retrieve. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; // The name (project, location, cluster) of the cluster to retrieve. // Specified in the format 'projects/*/locations/*/clusters/*'. @@ -957,20 +1498,20 @@ message GetClusterRequest { // UpdateClusterRequest updates the settings of a cluster. message UpdateClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; // A description of the update. ClusterUpdate update = 4; @@ -980,6 +1521,228 @@ message UpdateClusterRequest { string name = 5; } +// SetNodePoolVersionRequest updates the version of a node pool. +message UpdateNodePoolRequest { + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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]; + + // 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]; + + // The Kubernetes version to change the nodes to (typically an + // upgrade). + // + // Users may specify either explicit versions offered by Kubernetes Engine or + // version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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; + + // The desired image type for the node pool. + string image_type = 6; + + // The name (project, location, cluster, node pool) of the node pool to + // update. Specified in the format + // '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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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]; + + // 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]; + + // Autoscaling configuration for the node pool. + NodePoolAutoscaling autoscaling = 5; + + // The name (project, location, cluster, node pool) of the node pool to set + // autoscaler settings. Specified in the format + // '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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/compute/docs/zones#available) in which the cluster + // resides. + // This field has been deprecated and replaced by the name field. + string zone = 2; + + // 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. + // Currently available options: + // + // * "logging.googleapis.com" - the Google Cloud Logging service + // * "none" - no metrics will be exported from the cluster + string logging_service = 4; + + // The name (project, location, cluster) of the cluster to set logging. + // 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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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 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; + + // The name (project, location, cluster) of the cluster to set monitoring. + // 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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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 desired configurations for the various addons available to run in the + // cluster. + AddonsConfig addons_config = 4; + + // The name (project, location, cluster) of the cluster to set addons. + // 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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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 desired list of Google Compute Engine + // [zones](/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; + + // The name (project, location, cluster) of the cluster to set locations. + // 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 + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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 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: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "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; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format 'projects/*/locations/*/clusters/*'. + string name = 7; +} + // SetMasterAuthRequest updates the admin password of a cluster. message SetMasterAuthRequest { // Operation type: what type update to perform. @@ -1000,20 +1763,20 @@ message SetMasterAuthRequest { SET_USERNAME = 3; } - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to upgrade. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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 exact form of action to be taken on the master auth. Action action = 4; @@ -1028,20 +1791,20 @@ message SetMasterAuthRequest { // DeleteClusterRequest deletes a cluster. message DeleteClusterRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to delete. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; // The name (project, location, cluster) of the cluster to delete. // Specified in the format 'projects/*/locations/*/clusters/*'. @@ -1050,16 +1813,16 @@ message DeleteClusterRequest { // ListClustersRequest lists clusters. message ListClustersRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use parent instead. - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides, or "-" for all zones. - // This field is deprecated, use parent instead. - string zone = 2; + // 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/*'. @@ -1080,20 +1843,20 @@ message ListClustersResponse { // GetOperationRequest gets a single operation. message GetOperationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The server-assigned `name` of the operation. - // This field is deprecated, use name instead. - string operation_id = 3; + // 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]; // The name (project, location, operation id) of the operation to get. // Specified in the format 'projects/*/locations/*/operations/*'. @@ -1102,15 +1865,15 @@ message GetOperationRequest { // ListOperationsRequest lists operations. message ListOperationsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use parent instead. - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine [zone](/compute/docs/zones#available) - // to return operations for, or `-` for all zones. - // This field is deprecated, use parent instead. - string zone = 2; + // Deprecated. The name of the Google Compute Engine + // [zone](/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/*'. @@ -1120,19 +1883,19 @@ message ListOperationsRequest { // CancelOperationRequest cancels a single operation. message CancelOperationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the operation resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The server-assigned `name` of the operation. - // This field is deprecated, use name instead. - string operation_id = 3; + // 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]; // The name (project, location, operation id) of the operation to cancel. // Specified in the format 'projects/*/locations/*/operations/*'. @@ -1149,24 +1912,24 @@ message ListOperationsResponse { repeated string missing_zones = 2; } -// Gets the current Container Engine service configuration. +// Gets the current Kubernetes Engine service configuration. message GetServerConfigRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine [zone](/compute/docs/zones#available) - // to return operations for. - // This field is deprecated, use name instead. - string zone = 2; + // Deprecated. The name of the Google Compute Engine + // [zone](/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/*'. string name = 4; } -// Container Engine service configuration. +// Kubernetes Engine service configuration. message ServerConfig { // Version of Kubernetes the service deploys by default. string default_cluster_version = 1; @@ -1186,100 +1949,103 @@ message ServerConfig { // CreateNodePoolRequest creates a node pool for a cluster. message CreateNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use parent instead. - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use parent instead. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use parent instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; - // The parent (project, location, cluster id) where the node pool will be created. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // The parent (project, location, cluster id) where the node pool will be + // created. Specified in the format + // 'projects/*/locations/*/clusters/*'. string parent = 6; } // DeleteNodePoolRequest deletes a node pool for a cluster. message DeleteNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; - // The name of the node pool to delete. - // This field is deprecated, use name instead. - string node_pool_id = 4; + // 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]; - // The name (project, location, cluster, node pool id) of the node pool to delete. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // The name (project, location, cluster, node pool id) of the node pool to + // delete. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. string name = 6; } // ListNodePoolsRequest lists the node pool(s) for a cluster. message ListNodePoolsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use parent instead. - string project_id = 1; + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use parent instead. - string zone = 2; + // This field has been deprecated and replaced by the parent field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use parent instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + 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/*'. + // The parent (project, location, cluster id) where the node pools will be + // listed. Specified in the format 'projects/*/locations/*/clusters/*'. string parent = 5; } // GetNodePoolRequest retrieves a node pool for a cluster. message GetNodePoolRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; - // The name of the node pool. - // This field is deprecated, use name instead. - string node_pool_id = 4; + // 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]; - // The name (project, location, cluster, node pool id) of the node pool to get. - // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + // The name (project, location, cluster, node pool id) of the node pool to + // get. Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. string name = 6; } @@ -1336,12 +2102,12 @@ message NodePool { // [Output only] Server-defined URL for the resource. string self_link = 100; - // [Output only] The version of the Kubernetes of this node. + // The version of the Kubernetes of this node. string version = 101; - // [Output only] The resource URLs of [instance - // groups](/compute/docs/instance-groups/) associated with this - // node pool. + // [Output only] The resource URLs of the [managed instance + // groups](/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with this node pool. repeated string instance_group_urls = 102; // [Output only] The status of the nodes in this pool instance. @@ -1357,6 +2123,13 @@ 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; } // NodeManagement defines the set of node management services turned on for the @@ -1415,24 +2188,24 @@ message DailyMaintenanceWindow { // SetNodePoolManagementRequest sets the node management properties of a node // pool. message SetNodePoolManagementRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to update. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; - // The name of the node pool to update. - // This field is deprecated, use name instead. - string node_pool_id = 4; + // 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]; // NodeManagement configuration for the node pool. NodeManagement management = 5; @@ -1443,28 +2216,59 @@ message SetNodePoolManagementRequest { string name = 7; } +// SetNodePoolSizeRequest sets the size a node +// pool. +message SetNodePoolSizeRequest { + // 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]; + + // Deprecated. The name of the Google Compute Engine + // [zone](/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]; + + // 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]; + + // 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]; + + // The desired node count for the pool. + int32 node_count = 5; + + // The name (project, location, cluster, node pool id) of the node pool to set + // size. + // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. + string name = 7; +} + // RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed // NodePool upgrade. This will be an no-op if the last upgrade successfully // completed. message RollbackNodePoolUpgradeRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to rollback. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; - // The name of the node pool to rollback. - // This field is deprecated, use name instead. - string node_pool_id = 4; + // 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]; // The name (project, location, cluster, node pool id) of the node poll to // rollback upgrade. @@ -1478,6 +2282,32 @@ 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; +} + +// 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 { @@ -1491,33 +2321,36 @@ 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 // Engine cluster, which will in turn set them for Google Compute Engine // resources used by that cluster message SetLabelsRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; // The fingerprint of the previous set of labels for this resource, // used to detect conflicts. The fingerprint is initially generated by - // Container Engine and changes after every request to modify or update + // 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. @@ -1531,20 +2364,20 @@ message SetLabelsRequest { // SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for // a cluster. message SetLegacyAbacRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://support.google.com/cloud/answer/6158840). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster to update. - // This field is deprecated, use name instead. - string cluster_id = 3; + // 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]; // Whether ABAC authorization will be enabled in the cluster. bool enabled = 4; @@ -1557,45 +2390,48 @@ message SetLegacyAbacRequest { // 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 { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + 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/*'. + // The name (project, location, cluster id) of the cluster to start IP + // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. string name = 6; + + // Whether to rotate credentials during IP rotation. + bool rotate_credentials = 7; } // CompleteIPRotationRequest moves the cluster master back into single-IP mode. message CompleteIPRotationRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + 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/*'. + // The name (project, location, cluster id) of the cluster to complete IP + // rotation. Specified in the format 'projects/*/locations/*/clusters/*'. string name = 7; } @@ -1609,28 +2445,56 @@ message AcceleratorConfig { string accelerator_type = 2; } +// WorkloadMetadataConfig defines the metadata configuration to expose to +// workloads on the node pool. +message WorkloadMetadataConfig { + // NodeMetadata is the configuration for if and how to expose the node + // metadata to the workload running on the node. + enum NodeMetadata { + // Not set. + UNSPECIFIED = 0; + + // Prevent workloads not in hostNetwork from accessing certain VM metadata, + // specifically kube-env, which contains Kubelet credentials, and the + // instance identity token. + // + // Metadata concealment is a temporary security solution available while the + // bootstrapping process for cluster nodes is being redesigned with + // significant security improvements. This feature is scheduled to be + // deprecated in the future and later removed. + SECURE = 1; + + // Expose all VM metadata to pods. + EXPOSE = 2; + } + + // NodeMetadata is the configuration for how to expose the node metadata to + // the workload running on the node. + NodeMetadata node_metadata = 1; +} + // SetNetworkPolicyRequest enables/disables network policy for a cluster. message SetNetworkPolicyRequest { - // The Google Developers Console [project ID or project + // Deprecated. The Google Developers Console [project ID or project // number](https://developers.google.com/console/help/new/#projectnumber). - // This field is deprecated, use name instead. - string project_id = 1; + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; - // The name of the Google Compute Engine + // Deprecated. The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. - // This field is deprecated, use name instead. - string zone = 2; + // This field has been deprecated and replaced by the name field. + string zone = 2 [deprecated = true]; - // The name of the cluster. - // This field is deprecated, use name instead. - string cluster_id = 3; + // Deprecated. The name of the cluster. + // 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; - // The name (project, location, cluster id) of the cluster to set networking policy. - // Specified in the format 'projects/*/locations/*/clusters/*'. + // The name (project, location, cluster id) of the cluster to set networking + // policy. Specified in the format 'projects/*/locations/*/clusters/*'. string name = 6; } @@ -1657,3 +2521,220 @@ message SetMaintenancePolicyRequest { // 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; +} + +// ListLocationsResponse returns the list of all GKE locations and their +// recommendation state. +message ListLocationsResponse { + // A full list of GKE locations. + repeated Location locations = 1; + + // Only return ListLocationsResponse that occur after the page_token. This + // value should be populated from the ListLocationsResponse.next_page_token if + // that response token was set (which happens when listing more Locations than + // fit in a single ListLocationsResponse). + string next_page_token = 2; +} + +// Location returns the location name, and if the location is recommended +// for GKE cluster scheduling. +message Location { + // LocationType is the type of GKE location, regional or zonal. + enum LocationType { + // LOCATION_TYPE_UNSPECIFIED means the location type was not determined. + LOCATION_TYPE_UNSPECIFIED = 0; + + // A GKE Location where Zonal clusters can be created. + ZONE = 1; + + // A GKE Location where Regional clusters can be created. + REGION = 2; + } + + // Contains the type of location this Location is for. + // Regional or Zonal. + LocationType type = 1; + + // Contains the name of the resource requested. + // Specified in the format 'projects/*/locations/*'. + string name = 2; + + // Whether the location is recomended for GKE cluster scheduling. + bool recommended = 3; +} + +// 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. + // More codes TBA + SET_BY_OPERATOR = 4; + } + + // 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.v1beta1.NetworkConfig.network](/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. + // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 2; +} + +// 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; +} + +// 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; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Constraint enforced on the max num of pods per node. + int64 max_pods_per_node = 1; +} + +// 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; + } + + // 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; +} diff --git a/google/container/v1beta1/container_gapic.yaml b/google/container/v1beta1/container_gapic.yaml new file mode 100644 index 000000000..20dcd1511 --- /dev/null +++ b/google/container/v1beta1/container_gapic.yaml @@ -0,0 +1,552 @@ +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: + # 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/datastore/BUILD.bazel b/google/datastore/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/datastore/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/datastore/admin/artman_datastore_admin.yaml b/google/datastore/admin/artman_datastore_admin.yaml index 43af6df77..78048169a 100644 --- a/google/datastore/admin/artman_datastore_admin.yaml +++ b/google/datastore/admin/artman_datastore_admin.yaml @@ -12,23 +12,8 @@ artifacts: - name: gapic_config type: GAPIC_CONFIG - name: java_gapic - type: GAPIC_ONLY + type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-datastore-admin-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-datastore-admin-v1 - - name: proto - dest: generated/java/proto-google-cloud-datastore-admin-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-datastore-admin - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-datastore-admin-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/datastore/admin/datastore_admin.yaml b/google/datastore/admin/datastore_admin.yaml index 0e8c32f8e..112229c5d 100644 --- a/google/datastore/admin/datastore_admin.yaml +++ b/google/datastore/admin/datastore_admin.yaml @@ -10,6 +10,7 @@ types: - name: google.datastore.admin.v1.ExportEntitiesMetadata - name: google.datastore.admin.v1.ExportEntitiesResponse - name: google.datastore.admin.v1.ImportEntitiesMetadata +- name: google.datastore.admin.v1.IndexOperationMetadata documentation: summary: |- diff --git a/google/datastore/admin/v1/datastore_admin.proto b/google/datastore/admin/v1/datastore_admin.proto index 44139f3dc..ffcdc00fb 100644 --- a/google/datastore/admin/v1/datastore_admin.proto +++ b/google/datastore/admin/v1/datastore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.datastore.admin.v1; import "google/api/annotations.proto"; +import "google/datastore/admin/v1/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; @@ -26,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "DatastoreAdminProto"; option java_package = "com.google.datastore.admin.v1"; - // Google Cloud Datastore Admin API // // The Datastore Admin API provides several admin services for Cloud Datastore. @@ -61,6 +61,15 @@ option java_package = "com.google.datastore.admin.v1"; // created for each export/import. The state (including any errors encountered) // of the export/import may be queried via the Operation resource. // +// # Index +// +// The index service manages Cloud Datastore composite indexes. +// +// Index creation and deletion are performed asynchronously. +// An Operation resource is created for each such asynchronous operation. +// The state of the operation (including any errors encountered) +// may be queried via the Operation resource. +// // # Operation // // The Operations collection provides a record of actions performed for the @@ -87,7 +96,8 @@ 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: "*" @@ -99,12 +109,29 @@ 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: "*" }; } + + // Gets an index. + rpc GetIndex(GetIndexRequest) returns (Index) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/indexes/{index_id}" + }; + } + + // Lists the indexes that match the specified filters. Datastore uses an + // eventually consistent query to fetch the list of indexes and may + // occasionally return stale results. + rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/indexes" + }; + } } // Metadata common to all Datastore Admin operations. @@ -192,8 +219,8 @@ 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. @@ -278,7 +305,9 @@ 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; } @@ -315,6 +344,54 @@ message EntityFilter { repeated string namespace_ids = 2; } +// 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; + + // The resource ID of the index to get. + string index_id = 3; +} + +// The request for +// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes]. +message ListIndexesRequest { + // Project ID against which to make the request. + string project_id = 1; + + string filter = 3; + + // The maximum number of items to return. If zero, then all results will be + // returned. + int32 page_size = 4; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 5; +} + +// The response for +// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes]. +message ListIndexesResponse { + // The indexes. + repeated Index indexes = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// Metadata for Index operations. +message IndexOperationMetadata { + // Metadata common to all Datastore Admin operations. + CommonMetadata common = 1; + + // An estimate of the number of entities processed. + Progress progress_entities = 2; + + // The index resource ID that this operation is acting on. + string index_id = 3; +} + // Operation types. enum OperationType { // Unspecified. @@ -325,4 +402,10 @@ enum OperationType { // ImportEntities. IMPORT_ENTITIES = 2; + + // CreateIndex. + CREATE_INDEX = 3; + + // DeleteIndex. + DELETE_INDEX = 4; } diff --git a/google/datastore/admin/v1/datastore_admin_gapic.yaml b/google/datastore/admin/v1/datastore_admin_gapic.yaml index 8ef5c7bea..9d3ad8f88 100644 --- a/google/datastore/admin/v1/datastore_admin_gapic.yaml +++ b/google/datastore/admin/v1/datastore_admin_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Datastore\Admin\V1 nodejs: package_name: admin.v1 -# 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. @@ -71,10 +65,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -125,7 +115,6 @@ interfaces: required_fields: - project_id - output_url_prefix - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 295000 @@ -140,7 +129,6 @@ interfaces: required_fields: - project_id - input_url - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 295000 diff --git a/google/datastore/admin/v1/index.proto b/google/datastore/admin/v1/index.proto new file mode 100644 index 000000000..15013d557 --- /dev/null +++ b/google/datastore/admin/v1/index.proto @@ -0,0 +1,122 @@ +// 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.datastore.admin.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Datastore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin"; +option java_multiple_files = true; +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 + message IndexedProperty { + // The property name to index. + // Required. + string name = 1; + + // The indexed property's direction. Must not be DIRECTION_UNSPECIFIED. + // Required. + Direction direction = 2; + } + + // For an ordered index, specifies whether each of the entity's ancestors + // will be included. + enum AncestorMode { + // The ancestor mode is unspecified. + ANCESTOR_MODE_UNSPECIFIED = 0; + + // Do not include the entity's ancestors in the index. + NONE = 1; + + // Include all the entity's ancestors in the index. + ALL_ANCESTORS = 2; + } + + // The direction determines how a property is indexed. + enum Direction { + // The direction is unspecified. + DIRECTION_UNSPECIFIED = 0; + + // The property's values are indexed so as to support sequencing in + // ascending order and also query by <, >, <=, >=, and =. + ASCENDING = 1; + + // The property's values are indexed so as to support sequencing in + // descending order and also query by <, >, <=, >=, and =. + DESCENDING = 2; + } + + // The possible set of states of an index. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The index is being created, and cannot be used by queries. + // There is an active long-running operation for the index. + // The index is updated when writing an entity. + // Some index data may exist. + CREATING = 1; + + // The index is ready to be used. + // The index is updated when writing an entity. + // The index is fully populated from all stored entities it applies to. + READY = 2; + + // The index is being deleted, and cannot be used by queries. + // There is an active long-running operation for the index. + // The index is not updated when writing an entity. + // Some index data may exist. + DELETING = 3; + + // The index was being created or deleted, but something went wrong. + // The index cannot by used by queries. + // There is no active long-running operation for the index, + // and the most recently finished long-running operation failed. + // The index is not updated when writing an entity. + // Some index data may exist. + ERROR = 4; + } + + // Project ID. + // Output only. + string project_id = 1; + + // The resource ID of the index. + // Output only. + string index_id = 3; + + // The entity kind to which this index applies. + // Required. + string kind = 4; + + // The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED. + // Required. + AncestorMode ancestor = 5; + + // An ordered sequence of property names and their index attributes. + // Required. + repeated IndexedProperty properties = 6; + + // The state of the index. + // Output only. + State state = 7; +} diff --git a/google/datastore/admin/v1beta1/datastore_admin.proto b/google/datastore/admin/v1beta1/datastore_admin.proto index c730de79c..b18591f2f 100644 --- a/google/datastore/admin/v1beta1/datastore_admin.proto +++ b/google/datastore/admin/v1beta1/datastore_admin.proto @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "DatastoreAdminProto"; option java_package = "com.google.datastore.admin.v1beta1"; - // Google Cloud Datastore Admin API // // The Datastore Admin API provides several admin services for Cloud Datastore. @@ -87,7 +86,8 @@ 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: "/v1beta1/projects/{project_id}:export" body: "*" @@ -99,7 +99,8 @@ 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: "/v1beta1/projects/{project_id}:import" body: "*" @@ -278,7 +279,8 @@ message ImportEntitiesMetadata { EntityFilter entity_filter = 4; // The location of the import metadata file. This will be the same value as - // the [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url] + // the + // [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url] // field. string input_url = 5; } diff --git a/google/datastore/artman_datastore.yaml b/google/datastore/artman_datastore.yaml index 92022edf9..787c8fd97 100644 --- a/google/datastore/artman_datastore.yaml +++ b/google/datastore/artman_datastore.yaml @@ -12,91 +12,24 @@ artifacts: - name: java_proto type: PROTOBUF language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: proto - dest: generated/java/proto-google-cloud-datastore-v1 - name: python_gapic type: GAPIC language: PYTHON release_level: BETA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-datastore-v1 - - name: grpc - dest: generated/python/proto-google-cloud-datastore-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/datastore_v1 - dest: datastore/google/cloud/datastore_v1 - - src: tests/unit/gapic/v1 - dest: datastore/tests/gapic - - name: grpc - src: google/cloud/proto - dest: datastore/google/cloud/proto - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-datastore-v1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-datastore - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/datastore/v1 - dest: google-cloud-datastore/lib/google/cloud/datastore/v1 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-datastore-v1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: datastore/apiv1 - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/datastore/src/v1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/datastore - name: gapic_config type: GAPIC_CONFIG diff --git a/google/datastore/v1/BUILD.bazel b/google/datastore/v1/BUILD.bazel new file mode 100644 index 000000000..30f787ba9 --- /dev/null +++ b/google/datastore/v1/BUILD.bazel @@ -0,0 +1,151 @@ +# 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 = "datastore_proto", + srcs = [ + "datastore.proto", + "entity.proto", + "query.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/type:latlng_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "datastore_proto_with_info", + deps = [":datastore_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 = "datastore_java_proto", + deps = [":datastore_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.datastore.v1.DatastoreClientTest", +]] + +# Opensource 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 = [ + ":datastore_java_proto", + ":datastore_proto", + ":datastore_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 = "datastore_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/datastore/v1", + protos = [":datastore_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:latlng_go_proto", + ], +) + +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", + deps = [ + ":datastore_go_proto", + ], +) + +go_test( + name = "datastore_go_gapic_test", + srcs = [":datastore_go_gapic_srcjar_test"], + embed = [":datastore_go_gapic"], + importpath = "cloud.google.com/go/datastore/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/datastore/v1/datastore.proto b/google/datastore/v1/datastore.proto index 2a29a58ce..51d69acb9 100644 --- a/google/datastore/v1/datastore.proto +++ b/google/datastore/v1/datastore.proto @@ -27,7 +27,6 @@ option java_outer_classname = "DatastoreProto"; option java_package = "com.google.datastore.v1"; option php_namespace = "Google\\Cloud\\Datastore\\V1"; - // Each RPC normalizes the partition IDs of the keys in its input entities, // and always returns entities with keys with normalized partition IDs. // This applies to all keys and entities, including those in values, except keys @@ -53,7 +52,8 @@ 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: "*" @@ -150,7 +150,8 @@ 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; @@ -159,7 +160,8 @@ 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; @@ -168,7 +170,8 @@ message BeginTransactionRequest { 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; @@ -184,11 +187,10 @@ message RollbackRequest { bytes transaction = 1; } -// 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 { @@ -198,7 +200,8 @@ message CommitRequest { MODE_UNSPECIFIED = 0; // Transactional: The mutations are either all applied, or none are applied. - // Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions). + // Learn about transactions + // [here](https://cloud.google.com/datastore/docs/concepts/transactions). TRANSACTIONAL = 1; // Non-transactional: The mutations may not apply as all or none. @@ -246,7 +249,8 @@ 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; @@ -256,14 +260,16 @@ message AllocateIdsRequest { repeated Key keys = 1; } -// 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; @@ -276,10 +282,9 @@ message ReserveIdsRequest { repeated Key keys = 1; } -// 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 { @@ -369,8 +374,10 @@ 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 { @@ -379,9 +386,7 @@ 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.yaml b/google/datastore/v1/datastore_gapic.yaml index ee18338f1..bbdf7200e 100644 --- a/google/datastore/v1/datastore_gapic.yaml +++ b/google/datastore/v1/datastore_gapic.yaml @@ -12,14 +12,12 @@ language_settings: 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 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.datastore.v1.Datastore collections: [] @@ -50,7 +48,6 @@ interfaces: required_fields: - project_id - keys - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -59,7 +56,6 @@ interfaces: required_fields: - project_id - partition_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -70,7 +66,6 @@ interfaces: - project_id required_fields: - project_id - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -90,7 +85,6 @@ interfaces: - project_id - mode - mutations - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -103,7 +97,6 @@ interfaces: required_fields: - project_id - transaction - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -116,7 +109,6 @@ interfaces: required_fields: - project_id - keys - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -129,7 +121,6 @@ interfaces: required_fields: - project_id - keys - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/datastore/v1/entity.proto b/google/datastore/v1/entity.proto index bab7953d6..9decd2b53 100644 --- a/google/datastore/v1/entity.proto +++ b/google/datastore/v1/entity.proto @@ -28,7 +28,6 @@ option java_outer_classname = "EntityProto"; option java_package = "com.google.datastore.v1"; option php_namespace = "Google\\Cloud\\Datastore\\V1"; - // A partition ID identifies a grouping of entities. The grouping is always // by project and namespace, however the namespace ID may be empty. // @@ -47,7 +46,8 @@ option php_namespace = "Google\\Cloud\\Datastore\\V1"; // // Foreign partition IDs (in which the project ID does // not match the context project ID ) are discouraged. -// Reads and writes of foreign partition IDs may fail if the project is not in an active state. +// Reads and writes of foreign partition IDs may fail if the project is not in +// an active state. message PartitionId { // The ID of the project to which the entities belong. string project_id = 2; @@ -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 least 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 2efed915a..872612c5d 100644 --- a/google/datastore/v1/query.proto +++ b/google/datastore/v1/query.proto @@ -28,7 +28,6 @@ option java_outer_classname = "QueryProto"; option java_package = "com.google.datastore.v1"; option php_namespace = "Google\\Cloud\\Datastore\\V1"; - // The result of fetching an entity from Datastore. message EntityResult { // Specifies what data the 'entity' field contains. @@ -56,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. @@ -91,12 +90,14 @@ message Query { // A starting point for the query results. Query cursors are // returned in query result batches and - // [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + // [can only be used to continue the same + // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). bytes start_cursor = 7; // An ending point for the query results. Query cursors are // returned in query result batches and - // [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + // [can only be used to limit the same + // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). bytes end_cursor = 8; // The number of results to skip. Applies before limit, but after all other @@ -217,7 +218,8 @@ message PropertyFilter { Value value = 3; } -// A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). +// A [GQL +// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). message GqlQuery { // A string of the format described // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). diff --git a/google/datastore/v1beta3/datastore.proto b/google/datastore/v1beta3/datastore.proto index b496f8103..54a0273a5 100644 --- a/google/datastore/v1beta3/datastore.proto +++ b/google/datastore/v1beta3/datastore.proto @@ -27,7 +27,6 @@ option java_outer_classname = "DatastoreProto"; option java_package = "com.google.datastore.v1beta3"; option php_namespace = "Google\\Cloud\\Datastore\\V1beta3"; - // Each RPC normalizes the partition IDs of the keys in its input entities, // and always returns entities with keys with normalized partition IDs. // This applies to all keys and entities, including those in values, except keys @@ -53,7 +52,8 @@ service Datastore { } // Begins a new transaction. - rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) + returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1beta3/projects/{project_id}:beginTransaction" body: "*" @@ -96,7 +96,8 @@ service Datastore { } } -// The request for [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. +// The request for +// [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. message LookupRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -108,7 +109,8 @@ message LookupRequest { repeated Key keys = 3; } -// The response for [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. +// The response for +// [Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. message LookupResponse { // Entities found as `ResultType.FULL` entities. The order of results in this // field is undefined and has no relation to the order of the keys in the @@ -126,7 +128,8 @@ message LookupResponse { repeated Key deferred = 3; } -// The request for [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. +// The request for +// [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. message RunQueryRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -150,7 +153,8 @@ message RunQueryRequest { } } -// The response for [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. +// The response for +// [Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. message RunQueryResponse { // A batch of query results (always present). QueryResultBatch batch = 1; @@ -159,7 +163,8 @@ message RunQueryResponse { Query query = 2; } -// The request for [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. +// The request for +// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. message BeginTransactionRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -168,13 +173,15 @@ message BeginTransactionRequest { TransactionOptions transaction_options = 10; } -// The response for [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. +// The response for +// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. message BeginTransactionResponse { // The transaction identifier (always present). bytes transaction = 1; } -// The request for [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. +// The request for +// [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. message RollbackRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -184,13 +191,13 @@ message RollbackRequest { bytes transaction = 1; } -// The response for [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. -// (an empty message). -message RollbackResponse { - -} +// The response for +// [Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. (an empty +// message). +message RollbackResponse {} -// The request for [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. +// The request for +// [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. message CommitRequest { // The modes available for commits. enum Mode { @@ -198,7 +205,8 @@ message CommitRequest { MODE_UNSPECIFIED = 0; // Transactional: The mutations are either all applied, or none are applied. - // Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions). + // Learn about transactions + // [here](https://cloud.google.com/datastore/docs/concepts/transactions). TRANSACTIONAL = 1; // Non-transactional: The mutations may not apply as all or none. @@ -235,7 +243,8 @@ message CommitRequest { repeated Mutation mutations = 6; } -// The response for [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. +// The response for +// [Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. message CommitResponse { // The result of performing the mutations. // The i-th mutation result corresponds to the i-th mutation in the request. @@ -246,7 +255,8 @@ message CommitResponse { int32 index_updates = 4; } -// The request for [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds]. +// The request for +// [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds]. message AllocateIdsRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -256,14 +266,16 @@ message AllocateIdsRequest { repeated Key keys = 1; } -// The response for [Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds]. +// The response for +// [Datastore.AllocateIds][google.datastore.v1beta3.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.v1beta3.Datastore.ReserveIds]. +// The request for +// [Datastore.ReserveIds][google.datastore.v1beta3.Datastore.ReserveIds]. message ReserveIdsRequest { // The ID of the project against which to make the request. string project_id = 8; @@ -276,10 +288,9 @@ message ReserveIdsRequest { repeated Key keys = 1; } -// The response for [Datastore.ReserveIds][google.datastore.v1beta3.Datastore.ReserveIds]. -message ReserveIdsResponse { - -} +// The response for +// [Datastore.ReserveIds][google.datastore.v1beta3.Datastore.ReserveIds]. +message ReserveIdsResponse {} // A mutation to apply to an entity. message Mutation { @@ -369,8 +380,10 @@ message ReadOptions { // Options for beginning a new transaction. // // Transactions can be created explicitly with calls to -// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction] or implicitly by setting -// [ReadOptions.new_transaction][google.datastore.v1beta3.ReadOptions.new_transaction] in read requests. +// [Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction] +// or implicitly by setting +// [ReadOptions.new_transaction][google.datastore.v1beta3.ReadOptions.new_transaction] +// in read requests. message TransactionOptions { // Options specific to read / write transactions. message ReadWrite { @@ -379,9 +392,7 @@ 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/v1beta3/entity.proto b/google/datastore/v1beta3/entity.proto index d3259e695..65863236a 100644 --- a/google/datastore/v1beta3/entity.proto +++ b/google/datastore/v1beta3/entity.proto @@ -28,7 +28,6 @@ option java_outer_classname = "EntityProto"; option java_package = "com.google.datastore.v1beta3"; option php_namespace = "Google\\Cloud\\Datastore\\V1beta3"; - // A partition ID identifies a grouping of entities. The grouping is always // by project and namespace, however the namespace ID may be empty. // @@ -47,7 +46,8 @@ option php_namespace = "Google\\Cloud\\Datastore\\V1beta3"; // // Foreign partition IDs (in which the project ID does // not match the context project ID ) are discouraged. -// Reads and writes of foreign partition IDs may fail if the project is not in an active state. +// Reads and writes of foreign partition IDs may fail if the project is not in +// an active state. message PartitionId { // The ID of the project to which the entities belong. string project_id = 2; @@ -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 least 1,000,000 bytes. string string_value = 17; // A blob value. diff --git a/google/datastore/v1beta3/query.proto b/google/datastore/v1beta3/query.proto index 9e57f6fce..c6aaea336 100644 --- a/google/datastore/v1beta3/query.proto +++ b/google/datastore/v1beta3/query.proto @@ -28,7 +28,6 @@ option java_outer_classname = "QueryProto"; option java_package = "com.google.datastore.v1beta3"; option php_namespace = "Google\\Cloud\\Datastore\\V1beta3"; - // The result of fetching an entity from Datastore. message EntityResult { // Specifies what data the 'entity' field contains. @@ -56,12 +55,13 @@ 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.v1beta3.EntityResult.ResultType.FULL] entity + // This field is set for + // [`FULL`][google.datastore.v1beta3.EntityResult.ResultType.FULL] entity // results. // - // For [missing][google.datastore.v1beta3.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.v1beta3.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. @@ -91,12 +91,14 @@ message Query { // A starting point for the query results. Query cursors are // returned in query result batches and - // [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + // [can only be used to continue the same + // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). bytes start_cursor = 7; // An ending point for the query results. Query cursors are // returned in query result batches and - // [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + // [can only be used to limit the same + // query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). bytes end_cursor = 8; // The number of results to skip. Applies before limit, but after all other @@ -217,7 +219,8 @@ message PropertyFilter { Value value = 3; } -// A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). +// A [GQL +// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). message GqlQuery { // A string of the format described // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). diff --git a/google/devtools/artman_clouddebugger.yaml b/google/devtools/artman_clouddebugger.yaml index 8f4ce5f1b..8dee0080f 100644 --- a/google/devtools/artman_clouddebugger.yaml +++ b/google/devtools/artman_clouddebugger.yaml @@ -13,83 +13,23 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-debugger - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/google-cloud-debugger-v2 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-debugger-v2 - - name: grpc - dest: generated/python/proto-google-cloud-debugger-v2 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-debugger-v2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/debugger/v2 - dest: google-cloud-debugger/lib/google/cloud/debugger/v2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-debugger - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: debugger/apiv2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-devtools-clouddebugger-v2/vendor - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v2 - dest: packages/debugger/src/v2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/debugger - name: gapic_config type: GAPIC_CONFIG diff --git a/google/devtools/build/artman_buildeventservice.yaml b/google/devtools/build/artman_buildeventservice.yaml new file mode 100644 index 000000000..4758a62ac --- /dev/null +++ b/google/devtools/build/artman_buildeventservice.yaml @@ -0,0 +1,34 @@ +common: + api_name: buildeventservice + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: buildeventservice.yaml + gapic_yaml: v1/buildeventservice_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/devtools/build/buildeventservice.yaml b/google/devtools/build/buildeventservice.yaml new file mode 100644 index 000000000..4d5850029 --- /dev/null +++ b/google/devtools/build/buildeventservice.yaml @@ -0,0 +1,17 @@ +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: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/build/v1/build_events.proto b/google/devtools/build/v1/build_events.proto index c3a1faed8..8b29a4521 100644 --- a/google/devtools/build/v1/build_events.proto +++ b/google/devtools/build/v1/build_events.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -20,8 +21,6 @@ import "google/api/annotations.proto"; import "google/devtools/build/v1/build_status.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;build"; @@ -29,8 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "BuildEventProto"; option java_package = "com.google.devtools.build.v1"; - -// An event representing some state change that occured in the build. This +// An event representing some state change that occurred in the build. This // message does not include field for uniquely identifying an event. message BuildEvent { // Notification that the build system has attempted to run the build tool. @@ -39,23 +37,21 @@ message BuildEvent { // for each new attempt. Can be used to determine if there is a later // invocation attempt replacing the current one a client is processing. int64 attempt_number = 1; + + // Additional details about the invocation. + google.protobuf.Any details = 2; } // Notification that an invocation attempt has finished. message InvocationAttemptFinished { - // The exit code of the build tool. - google.protobuf.Int32Value exit_code = 2; - // Final status of the invocation. BuildStatus invocation_status = 3; } - // Notification that the build request is enqueued. It could happen when - // a new build request is inserted into the build queue, or when a - // build request is put back into the build queue due to a previous build - // failure. + // Notification that the build request is enqueued. message BuildEnqueued { - + // Additional details about the Build. + google.protobuf.Any details = 1; } // Notification that the build request has finished, and no further diff --git a/google/devtools/build/v1/build_status.proto b/google/devtools/build/v1/build_status.proto index f88296c9c..8d108e36c 100644 --- a/google/devtools/build/v1/build_status.proto +++ b/google/devtools/build/v1/build_status.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -25,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "BuildStatusProto"; option java_package = "com.google.devtools.build.v1"; - // Status used for both invocation attempt and overall build completion. message BuildStatus { // The end result of the Build. diff --git a/google/devtools/build/v1/buildeventservice_gapic.yaml b/google/devtools/build/v1/buildeventservice_gapic.yaml new file mode 100644 index 000000000..cabd6db30 --- /dev/null +++ b/google/devtools/build/v1/buildeventservice_gapic.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/publish_build_event.proto b/google/devtools/build/v1/publish_build_event.proto index f6e05ee16..5e483d679 100644 --- a/google/devtools/build/v1/publish_build_event.proto +++ b/google/devtools/build/v1/publish_build_event.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -27,7 +28,6 @@ option java_multiple_files = true; option java_outer_classname = "BackendProto"; option java_package = "com.google.devtools.build.v1"; - // A service for publishing BuildEvents. BuildEvents are generated by Build // Systems to record actions taken during a Build. Events occur in streams, // are identified by a StreamId, and ordered by sequence number in a stream. @@ -45,8 +45,8 @@ option java_package = "com.google.devtools.build.v1"; // more than one build tool stream for an invocation attempt of a build. service PublishBuildEvent { // Publish a build event stating the new state of a build (typically from the - // build queue). If the event is a BuildEnqueued event, also register the new - // build request ID and its build type to BES. + // build queue). The BuildEnqueued event must be publishd before all other + // events for the same build ID. // // The backend will persist the event and deliver it to registered frontend // jobs immediately without batching. @@ -54,15 +54,24 @@ 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) { - option (google.api.http) = { post: "/v1/lifecycleEvents:publish" body: "*" }; + 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: "*" } + }; } // Publish build tool events belonging to the same stream to a backend job // using bidirectional streaming. rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest) returns (stream PublishBuildToolEventStreamResponse) { - option (google.api.http) = { post: "/v1/events:publish" body: "*" }; + option (google.api.http) = { + post: "/v1/projects/{project_id=*}/events:publish" + body: "*" + additional_bindings { post: "/v1/events:publish" body: "*" } + }; } } @@ -105,7 +114,9 @@ message PublishLifecycleEventRequest { // BuildEnqueued/InvocationAttemptStarted. repeated string notification_keywords = 4; - // This field identifies which project (if any) the build is associated with. + // 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; } @@ -134,21 +145,8 @@ message OrderedBuildEvent { BuildEvent event = 3; } +// Streaming request message for PublishBuildToolEventStream. message PublishBuildToolEventStreamRequest { - // The fist 3 fields are identical to OrderedBuildEvent so we can have wire- - // compatibility when migrating BES publishers. - - // Which build event stream this event belongs to. - google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true]; - - // The position of this event in the stream. The sequence numbers for a build - // event stream should be a sequence of consecutive natural numbers starting - // from one. (1, 2, 3, ...) - int64 sequence_number = 2 [deprecated = true]; - - // The actual event. - google.devtools.build.v1.BuildEvent event = 3 [deprecated = true]; - // The build event with position info. // New publishing clients should use this field rather than the 3 above. OrderedBuildEvent ordered_build_event = 4; @@ -158,4 +156,9 @@ message PublishBuildToolEventStreamRequest { // or ordered_build_event.sequence_number is 1 in this message. If this field // is empty, BES will not publish notification messages for this stream. repeated string notification_keywords = 5; + + // 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; } diff --git a/google/devtools/cloudbuild/cloudbuild.yaml b/google/devtools/cloudbuild/cloudbuild.yaml index bc44caecf..ed211ab23 100644 --- a/google/devtools/cloudbuild/cloudbuild.yaml +++ b/google/devtools/cloudbuild/cloudbuild.yaml @@ -1,7 +1,7 @@ type: google.api.Service config_version: 3 name: cloudbuild.googleapis.com -title: Cloud Container Builder API +title: Cloud Build API apis: - name: google.devtools.cloudbuild.v1.CloudBuild @@ -11,13 +11,13 @@ types: - name: google.devtools.cloudbuild.v1.ArtifactResult documentation: - summary: Builds container images in the cloud. + summary: Creates and manages builds on Google Cloud Platform. overview: |- - The Google Cloud Container Builder API lets you to build an application or - part of an application from source code stored in Google Cloud Storage or a - Google Cloud Source Repository and package it into container images. The - container images are then stored in Google Container Registry. You can - optionally copy the images to another container registry as required. + The Cloud Build API lets you to build an application or part of an + application from source code stored in Cloud Storage or a Cloud Source + Repository 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: diff --git a/google/devtools/cloudbuild/v1/cloudbuild.proto b/google/devtools/cloudbuild/v1/cloudbuild.proto index fd708b04e..e3adace15 100644 --- a/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -22,6 +23,7 @@ import "google/cloud/audit/audit_log.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"; @@ -30,7 +32,7 @@ option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; -// Manages build requests on Google Cloud Platform. +// Creates and manages builds on Google Cloud Platform. // // The main concept used by this API is a `Build`, which describes the location // of the source to build, how to build the source, and where to store the @@ -260,8 +262,7 @@ message BuiltImage { // Docker Registry 2.0 digest. string digest = 3; - // Stores timing information for pushing the specified image. - // @OutputOnly + // Output only. Stores timing information for pushing the specified image. TimeSpan push_timing = 4; } @@ -334,27 +335,29 @@ message BuildStep { // List of volumes to mount into the build step. // - // Each volume will be created as an empty volume prior to execution of the - // build step. Upon completion of the build, volumes and their contents will - // be discarded. + // Each volume is created as an empty volume prior to execution of the + // build step. Upon completion of the build, volumes and their contents are + // discarded. // // Using a named volume in only one step is not valid as it is indicative - // of a mis-configured build request. + // of a build request with an incorrect configuration. repeated Volume volumes = 9; - // Stores timing information for executing this build step. - // @OutputOnly + // Output only. Stores timing information for executing this build step. TimeSpan timing = 10; + // Output only. Stores timing information for pulling this build step's + // builder image only. + TimeSpan pull_timing = 13; + // Time limit for executing this build step. If not defined, the step has no // time limit and will be allowed to continue to run until either it completes // or the build itself times out. google.protobuf.Duration timeout = 11; - // Status of the build step. At this time, build step status is only updated - // on build completion; step status is not updated in real-time as the build - // progresses. - // @OutputOnly + // Output only. Status of the build step. At this time, build step status is + // only updated on build completion; step status is not updated in real-time + // as the build progresses. Build.Status status = 12; } @@ -388,6 +391,14 @@ message Results { // Number of artifacts uploaded. Only populated when artifacts are uploaded. int64 num_artifacts = 5; + + // List of build step outputs, produced by builder images, in the order + // corresponding to build step indices. + // + // [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) + // can produce this output by writing to `$BUILDER_OUTPUT/output`. + // Only the first 4KB of data is stored. + repeated bytes build_step_outputs = 6; } // An artifact that was uploaded during a build. This @@ -402,7 +413,7 @@ message ArtifactResult { repeated FileHashes file_hash = 2; } -// A build resource in the Container Builder API. +// A build resource in the Cloud Build API. // // At a high level, a `Build` describes where to find source code, how to build // it (for example, the builder image to run on the source), and where to store @@ -447,20 +458,16 @@ message Build { CANCELLED = 7; } - // Unique identifier of the build. - // @OutputOnly + // Output only. Unique identifier of the build. string id = 1; - // ID of the project. - // @OutputOnly. + // Output only. ID of the project. string project_id = 16; - // Status of the build. - // @OutputOnly + // Output only. Status of the build. Status status = 2; - // Customer-readable message about the current status. - // @OutputOnly + // Output only. Customer-readable message about the current status. string status_detail = 24; // The location of the source files to build. @@ -469,23 +476,19 @@ message Build { // Required. The operations to be performed on the workspace. repeated BuildStep steps = 11; - // Results of the build. - // @OutputOnly + // Output only. Results of the build. Results results = 10; - // Time at which the request to create the build was received. - // @OutputOnly + // Output only. Time at which the request to create the build was received. google.protobuf.Timestamp create_time = 6; - // Time at which execution of the build was started. - // @OutputOnly + // Output only. Time at which execution of the build was started. google.protobuf.Timestamp start_time = 7; - // Time at which execution of the build was finished. + // 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. - // @OutputOnly google.protobuf.Timestamp finish_time = 8; // Amount of time that this build should be allowed to run, to second @@ -517,20 +520,17 @@ message Build { // Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. string logs_bucket = 19; - // A permanent fixed identifier for source. - // @OutputOnly + // Output only. A permanent fixed identifier for source. SourceProvenance source_provenance = 21; - // The ID of the `BuildTrigger` that triggered this build, if it was - // triggered automatically. - // @OutputOnly + // Output only. The ID of the `BuildTrigger` that triggered this build, if it + // was triggered automatically. string build_trigger_id = 22; // Special options for this build. BuildOptions options = 23; - // URL to logs for this build in Google Cloud Console. - // @OutputOnly + // Output only. URL to logs for this build in Google Cloud Console. string log_url = 25; // Substitutions data for `Build` resource. @@ -542,7 +542,8 @@ message Build { // Secrets to decrypt using Cloud Key Management Service. repeated Secret secrets = 32; - // Stores timing information for phases of the build. Valid keys are: + // Output only. Stores timing information for phases of the build. Valid keys + // are: // // * BUILD: time to execute all build steps // * PUSH: time to push all specified images. @@ -550,7 +551,6 @@ message Build { // // If the build does not specify source or images, // these keys will not be included. - // @OutputOnly map timing = 33; } @@ -571,8 +571,7 @@ message Artifacts { // Path globs used to match files in the build's workspace. repeated string paths = 2; - // Stores timing information for pushing all artifact objects. - // @OutputOnly + // Output only. Stores timing information for pushing all artifact objects. TimeSpan timing = 3; } @@ -627,16 +626,16 @@ message SourceProvenance { // revisions resolved. RepoSource resolved_repo_source = 6; - // Hash(es) of the build source, which can be used to verify that the original - // source integrity was maintained in the build. Note that `FileHashes` will - // only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. + // 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 + // `SourceProvenanceHash`. // // 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. - // @OutputOnly map file_hashes = 4; } @@ -678,7 +677,7 @@ message Secret { // // Secret environment variables must be unique across all of a build's // secrets, and must be used by at least one build step. Values can be at most - // 1 KB in size. There can be at most ten secret values across all of a + // 64 KB in size. There can be at most 100 secret values across all of a // build's secrets. map secret_env = 3; } @@ -737,9 +736,7 @@ message CancelBuildRequest { // Configuration for an automated build in response to source repository // changes. message BuildTrigger { - // Unique identifier of the trigger. - // - // @OutputOnly + // Output only. Unique identifier of the trigger. string id = 1; // Human-readable description of this trigger. @@ -762,9 +759,7 @@ message BuildTrigger { string filename = 8; } - // Time when the trigger was created. - // - // @OutputOnly + // Output only. Time when the trigger was created. google.protobuf.Timestamp create_time = 5; // If true, the trigger will never result in a build. @@ -772,6 +767,27 @@ message BuildTrigger { // Substitutions data for Build resource. map substitutions = 11; + + // ignored_files and included_files are file glob matches using + // http://godoc/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. + // + // If ignored_files is not empty, then we ignore any files that match + // any of the ignored_file globs. If the change has no files that are + // outside of the ignored_files globs, then we do not trigger a build. + repeated string ignored_files = 15; + + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is empty, then as far as this filter is + // concerned, we should trigger the build. + // + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is not empty, then we make sure that at + // least one of those files matches a included_files glob. If not, + // then we do not trigger a build. + repeated string included_files = 16; } // Request to create a new `BuildTrigger`. @@ -871,6 +887,19 @@ message BuildOptions { STREAM_OFF = 2; } + // Specifies the logging mode. + enum LoggingMode { + // The service determines the logging mode. The default is `LEGACY`. Do not + // rely on the default logging behavior as it may change in the future. + LOGGING_UNSPECIFIED = 0; + + // Stackdriver logging and Cloud Storage logging are enabled. + LEGACY = 1; + + // Only Cloud Storage logging is enabled. + GCS_ONLY = 2; + } + // Requested hash for SourceProvenance. repeated Hash.HashType source_provenance_hash = 1; @@ -895,4 +924,38 @@ message BuildOptions { // Option to define build log streaming behavior to Google Cloud // 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. + string worker_pool = 7; + + // Option to specify the logging mode, which determines where the logs are + // stored. + LoggingMode logging = 11; + + // A list of global environment variable definitions that will exist for all + // build steps in this build. If a variable is defined in both globally and in + // a build step, the variable will use the build step value. + // + // The elements are of the form "KEY=VALUE" for the environment variable "KEY" + // being given the value "VALUE". + repeated string env = 12; + + // A list of global environment variables, which are encrypted using a Cloud + // Key Management Service crypto key. These values must be specified in the + // build's `Secret`. These variables will be available to all build steps + // in this build. + repeated string secret_env = 13; + + // Global list of volumes to mount for ALL build steps + // + // Each volume is created as an empty volume prior to starting the build + // process. Upon completion of the build, volumes and their contents are + // discarded. Global volume names and paths cannot conflict with the volumes + // defined a build step. + // + // Using a global volume in a build with only one step is not valid as + // it is indicative of a build request with an incorrect configuration. + repeated Volume volumes = 14; } diff --git a/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml index c20c32ce4..7b7d8c00c 100644 --- a/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml +++ b/google/devtools/cloudbuild/v1/cloudbuild_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Devtools\Cloudbuild\V1 nodejs: package_name: cloudbuild.v1 -# 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. @@ -68,9 +62,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # 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. @@ -115,7 +107,6 @@ interfaces: required_fields: - project_id - build - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -128,7 +119,6 @@ interfaces: required_fields: - project_id - id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -140,7 +130,6 @@ interfaces: - filter required_fields: - project_id - request_object_method: true page_streaming: request: page_size_field: page_size @@ -160,7 +149,6 @@ interfaces: required_fields: - project_id - id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -173,7 +161,6 @@ interfaces: required_fields: - project_id - trigger - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -186,7 +173,6 @@ interfaces: required_fields: - project_id - trigger_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -197,7 +183,6 @@ interfaces: - project_id required_fields: - project_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -210,7 +195,6 @@ interfaces: required_fields: - project_id - trigger_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -225,7 +209,6 @@ interfaces: - project_id - trigger_id - trigger - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -240,7 +223,6 @@ interfaces: - project_id - trigger_id - source - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -253,7 +235,6 @@ interfaces: required_fields: - project_id - id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/devtools/clouddebugger/BUILD.bazel b/google/devtools/clouddebugger/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/devtools/clouddebugger/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/devtools/clouddebugger/clouddebugger.yaml b/google/devtools/clouddebugger/clouddebugger.yaml index 2277b9332..be75bd23f 100644 --- a/google/devtools/clouddebugger/clouddebugger.yaml +++ b/google/devtools/clouddebugger/clouddebugger.yaml @@ -1,36 +1,40 @@ type: google.api.Service - config_version: 2 - name: clouddebugger.googleapis.com title: Stackdriver Debugger API -documentation: - summary: | - Examines the call stack and variables of a running application - without stopping or slowing it down. - apis: -- name: google.devtools.clouddebugger.v2.Debugger2 - 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: |- - google.devtools.clouddebugger.v2.Debugger2.SetBreakpoint, - google.devtools.clouddebugger.v2.Debugger2.GetBreakpoint, - google.devtools.clouddebugger.v2.Debugger2.DeleteBreakpoint, - google.devtools.clouddebugger.v2.Debugger2.ListBreakpoints, - google.devtools.clouddebugger.v2.Debugger2.ListDebuggees - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud_debugger, - https://www.googleapis.com/auth/cloud-platform - - selector: |- - google.devtools.clouddebugger.v2.Controller2.RegisterDebuggee, - google.devtools.clouddebugger.v2.Controller2.ListActiveBreakpoints, - google.devtools.clouddebugger.v2.Controller2.UpdateActiveBreakpoint + - selector: '*' oauth: canonical_scopes: |- - https://www.googleapis.com/auth/cloud_debugger, - https://www.googleapis.com/auth/cloud-platform + 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 new file mode 100644 index 000000000..6b33ee4df --- /dev/null +++ b/google/devtools/clouddebugger/v2/BUILD.bazel @@ -0,0 +1,153 @@ +# 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 = "debugger_proto", + srcs = [ + "controller.proto", + "data.proto", + "debugger.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "debugger_proto_with_info", + deps = [":debugger_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 = "debugger_java_proto", + deps = [":debugger_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"], +) + +java_gapic_library( + name = "debugger_java_gapic", + src = ":debugger_proto_with_info", + gapic_yaml = "clouddebugger_gapic.yaml", + service_yaml = "//google/devtools/clouddebugger:clouddebugger.yaml", + test_deps = [":debugger_java_grpc"], + deps = [ + ":debugger_java_proto", + ":debugger_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":debugger_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.debugger.v2.Debugger2ClientTest", + "com.google.cloud.debugger.v2.Controller2ClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "debugger_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2", + protos = [":debugger_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/devtools/source/v1:source_go_proto", + ], +) + +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"], +) + +go_test( + name = "debugger_go_gapic_test", + srcs = [":debugger_go_gapic_srcjar_test"], + embed = [":debugger_go_gapic"], + importpath = "cloud.google.com/go/debugger/apiv2", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-debugger-v2-go", + deps = [ + ":debugger_go_gapic", + ":debugger_go_gapic_srcjar-smoke-test.srcjar", + ":debugger_go_gapic_srcjar-test.srcjar", + ":debugger_go_proto", + ], +) diff --git a/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml index e7088ee57..1e910b192 100644 --- a/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml +++ b/google/devtools/clouddebugger/v2/clouddebugger_gapic.yaml @@ -17,9 +17,6 @@ language_settings: nodejs: package_name: debugger.v2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.devtools.clouddebugger.v2.Debugger2 collections: [] @@ -51,7 +48,6 @@ interfaces: - debuggee_id - breakpoint - client_version - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -66,7 +62,6 @@ interfaces: - debuggee_id - breakpoint_id - client_version - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -81,7 +76,6 @@ interfaces: - debuggee_id - breakpoint_id - client_version - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -94,7 +88,6 @@ interfaces: - parameters: - debuggee_id - client_version - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -107,7 +100,6 @@ interfaces: - parameters: - project - client_version - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -137,7 +129,6 @@ interfaces: groups: - parameters: - debuggee - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -148,7 +139,6 @@ interfaces: groups: - parameters: - debuggee_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -161,7 +151,6 @@ interfaces: - parameters: - debuggee_id - breakpoint - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/devtools/clouddebugger/v2/controller.proto b/google/devtools/clouddebugger/v2/controller.proto index 71193214d..3c9da584d 100644 --- a/google/devtools/clouddebugger/v2/controller.proto +++ b/google/devtools/clouddebugger/v2/controller.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -27,7 +28,6 @@ option java_outer_classname = "ControllerProto"; option java_package = "com.google.devtools.clouddebugger.v2"; option php_namespace = "Google\\Cloud\\Debugger\\V2"; - // The Controller service provides the API for orchestrating a collection of // debugger agents to perform debugging tasks. These agents are each attached // to a process of an application which may include one or more replicas. @@ -59,8 +59,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) { - option (google.api.http) = { post: "/v2/controller/debuggees/register" body: "*" }; + rpc RegisterDebuggee(RegisterDebuggeeRequest) + returns (RegisterDebuggeeResponse) { + option (google.api.http) = { + post: "/v2/controller/debuggees/register" + body: "*" + }; } // Returns the list of all active breakpoints for the debuggee. @@ -76,8 +80,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) { - option (google.api.http) = { get: "/v2/controller/debuggees/{debuggee_id}/breakpoints" }; + rpc ListActiveBreakpoints(ListActiveBreakpointsRequest) + returns (ListActiveBreakpointsResponse) { + option (google.api.http) = { + get: "/v2/controller/debuggees/{debuggee_id}/breakpoints" + }; } // Updates the breakpoint state or mutable fields. @@ -88,8 +95,12 @@ 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) { - option (google.api.http) = { put: "/v2/controller/debuggees/{debuggee_id}/breakpoints/{breakpoint.id}" body: "*" }; + rpc UpdateActiveBreakpoint(UpdateActiveBreakpointRequest) + returns (UpdateActiveBreakpointResponse) { + option (google.api.http) = { + put: "/v2/controller/debuggees/{debuggee_id}/breakpoints/{breakpoint.id}" + body: "*" + }; } } @@ -104,7 +115,7 @@ message RegisterDebuggeeRequest { // Response for registering a debuggee. message RegisterDebuggeeResponse { // Debuggee resource. - // The field `id` is guranteed to be set (in addition to the echoed fields). + // The field `id` is guaranteed to be set (in addition to the echoed fields). // If the field `is_disabled` is set to `true`, the agent should disable // itself by removing all breakpoints and detaching from the application. // It should however continue to poll `RegisterDebuggee` until reenabled. @@ -160,6 +171,4 @@ message UpdateActiveBreakpointRequest { // 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 8e8dad59f..c2659a9fa 100644 --- a/google/devtools/clouddebugger/v2/data.proto +++ b/google/devtools/clouddebugger/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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,9 +19,11 @@ 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"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Debugger.V2"; option go_package = "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2;clouddebugger"; option java_multiple_files = true; @@ -28,7 +31,6 @@ option java_outer_classname = "DataProto"; option java_package = "com.google.devtools.clouddebugger.v2"; option php_namespace = "Google\\Cloud\\Debugger\\V2"; - // Represents a message with parameters. message FormatMessage { // Format template for the message. The `format` uses placeholders `$0`, @@ -93,6 +95,11 @@ message SourceLocation { // Line inside the file. The first line in the file has the value `1`. int32 line = 2; + + // Column within a line. The first column in a line as the value `1`. + // Agents that do not support setting breakpoints on specific columns ignore + // this field. + int32 column = 3; } // Represents a variable or an argument possibly of a compound object type. @@ -356,7 +363,8 @@ message Breakpoint { // * `Field f not found in class C` referring to condition StatusMessage status = 10; - // The stack at breakpoint time. + // The stack at breakpoint time, where stack_frames[0] represents the most + // recently entered function. repeated StackFrame stack_frames = 7; // Values of evaluated expressions at breakpoint time. @@ -400,10 +408,10 @@ message Debuggee { // Use project number or id when registering a Google Cloud Platform project. string project = 2; - // Uniquifier to further distiguish the application. + // Uniquifier to further distinguish the application. // It is possible that different applications might have identical values in // the debuggee message, thus, incorrectly identified as a single application - // by the Controller service. This field adds salt to further distiguish the + // by the Controller service. This field adds salt to further distinguish the // application. Agents should consider seeding this field with value that // identifies the code, binary, configuration and environment. string uniquifier = 3; @@ -437,9 +445,8 @@ message Debuggee { // References to the locations and revisions of the source code used in the // deployed application. - // - // NOTE: this field is experimental and can be ignored. - repeated google.devtools.source.v1.ExtendedSourceContext ext_source_contexts = 13; + 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 aa18890c4..046f77076 100644 --- a/google/devtools/clouddebugger/v2/debugger.proto +++ b/google/devtools/clouddebugger/v2/debugger.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -27,7 +28,6 @@ option java_outer_classname = "DebuggerProto"; option java_package = "com.google.devtools.clouddebugger.v2"; option php_namespace = "Google\\Cloud\\Debugger\\V2"; - // The Debugger service provides the API that allows users to collect run-time // information from a running application, without stopping or slowing it down // and without modifying its state. An application may include one or @@ -43,27 +43,40 @@ option php_namespace = "Google\\Cloud\\Debugger\\V2"; service Debugger2 { // 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.http) = { + post: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/set" + body: "breakpoint" + }; } // Gets breakpoint information. rpc GetBreakpoint(GetBreakpointRequest) returns (GetBreakpointResponse) { - option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" }; + option (google.api.http) = { + get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" + }; } // Deletes the breakpoint from the debuggee. - rpc DeleteBreakpoint(DeleteBreakpointRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" }; + rpc DeleteBreakpoint(DeleteBreakpointRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" + }; } // Lists all breakpoints for the debuggee. - rpc ListBreakpoints(ListBreakpointsRequest) returns (ListBreakpointsResponse) { - option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints" }; + rpc ListBreakpoints(ListBreakpointsRequest) + returns (ListBreakpointsResponse) { + option (google.api.http) = { + get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints" + }; } // Lists all the debuggees that the user has access to. rpc ListDebuggees(ListDebuggeesRequest) returns (ListDebuggeesResponse) { - option (google.api.http) = { get: "/v2/debugger/debuggees" }; + option (google.api.http) = { + get: "/v2/debugger/debuggees" + }; } } @@ -146,7 +159,7 @@ message ListBreakpointsRequest { // This field is deprecated. The following fields are always stripped out of // the result: `stack_frames`, `evaluated_expressions` and `variable_table`. - bool strip_results = 5; + bool strip_results = 5 [deprecated = true]; // A wait token that, if specified, blocks the call until the breakpoints // list has changed, or a server selected timeout has expired. The value diff --git a/google/devtools/clouderrorreporting/BUILD.bazel b/google/devtools/clouderrorreporting/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/devtools/clouderrorreporting/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/devtools/clouderrorreporting/artman_errorreporting.yaml b/google/devtools/clouderrorreporting/artman_errorreporting.yaml index f465c39ad..0e5a573a4 100644 --- a/google/devtools/clouderrorreporting/artman_errorreporting.yaml +++ b/google/devtools/clouderrorreporting/artman_errorreporting.yaml @@ -12,98 +12,23 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-errorreporting - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-error-reporting-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-error-reporting-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-error-reporting-v1beta1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/errorreporting_v1beta1 - dest: errorreporting/google/cloud/errorreporting_v1beta1 - - src: tests/unit/gapic/v1beta1 - dest: errorreporting/tests/gapic - - name: grpc - src: google/cloud/proto - dest: errorreporting/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-error-reporting-v1beta1 - - name: grpc - dest: generated/python/proto-google-cloud-error-reporting-v1beta1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-error-reporting-v1beta1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/error_reporting/v1beta1 - dest: google-cloud-error_reporting/lib/google/cloud/error_reporting/v1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-error_reporting - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: error-reporting/apiv1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-devtools-clouderrorreporting-v1beta1/vendor - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1beta1 - dest: packages/error-reporting/src/v1beta1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/errorreporting - name: gapic_config type: GAPIC_CONFIG diff --git a/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel new file mode 100644 index 000000000..4b912abfb --- /dev/null +++ b/google/devtools/clouderrorreporting/v1beta1/BUILD.bazel @@ -0,0 +1,151 @@ +# 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 = "clouderrorreporting_proto", + srcs = [ + "common.proto", + "error_group_service.proto", + "error_stats_service.proto", + "report_errors_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:monitored_resource_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "clouderrorreporting_proto_with_info", + deps = [":clouderrorreporting_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 = "clouderrorreporting_java_proto", + deps = [":clouderrorreporting_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.errorreporting.v1beta1.ErrorGroupServiceClientTest", + "com.google.cloud.errorreporting.v1beta1.ErrorStatsServiceClientTest", + "com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceClientTest", +]] + +# Opensource 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 = [ + ":clouderrorreporting_java_proto", + ":clouderrorreporting_proto", + ":clouderrorreporting_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 = "clouderrorreporting_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1", + 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"], +) + +go_test( + name = "clouderrorreporting_go_gapic_test", + srcs = [":clouderrorreporting_go_gapic_srcjar_test"], + embed = [":clouderrorreporting_go_gapic"], + importpath = "cloud.google.com/go/errorreporting/apiv1beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-error-reporting-v1beta1-go", + deps = [ + ":clouderrorreporting_go_gapic", + ":clouderrorreporting_go_gapic_srcjar-smoke-test.srcjar", + ":clouderrorreporting_go_gapic_srcjar-test.srcjar", + ":clouderrorreporting_go_proto", + ], +) diff --git a/google/devtools/clouderrorreporting/v1beta1/common.proto b/google/devtools/clouderrorreporting/v1beta1/common.proto index 5d60cb2fb..132f1a646 100644 --- a/google/devtools/clouderrorreporting/v1beta1/common.proto +++ b/google/devtools/clouderrorreporting/v1beta1/common.proto @@ -27,7 +27,6 @@ option java_outer_classname = "CommonProto"; option java_package = "com.google.devtools.clouderrorreporting.v1beta1"; option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; - // Description of a group of similar error events. message ErrorGroup { // The group resource name. diff --git a/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto index 5c32e068d..15086a9ea 100644 --- a/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto @@ -26,18 +26,22 @@ option java_outer_classname = "ErrorGroupServiceProto"; option java_package = "com.google.devtools.clouderrorreporting.v1beta1"; option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; - // Service for retrieving and updating individual error groups. service ErrorGroupService { // Get the specified group. rpc GetGroup(GetGroupRequest) returns (ErrorGroup) { - option (google.api.http) = { get: "/v1beta1/{group_name=projects/*/groups/*}" }; + option (google.api.http) = { + get: "/v1beta1/{group_name=projects/*/groups/*}" + }; } // Replace the data for the specified group. // Fails if the group does not exist. rpc UpdateGroup(UpdateGroupRequest) returns (ErrorGroup) { - option (google.api.http) = { put: "/v1beta1/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.http) = { + put: "/v1beta1/{group.name=projects/*/groups/*}" + body: "group" + }; } } diff --git a/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto index 5b6213436..ffb25b2b8 100644 --- a/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto @@ -28,23 +28,28 @@ option java_outer_classname = "ErrorStatsServiceProto"; option java_package = "com.google.devtools.clouderrorreporting.v1beta1"; option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; - // An API for retrieving and managing error statistics as well as data for // individual events. service ErrorStatsService { // Lists the specified groups. rpc ListGroupStats(ListGroupStatsRequest) returns (ListGroupStatsResponse) { - option (google.api.http) = { get: "/v1beta1/{project_name=projects/*}/groupStats" }; + option (google.api.http) = { + get: "/v1beta1/{project_name=projects/*}/groupStats" + }; } // Lists the specified events. rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) { - option (google.api.http) = { get: "/v1beta1/{project_name=projects/*}/events" }; + option (google.api.http) = { + get: "/v1beta1/{project_name=projects/*}/events" + }; } // Deletes all error events of a given project. rpc DeleteEvents(DeleteEventsRequest) returns (DeleteEventsResponse) { - option (google.api.http) = { delete: "/v1beta1/{project_name=projects/*}/events" }; + option (google.api.http) = { + delete: "/v1beta1/{project_name=projects/*}/events" + }; } } @@ -296,9 +301,7 @@ message DeleteEventsRequest { } // Response message for deleting error events. -message DeleteEventsResponse { - -} +message DeleteEventsResponse {} // Specifies how the time periods of error group counts are aligned. enum TimedCountAlignment { diff --git a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml index f49a41312..c373fa8d9 100644 --- a/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml +++ b/google/devtools/clouderrorreporting/v1beta1/errorreporting_gapic.yaml @@ -17,9 +17,6 @@ language_settings: nodejs: package_name: errorreporting.v1beta1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt collections: - name_pattern: projects/{project} entity_name: project @@ -57,7 +54,6 @@ interfaces: - group_name required_fields: - group_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -71,7 +67,6 @@ interfaces: - group required_fields: - group - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -120,7 +115,6 @@ interfaces: required_fields: - project_name - event - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -160,7 +154,6 @@ interfaces: required_fields: - project_name - time_range - request_object_method: true page_streaming: request: page_size_field: page_size @@ -183,7 +176,6 @@ interfaces: required_fields: - project_name - group_id - request_object_method: true page_streaming: request: page_size_field: page_size @@ -204,7 +196,6 @@ interfaces: - project_name required_fields: - project_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: diff --git a/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto index cf22f4971..d77f646ce 100644 --- a/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto +++ b/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto @@ -27,7 +27,6 @@ option java_outer_classname = "ReportErrorsServiceProto"; option java_package = "com.google.devtools.clouderrorreporting.v1beta1"; option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; - // An API for reporting error events. service ReportErrorsService { // Report an individual error event. @@ -37,9 +36,14 @@ service ReportErrorsService { //
API key // 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) { - option (google.api.http) = { post: "/v1beta1/{project_name=projects/*}/events:report" body: "event" }; + //
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" + }; } } @@ -47,8 +51,9 @@ service ReportErrorsService { message ReportErrorEventRequest { // [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`. + // [Google Cloud Platform project + // ID](https://support.google.com/cloud/answer/6158840). Example: + // `projects/my-project-123`. string project_name = 1; // [Required] The error event to be reported. @@ -57,9 +62,7 @@ message ReportErrorEventRequest { // 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 { diff --git a/google/devtools/cloudprofiler/cloudprofiler.yaml b/google/devtools/cloudprofiler/cloudprofiler.yaml index 632db5a6c..660be9e6c 100644 --- a/google/devtools/cloudprofiler/cloudprofiler.yaml +++ b/google/devtools/cloudprofiler/cloudprofiler.yaml @@ -7,10 +7,19 @@ apis: - name: google.devtools.cloudprofiler.v2.ProfilerService documentation: - summary: Allows Google services to send in continuous profiling information. + summary: Manages continuous profiling information. overview: |- - The Stackdriver Profiler API allows Google services manage the continuous - profiling information collected in cloud environments like Flex and GCE VMs. + The Stackdriver Profiler API manages the continuous profiling information + collected in cloud environments like App Engine, GKE and GCE. + +backend: + rules: + - selector: google.devtools.cloudprofiler.v2.ProfilerService.CreateProfile + deadline: 3600.0 + - selector: google.devtools.cloudprofiler.v2.ProfilerService.CreateOfflineProfile + deadline: 20.0 + - selector: google.devtools.cloudprofiler.v2.ProfilerService.UpdateProfile + deadline: 20.0 authentication: rules: diff --git a/google/devtools/cloudprofiler/v2/profiler.proto b/google/devtools/cloudprofiler/v2/profiler.proto index a42dd741f..9238e88b6 100644 --- a/google/devtools/cloudprofiler/v2/profiler.proto +++ b/google/devtools/cloudprofiler/v2/profiler.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -18,79 +18,105 @@ package google.devtools.cloudprofiler.v2; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2;cloudprofiler"; - -// Service for recording the profiling data from profiling agents running -// in the cloud or from an offline provider of profiling data. +// Manage the collection of continuous profiling data provided by profiling +// agents running in the cloud or by an offline provider of profiling data. // // General guidelines: // * Profiles for a single deployment must be created in ascending time order. // * Profiles can be created in either online or offline mode, see below. service ProfilerService { - // CreateProfile creates a new profile resource. + // CreateProfile creates a new profile resource in the online mode. // - // In the online creation mode: - // * The server ensures that the new profiles are created at a constant rate - // per deployment, so the creation request may hang for some time until the - // next profile session is available. - // * The request may fail with ABORTED error if the creation is not - // available within ~1m, the response will indicate the duration of the - // backoff the client should take before attempting creating a profile - // again. The backoff duration is returned in google.rpc.RetryInfo extension - // on the response status. To a gRPC client, the extension will be return as - // a binary-serialized proto in the trailing metadata item named - // "google.rpc.retryinfo-bin". + // The server ensures that the new profiles are created at a constant rate per + // deployment, so the creation request may hang for some time until the next + // profile session is available. // - // In the offline creation mode: - // * The client provides the profile to create along with the profile bytes, - // the server records it. + // The request may fail with ABORTED error if the creation is not available + // within ~1m, the response will indicate the duration of the backoff the + // client should take before attempting creating a profile again. The backoff + // duration is returned in google.rpc.RetryInfo extension on the response + // status. To a gRPC client, the extension will be return as a + // binary-serialized proto in the trailing metadata item named + // "google.rpc.retryinfo-bin". rpc CreateProfile(CreateProfileRequest) returns (Profile) { - option (google.api.http) = { post: "/v2/projects/{deployment.project_id}/profiles" body: "*" }; + option (google.api.http) = { + post: "/v2/{parent=projects/*}/profiles" + body: "*" + }; + } + + // CreateOfflineProfile creates a new profile resource in the offline mode. + // The client provides the profile to create along with the profile bytes, the + // server records it. + rpc CreateOfflineProfile(CreateOfflineProfileRequest) returns (Profile) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/profiles:createOffline" + body: "profile" + }; } // UpdateProfile updates the profile bytes and labels on the profile resource - // created in the online mode. + // created in the online mode. Updating the bytes for profiles created in the + // offline mode is currently not supported: the profile content must be + // provided at the time of the profile creation. rpc UpdateProfile(UpdateProfileRequest) returns (Profile) { - option (google.api.http) = { patch: "/v2/{profile.name=projects/*/profiles/*}" body: "profile" }; + option (google.api.http) = { + patch: "/v2/{profile.name=projects/*/profiles/*}" + body: "profile" + }; } } -// CreateProfileRequest describes a profile resource creation request. -// Deployment field must be populated for both online and offline modes. -// For the online mode, profile field is not set and the profile_type specifies -// the list of profile types supported by the agent. The creation call will hang -// until a profile of one of these types needs to be collected. For offline -// mode, profile field must be set, profile_type must be empty, and deployment -// field must be identical to the deployment in the profile. +// CreateProfileRequest describes a profile resource online creation request. +// The deployment field must be populated. The profile_type specifies the list +// of profile types supported by the agent. The creation call will hang until a +// profile of one of these types needs to be collected. message CreateProfileRequest { + // Parent project to create the profile in. + string parent = 4; + // Deployment details. Deployment deployment = 1; - // Online mode: One or more profile types that the agent is capable of - // providing. + // One or more profile types that the agent is capable of providing. repeated ProfileType profile_type = 2; +} - // Offline mode: Contents of the profile to create. - Profile profile = 3; +// CreateOfflineProfileRequest describes a profile resource offline creation +// request. Profile field must be set. +message CreateOfflineProfileRequest { + // Parent project to create the profile in. + string parent = 1; + + // Contents of the profile to create. + Profile profile = 2; } // UpdateProfileRequest contains the profile to update. message UpdateProfileRequest { // Profile to update Profile profile = 1; + + // Field mask used to specify the fields to be overwritten. Currently only + // profile_bytes and labels fields are supported by UpdateProfile, so only + // those fields can be specified in the mask. When no mask is provided, all + // fields are overwritten. + google.protobuf.FieldMask update_mask = 2; } // Profile resource. message Profile { - // Opaque, server-assigned, unique ID for this profile. - // Output only. + // Output only. Opaque, server-assigned, unique ID for this profile. string name = 1; // Type of profile. - // Input (for the offline mode) or output (for the online mode). + // For offline mode, this must be specified when creating the profile. For + // online mode it is assigned and returned by the server. ProfileType profile_type = 2; // Deployment this profile corresponds to. @@ -104,14 +130,13 @@ message Profile { // stopping the profiling is handled asynchronously). google.protobuf.Duration duration = 4; - // Profile bytes, as a gzip compressed serialized proto, the format is - // https://github.com/google/pprof/blob/master/proto/profile.proto. + // Input only. Profile bytes, as a gzip compressed serialized proto, the + // format is https://github.com/google/pprof/blob/master/proto/profile.proto. bytes profile_bytes = 5; - // Labels associated to this specific profile. These labels will get merged - // with the deployment labels for the final data set. - // See documentation on deployment labels for validation rules and limits. - // Input only, will not be populated on responses. + // Input only. Labels associated to this specific profile. These labels will + // get merged with the deployment labels for the final data set. See + // documentation on deployment labels for validation rules and limits. map labels = 6; } @@ -158,7 +183,8 @@ enum ProfileType { // Wallclock time sampling. More expensive as stops all threads. WALL = 2; - // Heap allocation sampling. + // In-use heap profile. Represents a snapshot of the allocations that are + // live at the time of the profiling. HEAP = 3; // Single-shot collection of all thread stacks. @@ -166,4 +192,15 @@ enum ProfileType { // Synchronization contention profile. CONTENTION = 5; + + // Peak heap profile. + PEAK_HEAP = 6; + + // Heap allocation profile. It represents the aggregation of all allocations + // made over the duration of the profile. All allocations are included, + // including those that might have been freed by the end of the profiling + // interval. The profile is in particular useful for garbage collecting + // languages to understand which parts of the code create most of the garbage + // collection pressure to see if those can be optimized. + HEAP_ALLOC = 7; } diff --git a/google/devtools/cloudtrace/BUILD.bazel b/google/devtools/cloudtrace/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/devtools/cloudtrace/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml index 385ab1503..595cf1040 100644 --- a/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml +++ b/google/devtools/cloudtrace/artman_cloudtrace_v1.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-trace-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-trace-v1 - - name: proto - dest: generated/java/proto-google-cloud-trace-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-trace - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-trace-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml index 45ffed4d5..c4fad37fe 100644 --- a/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml +++ b/google/devtools/cloudtrace/artman_cloudtrace_v2.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-trace-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-trace-v2 - - name: proto - dest: generated/java/proto-google-cloud-trace-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-trace - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-trace-v2 - name: go_gapic type: GAPIC language: GO diff --git a/google/devtools/cloudtrace/v1/BUILD.bazel b/google/devtools/cloudtrace/v1/BUILD.bazel new file mode 100644 index 000000000..1626d051a --- /dev/null +++ b/google/devtools/cloudtrace/v1/BUILD.bazel @@ -0,0 +1,140 @@ +# 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 = "trace_proto", + srcs = [ + "trace.proto", + ], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "trace_proto_with_info", + deps = [":trace_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 = "trace_java_proto", + deps = [":trace_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"], +) + +java_gapic_library( + name = "trace_java_gapic", + src = ":trace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + service_yaml = "//google/devtools/cloudtrace:cloudtrace_v1.yaml", + test_deps = [":trace_java_grpc"], + deps = [ + ":trace_java_proto", + ":trace_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[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", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "trace_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"], +) + +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"], +) + +go_test( + name = "trace_go_gapic_test", + srcs = [":trace_go_gapic_srcjar_test"], + embed = [":trace_go_gapic"], + importpath = "cloud.google.com/go/trace/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-trace-v1-go", + deps = [ + ":trace_go_gapic", + ":trace_go_gapic_srcjar-smoke-test.srcjar", + ":trace_go_gapic_srcjar-test.srcjar", + ":trace_go_proto", + ], +) diff --git a/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml index e3503561a..aba476351 100644 --- a/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml +++ b/google/devtools/cloudtrace/v1/cloudtrace_gapic.yaml @@ -18,9 +18,6 @@ language_settings: csharp: package_name: Google.Cloud.Trace.V1 release_level: GA -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.devtools.cloudtrace.v1.TraceService smoke_test: @@ -56,7 +53,6 @@ interfaces: retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 - request_object_method: true - name: GetTrace flattening: groups: @@ -69,10 +65,10 @@ interfaces: retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 - request_object_method: false - name: ListTraces page_streaming: request: + page_size_field: page_size token_field: page_token response: token_field: next_page_token @@ -86,4 +82,3 @@ interfaces: retry_codes_name: idempotent retry_params_name: default timeout_millis: 30000 - request_object_method: true diff --git a/google/devtools/cloudtrace/v1/trace.proto b/google/devtools/cloudtrace/v1/trace.proto index 211d680f8..16af3a6ec 100644 --- a/google/devtools/cloudtrace/v1/trace.proto +++ b/google/devtools/cloudtrace/v1/trace.proto @@ -27,7 +27,6 @@ option java_outer_classname = "TraceProto"; option java_package = "com.google.devtools.cloudtrace.v1"; option php_namespace = "Google\\Cloud\\Trace\\V1"; - // This file describes an API for collecting and viewing traces and spans // within a trace. A Trace is a collection of spans corresponding to a single // operation or set of operations for an application. A span is an individual @@ -36,12 +35,16 @@ option php_namespace = "Google\\Cloud\\Trace\\V1"; service TraceService { // 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.http) = { + get: "/v1/projects/{project_id}/traces" + }; } // Gets a single trace by its ID. rpc GetTrace(GetTraceRequest) returns (Trace) { - option (google.api.http) = { get: "/v1/projects/{project_id}/traces/{trace_id}" }; + option (google.api.http) = { + get: "/v1/projects/{project_id}/traces/{trace_id}" + }; } // Sends new traces to Stackdriver Trace or updates existing traces. If the ID @@ -50,7 +53,10 @@ service TraceService { // and any new fields provided are merged with the existing trace data. If the // ID does not match, a new trace is created. rpc PatchTraces(PatchTracesRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { patch: "/v1/projects/{project_id}/traces" body: "traces" }; + option (google.api.http) = { + patch: "/v1/projects/{project_id}/traces" + body: "traces" + }; } } diff --git a/google/devtools/cloudtrace/v2/BUILD.bazel b/google/devtools/cloudtrace/v2/BUILD.bazel new file mode 100644 index 000000000..7b0b77dcb --- /dev/null +++ b/google/devtools/cloudtrace/v2/BUILD.bazel @@ -0,0 +1,167 @@ +# 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 = "trace_proto", + srcs = [ + "trace.proto", + "tracing.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "trace_proto_with_info", + deps = [":trace_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 = "trace_java_proto", + deps = [":trace_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"], +) + +java_gapic_library( + name = "trace_java_gapic", + src = ":trace_proto_with_info", + gapic_yaml = "cloudtrace_gapic.yaml", + service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml", + test_deps = [":trace_java_grpc"], + deps = [ + ":trace_java_proto", + ":trace_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[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", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "trace_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2", + protos = [":trace_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_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/apiv2", + service_yaml = "//google/devtools/cloudtrace:cloudtrace_v2.yaml", + deps = [":trace_go_proto"], +) + +go_test( + name = "trace_go_gapic_test", + srcs = [":trace_go_gapic_srcjar_test"], + embed = [":trace_go_gapic"], + importpath = "cloud.google.com/go/trace/apiv2", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-trace-v2-go", + deps = [ + ":trace_go_gapic", + ":trace_go_gapic_srcjar-smoke-test.srcjar", + ":trace_go_gapic_srcjar-test.srcjar", + ":trace_go_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "trace_cc_proto", + deps = [":trace_proto"], +) + +cc_grpc_library( + name = "trace_cc_grpc", + srcs = [":trace_proto"], + deps = [":trace_cc_proto"], + grpc_only = True, +) diff --git a/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml index 437eb9812..ec5e02a20 100644 --- a/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml +++ b/google/devtools/cloudtrace/v2/cloudtrace_gapic.yaml @@ -18,12 +18,6 @@ language_settings: package_name: cloud.google.com/go/trace/apiv2 csharp: package_name: Google.Cloud.Trace.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. @@ -83,9 +77,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # page_streaming - Specifies the configuration for paging. # Describes information for generating a method which transforms a # paging list RPC into a stream of resources. @@ -122,7 +114,6 @@ interfaces: required_fields: - name - spans - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -136,7 +127,6 @@ interfaces: - display_name - start_time - end_time - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: diff --git a/google/devtools/cloudtrace/v2/trace.proto b/google/devtools/cloudtrace/v2/trace.proto index aaa5ade0b..d9fbe663b 100644 --- a/google/devtools/cloudtrace/v2/trace.proto +++ b/google/devtools/cloudtrace/v2/trace.proto @@ -28,7 +28,6 @@ option java_outer_classname = "TraceProto"; option java_package = "com.google.devtools.cloudtrace.v2"; option php_namespace = "Google\\Cloud\\Trace\\V2"; - // A span represents a single operation within a trace. Spans can be // nested to form a trace tree. Often, a trace contains a root span // that describes the end-to-end latency, and one or more subspans for diff --git a/google/devtools/cloudtrace/v2/tracing.proto b/google/devtools/cloudtrace/v2/tracing.proto index fd4f3e027..2990d4606 100644 --- a/google/devtools/cloudtrace/v2/tracing.proto +++ b/google/devtools/cloudtrace/v2/tracing.proto @@ -28,7 +28,6 @@ option java_outer_classname = "TracingProto"; option java_package = "com.google.devtools.cloudtrace.v2"; option php_namespace = "Google\\Cloud\\Trace\\V2"; - // This file describes an API for collecting and viewing traces and spans // within a trace. A Trace is a collection of spans corresponding to a single // operation or set of operations for an application. A span is an individual @@ -38,12 +37,18 @@ service TraceService { // Sends new spans to new or existing traces. You cannot update // existing spans. rpc BatchWriteSpans(BatchWriteSpansRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v2/{name=projects/*}/traces:batchWrite" body: "*" }; + option (google.api.http) = { + post: "/v2/{name=projects/*}/traces:batchWrite" + body: "*" + }; } // Creates a new span. rpc CreateSpan(Span) returns (Span) { - option (google.api.http) = { post: "/v2/{name=projects/*/traces/*}/spans" body: "*" }; + option (google.api.http) = { + post: "/v2/{name=projects/*/traces/*}/spans" + body: "*" + }; } } diff --git a/google/devtools/containeranalysis/BUILD.bazel b/google/devtools/containeranalysis/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/devtools/containeranalysis/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/devtools/containeranalysis/artman_containeranalysis.yaml b/google/devtools/containeranalysis/artman_containeranalysis.yaml index 46ce03a64..67172bc9a 100644 --- a/google/devtools/containeranalysis/artman_containeranalysis.yaml +++ b/google/devtools/containeranalysis/artman_containeranalysis.yaml @@ -3,8 +3,9 @@ common: api_version: v1alpha1 organization_name: google-cloud proto_deps: - - name: google-common-protos - - name: google-iam-v1 + - name: google-common-protos + - name: google-iam-v1 + proto_path: google/iam/v1 src_proto_paths: - v1alpha1 service_yaml: containeranalysis.yaml diff --git a/google/cloud/tasks/artman_cloudtasks.yaml b/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml similarity index 64% rename from google/cloud/tasks/artman_cloudtasks.yaml rename to google/devtools/containeranalysis/artman_containeranalysis_v1.yaml index 41eb6947a..4de2d28e8 100644 --- a/google/cloud/tasks/artman_cloudtasks.yaml +++ b/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml @@ -1,13 +1,14 @@ common: - api_name: tasks - api_version: v2beta2 + api_name: containeranalysis + api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos + - name: google-iam-v1 src_proto_paths: - - v2beta2 - service_yaml: cloudtasks.yaml - gapic_yaml: v2beta2/cloudtasks_gapic.yaml + - v1 + service_yaml: containeranalysis_v1.yaml + gapic_yaml: v1/containeranalysis_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG @@ -19,16 +20,16 @@ artifacts: type: GITHUB location: git@github.com:googleapis/api-client-staging.git directory_mappings: - - dest: generated/java/gapic-google-cloud-cloudtasks-v2beta2 + - dest: generated/java/gapic-google-cloud-containeranalysis-v1 - name: grpc - dest: generated/java/grpc-google-cloud-cloudtasks-v2beta2 + dest: generated/java/grpc-google-cloud-containeranalysis-v1 - name: proto - dest: generated/java/proto-google-cloud-cloudtasks-v2beta2 + dest: generated/java/proto-google-cloud-containeranalysis-v1 - name: java type: GITHUB location: git@github.com:GoogleCloudPlatform/google-cloud-java.git directory_mappings: - - dest: google-cloud-cloudtasks + - dest: google-cloud-containeranalysis - name: python_gapic type: GAPIC language: PYTHON @@ -43,7 +44,7 @@ artifacts: type: GITHUB location: git@github.com:googleapis/api-client-staging.git directory_mappings: - - dest: generated/php/google-cloud-cloudtasks-v2beta2 + - dest: generated/php/google-cloud-containeranalysis-v1 - name: go_gapic type: GAPIC language: GO diff --git a/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml b/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml new file mode 100644 index 000000000..e7e57449f --- /dev/null +++ b/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml @@ -0,0 +1,56 @@ +common: + api_name: containeranalysis + api_version: v1beta1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + - name: google-iam-v1 + src_proto_paths: + - v1beta1 + service_yaml: containeranalysis_v1beta1.yaml + gapic_yaml: v1beta1/containeranalysis_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA + publish_targets: + - name: staging + type: GITHUB + location: git@github.com:googleapis/api-client-staging.git + directory_mappings: + - dest: generated/java/gapic-google-cloud-containeranalysis-v1beta1 + - name: grpc + dest: generated/java/grpc-google-cloud-containeranalysis-v1beta1 + - name: proto + dest: generated/java/proto-google-cloud-containeranalysis-v1beta1 + - name: java + type: GITHUB + location: git@github.com:GoogleCloudPlatform/google-cloud-java.git + directory_mappings: + - dest: google-cloud-containeranalysis +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP + publish_targets: + - name: staging + type: GITHUB + location: git@github.com:googleapis/api-client-staging.git + directory_mappings: + - dest: generated/php/google-cloud-containeranalysis-v1beta1 +- 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/devtools/containeranalysis/containeranalysis_v1.yaml b/google/devtools/containeranalysis/containeranalysis_v1.yaml new file mode 100644 index 000000000..c59b10186 --- /dev/null +++ b/google/devtools/containeranalysis/containeranalysis_v1.yaml @@ -0,0 +1,27 @@ +type: google.api.Service +config_version: 3 +name: containeranalysis.googleapis.com +title: Container Analysis API + +apis: +- name: google.devtools.containeranalysis.v1.ContainerAnalysis + +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.v1.ContainerAnalysis.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.devtools.containeranalysis.v1.ContainerAnalysis.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml b/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml new file mode 100644 index 000000000..2bc16a989 --- /dev/null +++ b/google/devtools/containeranalysis/containeranalysis_v1beta1.yaml @@ -0,0 +1,68 @@ +type: google.api.Service +config_version: 3 +name: containeranalysis.googleapis.com +title: Container Analysis API + +apis: +- name: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1 +- name: grafeas.v1beta1.GrafeasV1Beta1 + +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.SetIamPolicy + deadline: 30.0 + - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetIamPolicy + deadline: 30.0 + - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.TestIamPermissions + deadline: 30.0 + - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetScanConfig + deadline: 30.0 + - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.ListScanConfigs + deadline: 30.0 + - selector: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.UpdateScanConfig + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.GetOccurrence + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.ListOccurrences + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.DeleteOccurrence + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.CreateOccurrence + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.BatchCreateOccurrences + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.UpdateOccurrence + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.GetOccurrenceNote + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.GetNote + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.ListNotes + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.DeleteNote + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.CreateNote + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.BatchCreateNotes + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.UpdateNote + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.ListNoteOccurrences + deadline: 30.0 + - selector: grafeas.v1beta1.GrafeasV1Beta1.GetVulnerabilityOccurrencesSummary + deadline: 30.0 + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/devtools/containeranalysis/v1/containeranalysis.proto b/google/devtools/containeranalysis/v1/containeranalysis.proto new file mode 100644 index 000000000..0a54ccc6e --- /dev/null +++ b/google/devtools/containeranalysis/v1/containeranalysis.proto @@ -0,0 +1,101 @@ +// 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.containeranalysis.v1; + +import "google/api/annotations.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis"; +option java_multiple_files = true; +option java_package = "com.google.containeranalysis.v1"; +option objc_class_prefix = "GCA"; +option ruby_package = "Google::Cloud::ContainerAnalysis::V1"; + +// Retrieves analysis results of Cloud components such as Docker container +// images. The Container Analysis API is an implementation of the +// [Grafeas](https://grafeas.io) API. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service ContainerAnalysis { + // 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. + // + // 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) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/notes/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{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. + // + // 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) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/notes/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/occurrences/*}:getIamPolicy" + body: "*" + } + }; + } + + // Returns the permissions that a caller has on the specified note or + // occurrence. Requires list permission on the project (for example, + // `containeranalysis.notes.list`). + // + // 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) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/notes/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/occurrences/*}:testIamPermissions" + body: "*" + } + }; + } +} diff --git a/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1/containeranalysis_gapic.yaml new file mode 100644 index 000000000..bed399c30 --- /dev/null +++ b/google/devtools/containeranalysis/v1/containeranalysis_gapic.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/v1alpha1/bill_of_materials.proto b/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto index cd4ca50ca..0cd60f053 100644 --- a/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto +++ b/google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto @@ -24,7 +24,6 @@ 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. @@ -100,6 +99,4 @@ message PackageManager { // X64 architecture X64 = 2; } - - } diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto b/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto index def49b4d2..c94aed7c8 100644 --- a/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto +++ b/google/devtools/containeranalysis/v1alpha1/containeranalysis.proto @@ -35,7 +35,6 @@ 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. @@ -57,7 +56,8 @@ service ContainerAnalysis { } // Lists active `Occurrences` for a given project matching the filters. - rpc ListOccurrences(ListOccurrencesRequest) returns (ListOccurrencesResponse) { + rpc ListOccurrences(ListOccurrencesRequest) + returns (ListOccurrencesResponse) { option (google.api.http) = { get: "/v1alpha1/{parent=projects/*}/occurrences" }; @@ -65,7 +65,8 @@ service ContainerAnalysis { // 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) { + rpc DeleteOccurrence(DeleteOccurrenceRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1alpha1/{name=projects/*/occurrences/*}" }; @@ -135,14 +136,16 @@ service ContainerAnalysis { // 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) { + 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) { + rpc GetVulnzOccurrencesSummary(GetVulnzOccurrencesSummaryRequest) + returns (GetVulnzOccurrencesSummaryResponse) { option (google.api.http) = { get: "/v1alpha1/{parent=projects/*}/occurrences:vulnerabilitySummary" }; @@ -160,7 +163,8 @@ service ContainerAnalysis { // 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) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1alpha1/{resource=projects/*/notes/*}:setIamPolicy" body: "*" @@ -182,7 +186,8 @@ service ContainerAnalysis { // 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) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1alpha1/{resource=projects/*/notes/*}:getIamPolicy" body: "*" @@ -201,7 +206,8 @@ service ContainerAnalysis { // 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) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1alpha1/{resource=projects/*/notes/*}:testIamPermissions" body: "*" @@ -213,7 +219,8 @@ service ContainerAnalysis { } // Creates a new `Operation`. - rpc CreateOperation(CreateOperationRequest) returns (google.longrunning.Operation) { + rpc CreateOperation(CreateOperationRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha1/{parent=projects/*}/operations" body: "*" @@ -223,7 +230,8 @@ service ContainerAnalysis { // 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) { + rpc UpdateOperation(UpdateOperationRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1alpha1/{name=projects/*/operations/*}" body: "*" @@ -238,7 +246,8 @@ service ContainerAnalysis { } // Lists scan configurations for a project. - rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) { + rpc ListScanConfigs(ListScanConfigsRequest) + returns (ListScanConfigsResponse) { option (google.api.http) = { get: "/v1alpha1/{parent=projects/*}/scan_configs" }; @@ -539,8 +548,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 diff --git a/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml index 6a3ad89f5..30c5abc92 100644 --- a/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml +++ b/google/devtools/containeranalysis/v1alpha1/containeranalysis_gapic.yaml @@ -16,15 +16,9 @@ language_settings: package_name: Google\Cloud\Devtools\Containeranalysis\V1alpha1 nodejs: package_name: containeranalysis.v1alpha1 -# 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. +# The fully qualified name of the API interface. - name: google.devtools.containeranalysis.v1alpha1.ContainerAnalysis # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -77,9 +71,7 @@ interfaces: # message. # required_fields - Fields that are always required for a request to be # valid. - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate - # this method. + # # 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. @@ -122,7 +114,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -135,7 +126,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -155,7 +145,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -170,7 +159,6 @@ interfaces: required_fields: - parent - occurrence - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -185,7 +173,6 @@ interfaces: required_fields: - name - occurrence - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -198,7 +185,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -211,7 +197,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -224,7 +209,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -244,7 +228,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -261,7 +244,6 @@ interfaces: - parent - note_id - note - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -276,7 +258,6 @@ interfaces: required_fields: - name - note - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -289,7 +270,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -309,7 +289,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -324,7 +303,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -337,7 +315,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -352,7 +329,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/devtools/containeranalysis/v1alpha1/image_basis.proto b/google/devtools/containeranalysis/v1alpha1/image_basis.proto index e8cfe1f87..f97296969 100644 --- a/google/devtools/containeranalysis/v1alpha1/image_basis.proto +++ b/google/devtools/containeranalysis/v1alpha1/image_basis.proto @@ -23,7 +23,6 @@ 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 { @@ -145,6 +144,4 @@ message DockerImage { // occurrence. string base_resource_url = 4; } - - } diff --git a/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto b/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto index 46000359a..e56dd6c38 100644 --- a/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto +++ b/google/devtools/containeranalysis/v1alpha1/package_vulnerability.proto @@ -23,7 +23,6 @@ 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. diff --git a/google/devtools/containeranalysis/v1alpha1/provenance.proto b/google/devtools/containeranalysis/v1alpha1/provenance.proto index 969d70f7f..ce2b53202 100644 --- a/google/devtools/containeranalysis/v1alpha1/provenance.proto +++ b/google/devtools/containeranalysis/v1alpha1/provenance.proto @@ -25,7 +25,6 @@ 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 { diff --git a/google/devtools/containeranalysis/v1alpha1/source_context.proto b/google/devtools/containeranalysis/v1alpha1/source_context.proto index 949ac8149..e9d16643d 100644 --- a/google/devtools/containeranalysis/v1alpha1/source_context.proto +++ b/google/devtools/containeranalysis/v1alpha1/source_context.proto @@ -23,7 +23,6 @@ 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 { diff --git a/google/devtools/containeranalysis/v1beta1/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/BUILD.bazel new file mode 100644 index 000000000..b5133a10f --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/BUILD.bazel @@ -0,0 +1,233 @@ +# 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_SUBPACKAGE_DEPS = [ + "//google/devtools/containeranalysis/v1beta1/attestation:attestation_proto", + "//google/devtools/containeranalysis/v1beta1/build:build_proto", + "//google/devtools/containeranalysis/v1beta1/common:common_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_proto", + "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto", + "//google/devtools/containeranalysis/v1beta1/source:source_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_proto", +] + +proto_library( + name = "containeranalysis_proto", + srcs = [ + "containeranalysis.proto", + ], + deps = [ + "//google/api:annotations_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", + ] + _PROTO_SUBPACKAGE_DEPS, +) + +"//google/devtools/containeranalysis/v1beta1/attestation:_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", + "@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", + "//google/devtools/containeranalysis/v1beta1/common:common_java_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_java_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_java_proto", + "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_java_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_java_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_java_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_java_proto", + "//google/devtools/containeranalysis/v1beta1/source:source_java_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_java_proto", +] + +_JAVA_GRPC_SUBPACKAGE_DEPS = [ + "//google/devtools/containeranalysis/v1beta1/attestation:attestation_java_grpc", + "//google/devtools/containeranalysis/v1beta1/build:build_java_grpc", + "//google/devtools/containeranalysis/v1beta1/common:common_java_grpc", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_java_grpc", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_java_grpc", + "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_java_grpc", + "//google/devtools/containeranalysis/v1beta1/image:image_java_grpc", + "//google/devtools/containeranalysis/v1beta1/package:package_java_grpc", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_java_grpc", + "//google/devtools/containeranalysis/v1beta1/source:source_java_grpc", + "//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"], +) + +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"], +) + +java_gapic_library( + name = "containeranalysis_java_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1beta1.yaml", + test_deps = [ + ":containeranalysis_java_grpc", + ] + _JAVA_GRPC_SUBPACKAGE_DEPS, + deps = [ + ":containeranalysis_java_proto", + ":containeranalysis_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS + _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", +]] + +# Opensource 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 = [ + ":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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "containeranalysis_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1", + protos = [":containeranalysis_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_library( + name = "containeranalysis_go_gapic", + src = ":containeranalysis_proto_with_info", + gapic_yaml = "containeranalysis_gapic.yaml", + importpath = "cloud.google.com/go/containeranalysis/apiv1beta1", + service_yaml = "//google/devtools/containeranalysis:containeranalysis_v1beta1.yaml", + deps = [ + ":containeranalysis_go_proto", + "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto", + "//google/devtools/containeranalysis/v1beta1/build:build_go_proto", + "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto", + "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_go_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_go_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_go_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto", + "//google/devtools/containeranalysis/v1beta1/source:source_go_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_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/apiv1beta1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-containeranalysis-v1-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", + "//google/devtools/containeranalysis/v1beta1/build:build_go_proto", + "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto", + "//google/devtools/containeranalysis/v1beta1/grafeas:grafeas_go_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_go_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_go_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto", + "//google/devtools/containeranalysis/v1beta1/source:source_go_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_go_proto", + ], +) diff --git a/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel new file mode 100644 index 000000000..05e1086f5 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/attestation/BUILD.bazel @@ -0,0 +1,60 @@ +# 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 = "attestation_proto", + srcs = [ + "attestation.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "attestation_proto_with_info", + deps = [":attestation_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "attestation_java_proto", + deps = [":attestation_proto"], +) + +java_grpc_library( + name = "attestation_java_grpc", + srcs = [":attestation_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "attestation_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation", + protos = [":attestation_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto new file mode 100644 index 000000000..e60b6e91a --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto @@ -0,0 +1,132 @@ +// 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.attestation; + +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"; +option objc_class_prefix = "GRA"; + +// 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 { + // 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. + 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; + } + + // 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 hexidecimal 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 `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 +// 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 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 + // 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 + // verify. + message Hint { + // The human readable name of this Attestation Authority, for example "qa". + string human_readable_name = 1; + } + + // Hint hints at the purpose of the attestation authority. + Hint hint = 1; +} + +// Details of an attestation occurrence. +message Details { + // 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 +// 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 +// 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 { + // A PGP signed attestation. + PgpSignedAttestation pgp_signed_attestation = 1; + } +} diff --git a/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel new file mode 100644 index 000000000..fda8cda8b --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/build/BUILD.bazel @@ -0,0 +1,63 @@ +# 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 = "build_proto", + srcs = [ + "build.proto", + ], + deps = [ + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto", + ], +) + +proto_library_with_info( + name = "build_proto_with_info", + deps = [":build_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_resource_name_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_resource_name_proto_library( + name = "build_resource_name_java_proto", + gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", + deps = [":build_proto"], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "build_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/build", + protos = [":build_proto"], + deps = [ + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto", + ], +) diff --git a/google/devtools/containeranalysis/v1beta1/build/build.proto b/google/devtools/containeranalysis/v1beta1/build/build.proto new file mode 100644 index 000000000..32b357f00 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/build/build.proto @@ -0,0 +1,96 @@ +// 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.build; + +import "google/devtools/containeranalysis/v1beta1/provenance/provenance.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/build;build"; +option java_multiple_files = true; +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. +message Build { + // 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 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 Container Builder based signatures, this is a PEM encoded public + // key. To verify the Cloud Container Builder 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`. 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 + // 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 + 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; + } + + // The type of the key, either stored in `public_key` or referenced in + // `key_id` + KeyType key_type = 4; +} + +// Details of a build occurrence. +message Details { + // 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 + // 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; +} diff --git a/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel new file mode 100644 index 000000000..55758bb99 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/common/BUILD.bazel @@ -0,0 +1,60 @@ +# 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 = "common_proto", + srcs = [ + "common.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "common_proto_with_info", + deps = [":common_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "common_java_proto", + deps = [":common_proto"], +) + +java_grpc_library( + name = "common_java_grpc", + srcs = [":common_proto"], + 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 +############################################################################## +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/devtools/containeranalysis/v1beta1/common", + protos = [":common_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/common/common.proto b/google/devtools/containeranalysis/v1beta1/common/common.proto new file mode 100644 index 000000000..a8a2ddad2 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/common/common.proto @@ -0,0 +1,50 @@ +// 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; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/common;common"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.common"; +option objc_class_prefix = "GRA"; + +// Kind represents the kinds of notes supported. +enum NoteKind { + // Unknown. + NOTE_KIND_UNSPECIFIED = 0; + // The note and occurrence represent a package vulnerability. + VULNERABILITY = 1; + // The note and occurrence assert build provenance. + BUILD = 2; + // This represents an image basis relationship. + IMAGE = 3; + // This represents a package installed via a package manager. + PACKAGE = 4; + // The note and occurrence track deployment events. + DEPLOYMENT = 5; + // The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6; + // This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7; +} + +// Metadata for any related URL information. +message RelatedUrl { + // Specific URL associated with the resource. + string url = 1; + // Label to describe usage of the URL. + string label = 2; +} diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis.proto b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto new file mode 100644 index 000000000..b15153384 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/containeranalysis.proto @@ -0,0 +1,190 @@ +// 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.devtools.containeranalysis.v1beta1; + +import "google/api/annotations.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1;containeranalysis"; +option java_multiple_files = true; +option java_package = "com.google.containeranalysis.v1beta1"; +option objc_class_prefix = "GCA"; + +// Retrieves analysis results of Cloud components such as Docker container +// images. The Container Analysis API is an implementation of the +// [Grafeas](grafeas.io) API. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service ContainerAnalysisV1Beta1 { + // 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. + // + // 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) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/notes/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{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. + // + // 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) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/notes/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/occurrences/*}:getIamPolicy" + body: "*" + } + }; + } + + // Returns the permissions that a caller has on the specified note or + // occurrence. Requires list permission on the project (for example, + // `containeranalysis.notes.list`). + // + // 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) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/notes/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/occurrences/*}:testIamPermissions" + body: "*" + } + }; + } + + // Gets the specified scan configuration. + rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/scanConfigs/*}" + }; + } + + // Lists scan configurations for the specified project. + rpc ListScanConfigs(ListScanConfigsRequest) + returns (ListScanConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/scanConfigs" + }; + } + + // Updates the specified scan configuration. + rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) { + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/scanConfigs/*}" + body: "scan_config" + }; + } +} + +// A scan configuration specifies whether Cloud components in a project have a +// particular type of analysis being run. For example, it can configure whether +// vulnerability scanning is being done on Docker images or not. +message ScanConfig { + // Output only. The name of the scan configuration in the form of + // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + string name = 1; + + // Output only. A human-readable description of what the scan configuration + // does. + string description = 2; + + // Whether the scan is enabled. + bool enabled = 3; + + // Output only. The time this scan config was created. + google.protobuf.Timestamp create_time = 4; + + // Output only. The time this scan config was last updated. + google.protobuf.Timestamp update_time = 5; +} + +// Request to get a scan configuration. +message GetScanConfigRequest { + // The name of the scan configuration in the form of + // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + string name = 1; +} + +// Request to list scan configurations. +message ListScanConfigsRequest { + // The name of the project to list scan configurations for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1; + + // The filter expression. + string filter = 2; + + // The number of scan configs 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 for listing scan configurations. +message ListScanConfigsResponse { + // The scan configurations requested. + repeated ScanConfig scan_configs = 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; +} + +// A request to update a scan configuration. +message UpdateScanConfigRequest { + // 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; +} diff --git a/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml b/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml new file mode 100644 index 000000000..8008564e7 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/containeranalysis_gapic.yaml @@ -0,0 +1,597 @@ +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.v1beta1 + python: + package_name: google.cloud.devtools.containeranalysis_v1beta1.gapic + go: + package_name: cloud.google.com/go/containeranalysis/apiv1beta1 + release_level: BETA + csharp: + package_name: Google.Devtools.Containeranalysis.V1beta1 + ruby: + package_name: Google::Cloud::Devtools::Containeranalysis::V1beta1 + php: + package_name: Google\Cloud\Devtools\Containeranalysis\V1beta1 + nodejs: + package_name: containeranalysis.v1beta1 + 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 +- name_pattern: projects/{project}/scanConfigs/{scan_config} + entity_name: scan_config +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.v1beta1.ContainerAnalysisV1Beta1 + # 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 + - name: GetScanConfig + flattening: + groups: + - parameters: + - name + required_fields: + - name + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 30000 + - name: ListScanConfigs + 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: scan_configs + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 + - name: UpdateScanConfig + flattening: + groups: + - parameters: + - name + - scan_config + required_fields: + - name + - scan_config + resource_name_treatment: STATIC_TYPES + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: scan_config + timeout_millis: 30000 +# The fully qualified name of the API interface. +- name: grafeas.v1beta1.GrafeasV1Beta1 + # 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 + - name: GetVulnerabilityOccurrencesSummary + flattening: + groups: + - parameters: + - parent + - filter + required_fields: + - parent + resource_name_treatment: STATIC_TYPES + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: project + timeout_millis: 30000 +resource_name_generation: +- message_name: google.iam.v1.SetIamPolicyRequest + field_entity_map: + resource: iam_resource_oneof +- message_name: google.iam.v1.GetIamPolicyRequest + field_entity_map: + resource: iam_resource_oneof +- message_name: google.iam.v1.TestIamPermissionsRequest + field_entity_map: + resource: iam_resource_oneof +- message_name: ScanConfig + 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: UpdateScanConfigRequest + field_entity_map: + name: scan_config +- message_name: grafeas.v1beta1.Occurrence + field_entity_map: + name: occurrence +- message_name: grafeas.v1beta1.GetOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1beta1.ListOccurrencesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.DeleteOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1beta1.CreateOccurrenceRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.UpdateOccurrenceRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1beta1.BatchCreateOccurrencesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.Note + field_entity_map: + name: note +- message_name: grafeas.v1beta1.GetNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1beta1.ListNotesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.DeleteNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1beta1.CreateNoteRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.UpdateNoteRequest + field_entity_map: + name: note +- message_name: grafeas.v1beta1.BatchCreateNotesRequest + field_entity_map: + parent: project +- message_name: grafeas.v1beta1.GetOccurrenceNoteRequest + field_entity_map: + name: occurrence +- message_name: grafeas.v1beta1.ListNoteOccurrencesRequest + field_entity_map: + name: note +- message_name: grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest + field_entity_map: + parent: project diff --git a/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel new file mode 100644 index 000000000..670c8c763 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/deployment/BUILD.bazel @@ -0,0 +1,61 @@ +# 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 = "deployment_proto", + srcs = [ + "deployment.proto", + ], + deps = [ + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "deployment_proto_with_info", + deps = [":deployment_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "deployment_java_proto", + deps = [":deployment_proto"], +) + +java_grpc_library( + name = "deployment_java_grpc", + srcs = [":deployment_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "deployment_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/deployment", + protos = [":deployment_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto new file mode 100644 index 000000000..96a81aeb3 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto @@ -0,0 +1,74 @@ +// 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.deployment; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/deployment;deployment"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.deployment"; +option objc_class_prefix = "GRA"; + +// An artifact that can be deployed in some runtime. +message Deployable { + // Resource URI for the artifact being deployed. + repeated string resource_uri = 1; +} + +// Details of a deployment occurrence. +message Details { + // Deployment history for the resource. + Deployment deployment = 1; +} + +// The period during which some deployable was active in a runtime. +message Deployment { + // 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 = 4; + + // 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; + + // 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; + } + // Platform hosting this deployment. + Platform platform = 7; + + // next_id = 8; +} diff --git a/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel new file mode 100644 index 000000000..dfe0bae7c --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/discovery/BUILD.bazel @@ -0,0 +1,66 @@ +# 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 = "discovery_proto", + srcs = [ + "discovery.proto", + ], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "discovery_proto_with_info", + deps = [":discovery_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "discovery_java_proto", + deps = [":discovery_proto"], +) + +java_grpc_library( + name = "discovery_java_grpc", + srcs = [":discovery_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "discovery_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/discovery", + protos = [":discovery_proto"], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + "//google/rpc:status_go_proto", + ], +) diff --git a/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto b/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto new file mode 100644 index 000000000..4ed5aeba6 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/discovery/discovery.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.discovery; + +import "google/devtools/containeranalysis/v1beta1/common/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/discovery;discovery"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.discovery"; +option objc_class_prefix = "GRA"; + +// 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. +message Discovery { + // 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. + Discovered discovered = 1; +} + +// Provides information about the analysis status of a discovered resource. +message Discovered { + // Whether the resource is continuously analyzed. + enum ContinuousAnalysis { + // Unknown. + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + // The resource is continuously analyzed. + ACTIVE = 1; + // The resource is ignored for continuous analysis. + INACTIVE = 2; + } + + // Whether the resource is continuously analyzed. + ContinuousAnalysis continuous_analysis = 1; + + // The last time continuous analysis was done for this resource. + google.protobuf.Timestamp last_analysis_time = 2; + + // Analysis status for a resource. Currently for initial analysis only (not + // updated in continuous analysis). + 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; + // The resource is known not to be supported + FINISHED_UNSUPPORTED = 5; + } + + // The status of discovery for the resource. + AnalysisStatus analysis_status = 3; + + // When an error is encountered this will contain a LocalizedMessage under + // details to show to the user. The LocalizedMessage is output only and + // populated by the API. + google.rpc.Status analysis_status_error = 4; +} diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel new file mode 100644 index 000000000..41e0d234f --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/grafeas/BUILD.bazel @@ -0,0 +1,86 @@ +# 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 = "grafeas_proto", + srcs = [ + "grafeas.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/devtools/containeranalysis/v1beta1/attestation:attestation_proto", + "//google/devtools/containeranalysis/v1beta1/build:build_proto", + "//google/devtools/containeranalysis/v1beta1/common:common_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_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"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_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_resource_name_proto_library( + name = "grafeas_resource_name_java_proto", + gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml", + deps = [":grafeas_proto"], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "grafeas_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas", + protos = [":grafeas_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/devtools/containeranalysis/v1beta1/attestation:attestation_go_proto", + "//google/devtools/containeranalysis/v1beta1/build:build_go_proto", + "//google/devtools/containeranalysis/v1beta1/common:common_go_proto", + "//google/devtools/containeranalysis/v1beta1/deployment:deployment_go_proto", + "//google/devtools/containeranalysis/v1beta1/discovery:discovery_go_proto", + "//google/devtools/containeranalysis/v1beta1/image:image_go_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_go_proto", + "//google/devtools/containeranalysis/v1beta1/provenance:provenance_go_proto", + "//google/devtools/containeranalysis/v1beta1/vulnerability:vulnerability_go_proto", + ], +) diff --git a/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto new file mode 100644 index 000000000..9c2ac8b0b --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto @@ -0,0 +1,502 @@ +// 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; + +import "google/api/annotations.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"; +import "google/devtools/containeranalysis/v1beta1/deployment/deployment.proto"; +import "google/devtools/containeranalysis/v1beta1/discovery/discovery.proto"; +import "google/devtools/containeranalysis/v1beta1/image/image.proto"; +import "google/devtools/containeranalysis/v1beta1/package/package.proto"; +import "google/devtools/containeranalysis/v1beta1/provenance/provenance.proto"; +import "google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.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/containeranalysis/v1beta1/grafeas;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1"; +option objc_class_prefix = "GRA"; + +// [Grafeas](grafeas.io) API. +// +// Retrieves analysis results of Cloud components such as Docker container +// images. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service GrafeasV1Beta1 { + // Gets the specified occurrence. + rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/occurrences/*}" + }; + } + + // Lists occurrences for the specified project. + rpc ListOccurrences(ListOccurrencesRequest) + returns (ListOccurrencesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/occurrences" + }; + } + + // Deletes the specified occurrence. For example, use this method to delete an + // occurrence when the occurrence is no longer applicable for the given + // resource. + rpc DeleteOccurrence(DeleteOccurrenceRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/occurrences/*}" + }; + } + + // Creates a new occurrence. + rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/occurrences" + body: "occurrence" + }; + } + + // Creates new occurrences in batch. + rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) + returns (BatchCreateOccurrencesResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/occurrences:batchCreate" + body: "*" + }; + } + + // Updates the specified occurrence. + rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/occurrences/*}" + body: "occurrence" + }; + } + + // Gets the note attached to the specified occurrence. Consumer projects can + // use this method to get a note that belongs to a provider project. + rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/occurrences/*}/notes" + }; + } + + // Gets the specified note. + rpc GetNote(GetNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/notes/*}" + }; + } + + // Lists notes for the specified project. + rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/notes" + }; + } + + // Deletes the specified note. + rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/notes/*}" + }; + } + + // Creates a new note. + rpc CreateNote(CreateNoteRequest) returns (Note) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/notes" + body: "note" + }; + } + + // Creates new notes in batch. + rpc BatchCreateNotes(BatchCreateNotesRequest) + returns (BatchCreateNotesResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/notes:batchCreate" + body: "*" + }; + } + + // Updates the specified note. + rpc UpdateNote(UpdateNoteRequest) returns (Note) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/notes/*}" + body: "note" + }; + } + + // Lists occurrences referencing the specified note. Provider projects can use + // this method to get all occurrences across consumer projects referencing the + // specified note. + rpc ListNoteOccurrences(ListNoteOccurrencesRequest) + returns (ListNoteOccurrencesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/notes/*}/occurrences" + }; + } + + // Gets a summary of the number and severity of occurrences. + rpc GetVulnerabilityOccurrencesSummary( + GetVulnerabilityOccurrencesSummaryRequest) + returns (VulnerabilityOccurrencesSummary) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary" + }; + } +} + +// An instance of an analysis type that has been found on a resource. +message Occurrence { + // Output only. The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; + + // Required. Immutable. The resource for which the occurrence applies. + 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. + 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. + grafeas.v1beta1.NoteKind kind = 4; + + // 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 = 6; + + // Output only. The time this occurrence was last updated. + google.protobuf.Timestamp update_time = 7; + + // Required. Immutable. Describes the details of the note kind found on this + // resource. + oneof details { + // Describes a security vulnerability. + grafeas.v1beta1.vulnerability.Details vulnerability = 8; + // Describes a verifiable build. + grafeas.v1beta1.build.Details build = 9; + // Describes how this resource derives from the basis in the associated + // note. + grafeas.v1beta1.image.Details derived_image = 10; + // Describes the installation of a package on the linked resource. + grafeas.v1beta1.package.Details installation = 11; + // Describes the deployment of an artifact on a runtime. + grafeas.v1beta1.deployment.Details deployment = 12; + // Describes when a resource was discovered. + grafeas.v1beta1.discovery.Details discovered = 13; + // Describes an attestation of an artifact. + grafeas.v1beta1.attestation.Details attestation = 14; + } + + // next_id = 15; +} + +// An entity that can have metadata. For example, a Docker image. +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, + // `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. + grafeas.v1beta1.provenance.Hash content_hash = 3; + + // next_id = 4; +} + +// A type of analysis that can be done for a resource. +message Note { + // Output only. The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + + // A one sentence description of this note. + string short_description = 2; + + // A detailed description of this note. + string long_description = 3; + + // Output only. The type of analysis. This field can be used as a filter in + // list requests. + grafeas.v1beta1.NoteKind kind = 4; + + // URLs associated with this note. + repeated grafeas.v1beta1.RelatedUrl related_url = 5; + + // Time of expiration for this note. Empty if note does not expire. + google.protobuf.Timestamp expiration_time = 6; + + // Output only. The time this note was created. This field can be used as a + // filter in list requests. + google.protobuf.Timestamp create_time = 7; + + // 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 = 8; + + // Other notes related to this note. + repeated string related_note_names = 9; + + // Required. Immutable. The type of analysis this note represents. + oneof type { + // A note describing a package vulnerability. + grafeas.v1beta1.vulnerability.Vulnerability vulnerability = 10; + // A note describing build provenance for a verifiable build. + grafeas.v1beta1.build.Build build = 11; + // A note describing a base image. + grafeas.v1beta1.image.Basis base_image = 12; + // A note describing a package hosted by various package managers. + grafeas.v1beta1.package.Package package = 13; + // A note describing something that can be deployed. + grafeas.v1beta1.deployment.Deployable deployable = 14; + // A note describing the initial analysis of a resource. + grafeas.v1beta1.discovery.Discovery discovery = 15; + // A note describing an attestation role. + grafeas.v1beta1.attestation.Authority attestation_authority = 16; + } + + // next_id = 17; +} + +// Request to get an occurrence. +message GetOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; +} + +// 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; + + // 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; + + // next_id = 7; +} + +// Response for listing 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 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; + // The occurrence to create. + Occurrence occurrence = 2; +} + +// 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; + // 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 + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; +} + +// 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; +} + +// 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; + // 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 for listing notes. +message ListNotesResponse { + // The notes 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 + // results. + string next_page_token = 2; +} + +// Request to delete a note. +message DeleteNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; +} + +// 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; + // The ID to use for this note. + string note_id = 2; + // The note to create. + Note note = 3; +} + +// 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; + // The updated note. + Note note = 2; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to list occurrences for a note. +message ListNoteOccurrencesRequest { + // The name of the note to list occurrences for in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + // 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; +} + +// Response for listing occurrences for a note. +message ListNoteOccurrencesResponse { + // The occurrences attached to the specified note. + repeated Occurrence occurrences = 1; + // Token to provide to skip to a particular spot in the list. + string next_page_token = 2; +} + +// Request to create notes in batch. +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; + + // The notes to create. + map notes = 2; +} + +// Response for creating notes in batch. +message BatchCreateNotesResponse { + // The notes that were created. + repeated Note notes = 1; +} + +// Request to create occurrences in batch. +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; + // The occurrences to create. + repeated Occurrence occurrences = 2; +} + +// Response for creating occurrences in batch. +message BatchCreateOccurrencesResponse { + // The occurrences that were created. + repeated Occurrence occurrences = 1; +} + +// Request to get a vulnerability summary for some set of occurrences. +message GetVulnerabilityOccurrencesSummaryRequest { + // The name of the project to get a vulnerability summary for in the form of + // `projects/[PROJECT_ID]`. + string parent = 1; + // The filter expression. + string filter = 2; +} + +// A summary of how many vulnerability occurrences there are per resource and +// severity type. +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. + message FixableTotalByDigest { + // The affected resource. + Resource resource = 1; + // The severity for this count. SEVERITY_UNSPECIFIED indicates total across + // all severities. + grafeas.v1beta1.vulnerability.Severity severity = 2; + // The number of fixable vulnerabilities associated with this resource. + int64 fixable_count = 3; + // The total number of vulnerabilities associated with this resource. + int64 total_count = 4; + } +} diff --git a/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel new file mode 100644 index 000000000..99737d9dd --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/image/BUILD.bazel @@ -0,0 +1,59 @@ +# 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 = "image_proto", + srcs = [ + "image.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "image_proto_with_info", + deps = [":image_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "image_java_proto", + deps = [":image_proto"], +) + +java_grpc_library( + name = "image_java_grpc", + srcs = [":image_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "image_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/image", + protos = [":image_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/image/image.proto b/google/devtools/containeranalysis/v1beta1/image/image.proto new file mode 100644 index 000000000..01f5305a5 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/image/image.proto @@ -0,0 +1,144 @@ +// 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.image; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/image;image"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.image"; +option objc_class_prefix = "GRA"; + +// 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. + 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. + 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; +} + +// Details of an image occurrence. +message Details { + // The child image derived from the base image. + Derived derived_image = 1; +} + +// 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. + int32 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/v1beta1/package/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel new file mode 100644 index 000000000..e3e3e0013 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/package/BUILD.bazel @@ -0,0 +1,60 @@ +# 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 = "package_proto", + srcs = [ + "package.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "package_proto_with_info", + deps = [":package_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "package_java_proto", + deps = [":package_proto"], +) + +java_grpc_library( + name = "package_java_grpc", + srcs = [":package_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "package_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/package", + protos = [":package_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/package/package.proto b/google/devtools/containeranalysis/v1beta1/package/package.proto new file mode 100644 index 000000000..07031d500 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/package/package.proto @@ -0,0 +1,127 @@ +// 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.package; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/package;package"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.pkg"; +option objc_class_prefix = "GRA"; + +// Instruction set architectures supported by various package managers. +enum Architecture { + // Unknown architecture. + ARCHITECTURE_UNSPECIFIED = 0; + // X86 architecture. + X86 = 1; + // X64 architecture. + X64 = 2; +} + +// 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. + 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 = 5; + + // The distribution channel-specific description of this package. + string description = 6; +} + +// 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. + 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; +} + +// Details of a package occurrence. +message Details { + // Where the package was installed. + Installation installation = 1; +} + +// 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; +} + +// Version contains structured information about the version of a package. +message Version { + // 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; + + // Whether this is an ordinary package version or a sentinel MIN/MAX version. + enum VersionKind { + // Unknown. + VERSION_KIND_UNSPECIFIED = 0; + // A standard package version, defined by the other fields. + NORMAL = 1; + // A special version representing negative infinity, other fields are + // ignored. + MINIMUM = 2; + // A special version representing positive infinity, other fields are + // ignored. + MAXIMUM = 3; + }; + + // Distinguish between sentinel MIN/MAX versions and normal versions. If + // kind is not NORMAL, then the other fields are ignored. + VersionKind kind = 4; +} diff --git a/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel new file mode 100644 index 000000000..a4fbdff49 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/provenance/BUILD.bazel @@ -0,0 +1,65 @@ +# 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 = "provenance_proto", + srcs = [ + "provenance.proto", + ], + deps = [ + "//google/devtools/containeranalysis/v1beta1/source:source_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "provenance_proto_with_info", + deps = [":provenance_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "provenance_java_proto", + deps = [":provenance_proto"], +) + +java_grpc_library( + name = "provenance_java_grpc", + srcs = [":provenance_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "provenance_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/provenance", + protos = [":provenance_proto"], + deps = [ + "//google/devtools/containeranalysis/v1beta1/source:source_go_proto", + ], +) diff --git a/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto new file mode 100644 index 000000000..3d3342845 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto @@ -0,0 +1,164 @@ +// 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.provenance; + +import "google/devtools/containeranalysis/v1beta1/source/source.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/provenance;provenance"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.provenance"; +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. + string id = 1; + + // ID of the project. + string project_id = 2; + + // Commands requested by the build. + repeated Command commands = 3; + + // Output of the build. + repeated Artifact built_artifacts = 4; + + // Time at which the build was created. + google.protobuf.Timestamp create_time = 5; + + // Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 6; + + // Time at which execution of the build was finished. + google.protobuf.Timestamp end_time = 7; + + // 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 = 8; + + // URI where any logs for this provenance were written. + string logs_uri = 9; + + // Details of the Source input to the build. + Source source_provenance = 10; + + // Trigger identifier if the build was triggered automatically; empty if not. + string trigger_id = 11; + + // Special options applied to this build. This is a catch-all field where + // build providers can enter any desired additional details. + map build_options = 12; + + // Version string of the builder at the time this build was executed. + string builder_version = 13; + + // next_id = 14 +} + +// Source describes the location of the source used for the build. +message Source { + // If provided, the input binary artifacts for the build came from this + // location. + string artifact_storage_source_uri = 1; + + // 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 = 2; + + // If provided, the source code used for the build came from this location. + grafeas.v1beta1.source.SourceContext context = 3; + + // 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 grafeas.v1beta1.source.SourceContext additional_contexts = 4; +} + +// 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 { + // Unknown. + HASH_TYPE_UNSPECIFIED = 0; + // A SHA-256 hash. + SHA256 = 1; + } + + // The type of hash that was performed. + HashType type = 1; + // 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`. + 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 { + // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + // container. + string checksum = 1; + + // Artifact ID, if any; for container images, this will be a URL by digest + // like `gcr.io/projectID/imagename@sha256:123456`. + string id = 2; + + // 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 = 3; +} diff --git a/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel new file mode 100644 index 000000000..3e0b9c554 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/source/BUILD.bazel @@ -0,0 +1,60 @@ +# 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 = "source_proto", + srcs = [ + "source.proto", + ], + deps = [], +) + +proto_library_with_info( + name = "source_proto_with_info", + deps = [":source_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "source_java_proto", + deps = [":source_proto"], +) + +java_grpc_library( + name = "source_java_grpc", + srcs = [":source_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "source_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/source", + protos = [":source_proto"], + deps = [], +) diff --git a/google/devtools/containeranalysis/v1beta1/source/source.proto b/google/devtools/containeranalysis/v1beta1/source/source.proto new file mode 100644 index 000000000..01be060c5 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/source/source.proto @@ -0,0 +1,134 @@ +// 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.source; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/source;source"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.source"; +option objc_class_prefix = "GRA"; + +// 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; + + // 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/vulnerability/BUILD.bazel b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel new file mode 100644 index 000000000..dcb12c536 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/vulnerability/BUILD.bazel @@ -0,0 +1,66 @@ +# 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 = "vulnerability_proto", + srcs = [ + "vulnerability.proto", + ], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_proto", + "//google/devtools/containeranalysis/v1beta1/package:package_proto", + ], +) + +proto_library_with_info( + name = "vulnerability_proto_with_info", + deps = [":vulnerability_proto"], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "vulnerability_java_proto", + deps = [":vulnerability_proto"], +) + +java_grpc_library( + name = "vulnerability_java_grpc", + srcs = [":vulnerability_proto"], + 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 +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "vulnerability_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability", + protos = [":vulnerability_proto"], + deps = [ + "//google/devtools/containeranalysis/v1beta1/common:common_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 new file mode 100644 index 000000000..aef35c4e2 --- /dev/null +++ b/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto @@ -0,0 +1,145 @@ +// 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; + +import "google/devtools/containeranalysis/v1beta1/common/common.proto"; +import "google/devtools/containeranalysis/v1beta1/package/package.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability;vulnerability"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1beta1.vulnerability"; +option objc_class_prefix = "GRA"; + +// Note provider-assigned severity/impact ranking. +enum Severity { + // Unknown. + SEVERITY_UNSPECIFIED = 0; + // Minimal severity. + MINIMAL = 1; + // Low severity. + LOW = 2; + // Medium severity. + MEDIUM = 3; + // High severity. + HIGH = 4; + // Critical severity. + CRITICAL = 5; +} + +// Vulnerability provides metadata about a security vulnerability. +message Vulnerability { + // The CVSS score for this vulnerability. + float cvss_score = 1; + + // Note provider assigned impact of the vulnerability. + Severity severity = 2; + + // 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 = 3; + + // 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. + string cpe_uri = 1; + + // The name of the package where the vulnerability was found. + string package = 2; + + // The min version of the package in which the vulnerability exists. + grafeas.v1beta1.package.Version min_affected_version = 3; + + // The max version of the package in which the vulnerability exists. + grafeas.v1beta1.package.Version max_affected_version = 4; + + // The severity (eg: distro assigned severity) for this vulnerability. + string severity_name = 5; + + // A vendor-specific description of this note. + string description = 6; + + // The fix for this specific package version. + VulnerabilityLocation fixed_location = 7; + + // The type of package; whether native or non native(ruby gems, node.js + // packages etc). + string package_type = 8; + + // Whether this detail is obsolete. Occurrences are expected not to point to + // obsolete details. + bool is_obsolete = 9; + } +} + +// Details of a vulnerability occurrence. +message Details { + // The type of package; whether native or non native(ruby gems, node.js + // packages etc) + string type = 1; + + // Output only. The note provider assigned Severity of the vulnerability. + Severity severity = 2; + + // 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 = 3; + + // 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. + string short_description = 5; + + // Output only. A detailed description of this vulnerability. + string long_description = 6; + + // Output only. URLs related to this vulnerability. + repeated grafeas.v1beta1.RelatedUrl related_urls = 7; +} + +// 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 (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/) + // format. Examples include distro or storage location for vulnerable jar. + string cpe_uri = 1; + + // The package being described. + string package = 2; + + // 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 index 1a8e02133..578040fbd 100644 --- a/google/devtools/remoteexecution/v1test/remote_execution.proto +++ b/google/devtools/remoteexecution/v1test/remote_execution.proto @@ -28,7 +28,6 @@ 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. @@ -102,7 +101,10 @@ service Execution { // `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: "*" }; + option (google.api.http) = { + post: "/v1test/{instance_name=**}/actions:execute" + body: "*" + }; } } @@ -131,7 +133,9 @@ service ActionCache { // 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}" }; + option (google.api.http) = { + get: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" + }; } // Upload a new execution result. @@ -146,7 +150,10 @@ service ActionCache { // * `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" }; + option (google.api.http) = { + put: "/v1test/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" + body: "action_result" + }; } } @@ -222,8 +229,12 @@ service ContentAddressableStorage { // 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: "*" }; + rpc FindMissingBlobs(FindMissingBlobsRequest) + returns (FindMissingBlobsResponse) { + option (google.api.http) = { + post: "/v1test/{instance_name=**}/blobs:findMissing" + body: "*" + }; } // Upload many blobs at once. @@ -245,8 +256,12 @@ service ContentAddressableStorage { // * `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: "*" }; + 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. @@ -265,7 +280,9 @@ service ContentAddressableStorage { // // * `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" }; + option (google.api.http) = { + get: "/v1test/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" + }; } } diff --git a/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml b/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml index b57616542..f7cbc10d8 100644 --- a/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml +++ b/google/devtools/remoteworkers/v1test2/artman_remoteworkers.yaml @@ -23,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-remoteworkers-v1test2 - name: go_gapic type: GAPIC language: GO diff --git a/google/devtools/remoteworkers/v1test2/bots.proto b/google/devtools/remoteworkers/v1test2/bots.proto index ad46f4cd9..fbad1bf4f 100644 --- a/google/devtools/remoteworkers/v1test2/bots.proto +++ b/google/devtools/remoteworkers/v1test2/bots.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -31,7 +31,6 @@ option java_outer_classname = "RemoteWorkersBots"; option java_package = "com.google.devtools.remoteworkers.v1test2"; option objc_class_prefix = "RW"; - // Design doc: https://goo.gl/oojM5H // // Loosely speaking, the Bots interface monitors a collection of workers (think @@ -84,7 +83,8 @@ service Bots { // 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) { + rpc PostBotEventTemp(PostBotEventTempRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1test2/{name=**/botSessions/*}:postEvent" body: "*" @@ -166,26 +166,19 @@ message BotSession { // bot shouldn't report on them any more (the server will ignore superfluous // COMPLETED records). message Lease { - // The assignment, which is typically a resource that can be accessed through - // some other services. The assignment must be meaningful to the bot based - // solely on this name, either because the bot only understands one type of - // assignment (e.g., tasks served through the Tasks interface) or through some - // implementation-defined schema. - // - // For example, if the worker is executing a Task as defined by the Tasks - // interface, this field might be projects/{projectid}/tasks/{taskid}. - // However, it the worker is being assigned pull from a *queue* of tasks, the - // resource would be the name of the queue, something like - // projects/{projectid}/locations/{locationid}/queues/{queueid}. That queue - // may then provide the bot with tasks through another interface, which the - // bot then processes through the [Tasks] - // [google.devtools.remoteworkers.v1test2.Tasks] interface. - // - // Note that the assignment may be a [full resource name] - // [https://cloud.google.com/apis/design/resource_names#full_resource_name] if - // it should be accessed through an endpoint that is not already known to the - // bot. - string assignment = 1; + // A short string uniquely identifing the lease within this bot session. + string id = 7; + + // The actual work to be performed, if any. May be omitted by the server if + // the lease is not in the `PENDING` state. The message must be meaningful to + // the bot. Output only (must only be set by the server). + google.protobuf.Any payload = 8; + + // Any result the bot wishes to provide about the lease. Must not be changed + // after the first call with the lease in the `COMPLETED` or `CANCELLED` + // state. Input only (must only be set by the bot, will not be echoed by the + // server). + google.protobuf.Any result = 9; // The state of the lease. See LeaseState for more information. LeaseState state = 2; @@ -196,7 +189,7 @@ message Lease { // asked for some resource the bot didn't have, this status will be // FAILED_PRECONDITION. But if the assignment in the lease didn't execute // correctly, this field will be `OK` while the failure of the assignment must - // be tracked elsewhere (e.g., through the Tasks interface). + // communicated via the `result` field. google.rpc.Status status = 3; // The requirements that are being claimed by this lease. This field may be @@ -208,19 +201,14 @@ message Lease { // expiry date except the first one. google.protobuf.Timestamp expire_time = 5; - // While the `assignment` field is a resource name that allows the bot to - // get the actual assignment, the server can also optionally include the - // assignment itself inline in order to save a round trip to the server. - // - // This doesn't necessarily need to be the resource pointed to by - // `assignment`. For example, if the assignment is a task, this field could - // be task.description, not the entire task, since that's all the bot needs - // to know to get started. As with `assignment` itself, all that's necessary - // is that the bot knows how to handle the type of message received here. - // - // This field may be omitted by the server if the lease is not in the - // `PENDING` state. - google.protobuf.Any inline_assignment = 6; + // DEPRECATED. The assignment should be provided to the bot via the `payload` + // field. Clients that wish to use a simple name (such as a queue of work + // provided elsewhere) should define a custom message type and encode it into + // `payload`. + string assignment = 1 [deprecated = true]; + + // DEPRECATED. Use `payload` instead. + google.protobuf.Any inline_assignment = 6 [deprecated = true]; } // AdminTemp is a prelimiary set of administration tasks. It's called "Temp" diff --git a/google/devtools/remoteworkers/v1test2/command.proto b/google/devtools/remoteworkers/v1test2/command.proto index 544ca1d49..9d5befec7 100644 --- a/google/devtools/remoteworkers/v1test2/command.proto +++ b/google/devtools/remoteworkers/v1test2/command.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -16,7 +16,9 @@ syntax = "proto3"; package google.devtools.remoteworkers.v1test2; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2"; option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers"; @@ -25,8 +27,8 @@ option java_outer_classname = "RemoteWorkersCommands"; option java_package = "com.google.devtools.remoteworkers.v1test2"; option objc_class_prefix = "RW"; - -// Describes a shell-style task to execute. +// Describes a shell-style task to execute, suitable for providing as the Bots +// interface's `Lease.payload` field. message CommandTask { // Describes the inputs to a shell-style task. message Inputs { @@ -39,7 +41,16 @@ message CommandTask { string value = 2; } - // The command itself to run (e.g., argv) + // The command itself to run (e.g., argv). + // + // This field should be passed directly to the underlying operating system, + // and so it must be sensible to that operating system. For example, on + // Windows, the first argument might be "C:\Windows\System32\ping.exe" - + // that is, using drive letters and backslashes. A command for a *nix + // system, on the other hand, would use forward slashes. + // + // All other fields in the RWAPI must consistently use forward slashes, + // since those fields may be interpretted by both the service and the bot. repeated string arguments = 1; // The input filesystem to be set up prior to the task beginning. The @@ -59,11 +70,27 @@ message CommandTask { // Describes the expected outputs of the command. message Outputs { - // A list of expected files, relative to the execution root. + // A list of expected files, relative to the execution root. All paths + // MUST be delimited by forward slashes. repeated string files = 1; - // A list of expected directories, relative to the execution root. + // A list of expected directories, relative to the execution root. All paths + // MUST be delimited by forward slashes. repeated string directories = 2; + + // The destination to which any stdout should be sent. The method by which + // the bot should send the stream contents to that destination is not + // defined in this API. As examples, the destination could be a file + // referenced in the `files` field in this message, or it could be a URI + // that must be written via the ByteStream API. + string stdout_destination = 3; + + // The destination to which any stderr should be sent. The method by which + // the bot should send the stream contents to that destination is not + // defined in this API. As examples, the destination could be a file + // referenced in the `files` field in this message, or it could be a URI + // that must be written via the ByteStream API. + string stderr_destination = 4; } // Describes the timeouts associated with this task. @@ -98,6 +125,7 @@ message CommandTask { Timeouts timeouts = 5; } +// DEPRECATED - use CommandResult instead. // Describes the actual outputs from the task. message CommandOutputs { // exit_code is only fully reliable if the status' code is OK. If the task @@ -113,6 +141,7 @@ message CommandOutputs { Digest outputs = 2; } +// DEPRECATED - use CommandResult instead. // Can be used as part of CompleteRequest.metadata, or are part of a more // sophisticated message. message CommandOverhead { @@ -126,14 +155,50 @@ message CommandOverhead { google.protobuf.Duration overhead = 2; } +// All information about the execution of a command, suitable for providing as +// the Bots interface's `Lease.result` field. +message CommandResult { + // An overall status for the command. For example, if the command timed out, + // this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for + // memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. + google.rpc.Status status = 1; + + // The exit code of the process. An exit code of "0" should only be trusted if + // `status` has a code of OK (otherwise it may simply be unset). + int32 exit_code = 2; + + // The output files. The blob referenced by the digest should contain + // one of the following (implementation-dependent): + // * A marshalled DirectoryMetadata of the returned filesystem + // * A LUCI-style .isolated file + Digest outputs = 3; + + // The elapsed time between calling Accept and Complete. The server will also + // have its own idea of what this should be, but this excludes the overhead of + // the RPCs and the bot response time. + google.protobuf.Duration duration = 4 [deprecated = true]; + + // The amount of time *not* spent executing the command (ie + // uploading/downloading files). + google.protobuf.Duration overhead = 5 [deprecated = true]; + + // Implementation-dependent statistics 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 + // 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; +} + // The metadata for a file. Similar to the equivalent message in the Remote // Execution API. message FileMetadata { // The path of this file. If this message is part of the - // CommandResult.output_files fields, the path is relative to the execution - // root and must correspond to an entry in CommandTask.outputs.files. If this + // CommandOutputs.outputs fields, the path is relative to the execution root + // and must correspond to an entry in CommandTask.outputs.files. If this // message is part of a Directory message, then the path is relative to the - // root of that directory. + // root of that directory. All paths MUST be delimited by forward slashes. string path = 1; // A pointer to the contents of the file. The method by which a client @@ -151,7 +216,8 @@ 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 @@ -159,9 +225,15 @@ message DirectoryMetadata { Digest digest = 2; } -// A reference to the contents of a file or a directory. If the latter, the has -// refers to the hash of a marshalled Directory message. Similar to the -// equivalent message in the Remote Execution API. +// The CommandTask and CommandResult messages assume the existence of a service +// that can serve blobs of content, identified by a hash and size known as a +// "digest." The method by which these blobs may be retrieved is not specified +// here, but a model implementation is in the Remote Execution API's +// "ContentAddressibleStorage" interface. +// +// In the context of the RWAPI, a Digest will virtually always refer to the +// contents of a file or a directory. The latter is represented by the +// byte-encoded Directory message. message Digest { // A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 0x2b, 0x3c]) // using an implementation-defined hash algorithm (eg SHA-256). diff --git a/google/devtools/remoteworkers/v1test2/remote_workers.yaml b/google/devtools/remoteworkers/v1test2/remote_workers.yaml index 35ea414c0..3c8494ef9 100644 --- a/google/devtools/remoteworkers/v1test2/remote_workers.yaml +++ b/google/devtools/remoteworkers/v1test2/remote_workers.yaml @@ -10,6 +10,7 @@ apis: types: - name: google.devtools.remoteworkers.v1test2.AdminTemp - name: google.devtools.remoteworkers.v1test2.CommandTask +- name: google.devtools.remoteworkers.v1test2.CommandResult - name: google.devtools.remoteworkers.v1test2.CommandOutputs - name: google.devtools.remoteworkers.v1test2.CommandOverhead - name: google.devtools.remoteworkers.v1test2.FileMetadata diff --git a/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml index 2fcba9024..1ee027d48 100644 --- a/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml +++ b/google/devtools/remoteworkers/v1test2/remoteworkers_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Devtools\Remoteworkers\V1test2 nodejs: package_name: remoteworkers.v1test2 -# 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. @@ -73,10 +67,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -125,7 +115,6 @@ interfaces: required_fields: - parent - bot_session - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -140,7 +129,6 @@ interfaces: - name - bot_session - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -157,7 +145,6 @@ interfaces: - name - type - msg - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -214,10 +201,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -264,7 +247,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -283,7 +265,6 @@ interfaces: - result - update_mask - source - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -299,7 +280,6 @@ interfaces: required_fields: - name - log_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/devtools/remoteworkers/v1test2/tasks.proto b/google/devtools/remoteworkers/v1test2/tasks.proto index 8f7f6de0d..236112aa5 100644 --- a/google/devtools/remoteworkers/v1test2/tasks.proto +++ b/google/devtools/remoteworkers/v1test2/tasks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -28,21 +28,11 @@ option java_outer_classname = "RemoteWorkersTasks"; option java_package = "com.google.devtools.remoteworkers.v1test2"; option objc_class_prefix = "RW"; - -// Design doc: https://goo.gl/oojM5H -// -// The Tasks interface defines tasks to execute and the results of these tasks. -// It does not include the metadata surrounding tasks; that is, the Task message -// represents *what* to be executed and *what* was the result of that execution, -// but not *how* to execute that task. For example this interface does not -// explain what platform the task should be run on, what priority it may have in -// any queue, etc. -// -// NB: we are not using google.rpc.batch since that's designed specifically for -// batch execution of RPC methods, and so is semantically quite different from -// our more general concept (though an RPC method could certainly be described -// by a Task in this interface). +// DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by +// Lease.result and logs should be precreated prior to sending to the bot (eg, +// via CommandTask.expected_outputs.stdout_destination). service Tasks { + // 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 // the bots. @@ -52,6 +42,7 @@ service Tasks { }; } + // DEPRECATED - use Lease.result instead. // UpdateTaskResult updates the result. rpc UpdateTaskResult(UpdateTaskResultRequest) returns (TaskResult) { option (google.api.http) = { @@ -60,6 +51,7 @@ service Tasks { }; } + // DEPRECATED - precreate logs prior to sending to bot. // AddTaskLog creates a new streaming log. The log is streamed and marked as // completed through other interfaces (i.e., ByteStream). This can be called // by the bot if it wants to create a new log; the server can also predefine @@ -72,6 +64,7 @@ service Tasks { } } +// DEPRECATED - use Lease.payload instead. // A Task represents a unit of work. Its result and logs are defined as // subresources. // @@ -98,6 +91,7 @@ message Task { map logs = 3; } +// 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 diff --git a/google/devtools/remoteworkers/v1test2/worker.proto b/google/devtools/remoteworkers/v1test2/worker.proto index 0d6e16b79..747226066 100644 --- a/google/devtools/remoteworkers/v1test2/worker.proto +++ b/google/devtools/remoteworkers/v1test2/worker.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -23,7 +23,6 @@ option java_outer_classname = "RemoteWorkersWorker"; option java_package = "com.google.devtools.remoteworkers.v1test2"; option objc_class_prefix = "RW"; - // Describes a worker, which is a list of one or more devices and the // connections between them. A device could be a computer, a phone, or even an // accelerator like a GPU; it's up to the farm administrator to decide how to @@ -78,6 +77,24 @@ message Worker { string value = 2; } + // A configuration request or report; see the `configs` field for more + // information. + message Config { + // For general information on keys, see the documentation to `Worker`. + // + // The current set of standard keys are: + // + // * DockerImage: the image of the container. When being reported by the + // bot, the empty value should always be included if the bot is able to pull + // its own images; the bot may optionally *also* report images that are + // present in its cache. When being requested in a lease, the value is the + // URI of the image (eg `gcr.io/user/image@sha256:hash`). + string key = 1; + + // The configuration's value. + string value = 2; + } + // A list of devices; the first device is the primary device. See the `Device` // message for more information. repeated Device devices = 1; @@ -90,6 +107,24 @@ message Worker { // // The behaviour of repeated keys is identical to that of Device.Property. repeated Property properties = 2; + + // Bots can be configured in certain ways when accepting leases. For example, + // many leases are executed inside a Docker container. To support this, the + // bot needs to be able to report that it has Docker installed (and knows how + // to execute something inside a container), and the task submitter needs to + // specify which image should be used to start the container. Similarly, a + // lease may be able to run as one of several users on the worker; in such + // cases, the bot needs to report what users are available, and the submitter + // needs to choose one. + // + // Therefore, when this message is reported by the bot to the service, each + // key represents a *type* of configuration that the bot knows how to set, + // while each *value* represents a legal value for that configuration (the + // empty string is interpretted as a wildcard, such as for Docker images). + // When this message is sent by the server to the bot in the context of a + // lease, it represents a command to the bot to apply the setting. Keys may + // be repeated during reporting but not in a lease. + repeated Config configs = 3; } // Any device, including computers, phones, accelerators (e.g. GPUs), etc. All diff --git a/google/devtools/resultstore/artman_resultstore.yaml b/google/devtools/resultstore/artman_resultstore.yaml index 68a18d9b7..6c3106964 100644 --- a/google/devtools/resultstore/artman_resultstore.yaml +++ b/google/devtools/resultstore/artman_resultstore.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-resultstore-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-resultstore-v2 - - name: proto - dest: generated/java/proto-google-cloud-resultstore-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-resultstore - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-resultstore-v2 - name: go_gapic type: GAPIC language: GO diff --git a/google/devtools/resultstore/resultstore-service.yaml b/google/devtools/resultstore/resultstore-service.yaml index 70a4d729b..8f79a90ff 100644 --- a/google/devtools/resultstore/resultstore-service.yaml +++ b/google/devtools/resultstore/resultstore-service.yaml @@ -6,6 +6,7 @@ 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. diff --git a/google/devtools/resultstore/v2/action.proto b/google/devtools/resultstore/v2/action.proto index 7b60a6a58..1b4659ef3 100644 --- a/google/devtools/resultstore/v2/action.proto +++ b/google/devtools/resultstore/v2/action.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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,7 +19,6 @@ 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/test_suite.proto"; import "google/protobuf/duration.proto"; @@ -122,10 +122,6 @@ message Action { // ensures files that are never covered at all are included. ActionCoverage coverage = 11; - // Summary of aggregate coverage across all files for this action in. The - // server populates this for you in the post-processing phase. - repeated LanguageCoverageSummary coverage_summaries = 12; - // 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. diff --git a/google/devtools/resultstore/v2/common.proto b/google/devtools/resultstore/v2/common.proto index d33d1abc0..ea962c91d 100644 --- a/google/devtools/resultstore/v2/common.proto +++ b/google/devtools/resultstore/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -23,7 +24,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // Describes the status of a resource in both enum and string form. // Only use description when conveying additional info not captured in the enum // name. @@ -140,6 +140,12 @@ enum Language { // Webtesting WEB = 19; + + // Scala + SCALA = 20; + + // Protocol Buffer + PROTO = 21; } // Status of a resource. diff --git a/google/devtools/resultstore/v2/configuration.proto b/google/devtools/resultstore/v2/configuration.proto index 66e87869f..eb3068625 100644 --- a/google/devtools/resultstore/v2/configuration.proto +++ b/google/devtools/resultstore/v2/configuration.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -22,7 +23,6 @@ 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 configuration within an Invocation associated with one or more // ConfiguredTargets. It captures the environment and other settings that // were used. diff --git a/google/devtools/resultstore/v2/configured_target.proto b/google/devtools/resultstore/v2/configured_target.proto index 5b6b6a689..39d2e1d93 100644 --- a/google/devtools/resultstore/v2/configured_target.proto +++ b/google/devtools/resultstore/v2/configured_target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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.devtools.resultstore.v2; import "google/devtools/resultstore/v2/common.proto"; -import "google/devtools/resultstore/v2/coverage_summary.proto"; import "google/devtools/resultstore/v2/file.proto"; import "google/protobuf/duration.proto"; @@ -25,7 +25,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // Each ConfiguredTarget represents data for a given configuration of a given // target in a given Invocation. // Every ConfiguredTarget should have at least one Action as a child resource @@ -74,11 +73,6 @@ message ConfiguredTarget { // 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. repeated File files = 8; - - // Summary of aggregate coverage across all test actions for this target in - // this configuration. The server populates this for you in the - // post-processing phase. - repeated LanguageCoverageSummary coverage_summaries = 9; } // Attributes that apply only to test actions under this configured target. diff --git a/google/devtools/resultstore/v2/coverage.proto b/google/devtools/resultstore/v2/coverage.proto index 4e3c4b7da..50415a9b0 100644 --- a/google/devtools/resultstore/v2/coverage.proto +++ b/google/devtools/resultstore/v2/coverage.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -20,7 +21,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // Describes line coverage for a file message LineCoverage { // Which source lines in the file represent the start of a statement that was diff --git a/google/devtools/resultstore/v2/coverage_summary.proto b/google/devtools/resultstore/v2/coverage_summary.proto index 283d48f66..16f84e3bc 100644 --- a/google/devtools/resultstore/v2/coverage_summary.proto +++ b/google/devtools/resultstore/v2/coverage_summary.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -22,7 +23,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // Summary of line coverage message LineCoverageSummary { // Number of lines instrumented for coverage. diff --git a/google/devtools/resultstore/v2/file.proto b/google/devtools/resultstore/v2/file.proto index d95e42aaa..93217dc97 100644 --- a/google/devtools/resultstore/v2/file.proto +++ b/google/devtools/resultstore/v2/file.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -22,9 +23,23 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // The metadata for a file or an archive file entry. message File { + // If known, the hash function used to compute this digest. + enum HashType { + // Unknown + HASH_TYPE_UNSPECIFIED = 0; + + // MD5 + MD5 = 1; + + // SHA-1 + SHA1 = 2; + + // SHA-256 + SHA256 = 3; + } + // The identifier of the file or archive entry. // User-provided, must be unique for the repeated field it is in. When an // Append RPC is called with a Files field populated, if a File already exists @@ -67,6 +82,12 @@ message File { // files to understand the purpose of this file and what they would want to // view it for. string description = 8; + + // (Optional) digest of this file in hexadecimal-like string if known. + string digest = 9; + + // (Optional) The algorithm corresponding to the digest if known. + HashType hash_type = 10; } // Information specific to an entry in an archive. diff --git a/google/devtools/resultstore/v2/file_set.proto b/google/devtools/resultstore/v2/file_set.proto index bb6c86172..d46307fc7 100644 --- a/google/devtools/resultstore/v2/file_set.proto +++ b/google/devtools/resultstore/v2/file_set.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -22,7 +23,6 @@ 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. message FileSet { // The resource ID components that identify the FileSet. diff --git a/google/devtools/resultstore/v2/invocation.proto b/google/devtools/resultstore/v2/invocation.proto index 908db13ca..d26266789 100644 --- a/google/devtools/resultstore/v2/invocation.proto +++ b/google/devtools/resultstore/v2/invocation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -71,9 +72,7 @@ message Invocation { } // 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 @@ -133,4 +132,23 @@ message InvocationAttributes { // 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. + // It will be used in the UI to give users more information about + // how or why this invocation was run. + string description = 4; + + // If this Invocation was run in the context of a larger Continuous + // Integration build or other automated system, this field may contain more + // information about the greater context. + repeated InvocationContext invocation_contexts = 6; +} + +// Describes the invocation context which includes a display name and URL. +message InvocationContext { + // A human readable name for the context under which this Invocation was run. + string display_name = 1; + + // A URL pointing to a UI containing more information + string url = 2; } diff --git a/google/devtools/resultstore/v2/resultstore_download.proto b/google/devtools/resultstore/v2/resultstore_download.proto index 796ce30de..23f86d754 100644 --- a/google/devtools/resultstore/v2/resultstore_download.proto +++ b/google/devtools/resultstore/v2/resultstore_download.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -31,8 +32,8 @@ option java_package = "com.google.devtools.resultstore.v2"; // This is the interface used to download information from the database. // -// Every request supports setting a response FieldMask via the 'fields' -// parameter. +// 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 { @@ -41,6 +42,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the invocation is not found. // - If the given invocation name is badly formatted. + // - If no field mask was given. rpc GetInvocation(GetInvocationRequest) returns (Invocation) { option (google.api.http) = { get: "/v2/{name=invocations/*}" @@ -52,6 +54,7 @@ service ResultStoreDownload { // // 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) { option (google.api.http) = { @@ -64,6 +67,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the configuration or its parent invocation is not found. // - If the given configuration name is badly formatted. + // - If no field mask was given. rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) { option (google.api.http) = { get: "/v2/{name=invocations/*/configs/*}" @@ -77,6 +81,7 @@ service ResultStoreDownload { // 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) { option (google.api.http) = { @@ -89,6 +94,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the target or its parent invocation is not found. // - If the given target name is badly formatted. + // - If no field mask was given. rpc GetTarget(GetTargetRequest) returns (Target) { option (google.api.http) = { get: "/v2/{name=invocations/*/targets/*}" @@ -101,6 +107,7 @@ service ResultStoreDownload { // 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 ListTargets(ListTargetsRequest) returns (ListTargetsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*}/targets" @@ -112,6 +119,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - 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) { option (google.api.http) = { @@ -126,7 +134,9 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the parent is not found. // - If the given parent name is badly formatted. - rpc ListConfiguredTargets(ListConfiguredTargetsRequest) returns (ListConfiguredTargetsResponse) { + // - If no field mask was given. + rpc ListConfiguredTargets(ListConfiguredTargetsRequest) + returns (ListConfiguredTargetsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*/targets/*}/configuredTargets" }; @@ -137,6 +147,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the action is not found. // - If the given name is badly formatted. + // - If no field mask was given. rpc GetAction(GetActionRequest) returns (Action) { option (google.api.http) = { get: "/v2/{name=invocations/*/targets/*/configuredTargets/*/actions/*}" @@ -153,6 +164,7 @@ service ResultStoreDownload { // 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 ListActions(ListActionsRequest) returns (ListActionsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions" @@ -164,6 +176,7 @@ service ResultStoreDownload { // An error will be reported in the following cases: // - If the file set or its parent invocation is not found. // - If the given file set name is badly formatted. + // - If no field mask was given. rpc GetFileSet(GetFileSetRequest) returns (FileSet) { option (google.api.http) = { get: "/v2/{name=invocations/*/fileSets/*}" @@ -177,6 +190,7 @@ service ResultStoreDownload { // 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 ListFileSets(ListFileSetsRequest) returns (ListFileSetsResponse) { option (google.api.http) = { get: "/v2/{parent=invocations/*}/fileSets" diff --git a/google/devtools/resultstore/v2/resultstore_file_download.proto b/google/devtools/resultstore/v2/resultstore_file_download.proto index 4f376345d..5d2c5ec5c 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 Inc. +// 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. @@ -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"; @@ -22,7 +23,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // This API allows download of File messages referenced in // ResultStore resources. service ResultStoreFileDownload { diff --git a/google/devtools/resultstore/v2/resultstore_gapic.yaml b/google/devtools/resultstore/v2/resultstore_gapic.yaml index 2ccea6553..fadd4131e 100644 --- a/google/devtools/resultstore/v2/resultstore_gapic.yaml +++ b/google/devtools/resultstore/v2/resultstore_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Cloud\Devtools\Resultstore\V2 nodejs: package_name: resultstore.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. @@ -83,10 +77,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -133,7 +123,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -148,7 +137,6 @@ interfaces: required_fields: - query - project_id - request_object_method: true page_streaming: request: page_size_field: page_size @@ -166,7 +154,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -179,7 +166,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -199,7 +185,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -212,7 +197,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -232,7 +216,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -245,7 +228,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -265,7 +247,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -278,7 +259,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -298,7 +278,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -311,7 +290,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -375,10 +353,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -427,7 +401,6 @@ interfaces: - read_limit required_fields: - uri - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -442,9 +415,307 @@ interfaces: - read_limit required_fields: - uri - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: uri: tail timeout_millis: 60000 +# The fully qualified name of the API interface. +- name: google.devtools.resultstore.v2.ResultStoreUpload + # 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: 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 + # 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: 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 + 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 + required_fields: + - request_id + - parent + - target_id + - target + - authorization_token + 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 + timeout_millis: 60000 + - name: FinishTarget + 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 + 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 + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + configured_target.name: configured_target + timeout_millis: 60000 + - name: FinishConfiguredTarget + 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 + required_fields: + - request_id + - parent + - action_id + - action + - authorization_token + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: configured_target + timeout_millis: 60000 + - name: UpdateAction + 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 + required_fields: + - request_id + - parent + - config_id + - configuration + - authorization_token + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: invocation + timeout_millis: 60000 + - name: UpdateConfiguration + 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 + required_fields: + - request_id + - parent + - file_set_id + - file_set + - authorization_token + 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 + diff --git a/google/devtools/resultstore/v2/resultstore_upload.proto b/google/devtools/resultstore/v2/resultstore_upload.proto new file mode 100644 index 000000000..685f17782 --- /dev/null +++ b/google/devtools/resultstore/v2/resultstore_upload.proto @@ -0,0 +1,636 @@ +// 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.devtools.resultstore.v2; + +import "google/api/annotations.proto"; +import "google/devtools/resultstore/v2/action.proto"; +import "google/devtools/resultstore/v2/configuration.proto"; +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/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.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 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. +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. + // + // Returns an empty Invocation proto with only the name and ID fields + // populated. + // + // An error will be reported in the following cases: + // - If an invocation with the same ID already exists. + rpc CreateInvocation(CreateInvocationRequest) returns (Invocation) { + option (google.api.http) = { + post: "/v2/invocations" + body: "invocation" + }; + } + + // Applies a standard update to the invocation identified by the given proto's + // name. For all types of fields (primitive, message, or repeated), replaces + // them with the given proto fields if they are under the given field mask + // paths. Fields that match the mask but aren't populated in the given + // invocation are cleared. This is an implicitly idempotent API. + // + // 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 finished. + // - If no field mask was given. + rpc UpdateInvocation(UpdateInvocationRequest) returns (Invocation) { + option (google.api.http) = { + patch: "/v2/{invocation.name=invocations/*}" + body: "invocation" + }; + } + + // Declares the invocation with the given name as finished and immutable. + // 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) { + option (google.api.http) = { + post: "/v2/{name=invocations/*}:finish" + body: "*" + }; + } + + // 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 + // 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 no target ID is provided. + // - If the parent invocation does not exist. + // - If the parent invocation is finished. + // - If a target with the same name already exists. + rpc CreateTarget(CreateTargetRequest) returns (Target) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*}/targets" + body: "target" + }; + } + + // Applies a standard update to the target identified by the given proto's + // name. For all types of fields (primitive, message, or repeated), replaces + // them with the given proto fields if they are under the given field mask + // paths. Fields that match the mask but aren't populated in the given + // target are cleared. This is an implicitly idempotent API. + // + // 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 finished. + // - If no field mask was given. + rpc UpdateTarget(UpdateTargetRequest) returns (Target) { + option (google.api.http) = { + patch: "/v2/{target.name=invocations/*/targets/*}" + body: "target" + }; + } + + // Declares the target with the given name as finished and immutable. + // 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) { + option (google.api.http) = { + post: "/v2/{name=invocations/*/targets/*}:finish" + body: "*" + }; + } + + // Creates the given configured target under the given parent target. + // The given configured target ID is URL encoded, converted to the full + // resource name, and assigned to the configured target's name field. + // 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 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) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*/targets/*}/configuredTargets" + body: "configured_target" + }; + } + + // Applies a standard update to the configured target identified by the given + // proto's name. For all types of fields (primitive, message, or repeated), + // replaces them with the given proto fields if they are under the given + // field mask paths. Fields that match the mask but aren't populated in the + // given configured target are cleared. This is an implicitly idempotent API. + // + // 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 finished. + // - If no field mask was given. + 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. + // + // An error will be reported in the following cases: + // - If the configured target does not exist. + rpc FinishConfiguredTarget(FinishConfiguredTargetRequest) + returns (FinishConfiguredTargetResponse) { + option (google.api.http) = { + post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finish" + body: "*" + }; + } + + // Creates the given action under the given configured target. The given + // action ID is URL encoded, converted to the full resource name, and + // assigned to the action's name field. 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 no action ID provided. + // - If the parent configured target does not exist. + // - If the parent target or invocation is finished. + // - If an action with the same name already exists. + rpc CreateAction(CreateActionRequest) returns (Action) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions" + body: "action" + }; + } + + // Applies a standard update to the action identified by the given + // proto's name. For all types of fields (primitive, message, or repeated), + // replaces them with the given proto fields if they are under the given + // field mask paths. Fields that match the mask but aren't populated in the + // given action are cleared. This is an implicitly idempotent API. + // + // 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 finished. + // - If no field mask was given. + rpc UpdateAction(UpdateActionRequest) returns (Action) { + option (google.api.http) = { + patch: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}" + body: "action" + }; + } + + // 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 + // "default" should be preferred for the default configuration in a + // single-config invocation. This is not an implicitly idempotent API, so a + // request id is required to make it idempotent. + // + // Returns an empty Configuration proto with only the name and ID fields + // populated. + // + // 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 a configuration with the same name already exists. + rpc CreateConfiguration(CreateConfigurationRequest) returns (Configuration) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*}/configs" + body: "configuration" + }; + } + + // Applies a standard update to the configuration identified by the given + // proto's name. For all types of fields (primitive, message, or repeated), + // replaces them with the given proto fields if they are under the given field + // mask paths. Fields that match the mask but aren't populated in the given + // configuration are cleared. This is an implicitly idempotent API. + // + // Returns an empty Configuration proto with only the name and ID fields + // populated. + // + // An error will be reported in the following cases: + // - If the configuration does not exist. + // - If the parent invocation is finished. + // - If no field mask was given. + // - If a given field mask path is not valid. + rpc UpdateConfiguration(UpdateConfigurationRequest) returns (Configuration) { + option (google.api.http) = { + patch: "/v2/{configuration.name=invocations/*/configs/*}" + body: "configuration" + }; + } + + // Creates the given file set under the given parent invocation. The given + // file set ID is URL encoded, converted to the full resource name, and + // assigned to the file set's name field. 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 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. + rpc CreateFileSet(CreateFileSetRequest) returns (FileSet) { + option (google.api.http) = { + post: "/v2/{parent=invocations/*}/fileSets" + body: "file_set" + }; + } + + // Applies a standard update to the file set identified by the given proto's + // name. For all types of fields (primitive, message, or repeated), replaces + // them with the given proto fields if they are under the given field mask + // paths. Fields that match the mask but aren't populated in the given + // configuration are cleared. This is an implicitly idempotent API. + // + // 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 finished. + // - If no field mask was given. + // - If a given field mask path is not valid. + rpc UpdateFileSet(UpdateFileSetRequest) returns (FileSet) { + option (google.api.http) = { + patch: "/v2/{file_set.name=invocations/*/fileSets/*}" + body: "file_set" + }; + } +} + +// Request passed into CreateInvocation +message CreateInvocationRequest { + // 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. If set, invocation_id must also be provided. + // Restricted to 36 utf-8 bytes. + 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. + string invocation_id = 2; + + // The invocation to create. Its name field will be ignored, since the name + // will be derived from the id field above and assigned by the server. + Invocation invocation = 3; + + // This is a token to authorize upload access to this invocation. It must be + // set to a RFC 4122-compliant v3, v4, or v5 UUID. Once this is set in + // CreateInvocation, all other upload RPCs for that Invocation and any of its + // child resources must also include the exact same token, or they will be + // rejected. The generated token should be unique to this invocation, and it + // should be kept secret. + // + // The purpose of this field is to prevent other users and tools from + // clobbering your upload intentionally or accidentally. The standard way of + // using this token is to create a second v4 UUID when the invocation_id is + // created, and storing them together during the upload. Essentially, this is + // 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; +} + +// Request passed into UpdateInvocation +message UpdateInvocationRequest { + // Contains the name and the fields of the invocation to be updated. The + // name format must be: invocations/${INVOCATION_ID} + Invocation invocation = 3; + + // Indicates which fields to update. + 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 FinishInvocation +message FinishInvocationRequest { + // 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 = 3; +} + +// Response returned from FinishInvocation +message FinishInvocationResponse { + // 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 CreateTarget +message CreateTargetRequest { + // 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 utf-8 bytes. + 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 '-'. + string target_id = 3; + + // The target to create. Its name field will be ignored, since the name will + // be derived from the id field above and assigned by the server. + Target target = 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 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} + Target target = 3; + + // Indicates which fields to update. + 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 FinishTarget +message FinishTargetRequest { + // The name of the target. Its format must be: + // invocations/${INVOCATION_ID}/targets/${TARGET_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 = 3; +} + +// Response returned from FinishTarget +message FinishTargetResponse { + // The name of the target. Its format will be: + // invocations/${INVOCATION_ID}/targets/${TARGET_ID} + string name = 1; + + // The resource ID components that identify the Target. + Target.Id id = 2; +} + +// Request passed into CreateConfiguredTarget +message CreateConfiguredTargetRequest { + // 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 utf-8 bytes. + 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} + string parent = 2; + + // The configuration identifier. This must match the ID of an existing + // Configuration under this Invocation. Cannot be the reserved id '-'. + string config_id = 3; + + // The configured target to create. Its name field will be ignored, since the + // name will be derived from the id field above and assigned by the server. + ConfiguredTarget configured_target = 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 UpdateConfiguredTarget +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} + ConfiguredTarget configured_target = 3; + + // Indicates which fields to update. + 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 FinishConfiguredTarget +message FinishConfiguredTargetRequest { + // The name of the configured target. Its format must be: + // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_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 = 3; +} + +// Response returned from FinishConfiguredTarget +message FinishConfiguredTargetResponse { + // The name of the configured target. Its format must be: + // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIG_ID} + string name = 1; + + // The resource ID components that identify the ConfiguredTarget. + ConfiguredTarget.Id id = 2; +} + +// Request passed into CreateAction +message CreateActionRequest { + // 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 utf-8 bytes. + 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} + string parent = 2; + + // The action identifier. It can be any UTF-8 string up to 512 bytes long, + // except for the reserved id '-'. + string action_id = 3; + + // The action to create. Its name field will be ignored, since the + // name will be derived from the id field above and assigned by the server. + Action action = 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 UpdateAction +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} + Action action = 3; + + // Indicates which fields to update. + 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 CreateConfiguration +message CreateConfigurationRequest { + // 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 utf-8 bytes. + 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 '-'. + string config_id = 3; + + // The configuration to create. Its name field will be ignored, since the name + // will be derived from the id field above and assigned by the server. + Configuration configuration = 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 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} + Configuration configuration = 3; + + // Indicates which fields to update. + 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 CreateFileSet +message CreateFileSetRequest { + // 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 utf-8 bytes. + 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. + string file_set_id = 3; + + // The file set to create. Its name field will be ignored, since the name will + // be derived from the id field above and assigned by the server. + FileSet file_set = 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 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} + FileSet file_set = 1; + + // Indicates which fields to update. + google.protobuf.FieldMask update_mask = 2; + + // 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; +} diff --git a/google/devtools/resultstore/v2/target.proto b/google/devtools/resultstore/v2/target.proto index 51880e5c8..dac53d949 100644 --- a/google/devtools/resultstore/v2/target.proto +++ b/google/devtools/resultstore/v2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -23,7 +24,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // Each Target represents data for a given target in a given Invocation. // ConfiguredTarget and Action resources under each Target contain the bulk of // the data. @@ -71,7 +71,7 @@ message Target { // Provides a hint to clients as to whether to display the Target to users. // If true then clients likely want to display the Target by default. // Once set to true, this may not be set back to false. - bool is_visible = 9; + bool visible = 10; } // Attributes that apply to all targets. diff --git a/google/devtools/resultstore/v2/test_suite.proto b/google/devtools/resultstore/v2/test_suite.proto index 511df6410..c892f906d 100644 --- a/google/devtools/resultstore/v2/test_suite.proto +++ b/google/devtools/resultstore/v2/test_suite.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -23,7 +24,6 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/ option java_multiple_files = true; option java_package = "com.google.devtools.resultstore.v2"; - // The result of running a test suite, as reported in a element of // an XML log. message TestSuite { @@ -160,6 +160,20 @@ message TestFailure { // call is usually first, but not for Python stack traces. May contain the // exception_type and message. string stack_trace = 3; + + // The expected values. + // + // These values can be diffed against the actual values. Often, there is just + // one actual and one expected value. If there is more than one, they should + // be compared as an unordered collection. + repeated string expected = 4; + + // The actual values. + // + // These values can be diffed against the expected values. Often, there is + // just one actual and one expected value. If there is more than one, they + // should be compared as an unordered collection. + repeated string actual = 5; } // Represents an exception that prevented a test case from completing, as diff --git a/google/devtools/source/v1/BUILD.bazel b/google/devtools/source/v1/BUILD.bazel new file mode 100644 index 000000000..c94106fb9 --- /dev/null +++ b/google/devtools/source/v1/BUILD.bazel @@ -0,0 +1,58 @@ +# 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 = "source_proto", + srcs = ["source_context.proto"], + deps = [ + "//google/api:annotations_proto", + ], +) + +proto_library_with_info( + name = "source_proto_with_info", + deps = [":source_proto"], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") + +java_proto_library( + name = "source_java_proto", + deps = [ + ":source_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "source_go_proto", + importpath = "google.golang.org/genproto/googleapis/devtools/source/v1", + protos = [":source_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-source-v1-go", + deps = [ + ":source_go_proto", + ], +) diff --git a/google/devtools/source/v1/source_context.proto b/google/devtools/source/v1/source_context.proto index 70d46dff9..6d6a4dedd 100644 --- a/google/devtools/source/v1/source_context.proto +++ b/google/devtools/source/v1/source_context.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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,6 +19,7 @@ package google.devtools.source.v1; import "google/api/annotations.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.DevTools.Source.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/source/v1;source"; option java_multiple_files = true; @@ -25,7 +27,6 @@ option java_outer_classname = "SourceContextProto"; option java_package = "com.google.devtools.source.v1"; option php_namespace = "Google\\Cloud\\DevTools\\Source\\V1"; - // 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 { @@ -94,7 +95,7 @@ message CloudRepoSourceContext { string revision_id = 2; // The name of an alias (branch, tag, etc.). - string alias_name = 3; + string alias_name = 3 [deprecated = true]; // An alias, which may be a branch or tag. AliasContext alias_context = 4; @@ -128,7 +129,7 @@ message GerritSourceContext { string revision_id = 3; // The name of an alias (branch, tag, etc.). - string alias_name = 4; + string alias_name = 4 [deprecated = true]; // An alias, which may be a branch or tag. AliasContext alias_context = 5; diff --git a/google/devtools/sourcerepo/v1/sourcerepo.proto b/google/devtools/sourcerepo/v1/sourcerepo.proto index 5bbd5c4e2..3d4e1678c 100644 --- a/google/devtools/sourcerepo/v1/sourcerepo.proto +++ b/google/devtools/sourcerepo/v1/sourcerepo.proto @@ -26,18 +26,21 @@ option java_multiple_files = true; option java_outer_classname = "SourceRepoProto"; option java_package = "com.google.devtools.sourcerepo.v1"; - // The Source Repo API service. service SourceRepo { // Returns all repos belonging to a project. The sizes of the repos are // not set by ListRepos. To get the size of a repo, use GetRepo. rpc ListRepos(ListReposRequest) returns (ListReposResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*}/repos" }; + option (google.api.http) = { + get: "/v1/{name=projects/*}/repos" + }; } // Returns information about a repo. rpc GetRepo(GetRepoRequest) returns (Repo) { - option (google.api.http) = { get: "/v1/{name=projects/*/repos/**}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/repos/**}" + }; } // Creates a repo in the given project with the given name. @@ -45,32 +48,48 @@ service SourceRepo { // If the named repository already exists, `CreateRepo` returns // `ALREADY_EXISTS`. rpc CreateRepo(CreateRepoRequest) returns (Repo) { - option (google.api.http) = { post: "/v1/{parent=projects/*}/repos" body: "repo" }; + option (google.api.http) = { + post: "/v1/{parent=projects/*}/repos" + body: "repo" + }; } // Deletes a repo. rpc DeleteRepo(DeleteRepoRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/repos/**}" }; + option (google.api.http) = { + delete: "/v1/{name=projects/*/repos/**}" + }; } // Sets the access control policy on the specified resource. Replaces any // existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { post: "/v1/{resource=projects/*/repos/**}:setIamPolicy" body: "*" }; + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/repos/**}:setIamPolicy" + body: "*" + }; } // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { get: "/v1/{resource=projects/*/repos/**}:getIamPolicy" }; + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/repos/**}:getIamPolicy" + }; } // 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) { - option (google.api.http) = { post: "/v1/{resource=projects/*/repos/**}:testIamPermissions" body: "*" }; + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/repos/**}:testIamPermissions" + body: "*" + }; } } diff --git a/google/example/library/BUILD.bazel b/google/example/library/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/example/library/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/example/library/artman_library_example_v1.yaml b/google/example/library/artman_library_example_v1.yaml new file mode 100644 index 000000000..3bc2fffb3 --- /dev/null +++ b/google/example/library/artman_library_example_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: library_example + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: library_example_v1.yaml + gapic_yaml: v1/library_example_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/example/library/library.yaml b/google/example/library/library.yaml deleted file mode 100644 index 56c6c021e..000000000 --- a/google/example/library/library.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: google.api.Service -config_version: 3 -name: library-example.googleapis.com -title: Google Example Library API - -apis: -- name: google.example.library.v1.LibraryService diff --git a/google/example/library/library_example_v1.yaml b/google/example/library/library_example_v1.yaml new file mode 100644 index 000000000..a1297cfa2 --- /dev/null +++ b/google/example/library/library_example_v1.yaml @@ -0,0 +1,41 @@ +type: google.api.Service +config_version: 3 +name: library-example.googleapis.com +title: Example Library API + +apis: +- name: google.example.library.v1.LibraryService + +documentation: + summary: A simple Google Example Library API. + overview: |- + # Introduction + + This is a Google example service representing a simple digital library. It + manages a collection of shelf resources, and each shelf owns a collection of + book resources. + +backend: + rules: + - selector: google.example.library.v1.LibraryService.CreateShelf + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.GetShelf + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.ListShelves + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.DeleteShelf + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.MergeShelves + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.CreateBook + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.GetBook + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.ListBooks + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.DeleteBook + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.UpdateBook + deadline: 10.0 + - selector: google.example.library.v1.LibraryService.MoveBook + deadline: 10.0 diff --git a/google/example/library/v1/BUILD.bazel b/google/example/library/v1/BUILD.bazel new file mode 100644 index 000000000..d5f2b8c90 --- /dev/null +++ b/google/example/library/v1/BUILD.bazel @@ -0,0 +1,140 @@ +# 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 = "library_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", + ], +) + +proto_library_with_info( + name = "library_proto_with_info", + deps = [":library_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 = "library_java_proto", + deps = [":library_proto"], +) + +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"], +) + +java_gapic_library( + name = "library_java_gapic", + src = ":library_proto_with_info", + gapic_yaml = "library_example_gapic.yaml", + service_yaml = "//google/example/library:library_example_v1.yaml", + 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, + runtime_deps = [":library_java_gapic_test"], +) for test_name in [ + "com.google.cloud.example.library.v1.LibraryServiceClientTest", +]] + +# Opensource 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 = [ + ":library_java_proto", + ":library_proto", + ":library_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 = "library_go_proto", + 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"], +) + +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", + service_yaml = "//google/example/library:library_example_v1.yaml", + deps = [":library_go_proto"], +) + +go_test( + name = "library_go_gapic_test", + srcs = [":library_go_gapic_srcjar_test"], + embed = [":library_go_gapic"], + importpath = "cloud.google.com/go/example/library/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-library-v1-go", + deps = [ + ":library_go_gapic", + ":library_go_gapic_srcjar-smoke-test.srcjar", + ":library_go_gapic_srcjar-test.srcjar", + ":library_go_proto", + ], +) diff --git a/google/example/library/v1/library.proto b/google/example/library/v1/library.proto index c31f77201..bc36c31d1 100644 --- a/google/example/library/v1/library.proto +++ b/google/example/library/v1/library.proto @@ -1,4 +1,4 @@ -// Copyright (c) 2015, 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.example.library.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"; option go_package = "google.golang.org/genproto/googleapis/example/library/v1;library"; @@ -24,7 +28,6 @@ option java_multiple_files = true; option java_outer_classname = "LibraryProto"; option java_package = "com.google.example.library.v1"; - // This API represents a simple digital library. It lets you manage Shelf // resources and Book resources in the library. It defines the following // resource model: @@ -37,23 +40,35 @@ option java_package = "com.google.example.library.v1"; service LibraryService { // Creates a shelf, and returns the new Shelf. rpc CreateShelf(CreateShelfRequest) returns (Shelf) { - option (google.api.http) = { post: "/v1/shelves" body: "shelf" }; + option (google.api.http) = { + post: "/v1/shelves" + body: "shelf" + }; + option (google.api.method_signature) = "shelf"; } // Gets a shelf. Returns NOT_FOUND if the shelf does not exist. rpc GetShelf(GetShelfRequest) returns (Shelf) { - option (google.api.http) = { get: "/v1/{name=shelves/*}" }; + option (google.api.http) = { + get: "/v1/{name=shelves/*}" + }; + option (google.api.method_signature) = "name"; } // Lists shelves. The order is unspecified but deterministic. Newly created // shelves will not necessarily be added to the end of this list. rpc ListShelves(ListShelvesRequest) returns (ListShelvesResponse) { - option (google.api.http) = { get: "/v1/shelves" }; + option (google.api.http) = { + get: "/v1/shelves" + }; } // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist. rpc DeleteShelf(DeleteShelfRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=shelves/*}" }; + option (google.api.http) = { + delete: "/v1/{name=shelves/*}" + }; + option (google.api.method_signature) = "name"; } // Merges two shelves by adding all books from the shelf named @@ -64,50 +79,81 @@ service LibraryService { // Returns NOT_FOUND if either shelf does not exist. // This call is a no-op if the specified shelves are the same. rpc MergeShelves(MergeShelvesRequest) returns (Shelf) { - option (google.api.http) = { post: "/v1/{name=shelves/*}:merge" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=shelves/*}:merge" + body: "*" + }; + option (google.api.method_signature) = "name,other_shelf_name"; } // Creates a book, and returns the new Book. rpc CreateBook(CreateBookRequest) returns (Book) { - option (google.api.http) = { post: "/v1/{name=shelves/*}/books" body: "book" }; + option (google.api.http) = { + post: "/v1/{name=shelves/*}/books" + body: "book" + }; + option (google.api.method_signature) = "name,book"; } // Gets a book. Returns NOT_FOUND if the book does not exist. rpc GetBook(GetBookRequest) returns (Book) { - option (google.api.http) = { get: "/v1/{name=shelves/*/books/*}" }; + option (google.api.http) = { + get: "/v1/{name=shelves/*/books/*}" + }; + option (google.api.method_signature) = "name"; } // Lists books in a shelf. The order is unspecified but deterministic. Newly // created books will not necessarily be added to the end of this list. // Returns NOT_FOUND if the shelf does not exist. rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) { - option (google.api.http) = { get: "/v1/{name=shelves/*}/books" }; + option (google.api.http) = { + get: "/v1/{name=shelves/*}/books" + }; + option (google.api.method_signature) = "name"; } // Deletes a book. Returns NOT_FOUND if the book does not exist. rpc DeleteBook(DeleteBookRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=shelves/*/books/*}" }; + option (google.api.http) = { + delete: "/v1/{name=shelves/*/books/*}" + }; } // Updates a book. Returns INVALID_ARGUMENT if the name of the book - // is non-empty and does equal the previous name. + // is non-empty and does not equal the existing name. rpc UpdateBook(UpdateBookRequest) returns (Book) { - option (google.api.http) = { put: "/v1/{name=shelves/*/books/*}" body: "book" }; + option (google.api.http) = { + put: "/v1/{book.name=shelves/*/books/*}" + body: "book" + }; + option (google.api.method_signature) = "book"; } // Moves a book to another shelf, and returns the new book. The book // id of the new book may not be the same as the original book. rpc MoveBook(MoveBookRequest) returns (Book) { - option (google.api.http) = { post: "/v1/{name=shelves/*/books/*}:move" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=shelves/*/books/*}:move" + body: "*" + }; + option (google.api.method_signature) = "name,other_shelf_name"; } } // A single book in the library. message Book { + option (google.api.resource) = { + type: "library-example.googleapis.com/Book", + pattern: "shelves/{shelf_id}/books/{book_id}" + }; // The resource name of the book. // Book names have the form `shelves/{shelf_id}/books/{book_id}`. // The name is ignored when creating a book. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "library-example.googleapis.com/Book" + ]; // The name of the book author. string author = 2; @@ -121,10 +167,17 @@ message Book { // A Shelf contains a collection of books with a theme. message Shelf { + option (google.api.resource) = { + type: "library-example.googleapis.com/Shelf", + pattern: "shelves/{shelf_id}" + }; // The resource name of the shelf. // Shelf names have the form `shelves/{shelf_id}`. // The name is ignored when creating a shelf. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "library-example.googleapis.com/Shelf" + ]; // The theme of the shelf string theme = 2; @@ -133,13 +186,16 @@ message Shelf { // Request message for LibraryService.CreateShelf. message CreateShelfRequest { // The shelf to create. - Shelf shelf = 1; + Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for LibraryService.GetShelf. message GetShelfRequest { // The name of the shelf to retrieve. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; } // Request message for LibraryService.ListShelves. @@ -171,38 +227,56 @@ message ListShelvesResponse { // Request message for LibraryService.DeleteShelf. message DeleteShelfRequest { // The name of the shelf to delete. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; } // Describes the shelf being removed (other_shelf_name) and updated // (name) in this merge. message MergeShelvesRequest { // The name of the shelf we're adding books to. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; // The name of the shelf we're removing books from and deleting. - string other_shelf_name = 2; + string other_shelf_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; } // Request message for LibraryService.CreateBook. message CreateBookRequest { // The name of the shelf in which the book is created. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; // The book to create. - Book book = 2; + Book book = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for LibraryService.GetBook. message GetBookRequest { // The name of the book to retrieve. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Book" + ]; } // Request message for LibraryService.ListBooks. message ListBooksRequest { // The name of the shelf whose books we'd like to list. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; // Requested page size. Server may return fewer books than requested. // If unspecified, server will pick an appropriate default. @@ -231,24 +305,33 @@ message ListBooksResponse { // Request message for LibraryService.UpdateBook. message UpdateBookRequest { // The name of the book to update. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // The book to update with. The name must match or be empty. - Book book = 2; + Book book = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for LibraryService.DeleteBook. message DeleteBookRequest { // The name of the book to delete. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Book" + ]; } // Describes what book to move (name) and what shelf we're moving it // to (other_shelf_name). message MoveBookRequest { // The name of the book to move. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Book" + ]; // The name of the destination shelf. - string other_shelf_name = 2; + string other_shelf_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "Shelf" + ]; } diff --git a/google/example/library/v1/library_example_gapic.yaml b/google/example/library/v1/library_example_gapic.yaml new file mode 100644 index 000000000..1c7cab232 --- /dev/null +++ b/google/example/library/v1/library_example_gapic.yaml @@ -0,0 +1,254 @@ +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.example.library.v1 + python: + package_name: google.cloud.example.library_v1.gapic + go: + package_name: cloud.google.com/go/example/library/apiv1 + csharp: + package_name: Google.Example.Library.V1 + ruby: + package_name: Google::Cloud::Example::Library::V1 + php: + package_name: Google\Cloud\Example\Library\V1 + nodejs: + package_name: library.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.example.library.v1.LibraryService + # 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: shelves/{shelf} + entity_name: shelf + - name_pattern: shelves/{shelf}/books/{book} + entity_name: book + # 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: CreateShelf + flattening: + groups: + - parameters: + - shelf + required_fields: + - shelf + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetShelf + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: shelf + timeout_millis: 10000 + - name: ListShelves + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: shelves + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: DeleteShelf + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: shelf + timeout_millis: 10000 + - name: MergeShelves + flattening: + groups: + - parameters: + - name + - other_shelf_name + required_fields: + - name + - other_shelf_name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: shelf + timeout_millis: 10000 + - name: CreateBook + flattening: + groups: + - parameters: + - name + - book + required_fields: + - name + - book + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: shelf + timeout_millis: 10000 + - name: GetBook + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: book + timeout_millis: 10000 + - name: ListBooks + 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: books + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: shelf + timeout_millis: 10000 + - name: DeleteBook + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: book + timeout_millis: 10000 + - name: UpdateBook + flattening: + groups: + - parameters: + - name + - book + required_fields: + - name + - book + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + book.name: book + timeout_millis: 10000 + - name: MoveBook + flattening: + groups: + - parameters: + - name + - other_shelf_name + required_fields: + - name + - other_shelf_name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: book + timeout_millis: 10000 diff --git a/google/firebase/fcm/connection/fcmconnection_v1alpha1.yaml b/google/firebase/fcm/connection/fcmconnection_v1alpha1.yaml new file mode 100644 index 000000000..84b454b90 --- /dev/null +++ b/google/firebase/fcm/connection/fcmconnection_v1alpha1.yaml @@ -0,0 +1,17 @@ +type: google.api.Service +config_version: 3 +name: fcmconnection.googleapis.com +title: FCM Connection API + +apis: +- name: google.firebase.fcm.connection.v1alpha1.ConnectionApi + +documentation: + summary: An API to connect clients to receive FCM messages. + overview: |- + The FCM Connection API allows developers’ client applications to create + long-lived bi-directional gRPC connections with FCM in order to receive & + send messages from/to their respective app servers. Historically, + developers could only send push notifications/messages to Android, iOS & + browsers. This API allows all gRPC supported client platforms to connect + to FCM. diff --git a/google/firebase/fcm/connection/v1alpha1/connection_api.proto b/google/firebase/fcm/connection/v1alpha1/connection_api.proto new file mode 100644 index 000000000..7a95a578c --- /dev/null +++ b/google/firebase/fcm/connection/v1alpha1/connection_api.proto @@ -0,0 +1,89 @@ +// 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.firebase.fcm.connection.v1alpha1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/firebase/fcm/connection/v1alpha1;connection"; +option java_multiple_files = true; +option java_package = "com.google.firebase.fcm.connection.v1alpha1"; + +// FCM's service to create client connections to send/receive messages. +service ConnectionApi { + // Creates a streaming connection with FCM to send messages and their + // respective ACKs. + // + // The client credentials need to be passed in the [gRPC + // Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format + // of the header is: + // Key: "authorization" + // Value: "Checkin [client_id:secret]" + // + // + // The project's API key also needs to be sent to authorize the project. + // That can be set in the X-Goog-Api-Key Metadata header. + rpc Connect(stream UpstreamRequest) returns (stream DownstreamResponse) { + } +} + +// Request sent to FCM from the connected client. +message UpstreamRequest { + // The type of request the client is making to FCM. + oneof request_type { + // Message acknowledgement. + Ack ack = 1; + } +} + +// Response sent to the connected client from FCM. +message DownstreamResponse { + // The type of response FCM is sending to the client. + oneof response_type { + // Message sent to FCM via the [Send + // API](https://firebase.google.com/docs/cloud-messaging/send-message) + // targeting this client. + Message message = 1; + } +} + +// Acknowledgement to indicate a client successfully received an FCM message. +// +// If a message is not acked, FCM will continously resend the message until +// it expires. Duplicate delivery in this case is working as intended. +message Ack { + // Id of message being acknowledged + string message_id = 1; +} + +// Message created through the [Send +// API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message). +message Message { + // The identifier of the message. Used to ack the message. + string message_id = 1; + + // Time the message was received in FCM. + google.protobuf.Timestamp create_time = 2; + + // Expiry time of the message. Currently it is always 4 weeks. + google.protobuf.Timestamp expire_time = 3; + + // The arbitrary payload set in the [Send + // API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message). + map data = 4; +} diff --git a/google/firestore/BUILD.bazel b/google/firestore/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/firestore/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/firestore/admin/artman_firestore_v1.yaml b/google/firestore/admin/artman_firestore_v1.yaml new file mode 100644 index 000000000..ee6ce029a --- /dev/null +++ b/google/firestore/admin/artman_firestore_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: firestore-admin + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: firestore_admin_v1.yaml + gapic_yaml: v1/firestore_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/firestore/admin/firestore_admin_v1.yaml b/google/firestore/admin/firestore_admin_v1.yaml new file mode 100644 index 000000000..aabec468e --- /dev/null +++ b/google/firestore/admin/firestore_admin_v1.yaml @@ -0,0 +1,48 @@ +type: google.api.Service +config_version: 3 +name: firestore.googleapis.com +title: Google Cloud Firestore Admin API + +documentation: + summary: > + Accesses the NoSQL document database built for automatic scaling, + high performance, and ease of application development. + overview: | + (== suppress_warning control-presence ==) + (== suppress_warning quota-presence ==) + (== suppress_warning http-rest ==) + (== suppress_warning versioning-http-version-prefix ==) + +apis: +- name: google.firestore.admin.v1.FirestoreAdmin + +types: +- name: google.firestore.admin.v1.IndexOperationMetadata +- name: google.firestore.admin.v1.LocationMetadata +- name: google.firestore.admin.v1.ExportDocumentsMetadata +- name: google.firestore.admin.v1.ImportDocumentsMetadata +- name: google.firestore.admin.v1.ExportDocumentsResponse +- name: google.firestore.admin.v1.FieldOperationMetadata + +http: + rules: + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/databases/*}/operations' + + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/databases/*/operations/*}' + + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/databases/*/operations/*}' + + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/databases/*/operations/*}:cancel' + body: '*' + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/firestore/admin/v1/field.proto b/google/firestore/admin/v1/field.proto new file mode 100644 index 000000000..a24e1aaf1 --- /dev/null +++ b/google/firestore/admin/v1/field.proto @@ -0,0 +1,96 @@ +// 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.firestore.admin.v1; + +import "google/firestore/admin/v1/index.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "FieldProto"; +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 { + // 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 + // 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 + // 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). + string ancestor_field = 3; + + // Output only + // When true, the `Field`'s index configuration is in the process of being + // reverted. Once complete, the index config will transition to the same + // state as the field specified by `ancestor_field`, at which point + // `uses_ancestor_config` will be `true` and `reverting` will be `false`. + bool reverting = 4; + } + + // A field name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + // + // A field path may be a simple field name, e.g. `address` or a path to fields + // within map_value , e.g. `address.city`, + // or a special field path. The only valid special field is `*`, which + // represents any field. + // + // Field paths may be quoted using ` (backtick). The only character that needs + // to be escaped within a quoted field path is the backtick character itself, + // escaped using a backslash. Special characters in field paths that + // must be quoted include: `*`, `.`, + // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + // + // Examples: + // (Note: Comments here are written in markdown syntax, so there is an + // additional layer of backticks to represent a code block) + // `\`address.city\`` represents a field named `address.city`, not the map key + // `city` in the field `address`. + // `\`*\`` represents a field named `*`, not any field. + // + // A special `Field` contains the default indexing settings for all fields. + // This field's resource name is: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + // Indexes defined on this `Field` will be applied to all fields which do not + // have their own `Field` index configuration. + string name = 1; + + // The index configuration for this field. If unset, field indexing will + // revert to the configuration defined by the `ancestor_field`. To + // explicitly remove all indexes for this field, specify an index config + // with an empty list of indexes. + IndexConfig index_config = 2; +} diff --git a/google/firestore/admin/v1/firestore_admin.proto b/google/firestore/admin/v1/firestore_admin.proto new file mode 100644 index 000000000..e753686b2 --- /dev/null +++ b/google/firestore/admin/v1/firestore_admin.proto @@ -0,0 +1,274 @@ +// 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.firestore.admin.v1; + +import "google/api/annotations.proto"; +import "google/firestore/admin/v1/field.proto"; +import "google/firestore/admin/v1/index.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +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"; + + +// Operations are created by service `FirestoreAdmin`, but are accessed via +// service `google.longrunning.Operations`. +service FirestoreAdmin { + // 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]. + rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + body: "index" + }; + } + + // Lists composite indexes. + rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + }; + } + + // Gets a composite index. + rpc GetIndex(GetIndexRequest) returns (Index) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Deletes a composite index. + rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Gets the metadata and configuration for a Field. + rpc GetField(GetFieldRequest) returns (Field) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}" + }; + } + + // Updates a field configuration. Currently, field updates apply only to + // single field index configuration. However, calls to + // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid + // changing any configuration that the caller isn't aware of. The field mask + // should be specified as: `{ paths: "index_config" }`. + // + // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + // track the status of the field update. The metadata for + // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + // + // To configure the default field settings for the database, use + // the special `Field` with resource name: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + rpc UpdateField(UpdateFieldRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}" + body: "field" + }; + } + + // Lists the field configuration and metadata for this database. + // + // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields" + }; + } + + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // 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 ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*}:exportDocuments" + body: "*" + }; + } + + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*}:importDocuments" + body: "*" + }; + } +} + +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +message CreateIndexRequest { + // 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; +} + +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +message ListIndexesRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +message ListIndexesResponse { + // The requested indexes. + repeated Index indexes = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. +message GetIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. +message DeleteIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +message UpdateFieldRequest { + // The field to be updated. + Field field = 1; + + // A mask, relative to the field. If specified, only configuration specified + // by this field_mask will be updated in the field. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. +message GetFieldRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +message ListFieldsRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. Currently, + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +message ListFieldsResponse { + // The requested fields. + repeated Field fields = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsRequest { + // Database to export. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to export. Unspecified means all collections. + repeated string collection_ids = 2; + + // The output URI. Currently only supports Google Cloud Storage URIs of the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Google Cloud Storage namespace path. When + // choosing a name, be sure to consider Google Cloud Storage naming + // guidelines: https://cloud.google.com/storage/docs/naming. + // If the URI is a bucket (without a namespace path), a prefix will be + // generated based on the start time. + string output_uri_prefix = 3; +} + +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsRequest { + // Database to import into. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to import. Unspecified means all collections included + // in the import. + repeated string collection_ids = 2; + + // Location of the exported files. + // This must match the output_uri_prefix of an ExportDocumentsResponse from + // an export that has completed successfully. + // See: + // [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + string input_uri_prefix = 3; +} diff --git a/google/example/library/library_gapic.yaml b/google/firestore/admin/v1/firestore_gapic.yaml old mode 100755 new mode 100644 similarity index 54% rename from google/example/library/library_gapic.yaml rename to google/firestore/admin/v1/firestore_gapic.yaml index 0233e2758..bda86e4e5 --- a/google/example/library/library_gapic.yaml +++ b/google/firestore/admin/v1/firestore_gapic.yaml @@ -1,30 +1,32 @@ type: com.google.api.codegen.ConfigProto config_schema_version: 1.0.0 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt language_settings: java: - package_name: com.google.cloud.example.library.spi.v1 + package_name: com.google.cloud.firestore.v1 python: - package_name: google.cloud.gapic.example.library.v1 + package_name: google.cloud.firestore_v1.gapic go: - package_name: cloud.google.com/go/example/library/apiv1 + package_name: cloud.google.com/go/firestore/apiv1/admin csharp: - package_name: Google.Example.Library.V1 + package_name: Google.Cloud.Firestore.Admin.V1 ruby: - package_name: Google::Cloud::Example::Library::V1 + package_name: Google::Cloud::Firestore::V1 php: - package_name: Google\Cloud\Example\Library\V1 + package_name: Google\Cloud\Firestore\Admin\V1 nodejs: - package_name: library.v1 + package_name: firestore.v1 + domain_layer_location: google-cloud interfaces: -- name: google.example.library.v1.LibraryService +- name: google.firestore.admin.v1.FirestoreAdmin collections: - - name_pattern: shelves/{shelf} - entity_name: shelf - - name_pattern: shelves/{shelf}/books/{book} - entity_name: book + - 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: @@ -42,158 +44,155 @@ interfaces: max_rpc_timeout_millis: 20000 total_timeout_millis: 600000 methods: - - name: CreateShelf + - name: CreateIndex flattening: groups: - parameters: - - shelf + - parent + - index required_fields: - - shelf - request_object_method: false + - parent + - index retry_codes_name: non_idempotent retry_params_name: default + field_name_patterns: + parent: parent timeout_millis: 60000 - - name: GetShelf + - name: ListIndexes flattening: groups: - parameters: - - name + - parent required_fields: - - name - request_object_method: false - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: shelf - timeout_millis: 60000 - - name: ListShelves - request_object_method: true + - parent page_streaming: request: page_size_field: page_size token_field: page_token response: token_field: next_page_token - resources_field: shelves + resources_field: indexes retry_codes_name: idempotent retry_params_name: default + field_name_patterns: + parent: parent timeout_millis: 60000 - - name: DeleteShelf + - name: GetIndex flattening: groups: - parameters: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: shelf + name: index timeout_millis: 60000 - - name: MergeShelves + resource_name_treatment: STATIC_TYPES + - name: DeleteIndex flattening: groups: - parameters: - name - - other_shelf_name required_fields: - name - - other_shelf_name - request_object_method: true - retry_codes_name: non_idempotent + retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: shelf + name: index timeout_millis: 60000 - - name: CreateBook + resource_name_treatment: STATIC_TYPES + - name: ImportDocuments flattening: groups: - parameters: - name - - book required_fields: - name - - book - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - name: shelf - timeout_millis: 60000 - - name: GetBook - flattening: - groups: - - parameters: - - name - required_fields: - - name - request_object_method: false - retry_codes_name: idempotent - retry_params_name: default - field_name_patterns: - name: book + name: database timeout_millis: 60000 - - name: ListBooks + resource_name_treatment: STATIC_TYPES + - name: ExportDocuments flattening: groups: - parameters: - name required_fields: - name - request_object_method: true - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: books - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: - name: shelf + name: database timeout_millis: 60000 - - name: DeleteBook + resource_name_treatment: STATIC_TYPES + - name: GetField flattening: groups: - parameters: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: - name: book + name: field timeout_millis: 60000 - - name: UpdateBook + resource_name_treatment: STATIC_TYPES + - name: ListFields flattening: groups: - parameters: - - name - - book + - parent required_fields: - - name - - book - request_object_method: true + - 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: - name: book + parent: parent timeout_millis: 60000 - - name: MoveBook + - name: UpdateField flattening: groups: - parameters: - - name - - other_shelf_name + - field required_fields: - - name - - other_shelf_name - request_object_method: true + - field retry_codes_name: non_idempotent retry_params_name: default - field_name_patterns: - name: book 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/index.proto b/google/firestore/admin/v1/index.proto new file mode 100644 index 000000000..94941d3a0 --- /dev/null +++ b/google/firestore/admin/v1/index.proto @@ -0,0 +1,149 @@ +// 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.firestore.admin.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "IndexProto"; +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 { + // A field in an index. + // The field_path describes which field is indexed, the value_mode describes + // how the field value is indexed. + message IndexField { + // The supported orderings. + enum Order { + // The ordering is unspecified. Not a valid option. + ORDER_UNSPECIFIED = 0; + + // The field is ordered by ascending field value. + ASCENDING = 1; + + // The field is ordered by descending field value. + DESCENDING = 2; + } + + // The supported array value configurations. + enum ArrayConfig { + // The index does not support additional array queries. + ARRAY_CONFIG_UNSPECIFIED = 0; + + // The index supports array containment queries. + CONTAINS = 1; + } + + // Can be __name__. + // For single field indexes, this must match the name of the field or may + // be omitted. + string field_path = 1; + + // How the field value is indexed. + oneof value_mode { + // Indicates that this field supports ordering by the specified order or + // comparing using =, <, <=, >, >=. + Order order = 2; + + // Indicates that this field supports operations on `array_value`s. + ArrayConfig array_config = 3; + } + } + + // Query Scope defines the scope at which a query is run. This is specified on + // a StructuredQuery's `from` field. + enum QueryScope { + // The query scope is unspecified. Not a valid option. + QUERY_SCOPE_UNSPECIFIED = 0; + + // Indexes with a collection query scope specified allow queries + // 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; + } + + // The state of an index. During index creation, an index will be in the + // `CREATING` state. If the index is created successfully, it will transition + // to the `READY` state. If the index creation encounters a problem, the index + // will transition to the `NEEDS_REPAIR` state. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The index is being created. + // There is an active long-running operation for the index. + // The index is updated when writing a document. + // Some index data may exist. + CREATING = 1; + + // The index is ready to be used. + // The index is updated when writing a document. + // The index is fully populated from all stored documents it applies to. + READY = 2; + + // The index was being created, but something went wrong. + // There is no active long-running operation for the index, + // and the most recently finished long-running operation failed. + // The index is not updated when writing a document. + // Some index data may exist. + // Use the google.longrunning.Operations API to determine why the operation + // that last attempted to create this index failed, then re-create the + // index. + NEEDS_REPAIR = 3; + } + + // 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. + string name = 1; + + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified at + // query time, and that has the same collection id. + // + // Indexes with a collection group query scope specified allow queries against + // all collections descended from a specific document, specified at query + // time, and that have the same collection id as this index. + QueryScope query_scope = 2; + + // The fields supported by this index. + // + // For composite indexes, this is always 2 or more fields. + // The last field entry is always for the field path `__name__`. If, on + // creation, `__name__` was not specified as the last field, it will be added + // automatically with the same direction as that of the last field defined. If + // the final field in a composite index is not directional, the `__name__` + // will be ordered ASCENDING (unless explicitly specified). + // + // For single field indexes, this will always be exactly one entry with a + // field path equal to the field path of the associated field. + repeated IndexField fields = 3; + + // 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 new file mode 100644 index 000000000..7b56051a5 --- /dev/null +++ b/google/firestore/admin/v1/location.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.firestore.admin.v1; + +import "google/type/latlng.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "LocationProto"; +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 new file mode 100644 index 000000000..d333d9b7d --- /dev/null +++ b/google/firestore/admin/v1/operation.proto @@ -0,0 +1,204 @@ +// 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.firestore.admin.v1; + +import "google/firestore/admin/v1/index.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "OperationProto"; +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 { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The index resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string index = 3; + + // The state of the operation. + OperationState state = 4; + + // The progress, in documents, of this operation. + Progress progress_documents = 5; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 6; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +message FieldOperationMetadata { + // Information about an index configuration change. + message IndexConfigDelta { + // Specifies how the index is changing. + enum ChangeType { + // The type of change is not specified or known. + CHANGE_TYPE_UNSPECIFIED = 0; + + // The single field index is being added. + ADD = 1; + + // The single field index is being removed. + REMOVE = 2; + } + + // Specifies how the index is changing. + ChangeType change_type = 1; + + // The index being changed. + Index index = 2; + } + + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The field resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + string field = 3; + + // A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + // operation. + repeated IndexConfigDelta index_config_deltas = 4; + + // The state of the operation. + OperationState state = 5; + + // The progress, in documents, of this operation. + Progress progress_documents = 6; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the export operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being exported. + repeated string collection_ids = 6; + + // Where the entities are being exported to. + string output_uri_prefix = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the import operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being imported. + repeated string collection_ids = 6; + + // The location of the documents being imported. + string input_uri_prefix = 7; +} + +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. +message ExportDocumentsResponse { + // Location of the output files. This can be used to begin an import + // into Cloud Firestore (this project or another project) after the operation + // completes successfully. + string output_uri_prefix = 1; +} + +// Describes the state of the operation. +enum OperationState { + // Unspecified. + OPERATION_STATE_UNSPECIFIED = 0; + + // Request is being prepared for processing. + INITIALIZING = 1; + + // Request is actively being processed. + PROCESSING = 2; + + // Request is in the process of being cancelled after user called + // google.longrunning.Operations.CancelOperation on the operation. + CANCELLING = 3; + + // Request has been processed and is in its finalization stage. + FINALIZING = 4; + + // Request has completed successfully. + SUCCESSFUL = 5; + + // Request has finished being processed, but encountered an error. + FAILED = 6; + + // Request has finished being cancelled after user called + // 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 f137fc3fc..505872259 100644 --- a/google/firestore/admin/v1beta1/firestore_admin.proto +++ b/google/firestore/admin/v1beta1/firestore_admin.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,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"; @@ -88,22 +89,58 @@ service FirestoreAdmin { // // Indexes with a single field cannot be created. rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*}/indexes" body: "index" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/databases/*}/indexes" + body: "index" + }; } // Lists the indexes that match the specified filters. rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/databases/*}/indexes" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/databases/*}/indexes" + }; } // Gets an index. rpc GetIndex(GetIndexRequest) returns (Index) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/databases/*/indexes/*}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/databases/*/indexes/*}" + }; } // Deletes an index. rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/databases/*/indexes/*}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/databases/*/indexes/*}" + }; + } + + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // 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 ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/databases/*}:exportDocuments" + body: "*" + }; + } + + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/databases/*}:importDocuments" + body: "*" + }; } } @@ -201,3 +238,128 @@ message ListIndexesResponse { // The standard List next-page token. string next_page_token = 2; } + +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsRequest { + // Database to export. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to export. Unspecified means all collections. + repeated string collection_ids = 3; + + // The output URI. Currently only supports Google Cloud Storage URIs of the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Google Cloud Storage namespace path. When + // choosing a name, be sure to consider Google Cloud Storage naming + // guidelines: https://cloud.google.com/storage/docs/naming. + // If the URI is a bucket (without a namespace path), a prefix will be + // generated based on the start time. + string output_uri_prefix = 4; +} + +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsRequest { + // Database to import into. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to import. Unspecified means all collections included + // in the import. + repeated string collection_ids = 3; + + // Location of the exported files. + // This must match the output_uri_prefix of an ExportDocumentsResponse from + // an export that has completed successfully. + // See: + // [google.firestore.admin.v1beta1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1beta1.ExportDocumentsResponse.output_uri_prefix]. + string input_uri_prefix = 4; +} + +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. +message ExportDocumentsResponse { + // Location of the output files. This can be used to begin an import + // into Cloud Firestore (this project or another project) after the operation + // completes successfully. + string output_uri_prefix = 1; +} + +// Metadata for ExportDocuments operations. +message ExportDocumentsMetadata { + // The time that work began on the operation. + google.protobuf.Timestamp start_time = 1; + + // The time the operation ended, either successfully or otherwise. Unset if + // the operation is still active. + google.protobuf.Timestamp end_time = 2; + + // The state of the export operation. + OperationState operation_state = 3; + + // An estimate of the number of documents processed. + Progress progress_documents = 4; + + // An estimate of the number of bytes processed. + Progress progress_bytes = 5; + + // Which collection ids are being exported. + repeated string collection_ids = 6; + + // Where the entities are being exported to. + string output_uri_prefix = 7; +} + +// Metadata for ImportDocuments operations. +message ImportDocumentsMetadata { + // The time that work began on the operation. + google.protobuf.Timestamp start_time = 1; + + // The time the operation ended, either successfully or otherwise. Unset if + // the operation is still active. + google.protobuf.Timestamp end_time = 2; + + // The state of the import operation. + OperationState operation_state = 3; + + // An estimate of the number of documents processed. + Progress progress_documents = 4; + + // An estimate of the number of bytes processed. + Progress progress_bytes = 5; + + // Which collection ids are being imported. + repeated string collection_ids = 6; + + // The location of the documents being imported. + string input_uri_prefix = 7; +} + +// The various possible states for an ongoing Operation. +enum OperationState { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // Request is being prepared for processing. + INITIALIZING = 1; + + // Request is actively being processed. + PROCESSING = 2; + + // Request is in the process of being cancelled after user called + // google.longrunning.Operations.CancelOperation on the operation. + CANCELLING = 3; + + // Request has been processed and is in its finalization stage. + FINALIZING = 4; + + // Request has completed successfully. + SUCCESSFUL = 5; + + // Request has finished being processed, but encountered an error. + FAILED = 6; + + // Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + CANCELLED = 7; +} diff --git a/google/firestore/admin/v1beta1/index.proto b/google/firestore/admin/v1beta1/index.proto index 2bb826bb5..285e0a533 100644 --- a/google/firestore/admin/v1beta1/index.proto +++ b/google/firestore/admin/v1beta1/index.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,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"; @@ -40,6 +41,10 @@ message IndexField { // The field's values are indexed so as to support sequencing in // descending order and also query by <, >, <=, >=, and =. DESCENDING = 3; + + // The field's array values are indexed so as to support membership using + // ARRAY_CONTAINS queries. + ARRAY_CONTAINS = 4; } // The path of the field. Must match the field path specification described diff --git a/google/firestore/admin/v1beta1/location.proto b/google/firestore/admin/v1beta1/location.proto new file mode 100644 index 000000000..2e6dff1b9 --- /dev/null +++ b/google/firestore/admin/v1beta1/location.proto @@ -0,0 +1,34 @@ +// 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.firestore.admin.v1beta1; + +import "google/type/latlng.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin"; +option java_multiple_files = true; +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 new file mode 100644 index 000000000..8b2599caf --- /dev/null +++ b/google/firestore/admin/v1beta2/field.proto @@ -0,0 +1,95 @@ +// 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.firestore.admin.v1beta2; + +import "google/firestore/admin/v1beta2/index.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; +option java_multiple_files = true; +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 +// collections in the database with the same id. +message 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 + // 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 + // 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). + string ancestor_field = 3; + + // Output only + // When true, the `Field`'s index configuration is in the process of being + // reverted. Once complete, the index config will transition to the same + // state as the field specified by `ancestor_field`, at which point + // `uses_ancestor_config` will be `true` and `reverting` will be `false`. + bool reverting = 4; + } + + // A field name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + // + // A field path may be a simple field name, e.g. `address` or a path to fields + // within map_value , e.g. `address.city`, + // or a special field path. The only valid special field is `*`, which + // represents any field. + // + // Field paths may be quoted using ` (backtick). The only character that needs + // to be escaped within a quoted field path is the backtick character itself, + // escaped using a backslash. Special characters in field paths that + // must be quoted include: `*`, `.`, + // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + // + // Examples: + // (Note: Comments here are written in markdown syntax, so there is an + // additional layer of backticks to represent a code block) + // `\`address.city\`` represents a field named `address.city`, not the map key + // `city` in the field `address`. + // `\`*\`` represents a field named `*`, not any field. + // + // A special `Field` contains the default indexing settings for all fields. + // This field's resource name is: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + // Indexes defined on this `Field` will be applied to all fields which do not + // have their own `Field` index configuration. + string name = 1; + + // The index configuration for this field. If unset, field indexing will + // revert to the configuration defined by the `ancestor_field`. To + // explicitly remove all indexes for this field, specify an index config + // with an empty list of indexes. + IndexConfig index_config = 2; +} diff --git a/google/firestore/admin/v1beta2/firestore_admin.proto b/google/firestore/admin/v1beta2/firestore_admin.proto new file mode 100644 index 000000000..a1ec525c6 --- /dev/null +++ b/google/firestore/admin/v1beta2/firestore_admin.proto @@ -0,0 +1,273 @@ +// 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.firestore.admin.v1beta2; + +import "google/api/annotations.proto"; +import "google/firestore/admin/v1beta2/field.proto"; +import "google/firestore/admin/v1beta2/index.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; +option java_multiple_files = true; +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 { + // 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]. + rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + body: "index" + }; + } + + // Lists composite indexes. + rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + }; + } + + // Gets a composite index. + rpc GetIndex(GetIndexRequest) returns (Index) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Deletes a composite index. + rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Gets the metadata and configuration for a Field. + rpc GetField(GetFieldRequest) returns (Field) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/databases/*/collectionGroups/*/fields/*}" + }; + } + + // Updates a field configuration. Currently, field updates apply only to + // single field index configuration. However, calls to + // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField] should provide a field mask to avoid + // changing any configuration that the caller isn't aware of. The field mask + // should be specified as: `{ paths: "index_config" }`. + // + // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + // track the status of the field update. The metadata for + // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1beta2.FieldOperationMetadata]. + // + // To configure the default field settings for the database, use + // the special `Field` with resource name: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + rpc UpdateField(UpdateFieldRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta2/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}" + body: "field" + }; + } + + // Lists the field configuration and metadata for this database. + // + // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/fields" + }; + } + + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // 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 ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{name=projects/*/databases/*}:exportDocuments" + body: "*" + }; + } + + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{name=projects/*/databases/*}:importDocuments" + body: "*" + }; + } +} + +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. +message CreateIndexRequest { + // 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; +} + +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. +message ListIndexesRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. +message ListIndexesResponse { + // The requested indexes. + repeated Index indexes = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta2.FirestoreAdmin.GetIndex]. +message GetIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta2.FirestoreAdmin.DeleteIndex]. +message DeleteIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField]. +message UpdateFieldRequest { + // The field to be updated. + Field field = 1; + + // A mask, relative to the field. If specified, only configuration specified + // by this field_mask will be updated in the field. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1beta2.FirestoreAdmin.GetField]. +message GetFieldRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. +message ListFieldsRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. Currently, + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. +message ListFieldsResponse { + // The requested fields. + repeated Field fields = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsRequest { + // Database to export. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to export. Unspecified means all collections. + repeated string collection_ids = 2; + + // The output URI. Currently only supports Google Cloud Storage URIs of the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Google Cloud Storage namespace path. When + // choosing a name, be sure to consider Google Cloud Storage naming + // guidelines: https://cloud.google.com/storage/docs/naming. + // If the URI is a bucket (without a namespace path), a prefix will be + // generated based on the start time. + string output_uri_prefix = 3; +} + +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsRequest { + // Database to import into. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to import. Unspecified means all collections included + // in the import. + repeated string collection_ids = 2; + + // Location of the exported files. + // This must match the output_uri_prefix of an ExportDocumentsResponse from + // an export that has completed successfully. + // See: + // [google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_prefix]. + string input_uri_prefix = 3; +} diff --git a/google/firestore/admin/v1beta2/index.proto b/google/firestore/admin/v1beta2/index.proto new file mode 100644 index 000000000..d6c738d87 --- /dev/null +++ b/google/firestore/admin/v1beta2/index.proto @@ -0,0 +1,148 @@ +// 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.firestore.admin.v1beta2; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; +option java_multiple_files = true; +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 { + // A field in an index. + // The field_path describes which field is indexed, the value_mode describes + // how the field value is indexed. + message IndexField { + // The supported orderings. + enum Order { + // The ordering is unspecified. Not a valid option. + ORDER_UNSPECIFIED = 0; + + // The field is ordered by ascending field value. + ASCENDING = 1; + + // The field is ordered by descending field value. + DESCENDING = 2; + } + + // The supported array value configurations. + enum ArrayConfig { + // The index does not support additional array queries. + ARRAY_CONFIG_UNSPECIFIED = 0; + + // The index supports array containment queries. + CONTAINS = 1; + } + + // Can be __name__. + // For single field indexes, this must match the name of the field or may + // be omitted. + string field_path = 1; + + // How the field value is indexed. + oneof value_mode { + // Indicates that this field supports ordering by the specified order or + // comparing using =, <, <=, >, >=. + Order order = 2; + + // Indicates that this field supports operations on `array_value`s. + ArrayConfig array_config = 3; + } + } + + // Query Scope defines the scope at which a query is run. This is specified on + // a StructuredQuery's `from` field. + enum QueryScope { + // The query scope is unspecified. Not a valid option. + QUERY_SCOPE_UNSPECIFIED = 0; + + // Indexes with a collection query scope specified allow queries + // 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; + } + + // The state of an index. During index creation, an index will be in the + // `CREATING` state. If the index is created successfully, it will transition + // to the `READY` state. If the index creation encounters a problem, the index + // will transition to the `NEEDS_REPAIR` state. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The index is being created. + // There is an active long-running operation for the index. + // The index is updated when writing a document. + // Some index data may exist. + CREATING = 1; + + // The index is ready to be used. + // The index is updated when writing a document. + // The index is fully populated from all stored documents it applies to. + READY = 2; + + // The index was being created, but something went wrong. + // There is no active long-running operation for the index, + // and the most recently finished long-running operation failed. + // The index is not updated when writing a document. + // Some index data may exist. + // Use the google.longrunning.Operations API to determine why the operation + // that last attempted to create this index failed, then re-create the + // index. + NEEDS_REPAIR = 3; + } + + // 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. + string name = 1; + + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified at + // query time, and that has the same collection id. + // + // Indexes with a collection group query scope specified allow queries against + // all collections descended from a specific document, specified at query + // time, and that have the same collection id as this index. + QueryScope query_scope = 2; + + // The fields supported by this index. + // + // For composite indexes, this is always 2 or more fields. + // The last field entry is always for the field path `__name__`. If, on + // creation, `__name__` was not specified as the last field, it will be added + // automatically with the same direction as that of the last field defined. If + // the final field in a composite index is not directional, the `__name__` + // will be ordered ASCENDING (unless explicitly specified). + // + // For single field indexes, this will always be exactly one entry with a + // field path equal to the field path of the associated field. + repeated IndexField fields = 3; + + // 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 new file mode 100644 index 000000000..871f1c16f --- /dev/null +++ b/google/firestore/admin/v1beta2/operation.proto @@ -0,0 +1,203 @@ +// 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.firestore.admin.v1beta2; + +import "google/firestore/admin/v1beta2/index.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; +option java_multiple_files = true; +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 { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The index resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string index = 3; + + // The state of the operation. + OperationState state = 4; + + // The progress, in documents, of this operation. + Progress progress_documents = 5; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 6; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField]. +message FieldOperationMetadata { + // Information about an index configuration change. + message IndexConfigDelta { + // Specifies how the index is changing. + enum ChangeType { + // The type of change is not specified or known. + CHANGE_TYPE_UNSPECIFIED = 0; + + // The single field index is being added. + ADD = 1; + + // The single field index is being removed. + REMOVE = 2; + } + + // Specifies how the index is changing. + ChangeType change_type = 1; + + // The index being changed. + Index index = 2; + } + + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The field resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + string field = 3; + + // A list of [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + // operation. + repeated IndexConfigDelta index_config_deltas = 4; + + // The state of the operation. + OperationState state = 5; + + // The progress, in documents, of this operation. + Progress document_progress = 6; + + // The progress, in bytes, of this operation. + Progress bytes_progress = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the export operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being exported. + repeated string collection_ids = 6; + + // Where the entities are being exported to. + string output_uri_prefix = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the import operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being imported. + repeated string collection_ids = 6; + + // The location of the documents being imported. + string input_uri_prefix = 7; +} + +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. +message ExportDocumentsResponse { + // Location of the output files. This can be used to begin an import + // into Cloud Firestore (this project or another project) after the operation + // completes successfully. + string output_uri_prefix = 1; +} + +// Describes the state of the operation. +enum OperationState { + // Unspecified. + OPERATION_STATE_UNSPECIFIED = 0; + + // Request is being prepared for processing. + INITIALIZING = 1; + + // Request is actively being processed. + PROCESSING = 2; + + // Request is in the process of being cancelled after user called + // google.longrunning.Operations.CancelOperation on the operation. + CANCELLING = 3; + + // Request has been processed and is in its finalization stage. + FINALIZING = 4; + + // Request has completed successfully. + SUCCESSFUL = 5; + + // Request has finished being processed, but encountered an error. + FAILED = 6; + + // Request has finished being cancelled after user called + // 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.v1beta2.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/artman_firestore.yaml b/google/firestore/artman_firestore.yaml index 211f21fdf..c9141704e 100644 --- a/google/firestore/artman_firestore.yaml +++ b/google/firestore/artman_firestore.yaml @@ -3,32 +3,17 @@ common: api_version: v1beta1 organization_name: google-cloud proto_deps: - - name: google-common-protos - gapic_yaml: v1beta1/firestore_gapic.yaml + - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: firestore.yaml + service_yaml: firestore_v1beta1.yaml + gapic_yaml: v1beta1/firestore_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-firestore-v1beta1 - - name: grpc - dest: generated/java/grpc-google-cloud-firestore-v1beta1 - - name: proto - dest: generated/java/proto-google-cloud-firestore-v1beta1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-firestore - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-firestore-v1beta1 - name: go_gapic type: GAPIC language: GO diff --git a/google/firestore/artman_firestore_v1.yaml b/google/firestore/artman_firestore_v1.yaml new file mode 100644 index 000000000..a24f9eef4 --- /dev/null +++ b/google/firestore/artman_firestore_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: firestore + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: firestore_v1.yaml + gapic_yaml: v1/firestore_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/firestore/firestore_v1.yaml b/google/firestore/firestore_v1.yaml new file mode 100644 index 000000000..e4aaeb919 --- /dev/null +++ b/google/firestore/firestore_v1.yaml @@ -0,0 +1,15 @@ +type: google.api.Service +config_version: 3 +name: firestore.googleapis.com +title: Google Cloud Firestore API + +apis: +- name: google.firestore.v1.Firestore + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/datastore diff --git a/google/firestore/firestore.yaml b/google/firestore/firestore_v1beta1.yaml similarity index 72% rename from google/firestore/firestore.yaml rename to google/firestore/firestore_v1beta1.yaml index e3632cdc5..9abd25c72 100644 --- a/google/firestore/firestore.yaml +++ b/google/firestore/firestore_v1beta1.yaml @@ -4,12 +4,8 @@ name: firestore.googleapis.com title: Google Cloud Firestore API apis: -# - name: google.firestore.admin.v1beta1.FirestoreAdmin - name: google.firestore.v1beta1.Firestore -# types: -# - name: google.firestore.admin.v1beta1.IndexOperationMetadata - authentication: rules: - selector: '*' diff --git a/google/firestore/v1/common.proto b/google/firestore/v1/common.proto new file mode 100644 index 000000000..59c62997a --- /dev/null +++ b/google/firestore/v1/common.proto @@ -0,0 +1,84 @@ +// 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.firestore.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +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. +// This is different from standard field masks, as this is always scoped to a +// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. +message DocumentMask { + // The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + // path syntax reference. + repeated string field_paths = 1; +} + +// A precondition on a document, used for conditional operations. +message Precondition { + // The type of precondition. + oneof condition_type { + // When set to `true`, the target document must exist. + // When set to `false`, the target document must not exist. + bool exists = 1; + + // When set, the target document must exist and have been last updated at + // that time. + google.protobuf.Timestamp update_time = 2; + } +} + +// Options for creating a new transaction. +message TransactionOptions { + // Options for a transaction that can be used to read and write documents. + message ReadWrite { + // An optional transaction to retry. + bytes retry_transaction = 1; + } + + // Options for a transaction that can only be used to read documents. + message ReadOnly { + // The consistency mode for this transaction. If not set, defaults to strong + // consistency. + oneof consistency_selector { + // Reads documents at the given time. + // This may not be older than 60 seconds. + google.protobuf.Timestamp read_time = 2; + } + } + + // The mode of the transaction. + oneof mode { + // The transaction can only be used for read operations. + ReadOnly read_only = 2; + + // The transaction can be used for both read and write operations. + ReadWrite read_write = 3; + } +} diff --git a/google/firestore/v1/document.proto b/google/firestore/v1/document.proto new file mode 100644 index 000000000..d3d9c11c7 --- /dev/null +++ b/google/firestore/v1/document.proto @@ -0,0 +1,151 @@ +// 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.firestore.v1; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/latlng.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; +option java_multiple_files = true; +option java_outer_classname = "DocumentProto"; +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. +message Document { + // The resource name of the document, for example + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + string name = 1; + + // The document's fields. + // + // The map keys represent field names. + // + // A simple field name contains only characters `a` to `z`, `A` to `Z`, + // `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + // `foo_bar_17`. + // + // Field names matching the regular expression `__.*__` are reserved. Reserved + // field names are forbidden except in certain documented contexts. The map + // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + // empty. + // + // Field paths may be used in other contexts to refer to structured fields + // defined here. For `map_value`, the field path is represented by the simple + // or quoted field names of the containing fields, delimited by `.`. For + // example, the structured field + // `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + // represented by the field path `foo.x&y`. + // + // Within a field path, a quoted field name starts and ends with `` ` `` and + // may contain any character. Some characters, including `` ` ``, must be + // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + // `` `bak\`tik` `` represents `` bak`tik ``. + map fields = 2; + + // Output only. The time at which the document was created. + // + // This value increases monotonically when a document is deleted then + // recreated. It can also be compared to values from other documents and + // the `read_time` of a query. + google.protobuf.Timestamp create_time = 3; + + // Output only. The time at which the document was last changed. + // + // This value is initially set to the `create_time` then increases + // monotonically with each change to the document. It can also be + // compared to values from other documents and the `read_time` of a query. + google.protobuf.Timestamp update_time = 4; +} + +// A message that can hold any of the supported value types. +message Value { + // Must have a value set. + oneof value_type { + // A null value. + google.protobuf.NullValue null_value = 11; + + // A boolean value. + bool boolean_value = 1; + + // An integer value. + int64 integer_value = 2; + + // A double value. + double double_value = 3; + + // A timestamp value. + // + // Precise only to microseconds. When stored, any additional precision is + // rounded down. + google.protobuf.Timestamp timestamp_value = 10; + + // A string value. + // + // The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + // Only the first 1,500 bytes of the UTF-8 representation are considered by + // queries. + string string_value = 17; + + // A bytes value. + // + // Must not exceed 1 MiB - 89 bytes. + // Only the first 1,500 bytes are considered by queries. + bytes bytes_value = 18; + + // A reference to a document. For example: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + string reference_value = 5; + + // A geo point value representing a point on the surface of Earth. + google.type.LatLng geo_point_value = 8; + + // An array value. + // + // Cannot directly contain another array value, though can contain an + // map which contains another array. + ArrayValue array_value = 9; + + // A map value. + MapValue map_value = 6; + } +} + +// An array value. +message ArrayValue { + // Values in the array. + repeated Value values = 1; +} + +// A map value. +message MapValue { + // The map's fields. + // + // The map keys represent field names. Field names matching the regular + // expression `__.*__` are reserved. Reserved field names are forbidden except + // in certain documented contexts. The map keys, represented as UTF-8, must + // not exceed 1,500 bytes and cannot be empty. + map fields = 1; +} diff --git a/google/firestore/v1/firestore.proto b/google/firestore/v1/firestore.proto new file mode 100644 index 000000000..5dc9667e2 --- /dev/null +++ b/google/firestore/v1/firestore.proto @@ -0,0 +1,761 @@ +// 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.firestore.v1; + +import "google/api/annotations.proto"; +import "google/firestore/v1/common.proto"; +import "google/firestore/v1/document.proto"; +import "google/firestore/v1/query.proto"; +import "google/firestore/v1/write.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; +option java_multiple_files = true; +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. +service Firestore { + // Gets a single document. + rpc GetDocument(GetDocumentRequest) returns (Document) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/documents/*/**}" + }; + } + + // Lists documents. + rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" + }; + } + + // 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" + }; + } + + // Deletes a document. + rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/databases/*/documents/*/**}" + }; + } + + // Gets multiple documents. + // + // Documents returned by this method are not guaranteed to be returned in the + // same order that they were requested. + rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:batchGet" + body: "*" + }; + } + + // Starts a new transaction. + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction" + body: "*" + }; + } + + // Commits a transaction, while optionally updating documents. + rpc Commit(CommitRequest) returns (CommitResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:commit" + body: "*" + }; + } + + // Rolls back a transaction. + rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:rollback" + body: "*" + }; + } + + // Runs a query. + rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/documents}:runQuery" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery" + body: "*" + } + }; + } + + // Streams batches of document updates and deletes, in order. + rpc Write(stream WriteRequest) returns (stream WriteResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:write" + body: "*" + }; + } + + // Listens to changes. + rpc Listen(stream ListenRequest) returns (stream ListenResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:listen" + body: "*" + }; + } + + // Lists all the collection IDs underneath a document. + rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds" + body: "*" + } + }; + } +} + +// The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. +message GetDocumentRequest { + // The resource name of the Document to get. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + string name = 1; + + // The fields to return. If not set, returns all fields. + // + // If the document has a field that is not present in this mask, that field + // will not be returned in the response. + DocumentMask mask = 2; + + // The consistency mode for this transaction. + // If not set, defaults to strong consistency. + oneof consistency_selector { + // Reads the document in a transaction. + bytes transaction = 3; + + // Reads the version of the document at the given time. + // This may not be older than 60 seconds. + google.protobuf.Timestamp read_time = 5; + } +} + +// The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +message ListDocumentsRequest { + // 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; + + // The collection ID, relative to `parent`, to list. For example: `chatrooms` + // or `messages`. + string collection_id = 2; + + // The maximum number of documents to return. + int32 page_size = 3; + + // The `next_page_token` value returned from a previous List request, if any. + string page_token = 4; + + // The order to sort results by. For example: `priority desc, name`. + string order_by = 6; + + // The fields to return. If not set, returns all fields. + // + // If a document has a field that is not present in this mask, that field + // will not be returned in the response. + DocumentMask mask = 7; + + // The consistency mode for this transaction. + // If not set, defaults to strong consistency. + oneof consistency_selector { + // Reads documents in a transaction. + bytes transaction = 8; + + // Reads documents as they were at the given time. + // This may not be older than 60 seconds. + google.protobuf.Timestamp read_time = 10; + } + + // If the list should show missing documents. A missing document is a + // document that does not exist but has sub-documents. These documents will + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + // or [Document.update_time][google.firestore.v1.Document.update_time] set. + // + // Requests with `show_missing` may not specify `where` or + // `order_by`. + bool show_missing = 12; +} + +// The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +message ListDocumentsResponse { + // The Documents found. + repeated Document documents = 1; + + // The next page token. + string next_page_token = 2; +} + +// The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. +message CreateDocumentRequest { + // 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; + + // The collection ID, relative to `parent`, to list. For example: `chatrooms`. + string collection_id = 2; + + // 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; + + // The fields to return. If not set, returns all fields. + // + // If the document has a field that is not present in this mask, that field + // will not be returned in the response. + DocumentMask mask = 5; +} + +// The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. +message UpdateDocumentRequest { + // The updated document. + // Creates the document if it does not already exist. + Document document = 1; + + // The fields to update. + // None of the field paths in the mask may contain a reserved name. + // + // If the document exists on the server and has fields not referenced in the + // mask, they are left unchanged. + // Fields referenced in the mask, but not present in the input document, are + // deleted from the document on the server. + DocumentMask update_mask = 2; + + // The fields to return. If not set, returns all fields. + // + // If the document has a field that is not present in this mask, that field + // will not be returned in the response. + DocumentMask mask = 3; + + // An optional precondition on the document. + // The request will fail if this is set and not met by the target document. + Precondition current_document = 4; +} + +// The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. +message DeleteDocumentRequest { + // The resource name of the Document to delete. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + string name = 1; + + // An optional precondition on the document. + // The request will fail if this is set and not met by the target document. + Precondition current_document = 2; +} + +// The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +message BatchGetDocumentsRequest { + // The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1; + + // The names of the documents to retrieve. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + // The request will fail if any of the document is not a child resource of the + // given `database`. Duplicate names will be elided. + repeated string documents = 2; + + // The fields to return. If not set, returns all fields. + // + // If a document has a field that is not present in this mask, that field will + // not be returned in the response. + DocumentMask mask = 3; + + // The consistency mode for this transaction. + // If not set, defaults to strong consistency. + oneof consistency_selector { + // Reads documents in a transaction. + bytes transaction = 4; + + // Starts a new transaction and reads the documents. + // Defaults to a read-only transaction. + // The new transaction ID will be returned as the first response in the + // stream. + TransactionOptions new_transaction = 5; + + // Reads documents as they were at the given time. + // This may not be older than 60 seconds. + google.protobuf.Timestamp read_time = 7; + } +} + +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +message BatchGetDocumentsResponse { + // A single result. + // This can be empty if the server is just returning a transaction. + oneof result { + // A document that was requested. + Document found = 1; + + // A document name that was requested but does not exist. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + string missing = 2; + } + + // The transaction that was started as part of this request. + // Will only be set in the first response, and only if + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + bytes transaction = 3; + + // The time at which the document was read. + // This may be monotically increasing, in this case the previous documents in + // the result stream are guaranteed not to have changed between their + // read_time and this one. + google.protobuf.Timestamp read_time = 4; +} + +// The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +message BeginTransactionRequest { + // The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1; + + // The options for the transaction. + // Defaults to a read-write transaction. + TransactionOptions options = 2; +} + +// The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +message BeginTransactionResponse { + // The transaction that was started. + bytes transaction = 1; +} + +// The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. +message CommitRequest { + // The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1; + + // The writes to apply. + // + // Always executed atomically and in order. + repeated Write writes = 2; + + // If set, applies all writes in this transaction, and commits it. + bytes transaction = 3; +} + +// The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. +message CommitResponse { + // The result of applying the writes. + // + // This i-th write result corresponds to the i-th write in the + // request. + repeated WriteResult write_results = 1; + + // The time at which the commit occurred. + google.protobuf.Timestamp commit_time = 2; +} + +// The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. +message RollbackRequest { + // The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1; + + // The transaction to roll back. + bytes transaction = 2; +} + +// The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +message RunQueryRequest { + // 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; + + // The query to run. + oneof query_type { + // A structured query. + StructuredQuery structured_query = 2; + } + + // The consistency mode for this transaction. + // If not set, defaults to strong consistency. + oneof consistency_selector { + // Reads documents in a transaction. + bytes transaction = 5; + + // Starts a new transaction and reads the documents. + // Defaults to a read-only transaction. + // The new transaction ID will be returned as the first response in the + // stream. + TransactionOptions new_transaction = 6; + + // Reads documents as they were at the given time. + // This may not be older than 60 seconds. + google.protobuf.Timestamp read_time = 7; + } +} + +// The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +message RunQueryResponse { + // The transaction that was started as part of this request. + // Can only be set in the first response, and only if + // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + // If set, no other fields will be set in this response. + bytes transaction = 2; + + // A query result. + // Not set when reporting partial progress. + Document document = 1; + + // The time at which the document was read. This may be monotonically + // increasing; in this case, the previous documents in the result stream are + // guaranteed not to have changed between their `read_time` and this one. + // + // If the query returns no results, a response with `read_time` and no + // `document` will be sent, and this represents the time at which the query + // was run. + google.protobuf.Timestamp read_time = 3; + + // The number of results that have been skipped due to an offset between + // the last response and the current response. + int32 skipped_results = 4; +} + +// The request for [Firestore.Write][google.firestore.v1.Firestore.Write]. +// +// The first request creates a stream, or resumes an existing one from a token. +// +// When creating a new stream, the server replies with a response containing +// only an ID and a token, to use in the next request. +// +// When resuming a stream, the server first streams any responses later than the +// 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: + // `projects/{project_id}/databases/{database_id}`. + // This is only required in the first message. + string database = 1; + + // The ID of the write stream to resume. + // This may only be set in the first message. When left empty, a new write + // stream will be created. + string stream_id = 2; + + // The writes to apply. + // + // Always executed atomically and in order. + // This must be empty on the first request. + // This may be empty on the last request. + // This must not be empty on all other requests. + repeated Write writes = 3; + + // A stream token that was previously sent by the server. + // + // The client should set this field to the token from the most recent + // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + // received responses up to this token. After sending this token, earlier + // tokens may not be used anymore. + // + // The server may close the stream if there are too many unacknowledged + // responses. + // + // Leave this field unset when creating a new stream. To resume a stream at + // a specific point, set this field and the `stream_id` field. + // + // Leave this field unset when creating a new stream. + bytes stream_token = 4; + + // Labels associated with this write request. + map labels = 5; +} + +// The response for [Firestore.Write][google.firestore.v1.Firestore.Write]. +message WriteResponse { + // The ID of the stream. + // Only set on the first message, when a new stream was created. + string stream_id = 1; + + // A token that represents the position of this response in the stream. + // This can be used by a client to resume the stream at this point. + // + // This field is always set. + bytes stream_token = 2; + + // The result of applying the writes. + // + // This i-th write result corresponds to the i-th write in the + // request. + repeated WriteResult write_results = 3; + + // The time at which the commit occurred. + google.protobuf.Timestamp commit_time = 4; +} + +// A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen] +message ListenRequest { + // The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1; + + // The supported target changes. + oneof target_change { + // A target to add to this stream. + Target add_target = 2; + + // The ID of a target to remove from this stream. + int32 remove_target = 3; + } + + // Labels associated with this target change. + map labels = 4; +} + +// The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen]. +message ListenResponse { + // The supported responses. + oneof response_type { + // Targets have changed. + TargetChange target_change = 2; + + // A [Document][google.firestore.v1.Document] has changed. + DocumentChange document_change = 3; + + // A [Document][google.firestore.v1.Document] has been deleted. + DocumentDelete document_delete = 4; + + // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + // relevant to that target). + DocumentRemove document_remove = 6; + + // A filter to apply to the set of documents previously returned for the + // given target. + // + // Returned when documents may have been removed from the given target, but + // the exact documents are unknown. + ExistenceFilter filter = 5; + } +} + +// A specification of a set of documents to listen to. +message Target { + // A target specified by a set of documents names. + message DocumentsTarget { + // The names of the documents to retrieve. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + // The request will fail if any of the document is not a child resource of + // the given `database`. Duplicate names will be elided. + repeated string documents = 2; + } + + // A target specified by a query. + message QueryTarget { + // 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; + + // The query to run. + oneof query_type { + // A structured query. + StructuredQuery structured_query = 2; + } + } + + // The type of target to listen to. + oneof target_type { + // A target specified by a query. + QueryTarget query = 2; + + // A target specified by a set of document names. + DocumentsTarget documents = 3; + } + + // When to start listening. + // + // If not specified, all matching Documents are returned before any + // subsequent changes. + oneof resume_type { + // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. + // + // Using a resume token with a different target is unsupported and may fail. + bytes resume_token = 4; + + // Start listening after a specific `read_time`. + // + // The client must know the state of matching documents at this time. + 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. + int32 target_id = 5; + + // If the target should be removed once it is current and consistent. + bool once = 6; +} + +// Targets being watched have changed. +message TargetChange { + // The type of change. + enum TargetChangeType { + // No change has occurred. Used only to send an updated `resume_token`. + NO_CHANGE = 0; + + // The targets have been added. + ADD = 1; + + // The targets have been removed. + REMOVE = 2; + + // The targets reflect all changes committed before the targets were added + // to the stream. + // + // This will be sent after or with a `read_time` that is greater than or + // equal to the time at which the targets were added. + // + // Listeners can wait for this change if read-after-write semantics + // are desired. + CURRENT = 3; + + // The targets have been reset, and a new initial state for the targets + // will be returned in subsequent changes. + // + // After the initial state is complete, `CURRENT` will be returned even + // if the target was previously indicated to be `CURRENT`. + RESET = 4; + } + + // The type of change that occurred. + TargetChangeType target_change_type = 1; + + // The target IDs of targets that have changed. + // + // 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. + repeated int32 target_ids = 2; + + // The error that resulted in this change, if applicable. + google.rpc.Status cause = 3; + + // A token that can be used to resume the stream for the given `target_ids`, + // or all targets if `target_ids` is empty. + // + // Not set on every target change. + bytes resume_token = 4; + + // The consistent `read_time` for the given `target_ids` (omitted when the + // target_ids are not at a consistent snapshot). + // + // The stream is guaranteed to send a `read_time` with `target_ids` empty + // whenever the entire stream reaches a new consistent snapshot. ADD, + // CURRENT, and RESET messages are guaranteed to (eventually) result in a + // new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + // + // For a given stream, `read_time` is guaranteed to be monotonically + // increasing. + google.protobuf.Timestamp read_time = 6; +} + +// The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +message ListCollectionIdsRequest { + // 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; + + // The maximum number of results to return. + int32 page_size = 2; + + // A page token. Must be a value from + // [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + string page_token = 3; +} + +// The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +message ListCollectionIdsResponse { + // The collection ids. + repeated string collection_ids = 1; + + // A page token that may be used to continue the list. + string next_page_token = 2; +} diff --git a/google/firestore/v1/firestore_gapic.yaml b/google/firestore/v1/firestore_gapic.yaml new file mode 100644 index 000000000..a15408c10 --- /dev/null +++ b/google/firestore/v1/firestore_gapic.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 + - 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/v1/query.proto b/google/firestore/v1/query.proto new file mode 100644 index 000000000..48684c060 --- /dev/null +++ b/google/firestore/v1/query.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.firestore.v1; + +import "google/firestore/v1/document.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; +option java_multiple_files = true; +option java_outer_classname = "QueryProto"; +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`. + message CollectionSelector { + // The collection ID. + // When set, selects only collections with this ID. + string collection_id = 2; + + // When false, selects only collections that are immediate children of + // the `parent` specified in the containing `RunQueryRequest`. + // When true, selects all descendant collections. + bool all_descendants = 3; + } + + // A filter. + message Filter { + // The type of filter. + oneof filter_type { + // A composite filter. + CompositeFilter composite_filter = 1; + + // A filter on a document field. + FieldFilter field_filter = 2; + + // A filter that takes exactly one argument. + UnaryFilter unary_filter = 3; + } + } + + // A filter that merges multiple other filters using the given operator. + message CompositeFilter { + // A composite filter operator. + enum Operator { + // Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0; + + // The results are required to satisfy each of the combined filters. + AND = 1; + } + + // The operator for combining multiple filters. + Operator op = 1; + + // The list of filters to combine. + // Must contain at least one filter. + repeated Filter filters = 2; + } + + // A filter on a specific field. + message FieldFilter { + // A field filter operator. + enum Operator { + // Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0; + + // Less than. Requires that the field come first in `order_by`. + LESS_THAN = 1; + + // Less than or equal. Requires that the field come first in `order_by`. + LESS_THAN_OR_EQUAL = 2; + + // Greater than. Requires that the field come first in `order_by`. + GREATER_THAN = 3; + + // Greater than or equal. Requires that the field come first in + // `order_by`. + GREATER_THAN_OR_EQUAL = 4; + + // Equal. + EQUAL = 5; + + // Contains. Requires that the field is an array. + ARRAY_CONTAINS = 7; + } + + // The field to filter by. + FieldReference field = 1; + + // The operator to filter by. + Operator op = 2; + + // The value to compare to. + Value value = 3; + } + + // A filter with a single operand. + message UnaryFilter { + // A unary operator. + enum Operator { + // Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0; + + // Test if a field is equal to NaN. + IS_NAN = 2; + + // Test if an exprestion evaluates to Null. + IS_NULL = 3; + } + + // The unary operator to apply. + Operator op = 1; + + // The argument to the filter. + oneof operand_type { + // The field to which to apply the operator. + FieldReference field = 2; + } + } + + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + + // An order on a field. + message Order { + // The field to order by. + FieldReference field = 1; + + // The direction to order by. Defaults to `ASCENDING`. + 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. + DIRECTION_UNSPECIFIED = 0; + + // Ascending. + ASCENDING = 1; + + // Descending. + DESCENDING = 2; + } + + // The projection to return. + Projection select = 1; + + // The collections to query. + repeated CollectionSelector from = 2; + + // The filter to apply. + Filter where = 3; + + // The order to apply to the query results. + // + // Firestore guarantees a stable ordering through the following rules: + // + // * Any field required to appear in `order_by`, that is not already + // specified in `order_by`, is appended to the order in field name order + // by default. + // * If an order on `__name__` is not specified, it is appended by default. + // + // Fields are appended with the same sort direction as the last order + // specified, or 'ASCENDING' if no order was specified. For example: + // + // * `SELECT * FROM Foo ORDER BY A` becomes + // `SELECT * FROM Foo ORDER BY A, __name__` + // * `SELECT * FROM Foo ORDER BY A DESC` becomes + // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` + // * `SELECT * FROM Foo WHERE A > 1` becomes + // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` + repeated Order order_by = 4; + + // A starting point for the query results. + Cursor start_at = 7; + + // A end point for the query results. + Cursor end_at = 8; + + // The number of results to skip. + // + // Applies before limit, but after all other constraints. Must be >= 0 if + // specified. + int32 offset = 6; + + // The maximum number of results to return. + // + // Applies after all other constraints. + // Must be >= 0 if specified. + google.protobuf.Int32Value limit = 5; +} + +// A position in a query result set. +message Cursor { + // The values that represent a position, in the order they appear in + // the order by clause of a query. + // + // Can contain fewer values than specified in the order by clause. + repeated Value values = 1; + + // If the position is just before or just after the given values, relative + // to the sort order defined by the query. + bool before = 2; +} diff --git a/google/firestore/v1/write.proto b/google/firestore/v1/write.proto new file mode 100644 index 000000000..4ab5d833e --- /dev/null +++ b/google/firestore/v1/write.proto @@ -0,0 +1,255 @@ +// 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.firestore.v1; + +import "google/firestore/v1/common.proto"; +import "google/firestore/v1/document.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; +option java_multiple_files = true; +option java_outer_classname = "WriteProto"; +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. + oneof operation { + // A document to write. + Document update = 1; + + // A document name to delete. In the format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + 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; + } + + // The fields to update in this write. + // + // This field can be set only when the operation is `update`. + // If the mask is not set for an `update` and the document exists, any + // existing data will be overwritten. + // If the mask is set and the document on the server has fields not covered by + // the mask, they are left unchanged. + // Fields referenced in the mask, but not present in the input document, are + // deleted from the document on the server. + // The field paths in this mask must not contain a reserved field name. + DocumentMask update_mask = 3; + + // An optional precondition on the document. + // + // The write will fail if this is set and not met by the target document. + Precondition current_document = 4; +} + +// A transformation of a document. +message DocumentTransform { + // A transformation of a field of the document. + message FieldTransform { + // A value that is calculated by the server. + enum ServerValue { + // Unspecified. This value must not be used. + SERVER_VALUE_UNSPECIFIED = 0; + + // The time at which the server processed the request, with millisecond + // precision. + REQUEST_TIME = 1; + } + + // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + // reference. + string field_path = 1; + + // The transformation to apply on the field. + oneof transform_type { + // Sets the field to the given server value. + ServerValue set_to_server_value = 2; + + // Adds the given value to the field's current value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the given value. + // If either of the given value or the current field value are doubles, + // both values will be interpreted as doubles. Double arithmetic and + // representation of double values follow IEEE 754 semantics. + // If there is positive/negative integer overflow, the field is resolved + // to the largest magnitude positive/negative integer. + Value increment = 3; + + // Sets the field to the maximum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the given value. + // If a maximum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the larger operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + // zero input value is always the stored value. + // The maximum of any numeric value x and NaN is NaN. + Value maximum = 4; + + // Sets the field to the minimum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the input value. + // If a minimum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the smaller operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + // zero input value is always the stored value. + // The minimum of any numeric value x and NaN is NaN. + Value minimum = 5; + + // Append the given elements in order if they are not already present in + // the current field value. + // If the field is not an array, or if the field does not yet exist, it is + // first set to the empty array. + // + // Equivalent numbers of different types (e.g. 3L and 3.0) are + // considered equal when checking if a value is missing. + // NaN is equal to NaN, and Null is equal to Null. + // If the input contains multiple equivalent values, only the first will + // be considered. + // + // The corresponding transform_result will be the null value. + ArrayValue append_missing_elements = 6; + + // Remove all of the given elements from the array in the field. + // If the field is not an array, or if the field does not yet exist, it is + // set to the empty array. + // + // Equivalent numbers of the different types (e.g. 3L and 3.0) are + // considered equal when deciding whether an element should be removed. + // NaN is equal to NaN, and Null is equal to Null. + // This will remove all equivalent values if there are duplicates. + // + // The corresponding transform_result will be the null value. + ArrayValue remove_all_from_array = 7; + } + } + + // The name of the document to transform. + string document = 1; + + // The list of transformations to apply to the fields of the document, in + // order. + // This must not be empty. + repeated FieldTransform field_transforms = 2; +} + +// The result of applying a write. +message WriteResult { + // The last update time of the document after applying the write. Not set + // after a `delete`. + // + // If the write did not actually change the document, this will be the + // previous update_time. + google.protobuf.Timestamp update_time = 1; + + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + // same order. + repeated Value transform_results = 2; +} + +// A [Document][google.firestore.v1.Document] has changed. +// +// May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that +// ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. +// +// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical +// change, if multiple targets are affected. +message DocumentChange { + // The new state of the [Document][google.firestore.v1.Document]. + // + // If `mask` is set, contains only fields that were updated or added. + Document document = 1; + + // A set of target IDs of targets that match this document. + repeated int32 target_ids = 5; + + // A set of target IDs for targets that no longer match this document. + repeated int32 removed_target_ids = 6; +} + +// A [Document][google.firestore.v1.Document] has been deleted. +// +// May be the result of multiple [writes][google.firestore.v1.Write], including updates, the +// last of which deleted the [Document][google.firestore.v1.Document]. +// +// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical +// delete, if multiple targets are affected. +message DocumentDelete { + // The resource name of the [Document][google.firestore.v1.Document] that was deleted. + string document = 1; + + // A set of target IDs for targets that previously matched this entity. + repeated int32 removed_target_ids = 6; + + // The read timestamp at which the delete was observed. + // + // Greater or equal to the `commit_time` of the delete. + google.protobuf.Timestamp read_time = 4; +} + +// A [Document][google.firestore.v1.Document] has been removed from the view of the targets. +// +// Sent if the document is no longer relevant to a target and is out of view. +// Can be sent instead of a DocumentDelete or a DocumentChange if the server +// can not send the new value of the document. +// +// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical +// write or delete, if multiple targets are affected. +message DocumentRemove { + // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. + string document = 1; + + // A set of target IDs for targets that previously matched this document. + repeated int32 removed_target_ids = 2; + + // The read timestamp at which the remove was observed. + // + // Greater or equal to the `commit_time` of the change/delete/remove. + google.protobuf.Timestamp read_time = 4; +} + +// A digest of all the documents that match a given target. +message ExistenceFilter { + // The target ID to which this filter applies. + int32 target_id = 1; + + // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. + // + // If different from the count of documents in the client that match, the + // client must manually determine which documents no longer match the target. + int32 count = 2; +} diff --git a/google/firestore/v1beta1/BUILD.bazel b/google/firestore/v1beta1/BUILD.bazel new file mode 100644 index 000000000..8d4aa5895 --- /dev/null +++ b/google/firestore/v1beta1/BUILD.bazel @@ -0,0 +1,154 @@ +# 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 = "firestore_proto", + srcs = [ + "common.proto", + "document.proto", + "firestore.proto", + "query.proto", + "write.proto", + ], + deps = [ + "//google/api:annotations_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"], +) + +############################################################################## +# 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 = "firestore_java_proto", + deps = [":firestore_proto"], +) + +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"], +) + +java_gapic_library( + name = "firestore_java_gapic", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + service_yaml = "//google/firestore:firestore_v1beta1.yaml", + 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", + ], +) for test_name in [ + "com.google.cloud.firestore.v1beta1.FirestoreClientTest", +]] + +# Opensource 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 = [ + ":firestore_java_proto", + ":firestore_proto", + ":firestore_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 = "firestore_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/firestore/v1beta1", + 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", + src = ":firestore_proto_with_info", + gapic_yaml = "firestore_gapic.yaml", + importpath = "cloud.google.com/go/firestore/apiv1beta1", + service_yaml = "//google/firestore:firestore_v1beta1.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/apiv1beta1", +) + +# Opensource 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", + ], +) diff --git a/google/firestore/v1beta1/common.proto b/google/firestore/v1beta1/common.proto index 1422c4485..87c88a3be 100644 --- a/google/firestore/v1beta1/common.proto +++ b/google/firestore/v1beta1/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,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.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; diff --git a/google/firestore/v1beta1/document.proto b/google/firestore/v1beta1/document.proto index 9ba580a35..8a043df59 100644 --- a/google/firestore/v1beta1/document.proto +++ b/google/firestore/v1beta1/document.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.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -43,7 +44,7 @@ message Document { // The map keys represent field names. // // A simple field name contains only characters `a` to `z`, `A` to `Z`, - // `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example, + // `0` to `9`, or `_`, and must not start with `0` to `9`. For example, // `foo_bar_17`. // // Field names matching the regular expression `__.*__` are reserved. Reserved @@ -73,7 +74,7 @@ message Document { // Output only. The time at which the document was last changed. // - // This value is initally set to the `create_time` then increases + // This value is initially set to the `create_time` then increases // monotonically with each change to the document. It can also be // compared to values from other documents and the `read_time` of a query. google.protobuf.Timestamp update_time = 4; @@ -123,7 +124,8 @@ message Value { // An array value. // - // Cannot contain another array value. + // Cannot directly contain another array value, though can contain an + // map which contains another array. ArrayValue array_value = 9; // A map value. diff --git a/google/firestore/v1beta1/firestore.proto b/google/firestore/v1beta1/firestore.proto index f8707198f..b7ba79075 100644 --- a/google/firestore/v1beta1/firestore.proto +++ b/google/firestore/v1beta1/firestore.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,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"; @@ -32,11 +33,8 @@ 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. // // This service exposes several types of comparable timestamps: @@ -56,27 +54,39 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; service Firestore { // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { - option (google.api.http) = { get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" }; + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" + }; } // Lists documents. rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { - option (google.api.http) = { get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" }; + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" + }; } // Creates a new document. rpc CreateDocument(CreateDocumentRequest) returns (Document) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}" body: "document" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}" + body: "document" + }; } // Updates or inserts a document. rpc UpdateDocument(UpdateDocumentRequest) returns (Document) { - option (google.api.http) = { patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" }; + option (google.api.http) = { + patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" + body: "document" + }; } // Deletes a document. rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" }; + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" + }; } // Gets multiple documents. @@ -84,42 +94,74 @@ service Firestore { // Documents returned by this method are not guaranteed to be returned in the // same order that they were requested. rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" + body: "*" + }; } // Starts a new transaction. rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" + body: "*" + }; } // Commits a transaction, while optionally updating documents. rpc Commit(CommitRequest) returns (CommitResponse) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" + body: "*" + }; } // Rolls back a transaction. rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" + body: "*" + }; } // Runs a query. rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery" + body: "*" + additional_bindings { + post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:runQuery" + body: "*" + } + }; } // Streams batches of document updates and deletes, in order. rpc Write(stream WriteRequest) returns (stream WriteResponse) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:write" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:write" + body: "*" + }; } // Listens to changes. rpc Listen(stream ListenRequest) returns (stream ListenResponse) { - option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:listen" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{database=projects/*/databases/*}/documents:listen" + body: "*" + }; } // Lists all the collection IDs underneath a document. rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { - option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" }; + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" + body: "*" + additional_bindings { + post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds" + body: "*" + } + }; } } diff --git a/google/firestore/v1beta1/firestore_gapic.yaml b/google/firestore/v1beta1/firestore_gapic.yaml index 774691b47..9f4f05aaa 100644 --- a/google/firestore/v1beta1/firestore_gapic.yaml +++ b/google/firestore/v1beta1/firestore_gapic.yaml @@ -18,94 +18,8 @@ language_settings: package_name: Google\Cloud\Firestore\V1beta1 nodejs: package_name: firestore.v1beta1 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt + domain_layer_location: google-cloud interfaces: -# - name: google.firestore.admin.v1beta1.FirestoreAdmin -# collections: -# - name_pattern: projects/{project}/databases/{database} -# entity_name: database -# - name_pattern: projects/{project}/databases/{database}/indexes/{index} -# entity_name: index -# 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: CreateIndex -# flattening: -# groups: -# - parameters: -# - parent -# - index -# required_fields: -# - parent -# - index -# request_object_method: true -# retry_codes_name: non_idempotent -# retry_params_name: default -# field_name_patterns: -# parent: database -# timeout_millis: 60000 -# - name: ListIndexes -# flattening: -# groups: -# - parameters: -# - parent -# required_fields: -# - parent -# request_object_method: true -# 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: database -# timeout_millis: 60000 -# - name: GetIndex -# flattening: -# groups: -# - parameters: -# - name -# required_fields: -# - name -# request_object_method: false -# retry_codes_name: idempotent -# retry_params_name: default -# field_name_patterns: -# name: index -# timeout_millis: 60000 -# - name: DeleteIndex -# flattening: -# groups: -# - parameters: -# - name -# required_fields: -# - name -# request_object_method: false -# retry_codes_name: idempotent -# retry_params_name: default -# field_name_patterns: -# name: index -# timeout_millis: 60000 - name: google.firestore.v1beta1.Firestore collections: - name_pattern: projects/{project}/databases/{database} @@ -145,17 +59,16 @@ interfaces: - name: GetDocument required_fields: - name - request_object_method: true 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 - request_object_method: true page_streaming: request: page_size_field: page_size @@ -175,7 +88,6 @@ interfaces: - collection_id - document_id - document - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -191,7 +103,6 @@ interfaces: required_fields: - document - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -204,17 +115,16 @@ interfaces: - name required_fields: - name - request_object_method: true 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 - request_object_method: true retry_codes_name: idempotent retry_params_name: streaming field_name_patterns: @@ -228,7 +138,6 @@ interfaces: - database required_fields: - database - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -243,7 +152,6 @@ interfaces: required_fields: - database - writes - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -258,7 +166,6 @@ interfaces: required_fields: - database - transaction - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -267,9 +174,8 @@ interfaces: - name: RunQuery required_fields: - parent - request_object_method: true retry_codes_name: idempotent - retry_params_name: default + retry_params_name: streaming field_name_patterns: parent: document_root parent: any_path @@ -281,8 +187,8 @@ interfaces: retry_params_name: streaming field_name_patterns: database: database_root - # Five minutes - timeout_millis: 300000 + # One day + timeout_millis: 86400000 - name: Listen required_fields: - database @@ -290,8 +196,8 @@ interfaces: retry_params_name: streaming field_name_patterns: database: database_root - # Five minutes - timeout_millis: 300000 + # One day + timeout_millis: 86400000 - name: ListCollectionIds flattening: groups: @@ -299,7 +205,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -313,3 +218,10 @@ interfaces: 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/query.proto b/google/firestore/v1beta1/query.proto index 215a5c294..94eec9cbb 100644 --- a/google/firestore/v1beta1/query.proto +++ b/google/firestore/v1beta1/query.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,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.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -99,6 +100,9 @@ message StructuredQuery { // Equal. EQUAL = 5; + + // Contains. Requires that the field is an array. + ARRAY_CONTAINS = 7; } // The field to filter by. @@ -111,6 +115,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. @@ -144,20 +157,6 @@ 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. @@ -170,6 +169,11 @@ 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 02fdb1104..4e58cc121 100644 --- a/google/firestore/v1beta1/write.proto +++ b/google/firestore/v1beta1/write.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.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/common.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -41,7 +42,7 @@ message Write { // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. string delete = 2; - // Applies a tranformation to a document. + // 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. @@ -51,9 +52,10 @@ message Write { // The fields to update in this write. // // This field can be set only when the operation is `update`. - // None of the field paths in the mask may contain a reserved name. - // If the document exists on the server and has fields not referenced in the - // mask, they are left unchanged. + // If the mask is not set for an `update` and the document exists, any + // existing data will be overwritten. + // If the mask is set and the document on the server has fields not covered by + // the mask, they are left unchanged. // Fields referenced in the mask, but not present in the input document, are // deleted from the document on the server. // The field paths in this mask must not contain a reserved field name. @@ -87,6 +89,72 @@ message DocumentTransform { oneof transform_type { // Sets the field to the given server value. ServerValue set_to_server_value = 2; + + // Adds the given value to the field's current value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the given value. + // If either of the given value or the current field value are doubles, + // both values will be interpreted as doubles. Double arithmetic and + // representation of double values follow IEEE 754 semantics. + // If there is positive/negative integer overflow, the field is resolved + // to the largest magnitude positive/negative integer. + Value increment = 3; + + // Sets the field to the maximum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the given value. + // If a maximum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the larger operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + // zero input value is always the stored value. + // The maximum of any numeric value x and NaN is NaN. + Value maximum = 4; + + // Sets the field to the minimum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the input value. + // If a minimum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the smaller operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + // zero input value is always the stored value. + // The minimum of any numeric value x and NaN is NaN. + Value minimum = 5; + + // Append the given elements in order if they are not already present in + // the current field value. + // If the field is not an array, or if the field does not yet exist, it is + // first set to the empty array. + // + // Equivalent numbers of different types (e.g. 3L and 3.0) are + // considered equal when checking if a value is missing. + // NaN is equal to NaN, and Null is equal to Null. + // If the input contains multiple equivalent values, only the first will + // be considered. + // + // The corresponding transform_result will be the null value. + ArrayValue append_missing_elements = 6; + + // Remove all of the given elements from the array in the field. + // If the field is not an array, or if the field does not yet exist, it is + // set to the empty array. + // + // Equivalent numbers of the different types (e.g. 3L and 3.0) are + // considered equal when deciding whether an element should be removed. + // NaN is equal to NaN, and Null is equal to Null. + // This will remove all equivalent values if there are duplicates. + // + // The corresponding transform_result will be the null value. + ArrayValue remove_all_from_array = 7; } } diff --git a/google/genomics/v1/annotations.proto b/google/genomics/v1/annotations.proto index 0a1e999eb..dea540649 100644 --- a/google/genomics/v1/annotations.proto +++ b/google/genomics/v1/annotations.proto @@ -29,7 +29,6 @@ option java_multiple_files = true; option java_outer_classname = "AnnotationsProto"; option java_package = "com.google.genomics.v1"; - // This service provides storage and positional retrieval of genomic // reference annotations, including variant annotations. service AnnotationServiceV1 { @@ -44,26 +43,37 @@ service AnnotationServiceV1 { // All other fields may be optionally specified, unless documented as being // server-generated (for example, the `id` field). rpc CreateAnnotationSet(CreateAnnotationSetRequest) returns (AnnotationSet) { - option (google.api.http) = { post: "/v1/annotationsets" body: "annotation_set" }; + option (google.api.http) = { + post: "/v1/annotationsets" + body: "annotation_set" + }; } // Gets an annotation set. Caller must have READ permission for // the associated dataset. rpc GetAnnotationSet(GetAnnotationSetRequest) returns (AnnotationSet) { - option (google.api.http) = { get: "/v1/annotationsets/{annotation_set_id}" }; + option (google.api.http) = { + get: "/v1/annotationsets/{annotation_set_id}" + }; } // Updates an annotation set. The update must respect all mutability // restrictions and other invariants described on the annotation set resource. // Caller must have WRITE permission for the associated dataset. rpc UpdateAnnotationSet(UpdateAnnotationSetRequest) returns (AnnotationSet) { - option (google.api.http) = { put: "/v1/annotationsets/{annotation_set_id}" body: "annotation_set" }; + option (google.api.http) = { + put: "/v1/annotationsets/{annotation_set_id}" + body: "annotation_set" + }; } // Deletes an annotation set. Caller must have WRITE permission // for the associated annotation set. - rpc DeleteAnnotationSet(DeleteAnnotationSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/annotationsets/{annotation_set_id}" }; + rpc DeleteAnnotationSet(DeleteAnnotationSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/annotationsets/{annotation_set_id}" + }; } // Searches for annotation sets that match the given criteria. Annotation sets @@ -71,8 +81,12 @@ service AnnotationServiceV1 { // two queries for the same content (regardless of page size) yield annotation // sets in the same order across their respective streams of paginated // responses. Caller must have READ permission for the queried datasets. - rpc SearchAnnotationSets(SearchAnnotationSetsRequest) returns (SearchAnnotationSetsResponse) { - option (google.api.http) = { post: "/v1/annotationsets/search" body: "*" }; + rpc SearchAnnotationSets(SearchAnnotationSetsRequest) + returns (SearchAnnotationSetsResponse) { + option (google.api.http) = { + post: "/v1/annotationsets/search" + body: "*" + }; } // Creates a new annotation. Caller must have WRITE permission @@ -98,7 +112,10 @@ service AnnotationServiceV1 { // [Annotation resource][google.genomics.v1.Annotation] // for additional restrictions on each field. rpc CreateAnnotation(CreateAnnotationRequest) returns (Annotation) { - option (google.api.http) = { post: "/v1/annotations" body: "annotation" }; + option (google.api.http) = { + post: "/v1/annotations" + body: "annotation" + }; } // Creates one or more new annotations atomically. All annotations must @@ -115,26 +132,38 @@ service AnnotationServiceV1 { // For details on the requirements for each individual annotation resource, // see // [CreateAnnotation][google.genomics.v1.AnnotationServiceV1.CreateAnnotation]. - rpc BatchCreateAnnotations(BatchCreateAnnotationsRequest) returns (BatchCreateAnnotationsResponse) { - option (google.api.http) = { post: "/v1/annotations:batchCreate" body: "*" }; + rpc BatchCreateAnnotations(BatchCreateAnnotationsRequest) + returns (BatchCreateAnnotationsResponse) { + option (google.api.http) = { + post: "/v1/annotations:batchCreate" + body: "*" + }; } // Gets an annotation. Caller must have READ permission // for the associated annotation set. rpc GetAnnotation(GetAnnotationRequest) returns (Annotation) { - option (google.api.http) = { get: "/v1/annotations/{annotation_id}" }; + option (google.api.http) = { + get: "/v1/annotations/{annotation_id}" + }; } // Updates an annotation. Caller must have // WRITE permission for the associated dataset. rpc UpdateAnnotation(UpdateAnnotationRequest) returns (Annotation) { - option (google.api.http) = { put: "/v1/annotations/{annotation_id}" body: "annotation" }; + option (google.api.http) = { + put: "/v1/annotations/{annotation_id}" + body: "annotation" + }; } // Deletes an annotation. Caller must have WRITE permission for // the associated annotation set. - rpc DeleteAnnotation(DeleteAnnotationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/annotations/{annotation_id}" }; + rpc DeleteAnnotation(DeleteAnnotationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/annotations/{annotation_id}" + }; } // Searches for annotations that match the given criteria. Results are @@ -144,8 +173,12 @@ service AnnotationServiceV1 { // same content (regardless of page size) yield annotations in the same order // across their respective streams of paginated responses. Caller must have // READ permission for the queried annotation sets. - rpc SearchAnnotations(SearchAnnotationsRequest) returns (SearchAnnotationsResponse) { - option (google.api.http) = { post: "/v1/annotations/search" body: "*" }; + rpc SearchAnnotations(SearchAnnotationsRequest) + returns (SearchAnnotationsResponse) { + option (google.api.http) = { + post: "/v1/annotations/search" + body: "*" + }; } } diff --git a/google/genomics/v1/cigar.proto b/google/genomics/v1/cigar.proto index e70e94387..29f9fa536 100644 --- a/google/genomics/v1/cigar.proto +++ b/google/genomics/v1/cigar.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "CigarProto"; option java_package = "com.google.genomics.v1"; - // A single CIGAR operation. message CigarUnit { // Describes the different types of CIGAR alignment operations that exist. diff --git a/google/genomics/v1/datasets.proto b/google/genomics/v1/datasets.proto index d312f3d1c..065942fc8 100644 --- a/google/genomics/v1/datasets.proto +++ b/google/genomics/v1/datasets.proto @@ -29,7 +29,6 @@ option java_multiple_files = true; option java_outer_classname = "DatasetsProto"; option java_package = "com.google.genomics.v1"; - // This service manages datasets, which are collections of genomic data. service DatasetServiceV1 { // Lists datasets within a project. @@ -38,7 +37,9 @@ service DatasetServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { - option (google.api.http) = { get: "/v1/datasets" }; + option (google.api.http) = { + get: "/v1/datasets" + }; } // Creates a new dataset. @@ -47,7 +48,10 @@ service DatasetServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc CreateDataset(CreateDatasetRequest) returns (Dataset) { - option (google.api.http) = { post: "/v1/datasets" body: "dataset" }; + option (google.api.http) = { + post: "/v1/datasets" + body: "dataset" + }; } // Gets a dataset by ID. @@ -56,7 +60,9 @@ service DatasetServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc GetDataset(GetDatasetRequest) returns (Dataset) { - option (google.api.http) = { get: "/v1/datasets/{dataset_id}" }; + option (google.api.http) = { + get: "/v1/datasets/{dataset_id}" + }; } // Updates a dataset. @@ -67,7 +73,10 @@ service DatasetServiceV1 { // // This method supports patch semantics. rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { - option (google.api.http) = { patch: "/v1/datasets/{dataset_id}" body: "dataset" }; + option (google.api.http) = { + patch: "/v1/datasets/{dataset_id}" + body: "dataset" + }; } // Deletes a dataset and all of its contents (all read group sets, @@ -81,7 +90,9 @@ service DatasetServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/datasets/{dataset_id}" }; + option (google.api.http) = { + delete: "/v1/datasets/{dataset_id}" + }; } // Undeletes a dataset by restoring a dataset which was deleted via this API. @@ -92,7 +103,10 @@ service DatasetServiceV1 { // // This operation is only possible for a week after the deletion occurred. rpc UndeleteDataset(UndeleteDatasetRequest) returns (Dataset) { - option (google.api.http) = { post: "/v1/datasets/{dataset_id}:undelete" body: "*" }; + option (google.api.http) = { + post: "/v1/datasets/{dataset_id}:undelete" + body: "*" + }; } // Sets the access control policy on the specified dataset. Replaces any @@ -104,8 +118,12 @@ service DatasetServiceV1 { // // See Setting a // Policy for more information. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { post: "/v1/{resource=datasets/*}:setIamPolicy" body: "*" }; + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=datasets/*}:setIamPolicy" + body: "*" + }; } // Gets the access control policy for the dataset. This is empty if the @@ -117,8 +135,12 @@ service DatasetServiceV1 { // For the definitions of datasets and other genomics resources, see // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { post: "/v1/{resource=datasets/*}:getIamPolicy" body: "*" }; + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=datasets/*}:getIamPolicy" + body: "*" + }; } // Returns permissions that a caller has on the specified resource. @@ -128,8 +150,12 @@ service DatasetServiceV1 { // For the definitions of datasets and other genomics resources, see // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { post: "/v1/{resource=datasets/*}:testIamPermissions" body: "*" }; + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=datasets/*}:testIamPermissions" + body: "*" + }; } } diff --git a/google/genomics/v1/operations.proto b/google/genomics/v1/operations.proto index 12bf7d2a3..19423b7d8 100644 --- a/google/genomics/v1/operations.proto +++ b/google/genomics/v1/operations.proto @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "OperationsProto"; option java_package = "com.google.genomics.v1"; - // Metadata describing an [Operation][google.longrunning.Operation]. message OperationMetadata { // The Google Cloud Project in which the job is scoped. diff --git a/google/genomics/v1/position.proto b/google/genomics/v1/position.proto index b4e2403d6..5017fae88 100644 --- a/google/genomics/v1/position.proto +++ b/google/genomics/v1/position.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "PositionProto"; option java_package = "com.google.genomics.v1"; - // An abstraction for referring to a genomic position, in relation to some // already known reference. For now, represents a genomic position as a // reference name, a base number on that reference (0-based), and a diff --git a/google/genomics/v1/range.proto b/google/genomics/v1/range.proto index 4f2a45405..c4a685683 100644 --- a/google/genomics/v1/range.proto +++ b/google/genomics/v1/range.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "RangeProto"; option java_package = "com.google.genomics.v1"; - // A 0-based half-open genomic coordinate range for search requests. message Range { // The reference sequence name, for example `chr1`, diff --git a/google/genomics/v1/readalignment.proto b/google/genomics/v1/readalignment.proto index c505584c5..1eb464034 100644 --- a/google/genomics/v1/readalignment.proto +++ b/google/genomics/v1/readalignment.proto @@ -27,7 +27,6 @@ option java_multiple_files = true; option java_outer_classname = "ReadAlignmentProto"; option java_package = "com.google.genomics.v1"; - // A linear alignment can be represented by one CIGAR string. Describes the // mapped position and local alignment of the read to the reference. message LinearAlignment { diff --git a/google/genomics/v1/readgroup.proto b/google/genomics/v1/readgroup.proto index 73e05769e..a72a78001 100644 --- a/google/genomics/v1/readgroup.proto +++ b/google/genomics/v1/readgroup.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "ReadGroupProto"; option java_package = "com.google.genomics.v1"; - // A read group is all the data that's processed the same way by the sequencer. message ReadGroup { message Experiment { diff --git a/google/genomics/v1/readgroupset.proto b/google/genomics/v1/readgroupset.proto index 8d5131e1a..b40d90042 100644 --- a/google/genomics/v1/readgroupset.proto +++ b/google/genomics/v1/readgroupset.proto @@ -26,7 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "ReadGroupSetProto"; option java_package = "com.google.genomics.v1"; - // A read group set is a logical collection of read groups, which are // collections of reads produced by a sequencer. A read group set typically // models reads corresponding to one sample, sequenced one way, and aligned one diff --git a/google/genomics/v1/reads.proto b/google/genomics/v1/reads.proto index f574707e3..316dec73b 100644 --- a/google/genomics/v1/reads.proto +++ b/google/genomics/v1/reads.proto @@ -30,12 +30,14 @@ option java_multiple_files = true; option java_outer_classname = "ReadsProto"; option java_package = "com.google.genomics.v1"; - service StreamingReadService { // Returns a stream of all the reads matching the search request, ordered // by reference name, position, and ID. rpc StreamReads(StreamReadsRequest) returns (stream StreamReadsResponse) { - option (google.api.http) = { post: "/v1/reads:stream" body: "*" }; + option (google.api.http) = { + post: "/v1/reads:stream" + body: "*" + }; } } @@ -59,8 +61,12 @@ service ReadServiceV1 { // their qualities (also the "BQ" and "OQ" tags, if any) will be reversed // - Unmapped reads will be stripped of positional information (reference name // and position) - rpc ImportReadGroupSets(ImportReadGroupSetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/readgroupsets:import" body: "*" }; + rpc ImportReadGroupSets(ImportReadGroupSetsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/readgroupsets:import" + body: "*" + }; } // Exports a read group set to a BAM file in Google Cloud Storage. @@ -73,8 +79,12 @@ service ReadServiceV1 { // files and the original BAM file at the time of import. See // [ImportReadGroupSets][google.genomics.v1.ReadServiceV1.ImportReadGroupSets] // for caveats. - rpc ExportReadGroupSet(ExportReadGroupSetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/readgroupsets/{read_group_set_id}:export" body: "*" }; + rpc ExportReadGroupSet(ExportReadGroupSetRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/readgroupsets/{read_group_set_id}:export" + body: "*" + }; } // Searches for read group sets matching the criteria. @@ -85,8 +95,12 @@ service ReadServiceV1 { // // Implements // [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135). - rpc SearchReadGroupSets(SearchReadGroupSetsRequest) returns (SearchReadGroupSetsResponse) { - option (google.api.http) = { post: "/v1/readgroupsets/search" body: "*" }; + rpc SearchReadGroupSets(SearchReadGroupSetsRequest) + returns (SearchReadGroupSetsResponse) { + option (google.api.http) = { + post: "/v1/readgroupsets/search" + body: "*" + }; } // Updates a read group set. @@ -97,7 +111,10 @@ service ReadServiceV1 { // // This method supports patch semantics. rpc UpdateReadGroupSet(UpdateReadGroupSetRequest) returns (ReadGroupSet) { - option (google.api.http) = { patch: "/v1/readgroupsets/{read_group_set_id}" body: "read_group_set" }; + option (google.api.http) = { + patch: "/v1/readgroupsets/{read_group_set_id}" + body: "read_group_set" + }; } // Deletes a read group set. @@ -105,8 +122,11 @@ service ReadServiceV1 { // For the definitions of read group sets and other genomics resources, see // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - rpc DeleteReadGroupSet(DeleteReadGroupSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/readgroupsets/{read_group_set_id}" }; + rpc DeleteReadGroupSet(DeleteReadGroupSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/readgroupsets/{read_group_set_id}" + }; } // Gets a read group set by ID. @@ -115,7 +135,9 @@ service ReadServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc GetReadGroupSet(GetReadGroupSetRequest) returns (ReadGroupSet) { - option (google.api.http) = { get: "/v1/readgroupsets/{read_group_set_id}" }; + option (google.api.http) = { + get: "/v1/readgroupsets/{read_group_set_id}" + }; } // Lists fixed width coverage buckets for a read group set, each of which @@ -131,8 +153,11 @@ service ReadServiceV1 { // precomputed bucket widths, enabling retrieval of various coverage 'zoom // levels'. The caller must have READ permissions for the target read group // set. - rpc ListCoverageBuckets(ListCoverageBucketsRequest) returns (ListCoverageBucketsResponse) { - option (google.api.http) = { get: "/v1/readgroupsets/{read_group_set_id}/coveragebuckets" }; + rpc ListCoverageBuckets(ListCoverageBucketsRequest) + returns (ListCoverageBucketsResponse) { + option (google.api.http) = { + get: "/v1/readgroupsets/{read_group_set_id}/coveragebuckets" + }; } // Gets a list of reads for one or more read group sets. @@ -160,7 +185,10 @@ service ReadServiceV1 { // Implements // [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85). rpc SearchReads(SearchReadsRequest) returns (SearchReadsResponse) { - option (google.api.http) = { post: "/v1/reads/search" body: "*" }; + option (google.api.http) = { + post: "/v1/reads/search" + body: "*" + }; } } diff --git a/google/genomics/v1/references.proto b/google/genomics/v1/references.proto index 4ab107375..fb9dc4e63 100644 --- a/google/genomics/v1/references.proto +++ b/google/genomics/v1/references.proto @@ -24,7 +24,6 @@ option java_multiple_files = true; option java_outer_classname = "ReferencesProto"; option java_package = "com.google.genomics.v1"; - service ReferenceServiceV1 { // Searches for reference sets which match the given criteria. // @@ -34,8 +33,12 @@ service ReferenceServiceV1 { // // Implements // [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) - rpc SearchReferenceSets(SearchReferenceSetsRequest) returns (SearchReferenceSetsResponse) { - option (google.api.http) = { post: "/v1/referencesets/search" body: "*" }; + rpc SearchReferenceSets(SearchReferenceSetsRequest) + returns (SearchReferenceSetsResponse) { + option (google.api.http) = { + post: "/v1/referencesets/search" + body: "*" + }; } // Gets a reference set. @@ -47,7 +50,9 @@ service ReferenceServiceV1 { // Implements // [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83). rpc GetReferenceSet(GetReferenceSetRequest) returns (ReferenceSet) { - option (google.api.http) = { get: "/v1/referencesets/{reference_set_id}" }; + option (google.api.http) = { + get: "/v1/referencesets/{reference_set_id}" + }; } // Searches for references which match the given criteria. @@ -58,8 +63,12 @@ service ReferenceServiceV1 { // // Implements // [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146). - rpc SearchReferences(SearchReferencesRequest) returns (SearchReferencesResponse) { - option (google.api.http) = { post: "/v1/references/search" body: "*" }; + rpc SearchReferences(SearchReferencesRequest) + returns (SearchReferencesResponse) { + option (google.api.http) = { + post: "/v1/references/search" + body: "*" + }; } // Gets a reference. @@ -71,7 +80,9 @@ service ReferenceServiceV1 { // Implements // [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158). rpc GetReference(GetReferenceRequest) returns (Reference) { - option (google.api.http) = { get: "/v1/references/{reference_id}" }; + option (google.api.http) = { + get: "/v1/references/{reference_id}" + }; } // Lists the bases in a reference, optionally restricted to a range. @@ -83,7 +94,9 @@ service ReferenceServiceV1 { // Implements // [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221). rpc ListBases(ListBasesRequest) returns (ListBasesResponse) { - option (google.api.http) = { get: "/v1/references/{reference_id}/bases" }; + option (google.api.http) = { + get: "/v1/references/{reference_id}/bases" + }; } } diff --git a/google/genomics/v1/variants.proto b/google/genomics/v1/variants.proto index bdd80f986..472a06f5f 100644 --- a/google/genomics/v1/variants.proto +++ b/google/genomics/v1/variants.proto @@ -28,12 +28,15 @@ option java_multiple_files = true; option java_outer_classname = "VariantsProto"; option java_package = "com.google.genomics.v1"; - service StreamingVariantService { // Returns a stream of all the variants matching the search request, ordered // by reference name, position, and ID. - rpc StreamVariants(StreamVariantsRequest) returns (stream StreamVariantsResponse) { - option (google.api.http) = { post: "/v1/variants:stream" body: "*" }; + rpc StreamVariants(StreamVariantsRequest) + returns (stream StreamVariantsResponse) { + option (google.api.http) = { + post: "/v1/variants:stream" + body: "*" + }; } } @@ -56,8 +59,12 @@ service VariantServiceV1 { // be moved to the call level; these are sometimes interpreted in a // call-specific context. // Imported VCF headers are appended to the metadata already in a variant set. - rpc ImportVariants(ImportVariantsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/variants:import" body: "*" }; + rpc ImportVariants(ImportVariantsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/variants:import" + body: "*" + }; } // Creates a new variant set. @@ -70,7 +77,10 @@ service VariantServiceV1 { // fields are optional. Note that the `id` field will be ignored, as this is // assigned by the server. rpc CreateVariantSet(CreateVariantSetRequest) returns (VariantSet) { - option (google.api.http) = { post: "/v1/variantsets" body: "variant_set" }; + option (google.api.http) = { + post: "/v1/variantsets" + body: "variant_set" + }; } // Exports variant set data to an external destination. @@ -78,8 +88,12 @@ service VariantServiceV1 { // For the definitions of variant sets and other genomics resources, see // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - rpc ExportVariantSet(ExportVariantSetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1/variantsets/{variant_set_id}:export" body: "*" }; + rpc ExportVariantSet(ExportVariantSetRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/variantsets/{variant_set_id}:export" + body: "*" + }; } // Gets a variant set by ID. @@ -88,7 +102,9 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc GetVariantSet(GetVariantSetRequest) returns (VariantSet) { - option (google.api.http) = { get: "/v1/variantsets/{variant_set_id}" }; + option (google.api.http) = { + get: "/v1/variantsets/{variant_set_id}" + }; } // Returns a list of all variant sets matching search criteria. @@ -99,8 +115,12 @@ service VariantServiceV1 { // // Implements // [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). - rpc SearchVariantSets(SearchVariantSetsRequest) returns (SearchVariantSetsResponse) { - option (google.api.http) = { post: "/v1/variantsets/search" body: "*" }; + rpc SearchVariantSets(SearchVariantSetsRequest) + returns (SearchVariantSetsResponse) { + option (google.api.http) = { + post: "/v1/variantsets/search" + body: "*" + }; } // Deletes a variant set including all variants, call sets, and calls within. @@ -109,8 +129,11 @@ service VariantServiceV1 { // For the definitions of variant sets and other genomics resources, see // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - rpc DeleteVariantSet(DeleteVariantSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/variantsets/{variant_set_id}" }; + rpc DeleteVariantSet(DeleteVariantSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/variantsets/{variant_set_id}" + }; } // Updates a variant set using patch semantics. @@ -119,7 +142,10 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc UpdateVariantSet(UpdateVariantSetRequest) returns (VariantSet) { - option (google.api.http) = { patch: "/v1/variantsets/{variant_set_id}" body: "variant_set" }; + option (google.api.http) = { + patch: "/v1/variantsets/{variant_set_id}" + body: "variant_set" + }; } // Gets a list of variants matching the criteria. @@ -131,7 +157,10 @@ service VariantServiceV1 { // Implements // [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126). rpc SearchVariants(SearchVariantsRequest) returns (SearchVariantsResponse) { - option (google.api.http) = { post: "/v1/variants/search" body: "*" }; + option (google.api.http) = { + post: "/v1/variants/search" + body: "*" + }; } // Creates a new variant. @@ -140,7 +169,10 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc CreateVariant(CreateVariantRequest) returns (Variant) { - option (google.api.http) = { post: "/v1/variants" body: "variant" }; + option (google.api.http) = { + post: "/v1/variants" + body: "variant" + }; } // Updates a variant. @@ -152,7 +184,10 @@ service VariantServiceV1 { // This method supports patch semantics. Returns the modified variant without // its calls. rpc UpdateVariant(UpdateVariantRequest) returns (Variant) { - option (google.api.http) = { patch: "/v1/variants/{variant_id}" body: "variant" }; + option (google.api.http) = { + patch: "/v1/variants/{variant_id}" + body: "variant" + }; } // Deletes a variant. @@ -161,7 +196,9 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc DeleteVariant(DeleteVariantRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/variants/{variant_id}" }; + option (google.api.http) = { + delete: "/v1/variants/{variant_id}" + }; } // Gets a variant by ID. @@ -170,7 +207,9 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc GetVariant(GetVariantRequest) returns (Variant) { - option (google.api.http) = { get: "/v1/variants/{variant_id}" }; + option (google.api.http) = { + get: "/v1/variants/{variant_id}" + }; } // Merges the given variants with existing variants. @@ -265,7 +304,10 @@ service VariantServiceV1 { // This may be the desired outcome, but it is up to the user to determine if // if that is indeed the case. rpc MergeVariants(MergeVariantsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/variants:merge" body: "*" }; + option (google.api.http) = { + post: "/v1/variants:merge" + body: "*" + }; } // Gets a list of call sets matching the criteria. @@ -277,7 +319,10 @@ service VariantServiceV1 { // Implements // [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178). rpc SearchCallSets(SearchCallSetsRequest) returns (SearchCallSetsResponse) { - option (google.api.http) = { post: "/v1/callsets/search" body: "*" }; + option (google.api.http) = { + post: "/v1/callsets/search" + body: "*" + }; } // Creates a new call set. @@ -286,7 +331,10 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc CreateCallSet(CreateCallSetRequest) returns (CallSet) { - option (google.api.http) = { post: "/v1/callsets" body: "call_set" }; + option (google.api.http) = { + post: "/v1/callsets" + body: "call_set" + }; } // Updates a call set. @@ -297,7 +345,10 @@ service VariantServiceV1 { // // This method supports patch semantics. rpc UpdateCallSet(UpdateCallSetRequest) returns (CallSet) { - option (google.api.http) = { patch: "/v1/callsets/{call_set_id}" body: "call_set" }; + option (google.api.http) = { + patch: "/v1/callsets/{call_set_id}" + body: "call_set" + }; } // Deletes a call set. @@ -306,7 +357,9 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc DeleteCallSet(DeleteCallSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/callsets/{call_set_id}" }; + option (google.api.http) = { + delete: "/v1/callsets/{call_set_id}" + }; } // Gets a call set by ID. @@ -315,7 +368,9 @@ service VariantServiceV1 { // [Fundamentals of Google // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) rpc GetCallSet(GetCallSetRequest) returns (CallSet) { - option (google.api.http) = { get: "/v1/callsets/{call_set_id}" }; + option (google.api.http) = { + get: "/v1/callsets/{call_set_id}" + }; } } diff --git a/google/genomics/v1alpha2/pipelines.proto b/google/genomics/v1alpha2/pipelines.proto index c0f510223..51b92ce46 100644 --- a/google/genomics/v1alpha2/pipelines.proto +++ b/google/genomics/v1alpha2/pipelines.proto @@ -29,7 +29,6 @@ option java_multiple_files = true; option java_outer_classname = "PipelinesProto"; option java_package = "com.google.genomics.v1a"; - // A service for running genomics pipelines. service PipelinesV1Alpha2 { // Creates a pipeline that can be run later. Create takes a Pipeline that @@ -39,7 +38,10 @@ service PipelinesV1Alpha2 { // // Caller must have WRITE permission to the project. rpc CreatePipeline(CreatePipelineRequest) returns (Pipeline) { - option (google.api.http) = { post: "/v1alpha2/pipelines" body: "pipeline" }; + option (google.api.http) = { + post: "/v1alpha2/pipelines" + body: "pipeline" + }; } // Runs a pipeline. If `pipelineId` is specified in the request, then @@ -50,41 +52,57 @@ service PipelinesV1Alpha2 { // is stored and WRITE permission to the project where the pipeline will be // run, as VMs will be created and storage will be used. rpc RunPipeline(RunPipelineRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { post: "/v1alpha2/pipelines:run" body: "*" }; + option (google.api.http) = { + post: "/v1alpha2/pipelines:run" + body: "*" + }; } // Retrieves a pipeline based on ID. // // Caller must have READ permission to the project. rpc GetPipeline(GetPipelineRequest) returns (Pipeline) { - option (google.api.http) = { get: "/v1alpha2/pipelines/{pipeline_id}" }; + option (google.api.http) = { + get: "/v1alpha2/pipelines/{pipeline_id}" + }; } // Lists pipelines. // // Caller must have READ permission to the project. rpc ListPipelines(ListPipelinesRequest) returns (ListPipelinesResponse) { - option (google.api.http) = { get: "/v1alpha2/pipelines" }; + option (google.api.http) = { + get: "/v1alpha2/pipelines" + }; } // Deletes a pipeline based on ID. // // Caller must have WRITE permission to the project. rpc DeletePipeline(DeletePipelineRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1alpha2/pipelines/{pipeline_id}" }; + option (google.api.http) = { + delete: "/v1alpha2/pipelines/{pipeline_id}" + }; } // Gets controller configuration information. Should only be called // by VMs created by the Pipelines Service and not by end users. - rpc GetControllerConfig(GetControllerConfigRequest) returns (ControllerConfig) { - option (google.api.http) = { get: "/v1alpha2/pipelines:getControllerConfig" }; + rpc GetControllerConfig(GetControllerConfigRequest) + returns (ControllerConfig) { + option (google.api.http) = { + get: "/v1alpha2/pipelines:getControllerConfig" + }; } // Sets status of a given operation. Any new timestamps (as determined by // description) are appended to TimestampEvents. Should only be called by VMs // created by the Pipelines Service and not by end users. - rpc SetOperationStatus(SetOperationStatusRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { put: "/v1alpha2/pipelines:setOperationStatus" body: "*" }; + rpc SetOperationStatus(SetOperationStatusRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + put: "/v1alpha2/pipelines:setOperationStatus" + body: "*" + }; } } diff --git a/google/home/graph/v1/device.proto b/google/home/graph/v1/device.proto index 62021289e..78a480ec5 100644 --- a/google/home/graph/v1/device.proto +++ b/google/home/graph/v1/device.proto @@ -22,7 +22,6 @@ 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. message Device { // Third-party partner's device ID. @@ -59,6 +58,15 @@ message Device { // Custom JSON data provided by the manufacturer and attached to QUERY and // EXECUTE requests in AoG. string custom_data = 10; + + // 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). + // + // 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; } // Different names for the device. @@ -88,3 +96,12 @@ message DeviceInfo { // Device software version. string sw_version = 4; } + +// Identifies a device in the third party or first party system. +message AgentOtherDeviceId { + // The agent's ID. Generally it is the agent's AoG project id. + string agent_id = 1; + + // Device ID defined by the agent. The device_id must be unique. + string device_id = 2; +} diff --git a/google/home/graph/v1/homegraph.proto b/google/home/graph/v1/homegraph.proto index 194704b46..b8b277add 100644 --- a/google/home/graph/v1/homegraph.proto +++ b/google/home/graph/v1/homegraph.proto @@ -35,10 +35,12 @@ service HomeGraphApiService { // // // Third-party user's identity is passed in as 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. - rpc RequestSyncDevices(RequestSyncDevicesRequest) returns (RequestSyncDevicesResponse) { + // (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. + rpc RequestSyncDevices(RequestSyncDevicesRequest) + returns (RequestSyncDevicesResponse) { option (google.api.http) = { post: "/v1/devices:requestSync" body: "*" @@ -56,7 +58,8 @@ service HomeGraphApiService { // // 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. - rpc ReportStateAndNotification(ReportStateAndNotificationRequest) returns (ReportStateAndNotificationResponse) { + rpc ReportStateAndNotification(ReportStateAndNotificationRequest) + returns (ReportStateAndNotificationResponse) { option (google.api.http) = { post: "/v1/devices:reportStateAndNotification" body: "*" @@ -125,15 +128,13 @@ message RequestSyncDevicesRequest { // Response type for RequestSyncDevices call. Intentionally empty upon success. // An HTTP response code is returned with more details upon failure. -message RequestSyncDevicesResponse { - -} +message RequestSyncDevicesResponse {} // Sample ReportStateAndNotificationRequest, with states and notifications // defined per device_id (eg: "123" and "456" in the following example): // { // "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", -// "agent_user_id": "1234", +// "agentUserId": "1234", // "payload": { // "devices": { // "states": { @@ -174,7 +175,7 @@ message RequestSyncDevicesResponse { // 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: 5. +// Next tag: 6. message ReportStateAndNotificationRequest { // Request id used for debugging. string request_id = 1; @@ -185,6 +186,9 @@ message ReportStateAndNotificationRequest { // Required. Third-party user id. string agent_user_id = 2; + // 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. diff --git a/google/home/graph/v1/homegraph_gapic.yaml b/google/home/graph/v1/homegraph_gapic.yaml index 733424729..f133f4827 100644 --- a/google/home/graph/v1/homegraph_gapic.yaml +++ b/google/home/graph/v1/homegraph_gapic.yaml @@ -16,12 +16,6 @@ language_settings: package_name: Google\Home\Graph\V1 nodejs: package_name: google.home.graph.v1 -# 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. @@ -73,10 +67,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -123,7 +113,6 @@ interfaces: - agent_user_id required_fields: - agent_user_id - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 10000 @@ -138,7 +127,6 @@ interfaces: required_fields: - agent_user_id - payload - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 10000 @@ -150,7 +138,6 @@ interfaces: - agent_user_id required_fields: - agent_user_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -166,7 +153,6 @@ interfaces: required_fields: - agent_user_id - inputs - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 @@ -178,7 +164,6 @@ interfaces: - agent_user_id required_fields: - agent_user_id - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 10000 diff --git a/google/iam/BUILD.bazel b/google/iam/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/iam/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/iam/admin/v1/BUILD.bazel b/google/iam/admin/v1/BUILD.bazel new file mode 100644 index 000000000..9ca130dd5 --- /dev/null +++ b/google/iam/admin/v1/BUILD.bazel @@ -0,0 +1,78 @@ +# 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 = "iam_admin_proto", + srcs = ["iam.proto"], + deps = [ + "//google/api:annotations_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 = "iam_admin_proto_with_info", + deps = [":iam_admin_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "iam_admin_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/iam/admin/v1", + protos = [":iam_admin_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +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", + deps = [ + ":iam_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"], + importpath = "cloud.google.com/go/iam/admin/apiv1", + deps = ["//google/iam/v1:iam_go_proto"], +) + +# Opensource 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", + ], +) diff --git a/google/iam/admin/v1/iam.proto b/google/iam/admin/v1/iam.proto index 8632b4d23..174e79bd4 100644 --- a/google/iam/admin/v1/iam.proto +++ b/google/iam/admin/v1/iam.proto @@ -29,7 +29,6 @@ option java_multiple_files = true; option java_outer_classname = "IamProto"; option java_package = "com.google.iam.admin.v1"; - // Creates and manages service account objects. // // Service account is an account that belongs to your project instead @@ -48,19 +47,28 @@ option java_package = "com.google.iam.admin.v1"; // `unique_id` of the service account. service IAM { // Lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project. - rpc ListServiceAccounts(ListServiceAccountsRequest) returns (ListServiceAccountsResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*}/serviceAccounts" }; + rpc ListServiceAccounts(ListServiceAccountsRequest) + returns (ListServiceAccountsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*}/serviceAccounts" + }; } // Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) { - option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*}" }; + option (google.api.http) = { + get: "/v1/{name=projects/*/serviceAccounts/*}" + }; } // Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount] // and returns it. - rpc CreateServiceAccount(CreateServiceAccountRequest) returns (ServiceAccount) { - option (google.api.http) = { post: "/v1/{name=projects/*}/serviceAccounts" body: "*" }; + rpc CreateServiceAccount(CreateServiceAccountRequest) + returns (ServiceAccount) { + option (google.api.http) = { + post: "/v1/{name=projects/*}/serviceAccounts" + body: "*" + }; } // Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. @@ -69,39 +77,61 @@ service IAM { // `display_name` . // The `etag` is mandatory. rpc UpdateServiceAccount(ServiceAccount) returns (ServiceAccount) { - option (google.api.http) = { put: "/v1/{name=projects/*/serviceAccounts/*}" body: "*" }; + option (google.api.http) = { + put: "/v1/{name=projects/*/serviceAccounts/*}" + body: "*" + }; } // Deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/serviceAccounts/*}" }; + rpc DeleteServiceAccount(DeleteServiceAccountRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/serviceAccounts/*}" + }; } // Lists [ServiceAccountKeys][google.iam.admin.v1.ServiceAccountKey]. - rpc ListServiceAccountKeys(ListServiceAccountKeysRequest) returns (ListServiceAccountKeysResponse) { - option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*}/keys" }; + rpc ListServiceAccountKeys(ListServiceAccountKeysRequest) + returns (ListServiceAccountKeysResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/serviceAccounts/*}/keys" + }; } // Gets the [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] // by key id. - rpc GetServiceAccountKey(GetServiceAccountKeyRequest) returns (ServiceAccountKey) { - option (google.api.http) = { get: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" }; + rpc GetServiceAccountKey(GetServiceAccountKeyRequest) + returns (ServiceAccountKey) { + option (google.api.http) = { + get: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" + }; } // Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] // and returns it. - rpc CreateServiceAccountKey(CreateServiceAccountKeyRequest) returns (ServiceAccountKey) { - option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}/keys" body: "*" }; + rpc CreateServiceAccountKey(CreateServiceAccountKeyRequest) + returns (ServiceAccountKey) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}/keys" + body: "*" + }; } // Deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. - rpc DeleteServiceAccountKey(DeleteServiceAccountKeyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" }; + rpc DeleteServiceAccountKey(DeleteServiceAccountKeyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/serviceAccounts/*/keys/*}" + }; } // Signs a blob using a service account's system-managed private key. rpc SignBlob(SignBlobRequest) returns (SignBlobResponse) { - option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob" + body: "*" + }; } // Signs a JWT using a service account's system-managed private key. @@ -110,52 +140,81 @@ service IAM { // an expiry time of one hour by default. If you request an expiry time of // more than one hour, the request will fail. rpc SignJwt(SignJwtRequest) returns (SignJwtResponse) { - option (google.api.http) = { post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt" + body: "*" + }; } // Returns the IAM access control policy for a // [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:getIamPolicy" body: "" }; + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/serviceAccounts/*}:getIamPolicy" + body: "" + }; } // Sets the IAM access control policy for a // [ServiceAccount][google.iam.admin.v1.ServiceAccount]. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:setIamPolicy" body: "*" }; + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/serviceAccounts/*}:setIamPolicy" + body: "*" + }; } // 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) { - option (google.api.http) = { post: "/v1/{resource=projects/*/serviceAccounts/*}:testIamPermissions" body: "*" }; + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/serviceAccounts/*}:testIamPermissions" + body: "*" + }; } // 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) { - option (google.api.http) = { post: "/v1/roles:queryGrantableRoles" body: "*" }; + rpc QueryGrantableRoles(QueryGrantableRolesRequest) + returns (QueryGrantableRolesResponse) { + option (google.api.http) = { + post: "/v1/roles:queryGrantableRoles" + body: "*" + }; } // Lists the Roles defined on a resource. rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) { - option (google.api.http) = { get: "/v1/roles" }; + option (google.api.http) = { + get: "/v1/roles" + }; } // Gets a Role definition. rpc GetRole(GetRoleRequest) returns (Role) { - option (google.api.http) = { get: "/v1/{name=roles/*}" }; + option (google.api.http) = { + get: "/v1/{name=roles/*}" + }; } // Creates a new Role. rpc CreateRole(CreateRoleRequest) returns (Role) { - option (google.api.http) = { post: "/v1/{parent=organizations/*}/roles" body: "*" }; + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/roles" + body: "*" + }; } // Updates a Role definition. rpc UpdateRole(UpdateRoleRequest) returns (Role) { - option (google.api.http) = { patch: "/v1/{name=organizations/*/roles/*}" body: "role" }; + option (google.api.http) = { + patch: "/v1/{name=organizations/*/roles/*}" + body: "role" + }; } // Soft deletes a role. The role is suspended and cannot be used to create new @@ -166,18 +225,27 @@ service IAM { // within 7 days. After 7 days the Role is deleted and all Bindings associated // with the role are removed. rpc DeleteRole(DeleteRoleRequest) returns (Role) { - option (google.api.http) = { delete: "/v1/{name=organizations/*/roles/*}" }; + option (google.api.http) = { + delete: "/v1/{name=organizations/*/roles/*}" + }; } // Undelete a Role, bringing it back in its previous state. rpc UndeleteRole(UndeleteRoleRequest) returns (Role) { - option (google.api.http) = { post: "/v1/{name=organizations/*/roles/*}:undelete" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=organizations/*/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) { - option (google.api.http) = { post: "/v1/permissions:queryTestablePermissions" body: "*" }; + rpc QueryTestablePermissions(QueryTestablePermissionsRequest) + returns (QueryTestablePermissionsResponse) { + option (google.api.http) = { + post: "/v1/permissions:queryTestablePermissions" + body: "*" + }; } } @@ -244,8 +312,8 @@ message CreateServiceAccountRequest { // `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. string account_id = 2; - // The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to create. - // Currently, only the following values are user assignable: + // The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to + // create. Currently, only the following values are user assignable: // `display_name` . ServiceAccount service_account = 3; } diff --git a/google/iam/admin/v1/iam_gapic.yaml b/google/iam/admin/v1/iam_gapic.yaml index 9cda1b194..cf122127a 100644 --- a/google/iam/admin/v1/iam_gapic.yaml +++ b/google/iam/admin/v1/iam_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: iam.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.iam.admin.v1.IAM collections: @@ -55,7 +52,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -75,7 +71,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -91,7 +86,6 @@ interfaces: required_fields: - name - account_id - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -100,7 +94,6 @@ interfaces: - name: UpdateServiceAccount required_fields: - etag - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -113,7 +106,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -127,7 +119,6 @@ interfaces: - key_types required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -141,7 +132,6 @@ interfaces: - public_key_type required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -156,7 +146,6 @@ interfaces: - key_algorithm required_fields: - name - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -169,7 +158,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -184,7 +172,6 @@ interfaces: required_fields: - name - bytes_to_sign - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -197,7 +184,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -216,7 +202,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -235,7 +220,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -248,7 +232,6 @@ interfaces: - full_resource_name required_fields: - full_resource_name - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -261,7 +244,6 @@ interfaces: required_fields: - name - payload - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/iam/artman_iam.yaml b/google/iam/artman_iam.yaml index e0e2255b4..7ef4e85a5 100644 --- a/google/iam/artman_iam.yaml +++ b/google/iam/artman_iam.yaml @@ -11,22 +11,6 @@ artifacts: - name: java_grpc type: GRPC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/java/grpc-google-iam-v1 - - name: proto - dest: generated/java/proto-google-iam-v1 - name: php_grpc type: GRPC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - name: grpc - dest: generated/php/google-iam-v1 diff --git a/google/iam/artman_iam_admin.yaml b/google/iam/artman_iam_admin.yaml index 0aaa9b8fa..a973d6c6a 100644 --- a/google/iam/artman_iam_admin.yaml +++ b/google/iam/artman_iam_admin.yaml @@ -13,14 +13,3 @@ artifacts: - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: iam/admin/apiv1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/iam-admin-v1/vendor diff --git a/google/iam/artman_iam_meta_api.yaml b/google/iam/artman_iam_meta_api.yaml new file mode 100644 index 000000000..5d8c9a83c --- /dev/null +++ b/google/iam/artman_iam_meta_api.yaml @@ -0,0 +1,34 @@ +common: + api_name: iam_meta_api + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: iam_meta_api.yaml + gapic_yaml: v1/iam_meta_api_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/iam/credentials/BUILD.bazel b/google/iam/credentials/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/iam/credentials/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/iam/credentials/artman_iamcredentials_v1.yaml b/google/iam/credentials/artman_iamcredentials_v1.yaml new file mode 100644 index 000000000..5cec89943 --- /dev/null +++ b/google/iam/credentials/artman_iamcredentials_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: iamcredentials + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: iamcredentials_v1.yaml + gapic_yaml: v1/iamcredentials_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 \ No newline at end of file diff --git a/google/iam/credentials/iamcredentials_v1.yaml b/google/iam/credentials/iamcredentials_v1.yaml new file mode 100644 index 000000000..bba6921cf --- /dev/null +++ b/google/iam/credentials/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: IAM Service Account Credentials API + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/iam/credentials/v1/BUILD.bazel b/google/iam/credentials/v1/BUILD.bazel new file mode 100644 index 000000000..d3ac16d3c --- /dev/null +++ b/google/iam/credentials/v1/BUILD.bazel @@ -0,0 +1,141 @@ +# 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 = "iamcredentials_proto", + srcs = [ + "common.proto", + "iamcredentials.proto", + ], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "iamcredentials_proto_with_info", + deps = [":iamcredentials_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 = "iamcredentials_java_proto", + deps = [":iamcredentials_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"], +) + +java_gapic_library( + name = "iamcredentials_java_gapic", + src = ":iamcredentials_proto_with_info", + gapic_yaml = "iamcredentials_gapic.yaml", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + test_deps = [":iamcredentials_java_grpc"], + deps = [ + ":iamcredentials_java_proto", + ":iamcredentials_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[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", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "iamcredentials_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"], +) + +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", + service_yaml = "//google/iam/credentials:iamcredentials_v1.yaml", + deps = [":iamcredentials_go_proto"], +) + +go_test( + name = "iamcredentials_go_gapic_test", + srcs = [":iamcredentials_go_gapic_srcjar_test"], + embed = [":iamcredentials_go_gapic"], + importpath = "cloud.google.com/go/iam/credentials/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-iamcredentials-v1-go", + deps = [ + ":iamcredentials_go_gapic", + ":iamcredentials_go_gapic_srcjar-smoke-test.srcjar", + ":iamcredentials_go_gapic_srcjar-test.srcjar", + ":iamcredentials_go_proto", + ], +) diff --git a/google/iam/credentials/v1/common.proto b/google/iam/credentials/v1/common.proto new file mode 100644 index 000000000..6ba010199 --- /dev/null +++ b/google/iam/credentials/v1/common.proto @@ -0,0 +1,154 @@ +// 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.iam.credentials.v1; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/iam/credentials/v1;credentials"; +option java_multiple_files = true; +option java_outer_classname = "IAMCredentialsCommonProto"; +option java_package = "com.google.cloud.iam.credentials.v1"; + +message GenerateAccessTokenRequest { + // 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; + + // The sequence of service accounts in a delegation chain. Each service + // account must be granted the `roles/iam.serviceAccountTokenCreator` role + // on its next service account in the chain. The last service account in the + // chain must be granted the `roles/iam.serviceAccountTokenCreator` role + // on the service account that is specified in the `name` field of the + // request. + // + // The delegates must have the following format: + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + repeated string delegates = 2; + + // 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; + + // 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 + // not specified, the token's lifetime will be set to a default value of one + // hour. + google.protobuf.Duration lifetime = 7; +} + +message GenerateAccessTokenResponse { + // The OAuth 2.0 access token. + string access_token = 1; + + // Token expiration time. + // The expiration time is always set. + google.protobuf.Timestamp expire_time = 3; +} + +message SignBlobRequest { + // 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; + + // The sequence of service accounts in a delegation chain. Each service + // account must be granted the `roles/iam.serviceAccountTokenCreator` role + // on its next service account in the chain. The last service account in the + // chain must be granted the `roles/iam.serviceAccountTokenCreator` role + // on the service account that is specified in the `name` field of the + // request. + // + // The delegates must have the following format: + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + repeated string delegates = 3; + + // The bytes to sign. + bytes payload = 5; +} + +message SignBlobResponse { + // The ID of the key used to sign the blob. + string key_id = 1; + + // The signed blob. + bytes signed_blob = 4; +} + +message SignJwtRequest { + // 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; + + // The sequence of service accounts in a delegation chain. Each service + // account must be granted the `roles/iam.serviceAccountTokenCreator` role + // on its next service account in the chain. The last service account in the + // chain must be granted the `roles/iam.serviceAccountTokenCreator` role + // on the service account that is specified in the `name` field of the + // request. + // + // The delegates must have the following format: + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + repeated string delegates = 3; + + // The JWT payload to sign: a JSON object that contains a JWT Claims Set. + string payload = 5; +} + +message SignJwtResponse { + // The ID of the key used to sign the JWT. + string key_id = 1; + + // The signed JWT. + string signed_jwt = 2; +} + +message GenerateIdTokenRequest { + // 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; + + // The sequence of service accounts in a delegation chain. Each service + // account must be granted the `roles/iam.serviceAccountTokenCreator` role + // on its next service account in the chain. The last service account in the + // chain must be granted the `roles/iam.serviceAccountTokenCreator` role + // on the service account that is specified in the `name` field of the + // request. + // + // The delegates must have the following format: + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + repeated string delegates = 2; + + // The audience for the token, such as the API or account that this token + // grants access to. + string audience = 3; + + // Include the service account email in the token. If set to `true`, the + // token will contain `email` and `email_verified` claims. + bool include_email = 4; +} + +message GenerateIdTokenResponse { + // The OpenId Connect ID token. + string token = 1; +} diff --git a/google/iam/credentials/v1/iamcredentials.proto b/google/iam/credentials/v1/iamcredentials.proto new file mode 100644 index 000000000..3308d63a4 --- /dev/null +++ b/google/iam/credentials/v1/iamcredentials.proto @@ -0,0 +1,71 @@ +// 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.iam.credentials.v1; + +import "google/api/annotations.proto"; +import "google/iam/credentials/v1/common.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/iam/credentials/v1;credentials"; +option java_multiple_files = true; +option java_outer_classname = "IAMCredentialsProto"; +option java_package = "com.google.cloud.iam.credentials.v1"; + +// A service account is a special type of Google account that belongs to your +// application or a virtual machine (VM), instead of to an individual end user. +// Your application assumes the identity of the service account to call Google +// APIs, so that the users aren't directly involved. +// +// Service account credentials are used to temporarily assume the identity +// of the service account. Supported credential types include OAuth 2.0 access +// tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and +// more. +service IAMCredentials { + // Generates an OAuth 2.0 access token for a service account. + rpc GenerateAccessToken(GenerateAccessTokenRequest) + returns (GenerateAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken" + body: "*" + }; + } + + // Generates an OpenID Connect ID token for a service account. + rpc GenerateIdToken(GenerateIdTokenRequest) + returns (GenerateIdTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:generateIdToken" + body: "*" + }; + } + + // Signs a blob using a service account's system-managed private key. + rpc SignBlob(SignBlobRequest) returns (SignBlobResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:signBlob" + body: "*" + }; + } + + // Signs a JWT using a service account's system-managed private key. + rpc SignJwt(SignJwtRequest) returns (SignJwtResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:signJwt" + body: "*" + }; + } +} diff --git a/google/iam/credentials/v1/iamcredentials_gapic.yaml b/google/iam/credentials/v1/iamcredentials_gapic.yaml new file mode 100644 index 000000000..7524a1853 --- /dev/null +++ b/google/iam/credentials/v1/iamcredentials_gapic.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/iam_meta_api.yaml b/google/iam/iam_meta_api.yaml new file mode 100644 index 000000000..939856790 --- /dev/null +++ b/google/iam/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/BUILD.bazel b/google/iam/v1/BUILD.bazel new file mode 100644 index 000000000..2a00de815 --- /dev/null +++ b/google/iam/v1/BUILD.bazel @@ -0,0 +1,83 @@ +# 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 = "iam_policy_proto", + srcs = ["iam_policy.proto"], + deps = [ + ":policy_proto", + "//google/api:annotations_proto", + "//google/api:resource_proto", + ], +) + +proto_library( + name = "policy_proto", + srcs = ["policy.proto"], + deps = [ + "//google/api:annotations_proto", + "//google/type:expr_proto", + ], +) + +proto_library_with_info( + name = "iam_proto_with_info", + deps = [ + ":iam_policy_proto", + ":policy_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library", "java_grpc_library") + +java_proto_library( + name = "iam_java_proto", + deps = [ + ":iam_policy_proto", + ":policy_proto", + ], +) + +java_grpc_library( + name = "iam_java_grpc", + srcs = [":iam_policy_proto"], + deps = [":iam_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "iam_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/iam/v1", + protos = [ + ":iam_policy_proto", + ":policy_proto", + ], + deps = [ + "//google/api:annotations_go_proto", + "//google/type:expr_go_proto", + ], +) + +go_gapic_assembly_pkg( + name = "gapi-cloud-iam-v1-go", + deps = [ + ":iam_go_proto", + ], +) diff --git a/google/iam/v1/iam_gapic.yaml b/google/iam/v1/iam_gapic.yaml index 48ecc7f4e..e2d0a674f 100644 --- a/google/iam/v1/iam_gapic.yaml +++ b/google/iam/v1/iam_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: iam.core.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt resource_name_generation: - message_name: SetIamPolicyRequest field_entity_map: diff --git a/google/iam/v1/iam_meta_api_gapic.yaml b/google/iam/v1/iam_meta_api_gapic.yaml new file mode 100644 index 000000000..5c4c83339 --- /dev/null +++ b/google/iam/v1/iam_meta_api_gapic.yaml @@ -0,0 +1,132 @@ +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.v1 + python: + package_name: google.cloud.iam_v1.gapic + go: + package_name: cloud.google.com/go/iam/apiv1 + csharp: + package_name: Google.Iam.V1 + ruby: + package_name: Google::Cloud::Iam::V1 + php: + package_name: Google\Cloud\Iam\V1 + nodejs: + package_name: iam.v1 +# A list of API interface configurations. +interfaces: +# The fully qualified name of the API interface. +- name: google.iam.v1.IAMPolicy + # 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: SetIamPolicy + flattening: + groups: + - parameters: + - resource + - policy + required_fields: + - resource + - policy + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: GetIamPolicy + flattening: + groups: + - parameters: + - resource + - options + required_fields: + - resource + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + - name: TestIamPermissions + flattening: + groups: + - parameters: + - resource + - permissions + required_fields: + - resource + - permissions + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 diff --git a/google/iam/v1/iam_policy.proto b/google/iam/v1/iam_policy.proto index a272fe8d7..7fee0c39b 100644 --- a/google/iam/v1/iam_policy.proto +++ b/google/iam/v1/iam_policy.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,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.iam.v1; -import "google/api/annotations.proto"; +import "google/iam/v1/options.proto"; import "google/iam/v1/policy.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Iam.V1"; @@ -27,7 +30,6 @@ option java_outer_classname = "IamPolicyProto"; option java_package = "com.google.iam.v1"; option php_namespace = "Google\\Cloud\\Iam\\V1"; - // ## API Overview // // Manages Identity and Access Management (IAM) policies. @@ -54,32 +56,46 @@ option php_namespace = "Google\\Cloud\\Iam\\V1"; // are created and deleted implicitly with the resources to which they are // attached. service IAMPolicy { + option (google.api.default_host) = "iam-meta-api.googleapis.com"; + // Sets the access control policy on the specified resource. Replaces any // existing policy. rpc SetIamPolicy(SetIamPolicyRequest) returns (Policy) { - option (google.api.http) = { post: "/v1/{resource=**}:setIamPolicy" body: "*" }; + option (google.api.http) = { + post: "/v1/{resource=**}:setIamPolicy" + body: "*" + }; } // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. rpc GetIamPolicy(GetIamPolicyRequest) returns (Policy) { - option (google.api.http) = { post: "/v1/{resource=**}:getIamPolicy" body: "*" }; + option (google.api.http) = { + post: "/v1/{resource=**}:getIamPolicy" + body: "*" + }; } // Returns permissions that a caller has on the specified resource. // If the resource does not exist, this will return an empty set of // permissions, not a NOT_FOUND error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. rpc TestIamPermissions(TestIamPermissionsRequest) returns (TestIamPermissionsResponse) { - option (google.api.http) = { post: "/v1/{resource=**}:testIamPermissions" body: "*" }; + option (google.api.http) = { + post: "/v1/{resource=**}:testIamPermissions" + body: "*" + }; } } // Request message for `SetIamPolicy` method. message SetIamPolicyRequest { // REQUIRED: The resource for which the policy is being specified. - // `resource` is usually specified as a path. For example, a Project - // resource is specified as `projects/{project}`. + // See the operation documentation for the appropriate value for this field. string resource = 1; // REQUIRED: The complete policy to be applied to the `resource`. The size of @@ -92,16 +108,18 @@ message SetIamPolicyRequest { // Request message for `GetIamPolicy` method. message GetIamPolicyRequest { // REQUIRED: The resource for which the policy is being requested. - // `resource` is usually specified as a path. For example, a Project - // resource is specified as `projects/{project}`. + // See the operation documentation for the appropriate value for this field. string resource = 1; + + // OPTIONAL: A `GetPolicyOptions` object for specifying options to + // `GetIamPolicy`. This field is only used by Cloud IAM. + GetPolicyOptions options = 2; } // Request message for `TestIamPermissions` method. message TestIamPermissionsRequest { // REQUIRED: The resource for which the policy detail is being requested. - // `resource` is usually specified as a path. For example, a Project - // resource is specified as `projects/{project}`. + // See the operation documentation for the appropriate value for this field. string resource = 1; // The set of permissions to check for the `resource`. Permissions with diff --git a/google/iam/v1/logging/BUILD.bazel b/google/iam/v1/logging/BUILD.bazel new file mode 100644 index 000000000..0824cdbdf --- /dev/null +++ b/google/iam/v1/logging/BUILD.bazel @@ -0,0 +1,60 @@ +# 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 = "audit_data_proto", + srcs = [ + "audit_data.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/iam/v1:policy_proto", + ], +) + +proto_library_with_info( + name = "logging_proto_with_info", + deps = [":audit_data_proto"], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") + +java_proto_library( + name = "logging_java_proto", + deps = [":audit_data_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/iam/v1/logging", + protos = [":audit_data_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + ], +) + +go_gapic_assembly_pkg( + name = "gapi-cloud-iam-admin-go", + deps = [ + ":logging_go_proto", + ], +) diff --git a/google/iam/v1/logging/audit_data.proto b/google/iam/v1/logging/audit_data.proto index d3f803fe5..dfe441ba6 100644 --- a/google/iam/v1/logging/audit_data.proto +++ b/google/iam/v1/logging/audit_data.proto @@ -25,7 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "AuditDataProto"; option java_package = "com.google.iam.v1.logging"; - // Audit log information specific to Cloud IAM. This message is serialized // as an `Any` type in the `ServiceData` message of an // `AuditLog` message. diff --git a/google/iam/v1/options.proto b/google/iam/v1/options.proto new file mode 100644 index 000000000..24e886366 --- /dev/null +++ b/google/iam/v1/options.proto @@ -0,0 +1,37 @@ +// 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.iam.v1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Iam.V1"; +option go_package = "google.golang.org/genproto/googleapis/iam/v1;iam"; +option java_multiple_files = true; +option java_outer_classname = "OptionsProto"; +option java_package = "com.google.iam.v1"; +option php_namespace = "Google\\Cloud\\Iam\\V1"; + +// Encapsulates settings provided to GetIamPolicy. +message GetPolicyOptions { + // Optional. The 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. + int32 requested_policy_version = 1; +} diff --git a/google/iam/v1/policy.proto b/google/iam/v1/policy.proto index 9c31ccb14..e0d2e331f 100644 --- a/google/iam/v1/policy.proto +++ b/google/iam/v1/policy.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.iam.v1; +import "google/type/expr.proto"; import "google/api/annotations.proto"; option cc_enable_arenas = true; @@ -26,17 +28,16 @@ option java_outer_classname = "PolicyProto"; option java_package = "com.google.iam.v1"; option php_namespace = "Google\\Cloud\\Iam\\V1"; - // Defines an Identity and Access Management (IAM) policy. It is used to // specify access control policies for Cloud Platform resources. // // -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of +// 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. // -// **Example** +// **JSON Example** // // { // "bindings": [ @@ -46,7 +47,7 @@ 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", +// "serviceAccount:my-other-app@appspot.gserviceaccount.com" // ] // }, // { @@ -56,14 +57,27 @@ option php_namespace = "Google\\Cloud\\Iam\\V1"; // ] // } // +// **YAML Example** +// +// bindings: +// - members: +// - user:mike@example.com +// - group:admins@example.com +// - domain:google.com +// - serviceAccount:my-other-app@appspot.gserviceaccount.com +// role: roles/owner +// - members: +// - user:sean@example.com +// role: roles/viewer +// +// // For a description of IAM and its features, see the -// [IAM developer's guide](https://cloud.google.com/iam). +// [IAM developer's guide](https://cloud.google.com/iam/docs). message Policy { - // Version of the `Policy`. The default version is 0. + // Deprecated. int32 version = 1; // Associates a list of `members` to a `role`. - // Multiple `bindings` must not be specified for the same `role`. // `bindings` with no members will result in an error. repeated Binding bindings = 4; @@ -84,7 +98,6 @@ message Policy { message Binding { // Role that is assigned to `members`. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - // Required string role = 1; // Specifies the identities requesting access for a Cloud Platform resource. @@ -97,7 +110,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` or `joe@example.com`. + // account. For example, `alice@gmail.com` . // // // * `serviceAccount:{emailid}`: An email address that represents a service @@ -106,17 +119,27 @@ message Binding { // * `group:{emailid}`: An email address that represents a Google group. // For example, `admins@example.com`. // - // * `domain:{domain}`: A Google Apps domain name that represents all the + // + // * `domain:{domain}`: The G Suite domain (primary) that represents all the // users of that domain. For example, `google.com` or `example.com`. // // repeated string members = 2; + + // The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via current + // binding. Different bindings, including their conditions, are examined + // independently. + google.type.Expr condition = 3; } // The difference delta between two policies. message PolicyDelta { // The delta for Bindings between two policies. repeated BindingDelta binding_deltas = 1; + + // The delta for AuditConfigs between two policies. + repeated AuditConfigDelta audit_config_deltas = 2; } // One delta entry for Binding. Each individual change (only one member in each @@ -147,4 +170,44 @@ message BindingDelta { // Follows the same format of Binding.members. // Required string member = 3; + + // Unimplemented. The condition that is associated with this binding. + // This field is logged only for Cloud Audit Logging. + google.type.Expr condition = 4; +} + +// One delta entry for AuditConfig. Each individual change (only one +// exempted_member in each entry) to a AuditConfig will be a separate entry. +message AuditConfigDelta { + // The type of action performed on an audit configuration in a policy. + enum Action { + // Unspecified. + ACTION_UNSPECIFIED = 0; + + // Addition of an audit configuration. + ADD = 1; + + // Removal of an audit configuration. + REMOVE = 2; + } + + // The action that was performed on an audit configuration in a policy. + // Required + Action action = 1; + + // Specifies a service that was configured for Cloud Audit Logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + // Required + string service = 2; + + // A single identity that is exempted from "data access" audit + // logging for the `service` specified above. + // Follows the same format of Binding.members. + string exempted_member = 3; + + // Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + // enabled, and cannot be configured. + // Required + string log_type = 4; } diff --git a/google/logging/BUILD.bazel b/google/logging/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/logging/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/logging/artman_logging.yaml b/google/logging/artman_logging.yaml index b250274cb..d99387d32 100644 --- a/google/logging/artman_logging.yaml +++ b/google/logging/artman_logging.yaml @@ -14,21 +14,6 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-logging-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-logging-v2 - - name: proto - dest: generated/java/proto-google-cloud-logging-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-logging - name: python_gapic type: GAPIC language: PYTHON @@ -38,12 +23,6 @@ artifacts: - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-logging-v2 - name: go_gapic type: GAPIC language: GO diff --git a/google/logging/logging.yaml b/google/logging/logging.yaml index c107ccda4..d84a57a80 100644 --- a/google/logging/logging.yaml +++ b/google/logging/logging.yaml @@ -9,7 +9,7 @@ apis: - name: google.logging.v2.MetricsServiceV2 documentation: - summary: Writes log entries and manages your Stackdriver Logging configuration. + summary: Writes log entries and manages your Logging configuration. overview: |- # Introduction diff --git a/google/logging/type/BUILD.bazel b/google/logging/type/BUILD.bazel new file mode 100644 index 000000000..641e02392 --- /dev/null +++ b/google/logging/type/BUILD.bazel @@ -0,0 +1,74 @@ +# 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 = "http_request_proto", + srcs = ["http_request.proto"], + deps = [ + "//google/api:annotations_proto", + "@com_google_protobuf//:duration_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_proto_library", + "java_resource_name_proto_library", +) + +java_proto_library( + name = "type_java_proto", + deps = [ + ":http_request_proto", + ":log_severity_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", + ], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "ltype_go_proto", + importpath = "google.golang.org/genproto/googleapis/logging/type", + protos = [ + ":http_request_proto", + ":log_severity_proto", + ], + deps = ["//google/api:annotations_go_proto"], +) diff --git a/google/logging/type/http_request.proto b/google/logging/type/http_request.proto index 4bca50823..974fdf71f 100644 --- a/google/logging/type/http_request.proto +++ b/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -26,7 +27,6 @@ option java_outer_classname = "HttpRequestProto"; option java_package = "com.google.logging.type"; option php_namespace = "Google\\Cloud\\Logging\\Type"; - // A common proto for logging HTTP requests. Only contains semantics // defined by the HTTP specification. Product-specific logging // information MUST be defined in a separate message. @@ -52,7 +52,8 @@ message HttpRequest { int64 response_size = 5; // The user agent sent by the client. Example: - // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. + // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + // CLR 1.0.3705)"`. string user_agent = 6; // The IP address (IPv4 or IPv6) of the client that issued the HTTP @@ -64,7 +65,8 @@ message HttpRequest { string server_ip = 13; // The referer URL of the request, as defined in - // [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // [HTTP/1.1 Header Field + // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). string referer = 8; // The request processing latency on the server, from the time the request was diff --git a/google/logging/type/log_severity.proto b/google/logging/type/log_severity.proto index d366e0778..e6556dddc 100644 --- a/google/logging/type/log_severity.proto +++ b/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -25,7 +26,6 @@ option java_outer_classname = "LogSeverityProto"; option java_package = "com.google.logging.type"; option php_namespace = "Google\\Cloud\\Logging\\Type"; - // The severity of the event described in a log entry, expressed as one of the // standard severity levels listed below. For your reference, the levels are // assigned the listed numeric values. The effect of using numeric values other diff --git a/google/logging/v2/BUILD.bazel b/google/logging/v2/BUILD.bazel new file mode 100644 index 000000000..7a6ae416f --- /dev/null +++ b/google/logging/v2/BUILD.bazel @@ -0,0 +1,187 @@ +# 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_SUBPACKAGE_DEPS = [ + "//google/logging/type:http_request_proto", + "//google/logging/type:log_severity_proto", +] + +proto_library( + name = "logging_proto", + srcs = [ + "log_entry.proto", + "logging.proto", + "logging_config.proto", + "logging_metrics.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:monitored_resource_proto", + "//google/api:distribution_proto", + "//google/api:metric_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_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/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_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"], +) + +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"], +) + +java_gapic_library( + name = "logging_java_gapic", + src = ":logging_proto_with_info", + gapic_yaml = "logging_gapic.yaml", + service_yaml = "//google/logging: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, +) + +[java_test( + name = test_name, + test_class = test_name, + 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 +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 = [ + ":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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/logging/v2", + protos = [":logging_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/api:distribution_go_proto", + "//google/api:metric_go_proto", + "//google/api:monitoredres_go_proto", + "//google/logging/type:ltype_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", + deps = [ + ":logging_go_proto", + "//google/api:monitoredres_go_proto", + ], +) + +go_test( + name = "logging_go_gapic_test", + srcs = [":logging_go_gapic_srcjar_test"], + embed = [":logging_go_gapic"], + importpath = "cloud.google.com/go/logging/apiv2", +) + +# Opensource 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", + ], +) diff --git a/google/logging/v2/log_entry.proto b/google/logging/v2/log_entry.proto index 0e5308c21..de9786daf 100644 --- a/google/logging/v2/log_entry.proto +++ b/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -32,7 +33,6 @@ option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // An individual entry in a log. message LogEntry { // Required. The resource name of the log to which this log entry belongs: @@ -83,7 +83,7 @@ message LogEntry { // 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 Stackdriver Logging assigns it the current time. + // 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. // @@ -95,7 +95,7 @@ message LogEntry { // [LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; - // Output only. The time the log entry was received by Stackdriver Logging. + // Output only. The time the log entry was received by Logging. google.protobuf.Timestamp receive_timestamp = 24; // Optional. The severity of the log entry. The default value is @@ -103,9 +103,9 @@ message LogEntry { google.logging.type.LogSeverity severity = 10; // Optional. A unique identifier for the log entry. If you provide a value, - // then Stackdriver Logging considers other log entries in the same project, + // 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 Stackdriver + // 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; @@ -133,12 +133,20 @@ message LogEntry { // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` string trace = 22; - // Optional. The span ID within the trace associated with the log entry. For - // Stackdriver Trace spans, this is the same format that the Stackdriver Trace + // 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; + // 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; + // Optional. Source code location information associated with the log entry, // if any. LogEntrySourceLocation source_location = 23; diff --git a/google/logging/v2/logging.proto b/google/logging/v2/logging.proto index ef8b6b56b..d04cd5c03 100644 --- a/google/logging/v2/logging.proto +++ b/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -32,7 +33,6 @@ option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // Service for ingesting and querying logs. service LoggingServiceV2 { // Deletes all the log entries in a log. @@ -42,27 +42,21 @@ service LoggingServiceV2 { 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=organizations/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } }; } - // Writes log entries to Stackdriver Logging. This API method is the - // only way to send log entries to Stackdriver Logging. This method - // is used, directly or indirectly, by the Stackdriver Logging agent - // (fluentd) and all logging libraries configured to use Stackdriver - // Logging. + // Writes log entries to Logging. This API method is the + // only way to send log entries to Logging. This method + // is used, directly or indirectly, by the Logging agent + // (fluentd) and all logging libraries configured to use Logging. // 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: "*" @@ -70,7 +64,7 @@ service LoggingServiceV2 { } // Lists log entries. Use this method to retrieve log entries from - // Stackdriver Logging. For ways to export log entries, see + // Logging. For ways to export log entries, see // [Exporting Logs](/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { @@ -79,9 +73,9 @@ service LoggingServiceV2 { }; } - // Lists the descriptors for monitored resource types used by Stackdriver - // Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + // Lists the descriptors for monitored resource types used by Logging. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) + returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -92,18 +86,10 @@ 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" } }; } } @@ -135,11 +121,15 @@ message WriteLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // `[LOG_ID]` must be URL-encoded. For example, - // `"projects/my-project-id/logs/syslog"` or - // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - // For more information about log names, see - // [LogEntry][google.logging.v2.LogEntry]. + // `[LOG_ID]` must be URL-encoded. For example: + // + // "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; // Optional. A default monitored resource object that is assigned to all log @@ -158,7 +148,7 @@ message WriteLogEntriesRequest { // See [LogEntry][google.logging.v2.LogEntry]. map labels = 3; - // Required. The log entries to send to Stackdriver Logging. The order of log + // 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 // `log_name`, `resource`, and `labels` fields are copied into those log // entries in this list that do not include values for their corresponding @@ -198,9 +188,7 @@ message WriteLogEntriesRequest { // Result returned from WriteLogEntries. // empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { diff --git a/google/logging/v2/logging_config.proto b/google/logging/v2/logging_config.proto index dc2783e0e..2afea1062 100644 --- a/google/logging/v2/logging_config.proto +++ b/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -29,26 +30,17 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - -// Service for configuring sinks used to export log entries outside of -// Stackdriver Logging. +// Service for configuring sinks used to export log entries out of +// Logging. service ConfigServiceV2 { // 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" } }; } @@ -56,18 +48,10 @@ service ConfigServiceV2 { 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/*}" } }; } @@ -79,18 +63,12 @@ service ConfigServiceV2 { 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" @@ -146,15 +124,9 @@ 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/*}" } @@ -165,18 +137,10 @@ service ConfigServiceV2 { 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" } }; } @@ -184,18 +148,10 @@ service ConfigServiceV2 { 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/*}" } }; } @@ -253,15 +209,9 @@ service ConfigServiceV2 { 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/*}" } @@ -275,7 +225,7 @@ service ConfigServiceV2 { // exported. The sink must be created within a project, organization, billing // account, or folder. message LogSink { - // Available log entry formats. Log entries can be written to Stackdriver + // 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. enum VersionFormat { @@ -321,7 +271,7 @@ message LogSink { VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity—a service account or group—under - // which Stackdriver Logging writes the exported log entries to the sink's + // 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 @@ -423,14 +373,15 @@ message CreateSinkRequest { // 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 // sink's parent is a project, then the value returned as `writer_identity` is - // the same group or service account used by Stackdriver Logging before the + // 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]. + // more information, see `writer_identity` in + // [LogSink][google.logging.v2.LogSink]. bool unique_writer_identity = 3; } @@ -476,7 +427,7 @@ message UpdateSinkRequest { // empty updateMask will be an error. // // For a detailed `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. google.protobuf.FieldMask update_mask = 4; @@ -496,7 +447,7 @@ message DeleteSinkRequest { string sink_name = 1; } -// Specifies a set of log entries that are not to be stored in Stackdriver +// 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. @@ -610,8 +561,9 @@ message UpdateExclusionRequest { // Required. A nonempty list of fields to change in the existing exclusion. // New values for the fields are taken from the corresponding fields in the - // [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in - // `update_mask` are not changed and are ignored in the request. + // [LogExclusion][google.logging.v2.LogExclusion] included in this request. + // Fields not mentioned in `update_mask` are not changed and are ignored in + // the request. // // For example, to change the filter and description of an exclusion, // specify an `update_mask` of `"filter,description"`. diff --git a/google/logging/v2/logging_gapic.yaml b/google/logging/v2/logging_gapic.yaml index 601c0ddb0..99e887f68 100644 --- a/google/logging/v2/logging_gapic.yaml +++ b/google/logging/v2/logging_gapic.yaml @@ -22,9 +22,6 @@ language_settings: nodejs: package_name: logging.v2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt collections: - name_pattern: projects/{project} entity_name: project @@ -136,7 +133,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: token_field: page_token @@ -157,7 +153,6 @@ interfaces: - sink_name required_fields: - sink_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -173,7 +168,6 @@ interfaces: required_fields: - parent - sink - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 120000 @@ -193,7 +187,6 @@ interfaces: required_fields: - sink_name - sink - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 120000 @@ -207,7 +200,6 @@ interfaces: - sink_name required_fields: - sink_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -221,7 +213,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: token_field: page_token @@ -242,7 +233,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -258,7 +248,6 @@ interfaces: required_fields: - parent - exclusion - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -276,7 +265,6 @@ interfaces: - name - exclusion - update_mask - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -290,7 +278,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -323,7 +310,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: token_field: page_token @@ -344,7 +330,6 @@ interfaces: - metric_name required_fields: - metric_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -360,7 +345,6 @@ interfaces: required_fields: - parent - metric - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -376,7 +360,6 @@ interfaces: required_fields: - metric_name - metric - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -390,7 +373,6 @@ interfaces: - metric_name required_fields: - metric_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -431,7 +413,6 @@ interfaces: - log_name required_fields: - log_name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -448,8 +429,7 @@ interfaces: - entries required_fields: - entries - request_object_method: true - retry_codes_name: non_idempotent + retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 field_name_patterns: @@ -478,7 +458,6 @@ interfaces: - order_by required_fields: - resource_names - request_object_method: true page_streaming: request: page_size_field: page_size @@ -493,7 +472,6 @@ interfaces: resource_names: parent_oneof resource_name_treatment: STATIC_TYPES - name: ListMonitoredResourceDescriptors - request_object_method: true page_streaming: request: page_size_field: page_size @@ -512,7 +490,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size diff --git a/google/logging/v2/logging_metrics.proto b/google/logging/v2/logging_metrics.proto index a8f3fe06f..dd3fa8782 100644 --- a/google/logging/v2/logging_metrics.proto +++ b/google/logging/v2/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -21,6 +22,7 @@ import "google/api/distribution.proto"; import "google/api/metric.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -30,7 +32,6 @@ option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // Service for configuring logs-based metrics. service MetricsServiceV2 { // Lists logs-based metrics. @@ -79,12 +80,12 @@ service MetricsServiceV2 { // extracted values along with an optional histogram of the values as specified // by the bucket options. message LogMetric { - // Stackdriver Logging API version. + // Logging API version. enum ApiVersion { - // Stackdriver Logging API v2. + // Logging API v2. V2 = 0; - // Stackdriver Logging API v1. + // Logging API v1. V1 = 1; } diff --git a/google/longrunning/BUILD.bazel b/google/longrunning/BUILD.bazel new file mode 100644 index 000000000..c9d7ff4ed --- /dev/null +++ b/google/longrunning/BUILD.bazel @@ -0,0 +1,112 @@ +# 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 = "operations_proto", + srcs = ["operations.proto"], + deps = [ + "//google/api:annotations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + ], +) + +proto_library_with_info( + name = "longrunning_proto_with_info", + deps = [":operations_proto"], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library", "java_grpc_library") + +java_proto_library( + name = "longrunning_java_proto", + deps = [":operations_proto"], +) + +java_grpc_library( + name = "longrunning_java_grpc", + srcs = [":operations_proto"], + deps = [":longrunning_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "longrunning_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/longrunning", + protos = [":operations_proto"], + visibility = ["//visibility:public"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "longrunning_go_gapic", + src = ":longrunning_proto_with_info", + gapic_yaml = "longrunning_gapic.yaml", + importpath = "cloud.google.com/go/longrunning/autogen", + service_yaml = "//google/longrunning:longrunning.yaml", + deps = [":longrunning_go_proto"], +) + +go_test( + name = "longrunning_go_gapic_test", + srcs = [":longrunning_go_gapic_srcjar_test"], + embed = [":longrunning_go_gapic"], + importpath = "cloud.google.com/go/longrunning/autogen", +) + +# Opensource 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", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "longrunning_cc_proto", + deps = [":operations_proto"], +) + +cc_grpc_library( + name = "longrunning_cc_grpc", + srcs = [":operations_proto"], + deps = [":longrunning_cc_proto"], + grpc_only = True, +) diff --git a/google/longrunning/artman_longrunning.yaml b/google/longrunning/artman_longrunning.yaml index 6fb8b060e..ddda18b02 100644 --- a/google/longrunning/artman_longrunning.yaml +++ b/google/longrunning/artman_longrunning.yaml @@ -12,79 +12,20 @@ artifacts: - name: java_gapic type: GAPIC_ONLY language: JAVA - publish_targets: - - name: gax - type: GITHUB - location: git@github.com:googleapis/gax-java.git - directory_mappings: - - src: src/main/java/com/google/longrunning - dest: src/main/java/com/google/longrunning - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-longrunning-v1 - - name: grpc - dest: generated/java/grpc-google-longrunning-v1 - - name: proto - dest: generated/java/proto-google-longrunning-v1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-longrunning-v1 - - name: grpc - dest: generated/php/google-longrunning-v1/proto - - name: gax - type: GITHUB - location: git@github.com:googleapis/gax-php.git - directory_mappings: - - src: src/Longrunning - dest: src/Longrunning - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: gax - type: GITHUB - location: git@github.com:googleapis/gax-ruby.git - directory_mappings: - - src: lib/google/longrunning - dest: lib/google/longrunning - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-longrunning - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: longrunning/autogen - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-longrunning/vendor - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: gax - type: GITHUB - location: git@github.com:googleapis/gax-nodejs.git - directory_mappings: - - dest: lib/operation* - name: gapic_config type: GAPIC_CONFIG diff --git a/google/longrunning/longrunning.yaml b/google/longrunning/longrunning.yaml index 74543bc0a..ff8fccf06 100644 --- a/google/longrunning/longrunning.yaml +++ b/google/longrunning/longrunning.yaml @@ -1,12 +1,72 @@ type: google.api.Service config_version: 1 name: longrunning.googleapis.com -title: Google Long Running Operations API +title: Long Running Operations API apis: -- name: google.longrunning.Operations + - name: google.longrunning.Operations + +types: + - name: google.longrunning.OperationInfo -# Documentation section documentation: - overview: - (== include google/longrunning/README.md ==) + overview: |- + # Long Running Operation API + + This package contains the definition of Long Running Operation (LRO) + interface. It is a standard interface that API services can implement for + managing asynchronous operations. + + ## 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. + + ## Using LROs + + If an API method could potentially take long time to finish, the method + 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. + + 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`. + + 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. + + ## 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, + re-run, and modified over time. Jobs also typically interact with multiple + resources and are created, deleted, and updated directly as independent + resources. + + Jobs can also offer support for more complex actions such as pausing and + resuming an individual job, where each action could return an LRO as a + response. + + 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. diff --git a/google/longrunning/longrunning_gapic.yaml b/google/longrunning/longrunning_gapic.yaml index 842ed62d8..acd110f63 100644 --- a/google/longrunning/longrunning_gapic.yaml +++ b/google/longrunning/longrunning_gapic.yaml @@ -8,8 +8,6 @@ language_settings: go: package_name: cloud.google.com/go/longrunning/autogen domain_layer_location: cloud.google.com/go/longrunning - license_header_override: - license_file: license-header-apache-2.0.txt csharp: package_name: Google.LongRunning ruby: @@ -18,9 +16,6 @@ language_settings: package_name: Google\ApiCore\LongRunning nodejs: package_name: longrunning -license_header: - copyright_file: copyright-google.txt - license_file: license-header-bsd-3-clause.txt interfaces: - name: google.longrunning.Operations required_constructor_params: @@ -50,7 +45,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -63,7 +57,6 @@ interfaces: required_fields: - name - filter - request_object_method: true page_streaming: request: page_size_field: page_size @@ -81,7 +74,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -92,7 +84,17 @@ interfaces: - name required_fields: - name - request_object_method: false 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/operations.proto b/google/longrunning/operations.proto index 76fef29c3..90778e03e 100644 --- a/google/longrunning/operations.proto +++ b/google/longrunning/operations.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,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,9 +19,12 @@ package google.longrunning; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; +import "google/protobuf/descriptor.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.LongRunning"; option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning"; option java_multiple_files = true; @@ -28,6 +32,15 @@ option java_outer_classname = "OperationsProto"; option java_package = "com.google.longrunning"; option php_namespace = "Google\\LongRunning"; +extend google.protobuf.MethodOptions { + // Additional information regarding long-running operations. + // In particular, this specifies the types that are returned from + // long-running operations. + // + // Required for methods that return `google.longrunning.Operation`; invalid + // otherwise. + google.longrunning.OperationInfo operation_info = 1049; +} // Manages long-running operations with an API service. // @@ -42,17 +55,26 @@ service Operations { // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. // - // NOTE: the `name` binding below allows API services to override the binding - // to use different resource name schemes, such as `users/*/operations`. + // NOTE: the `name` binding allows API services to override the binding + // to use different resource name schemes, such as `users/*/operations`. To + // override the binding, API services can add a binding such as + // `"/v1/{name=users/*}/operations"` to their service configuration. + // For backwards compatibility, the default name includes the operations + // collection id, however overriding users must ensure the name binding + // is the parent resource, without the operations collection id. rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { get: "/v1/{name=operations}" }; + option (google.api.http) = { + get: "/v1/{name=operations}" + }; } // Gets the latest state of a long-running operation. Clients can use this // method to poll the operation result at intervals as recommended by the API // service. rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { get: "/v1/{name=operations/**}" }; + option (google.api.http) = { + get: "/v1/{name=operations/**}" + }; } // Deletes a long-running operation. This method indicates that the client is @@ -60,7 +82,9 @@ service Operations { // operation. If the server doesn't support this method, it returns // `google.rpc.Code.UNIMPLEMENTED`. rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=operations/**}" }; + option (google.api.http) = { + delete: "/v1/{name=operations/**}" + }; } // Starts asynchronous cancellation on a long-running operation. The server @@ -74,7 +98,22 @@ service Operations { // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, // corresponding to `Code.CANCELLED`. rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=operations/**}:cancel" body: "*" }; + option (google.api.http) = { + post: "/v1/{name=operations/**}:cancel" + body: "*" + }; + } + + // Waits for the specified long-running operation until it is done or reaches + // at most a specified timeout, returning the latest state. If the operation + // is already done, the latest state is immediately returned. If the timeout + // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + // timeout is used. If the server does not support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + // Note that this method is on a best-effort basis. It may return the latest + // state before the specified timeout (including immediately), meaning even an + // immediate response is no guarantee that the operation is done. + rpc WaitOperation(WaitOperationRequest) returns (Operation) { } } @@ -93,7 +132,7 @@ message Operation { google.protobuf.Any metadata = 2; // If the value is `false`, it means the operation is still in progress. - // If true, the operation is completed, and either `error` or `response` is + // If `true`, the operation is completed, and either `error` or `response` is // available. bool done = 3; @@ -124,7 +163,7 @@ message GetOperationRequest { // The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. message ListOperationsRequest { - // The name of the operation collection. + // The name of the operation's parent resource. string name = 4; // The standard list filter. @@ -158,3 +197,45 @@ message DeleteOperationRequest { string name = 1; } +// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. +message WaitOperationRequest { + // The name of the operation resource to wait on. + string name = 1; + + // The maximum duration to wait before timing out. If left blank, the wait + // will be at most the time permitted by the underlying HTTP/RPC protocol. + // If RPC context deadline is also specified, the shorter one will be used. + google.protobuf.Duration timeout = 2; +} + +// A message representing the message types used by a long-running operation. +// +// Example: +// +// rpc LongRunningRecognize(LongRunningRecognizeRequest) +// returns (google.longrunning.Operation) { +// option (google.longrunning.operation_info) = { +// response_type: "LongRunningRecognizeResponse" +// metadata_type: "LongRunningRecognizeMetadata" +// }; +// } +message OperationInfo { + // Required. The message name of the primary return type for this + // long-running operation. + // This type will be used to deserialize the LRO's response. + // + // If the response is in a different package from the rpc, a fully-qualified + // message name must be used (e.g. `google.protobuf.Struct`). + // + // Note: Altering this value constitutes a breaking change. + string response_type = 1; + + // Required. The message name of the metadata type for this long-running + // operation. + // + // If the response is in a different package from the rpc, a fully-qualified + // message name must be used (e.g. `google.protobuf.Struct`). + // + // Note: Altering this value constitutes a breaking change. + string metadata_type = 2; +} diff --git a/google/monitoring/BUILD.bazel b/google/monitoring/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/monitoring/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/monitoring/artman_monitoring.yaml b/google/monitoring/artman_monitoring.yaml index 326281446..8ff5101ac 100644 --- a/google/monitoring/artman_monitoring.yaml +++ b/google/monitoring/artman_monitoring.yaml @@ -12,81 +12,19 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-monitoring-v3 - - name: grpc - dest: generated/java/grpc-google-cloud-monitoring-v3 - - name: proto - dest: generated/java/proto-google-cloud-monitoring-v3 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-monitoring + release_level: GA - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/monitoring_v3 - dest: monitoring/google/cloud/monitoring_v3 - - src: tests/unit/gapic/v3 - dest: monitoring/tests/gapic - - name: grpc - src: google/cloud/proto - dest: monitoring/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-monitoring-v3 - - name: grpc - dest: generated/python/proto-google-cloud-monitoring-v3 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-monitoring-v3 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-monitoring - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/monitoring/v3 - dest: google-cloud-monitoring/lib/google/cloud/monitoring/v3 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: monitoring/apiv3 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-monitoring-v3/vendor - name: csharp_gapic type: GAPIC language: CSHARP @@ -94,17 +32,5 @@ artifacts: type: GAPIC language: NODEJS release_level: BETA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/monitoring - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v3 - dest: packages/monitoring/src/v3 - name: gapic_config type: GAPIC_CONFIG diff --git a/google/monitoring/monitoring.yaml b/google/monitoring/monitoring.yaml index b4bf2162e..026a6b3ee 100644 --- a/google/monitoring/monitoring.yaml +++ b/google/monitoring/monitoring.yaml @@ -10,6 +10,10 @@ apis: - 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 @@ -18,6 +22,10 @@ documentation: 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 @@ -137,6 +145,12 @@ authentication: 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: |- diff --git a/google/monitoring/v3/BUILD b/google/monitoring/v3/BUILD deleted file mode 100644 index 3d40b4cae..000000000 --- a/google/monitoring/v3/BUILD +++ /dev/null @@ -1,42 +0,0 @@ - -package(default_visibility = ["//visibility:public"]) - -load("@submodule_grpc//bazel:grpc_build_system.bzl", "grpc_proto_library") - -grpc_proto_library(name = "metric", - srcs = ["metric.proto"], - deps = [ - "//google/api:metric", - "//google/api:monitored_resource", - ":common", - ], - well_known_protos = "@submodule_protobuf//:well_known_protos", - use_external = True, -) - -grpc_proto_library( - name = "common", - srcs = ["common.proto"], - deps = [ - "//google/api:distribution", - "//google/api:annotations", - ], - well_known_protos = "@submodule_protobuf//:well_known_protos", - use_external = True, -) - -grpc_proto_library( - name = "metric_service", - srcs = ["metric_service.proto"], - deps = [ - "//google/api:annotations", - "//google/api:metric", - "//google/api:monitored_resource", - "//google/api:label", - "//google/rpc:status", - ":common", - ":metric", - ], - well_known_protos = "@submodule_protobuf//:well_known_protos", - use_external = True, -) diff --git a/google/monitoring/v3/BUILD.bazel b/google/monitoring/v3/BUILD.bazel new file mode 100644 index 000000000..8294d5250 --- /dev/null +++ b/google/monitoring/v3/BUILD.bazel @@ -0,0 +1,202 @@ +# 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 = "monitoring_proto", + srcs = [ + "alert.proto", + "alert_service.proto", + "common.proto", + "dropped_labels.proto", + "group.proto", + "group_service.proto", + "metric.proto", + "metric_service.proto", + "mutation_record.proto", + "notification.proto", + "notification_service.proto", + "span_context.proto", + "uptime.proto", + "uptime_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:distribution_proto", + "//google/api:label_proto", + "//google/api:metric_proto", + "//google/api:monitored_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//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library_with_info( + name = "monitoring_proto_with_info", + deps = [":monitoring_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 = "monitoring_java_proto", + deps = [":monitoring_proto"], +) + +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"], +) + +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"], + deps = [ + ":monitoring_java_proto", + ":monitoring_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":monitoring_java_gapic_test", + ], +) 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", +]] + +# Opensource 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 = [ + ":monitoring_java_proto", + ":monitoring_proto", + ":monitoring_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 = "monitoring_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/monitoring/v3", + protos = [":monitoring_proto"], + deps = [ + "//google/api:annotations_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", + ], +) + +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", + deps = [ + ":monitoring_go_proto", + "//google/api:metric_go_proto", + "//google/api:monitoredres_go_proto", + ], +) + +go_test( + name = "monitoring_go_gapic_test", + srcs = [":monitoring_go_gapic_srcjar_test"], + embed = [":monitoring_go_gapic"], + importpath = "cloud.google.com/go/monitoring/apiv3", +) + +# Opensource 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", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "monitoring_cc_proto", + deps = [":monitoring_proto"], +) + +cc_grpc_library( + name = "monitoring_cc_grpc", + srcs = [":monitoring_proto"], + deps = [":monitoring_cc_proto"], + grpc_only = True, +) diff --git a/google/monitoring/v3/alert.proto b/google/monitoring/v3/alert.proto index 18d87174d..3b3e1dca2 100644 --- a/google/monitoring/v3/alert.proto +++ b/google/monitoring/v3/alert.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -29,7 +30,6 @@ option java_outer_classname = "AlertProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "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 @@ -92,8 +92,10 @@ message AlertPolicy { // 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 field. + // [`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 aggregations = 8; // A [filter](/monitoring/api/v3/filters) that identifies a time @@ -142,15 +144,14 @@ message AlertPolicy { // The amount of time that a time series must violate the // threshold to be considered failing. Currently, only values - // that are a multiple of a minute--e.g. 60, 120, or 300 + // that are a multiple of a minute--e.g., 0, 60, 120, or 300 // seconds--are supported. If an invalid value is given, an - // error will be returned. The `Duration.nanos` field is - // ignored. When choosing a duration, it is useful to keep in mind the - // frequency of the underlying time series data (which may also be - // affected by any alignments specified in the `aggregation` field); - // a good duration is long enough so that a single outlier does not - // generate spurious alerts, but short enough that unhealthy states - // are detected and alerted on quickly. + // error will be returned. When choosing a duration, it is useful to + // keep in mind the frequency of the underlying time series data + // (which may also be affected by any alignments specified in the + // `aggregations` field); a good duration is long enough so that a single + // outlier does not generate spurious alerts, but short enough that + // unhealthy states are detected and alerted on quickly. google.protobuf.Duration duration = 6; // The number/percent of time series for which the comparison must hold @@ -188,8 +189,10 @@ message AlertPolicy { // 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 field. + // 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 aggregations = 5; // The amount of time that a time series must fail to report new diff --git a/google/monitoring/v3/alert_service.proto b/google/monitoring/v3/alert_service.proto index ca2839f97..0dedca113 100644 --- a/google/monitoring/v3/alert_service.proto +++ b/google/monitoring/v3/alert_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -28,7 +29,6 @@ option java_outer_classname = "AlertServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The AlertPolicyService API is used to manage (list, create, delete, // edit) alert policies in Stackdriver Monitoring. An alerting policy is // a description of the conditions under which some aspect of your @@ -40,7 +40,8 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // [Cloud Console](https://console.cloud.google.com/). service AlertPolicyService { // 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" }; @@ -62,7 +63,8 @@ service AlertPolicyService { } // 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/*}" }; diff --git a/google/monitoring/v3/common.proto b/google/monitoring/v3/common.proto index 84d8423fd..73ca2c4ad 100644 --- a/google/monitoring/v3/common.proto +++ b/google/monitoring/v3/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -28,7 +29,6 @@ option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // A single strongly-typed value. message TypedValue { // The typed value field. @@ -391,10 +391,13 @@ enum ComparisonType { COMPARISON_NE = 6; } -// The tier of service for a Stackdriver account. Please see the -// [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) -// for more details. +// The tier of service for a Workspace. Please see the +// [service tiers +// documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more +// details. enum ServiceTier { + option deprecated = true; + // An invalid sentinel value, used to indicate that a tier has not // been provided explicitly. SERVICE_TIER_UNSPECIFIED = 0; @@ -402,12 +405,14 @@ enum ServiceTier { // The Stackdriver Basic tier, a free tier of service that provides basic // features, a moderate allotment of logs, and access to built-in metrics. // A number of features are not available in this tier. For more details, - // see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + // see [the service tiers + // documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_BASIC = 1; // The Stackdriver Premium tier, a higher, more expensive tier of service // that provides access to all Stackdriver features, lets you use Stackdriver // with AWS accounts, and has a larger allotments for logs and metrics. For - // more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + // more details, see [the service tiers + // documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_PREMIUM = 2; } diff --git a/google/monitoring/v3/dropped_labels.proto b/google/monitoring/v3/dropped_labels.proto new file mode 100644 index 000000000..acbe8cf25 --- /dev/null +++ b/google/monitoring/v3/dropped_labels.proto @@ -0,0 +1,45 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; + +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"; + +// A set of (label, value) pairs which were dropped during aggregation, attached +// to google.api.Distribution.Exemplars in google.api.Distribution values during +// aggregation. +// +// These values are used in combination with the label values that remain on the +// aggregated Distribution timeseries to construct the full label set for the +// exemplar values. The resulting full label set may be used to identify the +// specific task/job/instance (for example) which may be contributing to a +// long-tail, while allowing the storage savings of only storing aggregated +// distribution values for a large group. +// +// Note that there are no guarantees on ordering of the labels from +// exemplar-to-exemplar and from distribution-to-distribution in the same +// stream, and there may be duplicates. It is up to clients to resolve any +// ambiguities. +message DroppedLabels { + // Map from label to its value, for all labels dropped in any aggregation. + map label = 1; +} diff --git a/google/monitoring/v3/group.proto b/google/monitoring/v3/group.proto index 0c98bebea..ca46a0c0d 100644 --- a/google/monitoring/v3/group.proto +++ b/google/monitoring/v3/group.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// 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. @@ -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"; @@ -23,7 +24,6 @@ option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "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 // metadata. If a group's filter matches an available monitored resource, then @@ -66,7 +66,8 @@ message Group { // For groups with no parent, `parentName` is the empty string, `""`. string parent_name = 3; - // The filter used to determine which monitored resources belong to this group. + // The filter used to determine which monitored resources belong to this + // group. string filter = 5; // If true, the members of this group are considered to be a cluster. diff --git a/google/monitoring/v3/group_service.proto b/google/monitoring/v3/group_service.proto index 3d7493cf0..34e1d9e99 100644 --- a/google/monitoring/v3/group_service.proto +++ b/google/monitoring/v3/group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// 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. @@ -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"; @@ -29,9 +30,8 @@ option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The Group API lets you inspect and manage your -// [groups](google.monitoring.v3.Group). +// [groups](#google.monitoring.v3.Group). // // A group is a named filter that is used to identify // a collection of monitored resources. Groups are typically used to @@ -45,33 +45,48 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; service GroupService { // Lists the existing groups. rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/groups" + }; } // Gets a single group. rpc GetGroup(GetGroupRequest) returns (Group) { - option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/groups/*}" + }; } // Creates a new group. rpc CreateGroup(CreateGroupRequest) returns (Group) { - option (google.api.http) = { post: "/v3/{name=projects/*}/groups" body: "group" }; + option (google.api.http) = { + post: "/v3/{name=projects/*}/groups" + body: "group" + }; } // Updates an existing group. // You can change any group attributes except `name`. rpc UpdateGroup(UpdateGroupRequest) returns (Group) { - option (google.api.http) = { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.http) = { + put: "/v3/{group.name=projects/*/groups/*}" + body: "group" + }; } // Deletes an existing group. rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + option (google.api.http) = { + delete: "/v3/{name=projects/*/groups/*}" + }; } // Lists the monitored resources that are members of a group. - rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + rpc ListGroupMembers(ListGroupMembersRequest) + returns (ListGroupMembersResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*/groups/*}/members" + }; } } @@ -81,9 +96,9 @@ message ListGroupsRequest { // `"projects/{project_id_or_number}"`. string name = 7; - // 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. + // 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 diff --git a/google/monitoring/v3/metric.proto b/google/monitoring/v3/metric.proto index 80c59d50b..c111d4fb4 100644 --- a/google/monitoring/v3/metric.proto +++ b/google/monitoring/v3/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// 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. @@ -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.monitoring.v3; +import "google/api/annotations.proto"; +import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; @@ -27,17 +30,16 @@ option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "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 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 subsequent - // points specifying the same start time and increasing end times, until an - // event resets the cumulative value to zero and sets a new start time for the - // following points. + // 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 + // 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 + // subsequent points specifying the same start time and increasing end times, + // until an event resets the cumulative value to zero and sets a new start + // time for the following points. TimeInterval interval = 1; // The value of the data point. @@ -53,10 +55,15 @@ message TimeSeries { // series. google.api.Metric metric = 1; - // The associated resource. A fully-specified monitored resource used to - // identify the time series. + // The associated monitored resource. Custom metrics can use only certain + // monitored resource types in their time series data. google.api.MonitoredResource resource = 2; + // Output only. The associated monitored resource metadata. When reading a + // a timeseries, this field will include metadata labels that are explicitly + // named in the reduction. When creating a timeseries, this field is ignored. + google.api.MonitoredResourceMetadata metadata = 7; + // The metric kind of the time series. When listing time series, this metric // kind might be different from the metric kind of the associated metric if // this time series is an alignment or reduction of other time series. @@ -76,8 +83,8 @@ message TimeSeries { // the same as the type of the data in the `points` field. google.api.MetricDescriptor.ValueType value_type = 4; - // The data points of this time series. When listing time series, the order of - // the points is specified by the list method. + // The data points of this time series. When listing time series, points are + // returned in reverse time order. // // When creating a time series, this field must contain exactly one point and // the point's type must be the same as the value type of the associated diff --git a/google/monitoring/v3/metric_service.proto b/google/monitoring/v3/metric_service.proto index de11cbde9..febd3f7b5 100644 --- a/google/monitoring/v3/metric_service.proto +++ b/google/monitoring/v3/metric_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. +// 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. @@ -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"; @@ -21,6 +22,7 @@ import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; @@ -31,54 +33,83 @@ option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // 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.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + // Lists monitored resource descriptors that match a filter. This method does + // not require a Stackdriver account. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) + returns (ListMonitoredResourceDescriptorsResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*}/monitoredResourceDescriptors" + }; } - // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. - rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { - option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" }; + // Gets a single monitored resource descriptor. This method does not require a + // Stackdriver account. + rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) + returns (google.api.MonitoredResourceDescriptor) { + option (google.api.http) = { + get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + }; } - // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. - rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + // Lists metric descriptors that match a filter. This method does not require + // a Stackdriver account. + rpc ListMetricDescriptors(ListMetricDescriptorsRequest) + returns (ListMetricDescriptorsResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*}/metricDescriptors" + }; } - // Gets a single metric descriptor. This method does not require a Stackdriver account. - rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { - option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + // Gets a single metric descriptor. This method does not require a Stackdriver + // account. + rpc GetMetricDescriptor(GetMetricDescriptorRequest) + returns (google.api.MetricDescriptor) { + option (google.api.http) = { + get: "/v3/{name=projects/*/metricDescriptors/**}" + }; } // Creates a new metric descriptor. // User-created metric descriptors define // [custom metrics](/monitoring/custom-metrics). - rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { - option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) + returns (google.api.MetricDescriptor) { + option (google.api.http) = { + post: "/v3/{name=projects/*}/metricDescriptors" + body: "metric_descriptor" + }; } // Deletes a metric descriptor. Only user-created // [custom metrics](/monitoring/custom-metrics) can be deleted. - rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/metricDescriptors/**}" + }; } - // 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 + // Stackdriver account. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/timeSeries" + }; } // 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) { - option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + rpc CreateTimeSeries(CreateTimeSeriesRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v3/{name=projects/*}/timeSeries" + body: "*" + }; } } @@ -106,7 +137,7 @@ message ListMonitoredResourceDescriptorsRequest { string page_token = 4; } -// The `ListMonitoredResourcDescriptors` response. +// The `ListMonitoredResourceDescriptors` response. message ListMonitoredResourceDescriptorsResponse { // The monitored resource descriptors that are available to this project // and that match `filter`, if present. @@ -229,18 +260,18 @@ message ListTimeSeriesRequest { // views of the data. Aggregation aggregation = 5; - // Specifies the order in which the points of the time series should - // be returned. By default, results are not ordered. Currently, - // this field must be left blank. + // Unsupported: must be left blank. The points in each time series are + // returned in reverse time order. string order_by = 6; // Specifies which information is returned about the time series. TimeSeriesView view = 7; - // A positive number that is the maximum number of results to return. - // When `view` field sets to `FULL`, it limits the number of `Points` server - // will return; if `view` field is `HEADERS`, it limits the number of - // `TimeSeries` server will return. + // 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 + // `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + // maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + // the maximum number of `TimeSeries` returned. int32 page_size = 8; // If this field is not empty then it must contain the `nextPageToken` value @@ -258,6 +289,10 @@ message ListTimeSeriesResponse { // 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; + + // Query execution errors that may have caused the time series data returned + // to be incomplete. + repeated google.rpc.Status execution_errors = 3; } // The `CreateTimeSeries` request. diff --git a/google/monitoring/v3/monitoring_gapic.yaml b/google/monitoring/v3/monitoring_gapic.yaml index 45bf4b583..c046ff042 100644 --- a/google/monitoring/v3/monitoring_gapic.yaml +++ b/google/monitoring/v3/monitoring_gapic.yaml @@ -3,6 +3,7 @@ config_schema_version: 1.0.0 language_settings: java: package_name: com.google.cloud.monitoring.v3 + release_level: GA python: package_name: google.cloud.monitoring_v3.gapic go: @@ -18,9 +19,6 @@ language_settings: nodejs: package_name: monitoring.v3 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.monitoring.v3.AlertPolicyService collections: @@ -55,7 +53,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -76,7 +73,6 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -92,7 +88,6 @@ interfaces: required_fields: - name - alert_policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -106,7 +101,6 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -121,7 +115,6 @@ interfaces: - alert_policy required_fields: - alert_policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -156,7 +149,6 @@ interfaces: # Removing flattening until we figure out how to deal with oneof required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -177,7 +169,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -193,7 +184,6 @@ interfaces: required_fields: - name - group - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -207,7 +197,6 @@ interfaces: - group required_fields: - group - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -221,7 +210,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -235,7 +223,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -286,7 +273,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -307,7 +293,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -321,7 +306,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -342,7 +326,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -358,7 +341,6 @@ interfaces: required_fields: - name - metric_descriptor - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -372,7 +354,6 @@ interfaces: - name required_fields: - name - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -392,7 +373,6 @@ interfaces: - filter - interval - view - request_object_method: true page_streaming: request: page_size_field: page_size @@ -415,7 +395,6 @@ interfaces: required_fields: - name - time_series - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -455,7 +434,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -476,7 +454,6 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -490,7 +467,6 @@ interfaces: - name required_fields: - name - request_object_method: true page_streaming: request: page_size_field: page_size @@ -511,7 +487,6 @@ interfaces: - name required_fields: - name - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -527,7 +502,6 @@ interfaces: required_fields: - name - notification_channel - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -542,7 +516,6 @@ interfaces: - notification_channel required_fields: - notification_channel - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -556,13 +529,45 @@ interfaces: - force required_fields: - name - request_object_method: true 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 + - 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} @@ -594,7 +599,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true page_streaming: request: page_size_field: page_size @@ -614,12 +618,12 @@ interfaces: - name required_fields: - name - request_object_method: false 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: @@ -629,7 +633,6 @@ interfaces: required_fields: - parent - uptime_check_config - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -642,7 +645,6 @@ interfaces: - uptime_check_config required_fields: - uptime_check_config - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -655,14 +657,13 @@ interfaces: - name required_fields: - name - request_object_method: false 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 - request_object_method: true page_streaming: request: page_size_field: page_size @@ -759,3 +760,9 @@ resource_name_generation: - 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/mutation_record.proto b/google/monitoring/v3/mutation_record.proto index a3ba28a1d..c87e2ebcc 100644 --- a/google/monitoring/v3/mutation_record.proto +++ b/google/monitoring/v3/mutation_record.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -25,7 +26,6 @@ option java_outer_classname = "MutationRecordProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // Describes a change made to a configuration. message MutationRecord { // When the change occurred. diff --git a/google/monitoring/v3/notification.proto b/google/monitoring/v3/notification.proto index 8cbca33f2..f2812548e 100644 --- a/google/monitoring/v3/notification.proto +++ b/google/monitoring/v3/notification.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -28,7 +29,6 @@ option java_outer_classname = "NotificationProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "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. @@ -60,7 +60,7 @@ 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; + repeated ServiceTier supported_tiers = 5 [deprecated = true]; } // A `NotificationChannel` is a medium through which an alert is @@ -94,7 +94,9 @@ 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: @@ -117,8 +119,8 @@ message NotificationChannel { // 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 aa5d294be..e178e0cad 100644 --- a/google/monitoring/v3/notification_service.proto +++ b/google/monitoring/v3/notification_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -20,6 +21,7 @@ import "google/api/annotations.proto"; import "google/monitoring/v3/notification.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.Monitoring.V3"; @@ -29,13 +31,14 @@ option java_outer_classname = "NotificationServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The Notification Channel API provides access to configuration that // controls how messages related to incidents are sent. service NotificationChannelService { // 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" }; @@ -43,14 +46,16 @@ service NotificationChannelService { // 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/*}" }; } // 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" }; @@ -61,15 +66,17 @@ 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/*}" }; } // 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) { + // endpoint such as an email address, SMS number, or PagerDuty service. + rpc CreateNotificationChannel(CreateNotificationChannelRequest) + returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*}/notificationChannels" body: "notification_channel" @@ -78,7 +85,8 @@ service NotificationChannelService { // 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" @@ -86,7 +94,8 @@ service NotificationChannelService { } // 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/*}" }; @@ -94,7 +103,9 @@ service NotificationChannelService { // 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: "*" @@ -122,7 +133,9 @@ 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: "*" @@ -132,7 +145,8 @@ service NotificationChannelService { // 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: "*" @@ -207,7 +221,8 @@ message ListNotificationChannelsRequest { // 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. + // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + // operation. string name = 5; // If provided, this field specifies the criteria that must be met by diff --git a/google/monitoring/v3/span_context.proto b/google/monitoring/v3/span_context.proto new file mode 100644 index 000000000..f7977c288 --- /dev/null +++ b/google/monitoring/v3/span_context.proto @@ -0,0 +1,43 @@ +// 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.monitoring.v3; + +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 = "SpanContextProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + +// The context of a span, attached to google.api.Distribution.Exemplars +// in google.api.Distribution values during aggregation. +// +// It contains the name of a span with format: +// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +message SpanContext { + // The resource name of the span in the following format: + // + // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // + // [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 + // 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 24dd1d73d..2850301ac 100644 --- a/google/monitoring/v3/uptime.proto +++ b/google/monitoring/v3/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -26,6 +27,35 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// An internal checker allows uptime checks to run on private/internal GCP +// resources. +message InternalChecker { + // A unique resource name for this InternalChecker. The format is: + // + // + // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. + // + // PROJECT_ID 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 + // should be unique within a Stackdriver Workspace in order to make it easier + // to identify; however, uniqueness is not enforced. + string display_name = 2; + + // The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + // 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. + string gcp_zone = 4; + + // The GCP project_id where the internal checker lives. Not necessary + // the same as the workspace project. + string peer_project_id = 6; +} // This message configures which resources and services to monitor for // availability. @@ -86,6 +116,7 @@ message UptimeCheckConfig { // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). // Entering two separate headers with the same key in a Create call will // cause the first to be overwritten by the second. + // The maximum number of headers allowed is 100. map headers = 6; } @@ -97,33 +128,13 @@ message UptimeCheckConfig { int32 port = 1; } - // Used to perform string matching. Currently, this matches on the exact - // content. In the future, it can be expanded to allow for regular expressions - // and more complex matching. + // Used to perform string matching. It allows substring and regular + // expressions, together with their negations. message ContentMatcher { - // String content to match + // String or regex content to match (max 1024 bytes) string content = 1; } - // Nimbus InternalCheckers. - message InternalChecker { - // The GCP project ID. Not necessarily the same as the project_id for the config. - string project_id = 1; - - // The internal network to perform this uptime check on. - string network = 2; - - // The GCP zone the uptime check should egress from. Only respected for - // internal uptime checks, where internal_network is specified. - string gcp_zone = 3; - - // The checker ID. - string checker_id = 4; - - // The checker's human-readable name. - string display_name = 5; - } - // A unique resource name for this UptimeCheckConfig. The format is: // // @@ -135,13 +146,21 @@ message UptimeCheckConfig { string name = 1; // A human-friendly name for the uptime check configuration. The display name - // should be unique within a Stackdriver Account in order to make it easier + // 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; // The resource the check is checking. Required. oneof resource { - // The monitored resource associated with the configuration. + // 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 google.api.MonitoredResource monitored_resource = 3; // The group resource associated with the configuration. @@ -157,8 +176,10 @@ message UptimeCheckConfig { TcpCheck tcp_check = 6; } - // How often the uptime check is performed. - // Currently, only 1, 5, 10, and 15 minutes are supported. Required. + // 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`. google.protobuf.Duration period = 7; // The maximum amount of time to wait for the request to complete (must be @@ -173,13 +194,22 @@ message UptimeCheckConfig { 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. repeated UptimeCheckRegion selected_regions = 10; - // The internal checkers that this check will egress from. + // 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; + + // 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; } @@ -224,15 +254,18 @@ enum UptimeCheckRegion { } // The supported resource types that can be used as values of -// group_resource.resource_type. gae_app and uptime_url are not allowed -// because group checks on App Engine modules and URLs are not allowed. +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. enum GroupResourceType { // Default value (not valid). RESOURCE_TYPE_UNSPECIFIED = 0; - // A group of instances (could be either GCE or AWS_EC2). + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). INSTANCE = 1; - // A group of AWS load balancers. + // A group of Amazon ELB load balancers. AWS_ELB_LOAD_BALANCER = 2; } diff --git a/google/monitoring/v3/uptime_service.proto b/google/monitoring/v3/uptime_service.proto index c3e04133f..ed59114d0 100644 --- a/google/monitoring/v3/uptime_service.proto +++ b/google/monitoring/v3/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// 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. @@ -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"; @@ -28,7 +29,6 @@ option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "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 // check is a piece of configuration that determines which resources and @@ -40,46 +40,65 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; 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.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) + returns (ListUptimeCheckConfigsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*}/uptimeCheckConfigs" + }; } // Gets a single uptime check configuration. - rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { + option (google.api.http) = { + get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Creates a new uptime check configuration. - rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { + option (google.api.http) = { + post: "/v3/{parent=projects/*}/uptimeCheckConfigs" + body: "uptime_check_config" + }; } // 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"`. // Returns the updated configuration. - rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { + option (google.api.http) = { + patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" + body: "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 // other dependent configs that would be rendered invalid by the deletion. - rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Returns the list of IPs that checkers run from - rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { - option (google.api.http) = { get: "/v3/uptimeCheckIps" }; + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) + returns (ListUptimeCheckIpsResponse) { + option (google.api.http) = { + get: "/v3/uptimeCheckIps" + }; } } // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose uptime check configurations are listed. The format is - // - // `projects/[PROJECT_ID]`. + // The project whose uptime check configurations are listed. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The maximum number of results to return in a single response. The server @@ -105,21 +124,23 @@ message ListUptimeCheckConfigsResponse { // next_page_token is passed to the subsequent List method call (in the // request message's page_token field). string next_page_token = 2; + + // 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]`. + // The uptime check configuration to retrieve. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the uptime check. The format is: - // - // `projects/[PROJECT_ID]`. + // The project in which to create the uptime check. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The new uptime check configuration. @@ -137,18 +158,21 @@ message UpdateUptimeCheckConfigRequest { // 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 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; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The uptime check configuration to delete. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // The uptime check configuration to delete. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } diff --git a/google/privacy/dlp/BUILD.bazel b/google/privacy/dlp/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/privacy/dlp/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/privacy/dlp/artman_dlp_v2.yaml b/google/privacy/dlp/artman_dlp_v2.yaml index 955551273..03e4a2335 100644 --- a/google/privacy/dlp/artman_dlp_v2.yaml +++ b/google/privacy/dlp/artman_dlp_v2.yaml @@ -14,100 +14,21 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-dlp-v2 - - name: grpc - dest: generated/java/grpc-google-cloud-dlp-v2 - - name: proto - dest: generated/java/proto-google-cloud-dlp-v2 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-dlp - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/gapic - dest: dlp/google/cloud/gapic - - src: test/google/cloud/gapic/dlp/v2 - dest: dlp/tests/gapic - - name: grpc - src: google/cloud/proto - dest: dlp/google/cloud/proto - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-dlp-v2 - - name: grpc - dest: generated/python/proto-google-cloud-dlp-v2 - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/dlp - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v2 - dest: packages/dlp/src/v2 - - src: test/test.js - dest: packages/dlp/test/gapic-v2.js - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-dlp-v2 - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-cloud-dlp-v2/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: dlp/apiv2 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/dlp/v2 - dest: google-cloud-dlp/lib/google/cloud/dlp/v2 - - src: test/google/cloud/privacy/dlp/v2 - dest: google-cloud-dlp/test/google/cloud/dlp/v2 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-dlp - name: csharp_gapic type: GAPIC language: CSHARP diff --git a/google/privacy/dlp/dlp_v2.yaml b/google/privacy/dlp/dlp_v2.yaml index 104590733..d737692c7 100644 --- a/google/privacy/dlp/dlp_v2.yaml +++ b/google/privacy/dlp/dlp_v2.yaml @@ -14,60 +14,12 @@ documentation: backend: rules: - - selector: google.privacy.dlp.v2.DlpService.InspectContent - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.RedactImage - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.DeidentifyContent - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ReidentifyContent - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ListInfoTypes - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.CreateInspectTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.UpdateInspectTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.GetInspectTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ListInspectTemplates - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.DeleteInspectTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.GetDeidentifyTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ListDeidentifyTemplates - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplate - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.CreateJobTrigger - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.UpdateJobTrigger - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.GetJobTrigger - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ListJobTriggers - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.DeleteJobTrigger - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.CreateDlpJob - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.ListDlpJobs - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.GetDlpJob - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.DeleteDlpJob - deadline: 300.0 - - selector: google.privacy.dlp.v2.DlpService.CancelDlpJob + - selector: 'google.privacy.dlp.v2.DlpService.*' deadline: 300.0 authentication: rules: - - selector: '*' + - selector: 'google.privacy.dlp.v2.DlpService.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/privacy/dlp/v2/BUILD.bazel b/google/privacy/dlp/v2/BUILD.bazel new file mode 100644 index 000000000..68d9e7cc9 --- /dev/null +++ b/google/privacy/dlp/v2/BUILD.bazel @@ -0,0 +1,159 @@ +# 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 = "dlp_proto", + srcs = [ + "dlp.proto", + "storage.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_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", + ], +) + +proto_library_with_info( + name = "dlp_proto_with_info", + deps = [ + ":dlp_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 = "dlp_java_proto", + deps = [":dlp_proto"], +) + +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"], +) + +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", + 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, + runtime_deps = [":dlp_java_gapic_test"], +) for test_name in [ + # "com.google.cloud.dlp.v2.DlpServiceClientTest", +]] + +# Opensource 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 = [ + ":dlp_java_proto", + ":dlp_proto", + ":dlp_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 = "dlp_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/privacy/dlp/v2", + protos = [":dlp_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + "//google/type:date_go_proto", + "//google/type:dayofweek_go_proto", + "//google/type:timeofday_go_proto", + ], +) + +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"], +) + +go_test( + name = "dlp_go_gapic_test", + srcs = [":dlp_go_gapic_srcjar_test"], + embed = [":dlp_go_gapic"], + importpath = "cloud.google.com/go/dlp/apiv2", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-dlp-v2-go", + deps = [ + ":dlp_go_gapic", + ":dlp_go_gapic_srcjar-smoke-test.srcjar", + ":dlp_go_gapic_srcjar-test.srcjar", + ":dlp_go_proto", + ], +) diff --git a/google/privacy/dlp/v2/dlp.proto b/google/privacy/dlp/v2/dlp.proto index 4b151b3ed..b138c3b59 100644 --- a/google/privacy/dlp/v2/dlp.proto +++ b/google/privacy/dlp/v2/dlp.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"; @@ -26,6 +27,7 @@ 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"; @@ -34,7 +36,6 @@ option java_outer_classname = "DlpProto"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; - // The Cloud Data Loss Prevention (DLP) API is a service that allows clients // to detect the presence of Personally Identifiable Information (PII) and other // privacy-sensitive data in user-supplied, unstructured data streams, like text @@ -45,6 +46,9 @@ option php_namespace = "Google\\Cloud\\Dlp\\V2"; // To learn more about concepts and find how-to guides see // https://cloud.google.com/dlp/docs/. service DlpService { + option (google.api.default_host) = "dlp.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Finds potentially sensitive info in content. // This method has limits on input size, processing time, and output size. // @@ -279,6 +283,15 @@ service DlpService { }; } + // Activate a job trigger. Causes the immediate execute of a trigger + // instead of waiting on the trigger event to occur. + rpc ActivateJobTrigger(ActivateJobTriggerRequest) returns (DlpJob) { + option (google.api.http) = { + post: "/v2/{name=projects/*/jobTriggers/*}:activate" + body: "*" + }; + } + // Creates a new job to inspect storage or calculate risk metrics. // See https://cloud.google.com/dlp/docs/inspecting-storage and // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. @@ -333,6 +346,136 @@ service DlpService { body: "*" }; } + + // Creates a pre-built stored infoType to be used for inspection. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/storedInfoTypes" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*}/storedInfoTypes" + body: "*" + } + }; + } + + // Updates the stored infoType by creating a new version. The existing version + // will continue to be used until the new version is ready. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/storedInfoTypes/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=projects/*/storedInfoTypes/*}" + body: "*" + } + }; + } + + // Gets a stored infoType. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + get: "/v2/{name=projects/*/storedInfoTypes/*}" + } + }; + } + + // Lists stored infoTypes. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/storedInfoTypes" + additional_bindings { + get: "/v2/{parent=projects/*}/storedInfoTypes" + } + }; + } + + // Deletes a stored infoType. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + delete: "/v2/{name=projects/*/storedInfoTypes/*}" + } + }; + } +} + +// List of exclude infoTypes. +message ExcludeInfoTypes { + // InfoType list in ExclusionRule rule drops a finding when it overlaps or + // contained within with a finding of an infoType from this list. For + // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and + // `exclusion_rule` containing `exclude_info_types.info_types` with + // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap + // with EMAIL_ADDRESS finding. + // That leads to "555-222-2222@example.org" to generate only a single + // finding, namely email address. + 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 { + oneof type { + // Dictionary which defines the rule. + CustomInfoType.Dictionary dictionary = 1; + + // Regular expression which defines the rule. + CustomInfoType.Regex regex = 2; + + // Set of infoTypes for which findings would affect this rule. + ExcludeInfoTypes exclude_info_types = 3; + } + + // How the rule is applied, see MatchingType documentation for details. + MatchingType matching_type = 4; +} + +// A single inspection rule to be applied to infoTypes, specified in +// `InspectionRuleSet`. +message InspectionRule { + oneof type { + // Hotword-based detection rule. + CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + + // Exclusion rule. + ExclusionRule exclusion_rule = 2; + } +} + +// Rule set for modifying a set of infoTypes to alter behavior under certain +// circumstances, depending on the specific details of the rules within the set. +message InspectionRuleSet { + // List of infoTypes this rule set is applied to. + repeated InfoType info_types = 1; + + // Set of rules to be applied to infoTypes. The rules are applied in order. + repeated InspectionRule rules = 2; } // Configuration description of the scanning process. @@ -355,12 +498,12 @@ message InspectConfig { // Max number of findings that will be returned for each item scanned. // When set within `InspectDataSourceRequest`, - // the maximum returned is 1000 regardless if this is set higher. + // 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; // Max number of findings that will be returned per request/job. - // When set within `InspectContentRequest`, the maximum returned is 1000 + // When set within `InspectContentRequest`, the maximum returned is 2000 // regardless if this is set higher. int32 max_findings_per_request = 2; @@ -375,6 +518,11 @@ message InspectConfig { // When no InfoTypes or CustomInfoTypes are specified in a request, the // 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. repeated InfoType info_types = 1; // Only returns findings equal or above this threshold. The default is @@ -398,6 +546,11 @@ message InspectConfig { // List of options defining data content to scan. // If empty, text, images, and other content will be included. repeated ContentOption content_options = 8; + + // Set of rules to apply to the findings for this InspectConfig. + // Exclusion rules, contained in the set are executed in the end, other + // rules are executed in the order they are specified for each info type. + repeated InspectionRuleSet rule_set = 10; } // Container for bytes to inspect or redact. @@ -416,6 +569,8 @@ message ByteContentItem { IMAGE_SVG = 4; TEXT_UTF8 = 5; + + AVRO = 11; } // The type of data stored in the bytes string. Default will be TEXT_UTF8. @@ -516,12 +671,47 @@ message Location { 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; +} + // Findings container location data. message ContentLocation { // Name of the container where the finding is located. - // The top level name is the source file name or table name. Nested names - // could be absent if the embedded object has no string identifier - // (for an example an image contained within a document). + // 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: + // + // Nested names could be absent if the embedded object has no string + // identifier (for an example an image contained within a document). string container_name = 1; // Type of the container within the file with location of the finding. @@ -830,8 +1020,9 @@ message OutputStorageConfig { // from the predefined schema that are missing will be added. No columns in // the existing table will be deleted. // - // If unspecified, then all available columns will be used for a new table, - // and no changes will be made to an existing table. + // 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. OutputSchema output_schema = 3; } @@ -854,6 +1045,7 @@ message InspectDataSourceDetails { InspectJobConfig job_config = 3; } + // All result fields mentioned below are updated while the job is processing. message Result { // Total size in bytes that were processed. int64 processed_bytes = 1; @@ -883,6 +1075,10 @@ message InfoTypeDescription { // Which parts of the API supports this InfoType. repeated InfoTypeSupportedBy supported_by = 3; + + // Description of the infotype. Translated when language is provided in the + // request. + string description = 4; } // Request for the list of infoTypes. @@ -1003,7 +1199,7 @@ message PrivacyMetric { // Optional 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 distict rows, we consider the entire + // quasi-identifier tuples over distinct rows, we consider the entire // collection of tuples as the composite quasi-identifier. This collection // is a multiset: the order in which the different tuples appear in the // dataset is ignored, but their frequency is taken into account. @@ -1421,11 +1617,13 @@ message Value { message QuoteInfo { // Object representation of the quote. oneof parsed_quote { + // The date time indicated by the quote. DateTime date_time = 2; } } // Message for a date time object. +// e.g. 2018-01-01, 5th August. message DateTime { message TimeZone { // Set only if the offset can be determined. Positive for time ahead of UTC. @@ -1480,6 +1678,8 @@ message PrimitiveTransformation { CryptoHashConfig crypto_hash_config = 9; DateShiftConfig date_shift_config = 11; + + CryptoDeterministicConfig crypto_deterministic_config = 12; } } @@ -1514,14 +1714,72 @@ message TimePartConfig { // Pseudonymization method that generates surrogates via cryptographic hashing. // Uses SHA-256. // The key size must be either 32 or 64 bytes. -// Outputs a 32 byte digest as an uppercase hex string -// (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE). +// Outputs a base64 encoded representation of the hashed output +// (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). // Currently, only string and integer values can be hashed. +// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. message CryptoHashConfig { // The key used by the hash function. CryptoKey crypto_key = 1; } +// Pseudonymization method that generates deterministic encryption for the given +// input. Outputs a base64 encoded representation of the encrypted output. +// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. +message CryptoDeterministicConfig { + // The key used by the encryption function. + CryptoKey crypto_key = 1; + + // The custom info type to annotate the surrogate with. + // 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: (): + // + // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and + // the surrogate is 'abc', the full replacement value + // will be: 'MY_TOKEN_INFO_TYPE(3):abc' + // + // This annotation identifies the surrogate when inspecting content using the + // custom info type 'Surrogate'. This facilitates reversal of the + // surrogate when it occurs in free 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 + // + // - reverse a surrogate that does not correspond to an actual identifier + // - be unable to parse the surrogate and result in an error + // + // Therefore, choose your custom info type name carefully after considering + // what your data looks like. One way to select a name that has a high chance + // of yielding reliable detection is to include one or more unicode characters + // 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 + InfoType surrogate_info_type = 2; + + // Optional. 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 + // validated against the value used during encryption. If a context was + // provided during encryption, same context must be provided during decryption + // as well. + // + // If the context is not set, plaintext would be used as is for encryption. + // If the context is set but: + // + // 1. there is no record present when transforming a given value or + // 2. the field is not present when transforming a given value, + // + // plaintext would be used as is for encryption. + // + // Note that case (1) is expected when an `InfoTypeTransformation` is + // applied to both structured and non-structured `ContentItem`s. + FieldId context = 3; +} + // Replace each input value with a given `Value`. message ReplaceValueConfig { // Value to replace it with. @@ -1662,16 +1920,19 @@ message BucketingConfig { repeated Bucket buckets = 1; } -// Replaces an identifier with a surrogate using FPE with the FFX -// mode of operation; however when used in the `ReidentifyContent` API method, -// it serves the opposite function by reversing the surrogate back into -// the original identifier. -// The identifier must be encoded as ASCII. -// For a given crypto key and context, the same identifier will be -// replaced with the same surrogate. -// Identifiers must be at least two characters long. -// In the case that the identifier is the empty string, it will be skipped. -// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. +// Replaces an identifier with a surrogate using Format Preserving Encryption +// (FPE) with the FFX mode of operation; however when used in the +// `ReidentifyContent` API method, it serves the opposite function by reversing +// the surrogate back into the original identifier. The identifier must be +// encoded as ASCII. For a given crypto key and context, the same identifier +// will be replaced with the same surrogate. Identifiers must be at least two +// characters long. In the case that the identifier is the empty string, it will +// be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn +// more. +// +// Note: We recommend using CryptoDeterministicConfig for all use cases which +// do not require preserving the input alphabet space and size, plus warrant +// referential integrity. message CryptoReplaceFfxFpeConfig { // These are commonly used subsets of the alphabet that the FFX mode // natively supports. In the algorithm, the alphabet is selected using @@ -1788,14 +2049,26 @@ message TransientCryptoKey { 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; +} + // Using raw keys is prone to security risks due to accidentally // leaking the key. Choose another type of key if possible. message UnwrappedCryptoKey { - // The AES 128/192/256 bit key. [required] + // A 128/192/256 bit key. [required] bytes key = 1; } // Include to use an existing data crypto key wrapped by KMS. +// The wrapped key must be a 128/192/256 bit key. // Authorization requires the following IAM permissions when sending a request // to perform a crypto transformation using a kms-wrapped crypto key: // dlp.kms.encrypt @@ -1910,7 +2183,8 @@ message RecordSuppression { message RecordCondition { // The field type of `value` and `field` do not need to match to be // considered equal, but not all comparisons are possible. - // + // EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, + // but all other comparisons are invalid with incompatible types. // A `value` of type: // // - `string` can be compared against all other types @@ -1972,7 +2246,7 @@ message TransformationOverview { repeated TransformationSummary transformation_summaries = 3; } -// Summary of a single tranformation. +// Summary of a single transformation. // Only one of 'transformation', 'field_transformation', or 'record_suppress' // will be set. message TransformationSummary { @@ -1997,7 +2271,7 @@ message TransformationSummary { ERROR = 2; } - // Set if the transformation was limited to a specific info_type. + // Set if the transformation was limited to a specific InfoType. InfoType info_type = 1; // Set if the transformation was limited to a specific FieldId. @@ -2149,7 +2423,7 @@ message JobTrigger { repeated Trigger triggers = 5; // A stream of errors encountered when the trigger was activated. Repeated - // errors may result in the JobTrigger automaticaly being paused. + // 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; @@ -2178,7 +2452,10 @@ message Action { OutputStorageConfig output_config = 1; } - // Publish the results of a DlpJob to a pub sub channel. + // Publish a message into given Pub/Sub topic when DlpJob has completed. The + // message contains a single field, `DlpJobName`, which is equal to the + // finished job's + // [`DlpJob.name`](/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). // Compatible with: Inspect, Risk message PublishToPubSub { // Cloud Pub/Sub topic to send notifications to. The topic must have given @@ -2202,6 +2479,26 @@ message Action { } + // Publish findings of a DlpJob to Cloud Data Catalog. Labels summarizing the + // results of the DlpJob will be applied to the entry for the resource scanned + // in Cloud Data Catalog. Any labels previously written by another DlpJob will + // be deleted. InfoType naming patterns are strictly enforced when using this + // feature. Note that the findings will be persisted in Cloud Data Catalog + // storage and are governed by Data Catalog service-specific policy, see + // https://cloud.google.com/terms/service-terms + // Only a single instance of this action can be specified and only allowed if + // all resources being scanned are BigQuery tables. + // Compatible with: Inspect + message PublishFindingsToCloudDataCatalog { + + } + + // Enable email notification to project owners and editors on jobs's + // completion/failure. + message JobNotificationEmails { + + } + oneof action { // Save resulting findings in a provided location. SaveFindings save_findings = 1; @@ -2211,6 +2508,13 @@ message Action { // Publish summary to Cloud Security Command Center (Alpha). PublishSummaryToCscc publish_summary_to_cscc = 3; + + // Publish findings to Cloud Datahub. + PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + + // Enable email notification to project owners and editors on job's + // completion/failure. + JobNotificationEmails job_notification_emails = 8; } } @@ -2225,7 +2529,7 @@ message CreateInspectTemplateRequest { // 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 + // 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; } @@ -2265,6 +2569,21 @@ message ListInspectTemplatesRequest { // Optional 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, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to time the template was created. + // - `update_time`: corresponds to time the template was last updated. + // - `name`: corresponds to template's name. + // - `display_name`: corresponds to template's display name. + string order_by = 4; } // Response message for ListInspectTemplates. @@ -2295,11 +2614,18 @@ message CreateJobTriggerRequest { // 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 + // 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; } +// Request message for ActivateJobTrigger. +message ActivateJobTriggerRequest { + // Resource name of the trigger to activate, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1; +} + // Request message for UpdateJobTrigger. message UpdateJobTriggerRequest { // Resource name of the project and the triggeredJob, for example @@ -2336,7 +2662,7 @@ message CreateDlpJobRequest { // The job 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 + // 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; } @@ -2363,10 +2689,39 @@ message ListJobTriggersRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the triggeredJob was created. - // - `update_time`: corresponds to time the triggeredJob was last updated. + // - `create_time`: corresponds to time the JobTrigger was created. + // - `update_time`: corresponds to time the JobTrigger was last updated. + // - `last_run_time`: corresponds to the last time the JobTrigger ran. // - `name`: corresponds to JobTrigger's name. + // - `display_name`: corresponds to JobTrigger's display name. + // - `status`: corresponds to JobTrigger's status. string order_by = 4; + + // Optional. 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 ` `. + // * Supported fields/values for inspect jobs: + // - `status` - HEALTHY|PAUSED|CANCELLED + // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + // quotation marks. Nanoseconds are ignored. + // - 'error_count' - Number of errors that have occurred while running. + // * The operator must be `=` or `!=` for status and inspected_storage. + // + // Examples: + // + // * inspected_storage = cloud_storage AND status = HEALTHY + // * inspected_storage = cloud_storage OR inspected_storage = bigquery + // * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + // * last_run_time > \"2017-12-12T00:00:00+00:00\" + // + // The length of this field should be no more than 500 characters. + string filter = 5; } // Response message for ListJobTriggers. @@ -2398,8 +2753,7 @@ message InspectJobConfig { // template. string inspect_template_name = 3; - // Actions to execute at the completion of the job. Are executed in the order - // provided. + // Actions to execute at the completion of the job. repeated Action actions = 4; } @@ -2458,6 +2812,32 @@ 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. @@ -2481,8 +2861,12 @@ message ListDlpJobsRequest { // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY // - `trigger_name` - The resource name of the trigger that created job. + // - 'end_time` - Corresponds to time the job finished. + // - 'start_time` - Corresponds to time the job finished. // * Supported fields for risk analysis jobs: // - `state` - RUNNING|CANCELED|FINISHED|FAILED + // - 'end_time` - Corresponds to time the job finished. + // - 'start_time` - Corresponds to time the job finished. // * The operator must be `=` or `!=`. // // Examples: @@ -2490,6 +2874,7 @@ message ListDlpJobsRequest { // * inspected_storage = cloud_storage AND state = done // * inspected_storage = cloud_storage OR inspected_storage = bigquery // * inspected_storage = cloud_storage AND (state = done OR state = canceled) + // * end_time > \"2017-12-12T00:00:00+00:00\" // // The length of this field should be no more than 500 characters. string filter = 1; @@ -2502,6 +2887,21 @@ message ListDlpJobsRequest { // The type of job. Defaults to `DlpJobType.INSPECT` DlpJobType type = 5; + + // Optional 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. + // + // Example: `name asc, end_time asc, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to time the job was created. + // - `end_time`: corresponds to time the job ended. + // - `name`: corresponds to job's name. + // - `state`: corresponds to `state` + string order_by = 6; } // The response message for listing DLP jobs. @@ -2536,7 +2936,7 @@ message CreateDeidentifyTemplateRequest { // 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 + // 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; } @@ -2576,6 +2976,21 @@ message ListDeidentifyTemplatesRequest { // Optional 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, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to time the template was created. + // - `update_time`: corresponds to time the template was last updated. + // - `name`: corresponds to template's name. + // - `display_name`: corresponds to template's display name. + string order_by = 4; } // Response message for ListDeidentifyTemplates. @@ -2597,53 +3012,188 @@ message DeleteDeidentifyTemplateRequest { string name = 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; +// Configuration for a custom dictionary created from a data source of any size +// up to the maximum size defined in the +// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of +// dictionary creation are stored in the specified Google Cloud Storage +// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries +// that satisfy the size requirements. +message LargeCustomDictionaryConfig { + // Location to store dictionary artifacts in Google Cloud Storage. These files + // will only be accessible by project owners and the DLP API. If any of these + // artifacts are modified, the dictionary is considered invalid and can no + // longer be used. + CloudStoragePath output_path = 1; - // Text content within the data, excluding any metadata. - CONTENT_TEXT = 1; + oneof source { + // Set of files containing newline-delimited lists of dictionary phrases. + CloudStorageFileSet cloud_storage_file_set = 2; - // Images found in the data. - CONTENT_IMAGE = 2; + // Field in a BigQuery table where each cell represents a dictionary phrase. + BigQueryField big_query_field = 3; + } } -// Parts of the APIs which use certain infoTypes. -enum InfoTypeSupportedBy { - ENUM_TYPE_UNSPECIFIED = 0; +// Summary statistics of a custom dictionary. +message LargeCustomDictionaryStats { + // Approximate number of distinct phrases in the dictionary. + int64 approx_num_phrases = 1; +} - // Supported by the inspect operations. - INSPECT = 1; +// Configuration for a StoredInfoType. +message StoredInfoTypeConfig { + // Display name of the StoredInfoType (max 256 characters). + string display_name = 1; - // Supported by the risk analysis operations. - RISK_ANALYSIS = 2; + // Description of the StoredInfoType (max 256 characters). + string description = 2; + + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryConfig large_custom_dictionary = 3; + } } -// Operators available for comparing the value of fields. -enum RelationalOperator { - RELATIONAL_OPERATOR_UNSPECIFIED = 0; +// Statistics for a StoredInfoType. +message StoredInfoTypeStats { + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryStats large_custom_dictionary = 1; + } +} + +// Version of a StoredInfoType, including the configuration used to build it, +// create timestamp, and current state. +message StoredInfoTypeVersion { + // StoredInfoType configuration. + StoredInfoTypeConfig config = 1; + + // Create timestamp of the version. Read-only, determined by the system + // when the version is created. + google.protobuf.Timestamp create_time = 2; + + // Stored info type version state. Read-only, updated by the system + // during dictionary creation. + StoredInfoTypeState state = 3; + + // Errors that occurred when creating this storedInfoType version, or + // 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 + // 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 + // 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. + repeated Error errors = 4; + + // Statistics about this storedInfoType version. + StoredInfoTypeStats stats = 5; +} + +// StoredInfoType resource message that contains information about the current +// version and any pending updates. +message StoredInfoType { + // Resource name. + string name = 1; - // Equal. - EQUAL_TO = 1; + // Current version of the stored info type. + StoredInfoTypeVersion current_version = 2; - // Not equal to. - NOT_EQUAL_TO = 2; + // Pending versions of the stored info type. Empty if no versions are + // pending. + repeated StoredInfoTypeVersion pending_versions = 3; +} - // Greater than. - GREATER_THAN = 3; +// Request message for CreateStoredInfoType. +message CreateStoredInfoTypeRequest { + // The parent resource name, for example projects/my-project-id or + // organizations/my-org-id. + string parent = 1; - // Less than. - LESS_THAN = 4; + // Configuration of the storedInfoType to create. + StoredInfoTypeConfig config = 2; - // Greater than or equals. - GREATER_THAN_OR_EQUALS = 5; + // 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; +} - // Less than or equals. - LESS_THAN_OR_EQUALS = 6; +// Request message for UpdateStoredInfoType. +message UpdateStoredInfoTypeRequest { + // Resource name of organization and storedInfoType to be updated, for + // example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1; - // Exists - EXISTS = 7; + // Updated configuration for the storedInfoType. If not provided, a new + // version of the storedInfoType will be created with the existing + // configuration. + StoredInfoTypeConfig config = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetStoredInfoType. +message GetStoredInfoTypeRequest { + // 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; +} + +// Request message for ListStoredInfoTypes. +message ListStoredInfoTypesRequest { + // The parent resource name, for example projects/my-project-id or + // organizations/my-org-id. + string parent = 1; + + // Optional 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 + // a page of max size 100. + int32 page_size = 3; + + // Optional 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. + // + // Example: `name asc, display_name, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to time the most recent version of the + // resource was created. + // - `state`: corresponds to the state of the resource. + // - `name`: corresponds to resource name. + // - `display_name`: corresponds to info type's display name. + string order_by = 4; +} + +// Response message for ListStoredInfoTypes. +message ListStoredInfoTypesResponse { + // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. + repeated StoredInfoType stored_info_types = 1; + + // If the next page is available then the next page token to be used + // in following ListStoredInfoTypes request. + string next_page_token = 2; +} + +// Request message for DeleteStoredInfoType. +message DeleteStoredInfoTypeRequest { + // 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; } // An enum to represent the various type of DLP jobs. @@ -2656,3 +3206,23 @@ enum DlpJobType { // The job executed a Risk Analysis computation. RISK_ANALYSIS_JOB = 2; } + +// State of a StoredInfoType version. +enum StoredInfoTypeState { + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; + + // StoredInfoType version is being created. + PENDING = 1; + + // StoredInfoType version is ready for use. + READY = 2; + + // StoredInfoType creation failed. All relevant error messages are returned in + // the `StoredInfoTypeVersion` message. + FAILED = 3; + + // StoredInfoType is no longer valid because artifacts stored in + // user-controlled storage were modified. To fix an invalid StoredInfoType, + // use the `UpdateStoredInfoType` method to create a new version. + INVALID = 4; +} diff --git a/google/privacy/dlp/v2/dlp_gapic.yaml b/google/privacy/dlp/v2/dlp_gapic.yaml index f4bf99ab9..12b514849 100644 --- a/google/privacy/dlp/v2/dlp_gapic.yaml +++ b/google/privacy/dlp/v2/dlp_gapic.yaml @@ -7,6 +7,7 @@ language_settings: 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: @@ -16,9 +17,6 @@ language_settings: nodejs: package_name: dlp.v2 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt collection_oneofs: - oneof_name: deidentify_template_oneof collection_names: @@ -28,6 +26,10 @@ collection_oneofs: 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 @@ -64,6 +66,10 @@ interfaces: 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 @@ -98,10 +104,6 @@ interfaces: # required_fields - Fields that are always required for a request to be # valid. # - # request_object_method - Turns on or off the generation of a method whose - # sole parameter is a request object. Not all languages will generate this - # method. - # # 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. @@ -144,7 +146,6 @@ interfaces: - name: InspectContent required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -154,7 +155,6 @@ interfaces: - name: RedactImage required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -164,7 +164,6 @@ interfaces: - name: DeidentifyContent required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -174,7 +173,6 @@ interfaces: - name: ReidentifyContent required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -182,14 +180,12 @@ interfaces: parent: project timeout_millis: 300000 - name: ListInfoTypes - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 300000 - name: CreateInspectTemplate required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -199,7 +195,6 @@ interfaces: - name: UpdateInspectTemplate required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -207,7 +202,6 @@ interfaces: name: inspect_template_oneof timeout_millis: 300000 - name: GetInspectTemplate - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -217,7 +211,6 @@ interfaces: - name: ListInspectTemplates required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -234,7 +227,6 @@ interfaces: - name: DeleteInspectTemplate required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -244,7 +236,6 @@ interfaces: - name: CreateDeidentifyTemplate required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -254,7 +245,6 @@ interfaces: - name: UpdateDeidentifyTemplate required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -264,7 +254,6 @@ interfaces: - name: GetDeidentifyTemplate required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -274,7 +263,6 @@ interfaces: - name: ListDeidentifyTemplates required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -291,7 +279,6 @@ interfaces: - name: DeleteDeidentifyTemplate required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -301,7 +288,6 @@ interfaces: - name: CreateDlpJob required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -311,7 +297,6 @@ interfaces: - name: ListDlpJobs required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -328,7 +313,6 @@ interfaces: - name: GetDlpJob required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -338,7 +322,6 @@ interfaces: - name: DeleteDlpJob required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -348,7 +331,6 @@ interfaces: - name: CancelDlpJob required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -358,7 +340,6 @@ interfaces: - name: ListJobTriggers required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -375,7 +356,6 @@ interfaces: - name: GetJobTrigger required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -385,15 +365,24 @@ interfaces: - name: DeleteJobTrigger required_fields: - name - request_object_method: true 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: UpdateJobTrigger required_fields: - name - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -403,7 +392,6 @@ interfaces: - name: CreateJobTrigger required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -411,6 +399,59 @@ interfaces: 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: @@ -484,3 +525,18 @@ resource_name_generation: - 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 diff --git a/google/privacy/dlp/v2/storage.proto b/google/privacy/dlp/v2/storage.proto index 5c2ca5031..c2f38a613 100644 --- a/google/privacy/dlp/v2/storage.proto +++ b/google/privacy/dlp/v2/storage.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"; @@ -26,16 +27,48 @@ option java_outer_classname = "DlpStorage"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; - // Type of information detected by the API. message InfoType { // Name of the information type. Either a name of your choosing when // creating a CustomInfoType, or one of the names listed // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying - // a built-in type. + // a built-in type. InfoType names should conform to the pattern + // [a-zA-Z0-9_]{1,64}. string name = 1; } +// A reference to a StoredInfoType to use with scanning. +message StoredType { + // Resource name of the requested `StoredInfoType`, for example + // `organizations/433245324/storedInfoTypes/432452342` or + // `projects/project-id/storedInfoTypes/432452342`. + string name = 1; + + // Timestamp indicating when the version of the `StoredInfoType` used for + // inspection was created. Output-only field, populated by the system. + google.protobuf.Timestamp create_time = 2; +} + +// Categorization of results based on how likely they are to represent a match, +// based on the number of elements they contain which imply a match. +enum Likelihood { + // Default value; same as POSSIBLE. + LIKELIHOOD_UNSPECIFIED = 0; + + // Few matching elements. + VERY_UNLIKELY = 1; + + UNLIKELY = 2; + + // Some matching elements. + POSSIBLE = 3; + + LIKELY = 4; + + // Many matching elements. + VERY_LIKELY = 5; +} + // Custom information type provided by the user. Used to find domain-specific // sensitive information configurable to the data in question. message CustomInfoType { @@ -57,7 +90,11 @@ message CustomInfoType { // // Dictionary words containing a large number of characters that are not // letters or digits may result in unexpected findings because such characters - // are treated as whitespace. + // are treated as whitespace. The + // [limits](https://cloud.google.com/dlp/limits) page contains details about + // the size limits of dictionaries. For dictionaries that do not fit within + // these constraints, consider using `LargeCustomDictionaryConfig` in the + // `StoredInfoType` API. message Dictionary { // Message defining a list of words or phrases to search for in the data. message WordList { @@ -79,8 +116,14 @@ message CustomInfoType { // Message defining a custom regular expression. message Regex { - // Pattern defining the regular expression. + // Pattern defining the regular expression. Its syntax + // (https://github.com/google/re2/wiki/Syntax) can be found under the + // google/re2 repository on GitHub. string pattern = 1; + + // The index of the submatch to extract as findings. When not + // specified, the entire match is returned. No more than 3 may be included. + repeated int32 group_indexes = 2; } // Message for detecting output from deidentification transformations @@ -95,9 +138,10 @@ message CustomInfoType { } - // Rule for modifying a CustomInfoType to alter behavior under certain - // circumstances, depending on the specific details of the rule. Not supported - // for the `surrogate_type` custom info type. + // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a + // `CustomInfoType` to alter behavior under certain circumstances, depending + // on the specific details of the rule. Not supported for the `surrogate_type` + // custom infoType. message DetectionRule { // Message for specifying a window around a finding to apply a detection // rule. @@ -154,8 +198,21 @@ message CustomInfoType { } } - // All CustomInfoTypes must have a name - // that does not conflict with built-in InfoTypes or other CustomInfoTypes. + enum ExclusionType { + // A finding of this custom info type will not be excluded from results. + EXCLUSION_TYPE_UNSPECIFIED = 0; + + // A finding of this custom info type will be excluded from final results, + // but can still affect rule execution. + EXCLUSION_TYPE_EXCLUDE = 1; + } + + // CustomInfoType can either be a new infoType, or an extension of built-in + // infoType, when the name matches one of existing infoTypes and that infoType + // is specified in `InspectContent.info_types` field. Specifying the latter + // adds findings to the one detected by the system. If built-in info type is + // not specified in `InspectContent.info_types` list then the name is treated + // as a custom info type. InfoType info_type = 1; // Likelihood to return for this CustomInfoType. This base value can be @@ -173,12 +230,20 @@ message CustomInfoType { // Message for detecting output from deidentification transformations that // support reversing. SurrogateType surrogate_type = 4; + + // Load an existing `StoredInfoType` resource for use in + // `InspectDataSource`. Not currently supported in `InspectContent`. + StoredType stored_type = 5; } // Set of detection rules to apply to all findings of this CustomInfoType. // Rules are applied in order that they are specified. Not supported for the // `surrogate_type` CustomInfoType. repeated DetectionRule detection_rules = 7; + + // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding + // to be returned. It still can be used for rules matching. + ExclusionType exclusion_type = 8; } // General identifier of a data field in a storage service. @@ -217,14 +282,83 @@ message DatastoreOptions { KindExpression kind = 2; } -// Options defining a file or a set of files (path ending with *) within -// a Google Cloud Storage bucket. +// Message representing a set of files in a Cloud Storage bucket. Regular +// expressions are used to allow fine-grained control over which files in the +// bucket to include. +// +// Included files are those that match at least one item in `include_regex` and +// do not match any items in `exclude_regex`. Note that a file that matches +// items from both lists will _not_ be included. For a match to occur, the +// entire file path (i.e., everything in the url after the bucket name) must +// match the regular expression. +// +// For example, given the input `{bucket_name: "mybucket", include_regex: +// ["directory1/.*"], exclude_regex: +// ["directory1/excluded.*"]}`: +// +// * `gs://mybucket/directory1/myfile` will be included +// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches +// across `/`) +// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the +// full path doesn't match any items in `include_regex`) +// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path +// matches an item in `exclude_regex`) +// +// If `include_regex` is left empty, it will match all files by default +// (this is equivalent to setting `include_regex: [".*"]`). +// +// Some other common use cases: +// +// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all +// files in `mybucket` except for .pdf files +// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will +// include all files directly under `gs://mybucket/directory/`, without matching +// across `/` +message CloudStorageRegexFileSet { + // The name of a Cloud Storage bucket. Required. + string bucket_name = 1; + + // A list of regular expressions matching file paths to include. All files in + // the bucket that match at least one of these regular expressions will be + // included in the set of files, except for those that also match an item in + // `exclude_regex`. Leaving this field empty will match all files by default + // (this is equivalent to including `.*` in the list). + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string include_regex = 2; + + // A list of regular expressions matching file paths to exclude. All files in + // the bucket that match at least one of these regular expressions will be + // excluded from the scan. + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string exclude_regex = 3; +} + +// Options defining a file or a set of files within a Google Cloud Storage +// bucket. message CloudStorageOptions { // Set of files to scan. message FileSet { - // The url, in the format `gs:///`. Trailing wildcard in the - // path is allowed. + // The Cloud Storage url of the file(s) to scan, in the format + // `gs:///`. Trailing wildcard in the path is allowed. + // + // If the url ends in a trailing slash, the bucket or directory represented + // by the url will be scanned non-recursively (content in sub-directories + // will not be scanned). This means that `gs://mybucket/` is equivalent to + // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to + // `gs://mybucket/directory/*`. + // + // Exactly one of `url` or `regex_file_set` must be set. string url = 1; + + // The regex-filtered set of files to scan. Exactly one of `url` or + // `regex_file_set` must be set. + CloudStorageRegexFileSet regex_file_set = 2; } // How to sample bytes if not all bytes are scanned. Meaningful only when used @@ -241,15 +375,24 @@ message CloudStorageOptions { RANDOM_START = 2; } + // The set of one or more files to scan. FileSet file_set = 1; // Max number of bytes to scan from a file. If a scanned file's size is bigger - // than this value then the rest of the bytes are omitted. + // than this value then the rest of the bytes are omitted. Only one + // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. int64 bytes_limit_per_file = 4; + // Max percentage of bytes to scan from a file. The rest are omitted. The + // number of bytes scanned is rounded down. Must be between 0 and 100, + // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one + // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. + int32 bytes_limit_per_file_percent = 8; + // List of file type groups to include in the scan. // If empty, all files are scanned and available data format processors - // are applied. + // are applied. In addition, the binary content of the selected files + // is always scanned as well. repeated FileType file_types = 5; SampleMethod sample_method = 6; @@ -260,6 +403,13 @@ message CloudStorageOptions { int32 files_limit_percent = 7; } +// Message representing a set of files in Cloud Storage. +message CloudStorageFileSet { + // The url, in the format `gs:///`. Trailing wildcard in the + // path is allowed. + string url = 1; +} + // Message representing a single file or path in Cloud Storage. message CloudStoragePath { // A url representing a file or path (no wildcards) in Cloud Storage. @@ -270,8 +420,8 @@ message CloudStoragePath { // Options defining BigQuery table and row identifiers. message BigQueryOptions { // How to sample rows if not all rows are scanned. Meaningful only when used - // in conjunction with rows_limit. If not specified, scanning would start - // from the top. + // in conjunction with either rows_limit or rows_limit_percent. If not + // specified, scanning would start from the top. enum SampleMethod { SAMPLE_METHOD_UNSPECIFIED = 0; @@ -291,10 +441,22 @@ message BigQueryOptions { // Max number of rows to scan. If the table has more rows than this value, the // rest of the rows are omitted. If not set, or if set to 0, all rows will be - // scanned. Cannot be used in conjunction with TimespanConfig. + // scanned. Only one of rows_limit and rows_limit_percent can be specified. + // Cannot be used in conjunction with TimespanConfig. int64 rows_limit = 3; + // Max percentage of rows to scan. The rest are omitted. The number of rows + // scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and + // 100 means no limit. Defaults to 0. Only one of rows_limit and + // rows_limit_percent can be specified. Cannot be used in conjunction with + // TimespanConfig. + int32 rows_limit_percent = 6; + SampleMethod sample_method = 4; + + // References to fields excluded from scanning. This allows you to skip + // inspection of entire columns which you know have no findings. + repeated FieldId excluded_fields = 5; } // Shared message indicating Cloud storage type. @@ -302,15 +464,17 @@ message StorageConfig { // Configuration of the timespan of the items to include in scanning. // Currently only supported when inspecting Google Cloud Storage and BigQuery. message TimespanConfig { - // Exclude files older than this value. + // Exclude files or rows older than this value. google.protobuf.Timestamp start_time = 1; - // Exclude files newer than this value. + // Exclude files or rows newer than this value. // If set to zero, no upper time limit is applied. google.protobuf.Timestamp end_time = 2; // Specification of the field containing the timestamp of scanned items. - // Required for data sources like Datastore or BigQuery. + // 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. @@ -339,6 +503,32 @@ message StorageConfig { TimespanConfig timespan_config = 6; } +// Definitions of file type groups to scan. +enum FileType { + // Includes all files. + FILE_TYPE_UNSPECIFIED = 0; + + // Includes all file extensions not covered by text file types. + BINARY_FILE = 1; + + // Included file extensions: + // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp, + // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json, + // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, + // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml, + // xml, xsl, xsd, yml, yaml. + TEXT_FILE = 2; + + // Included file extensions: + // bmp, gif, jpg, jpeg, jpe, png. + // bytes_limit_per_file has no effect on image files. + IMAGE = 3; + + // Included file extensions: + // avro + AVRO = 7; +} + // Row key for identifying a record in BigQuery table. message BigQueryKey { // Complete BigQuery table reference. @@ -410,6 +600,10 @@ message RecordKey { BigQueryKey big_query_key = 3; } + + // Values of identifying columns in the given row. Order of values matches + // the order of field identifiers specified in the scanning request. + repeated string id_values = 5; } // Message defining the location of a BigQuery table. A table is uniquely @@ -429,6 +623,15 @@ message BigQueryTable { string table_id = 3; } +// Message defining a field of a BigQuery table. +message BigQueryField { + // Source table of the field. + BigQueryTable table = 1; + + // Designated field in the BigQuery table. + FieldId field = 2; +} + // An entity in a dataset is a field or set of fields that correspond to a // single person. For example, in medical records the `EntityId` might be a // patient identifier, or for financial records it might be an account @@ -438,40 +641,3 @@ message EntityId { // Composite key indicating which field contains the entity identifier. FieldId field = 1; } - -// Categorization of results based on how likely they are to represent a match, -// based on the number of elements they contain which imply a match. -enum Likelihood { - // Default value; same as POSSIBLE. - LIKELIHOOD_UNSPECIFIED = 0; - - // Few matching elements. - VERY_UNLIKELY = 1; - - UNLIKELY = 2; - - // Some matching elements. - POSSIBLE = 3; - - LIKELY = 4; - - // Many matching elements. - VERY_LIKELY = 5; -} - -// Definitions of file type groups to scan. -enum FileType { - // Includes all files. - FILE_TYPE_UNSPECIFIED = 0; - - // Includes all file extensions not covered by text file types. - BINARY_FILE = 1; - - // Included file extensions: - // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp, - // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json, - // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, - // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml, - // xml, xsl, xsd, yml, yaml. - TEXT_FILE = 2; -} diff --git a/google/pubsub/BUILD.bazel b/google/pubsub/BUILD.bazel new file mode 100644 index 000000000..a87c57fec --- /dev/null +++ b/google/pubsub/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) diff --git a/google/pubsub/artman_pubsub.yaml b/google/pubsub/artman_pubsub.yaml index 53489e679..5ca885a93 100644 --- a/google/pubsub/artman_pubsub.yaml +++ b/google/pubsub/artman_pubsub.yaml @@ -9,104 +9,38 @@ common: 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: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-pubsub-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-pubsub-v1 - - name: proto - dest: generated/java/proto-google-cloud-pubsub-v1 - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-pubsub + release_level: GA - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-pubsub-v1 - - name: grpc - dest: generated/python/proto-google-cloud-pubsub-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/pubsub_v1 - dest: pubsub/google/cloud/pubsub_v1 - - src: tests/unit/gapic/v1 - dest: pubsub/tests/gapic - - name: grpc - src: google/cloud/proto - dest: pubsub/google/cloud/proto + release_level: GA - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-pubsub-v1 + release_level: GA - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/pubsub/v1 - dest: google-cloud-pubsub/lib/google/cloud/pubsub/v1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-pubsub + release_level: BETA - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-pubsub-v1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: pubsub/apiv1 + release_level: GA - name: csharp_gapic type: GAPIC language: CSHARP + release_level: GA - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/pubsub - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/pubsub/src/v1 + release_level: GA - name: gapic_config type: GAPIC_CONFIG diff --git a/google/pubsub/v1/BUILD.bazel b/google/pubsub/v1/BUILD.bazel new file mode 100644 index 000000000..acd485b0f --- /dev/null +++ b/google/pubsub/v1/BUILD.bazel @@ -0,0 +1,219 @@ +# 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 = "pubsub_proto", + srcs = ["pubsub.proto"], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "pubsub_proto_with_info", + deps = [ + ":pubsub_proto", + "//google/iam/v1:iam_policy_proto", + "//google/iam/v1:policy_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +java_proto_library( + name = "pubsub_java_proto", + deps = [":pubsub_proto"], +) + +java_grpc_library( + name = "pubsub_java_grpc", + srcs = [":pubsub_proto"], + deps = [":pubsub_java_proto"] + _JAVA_GRPC_DEPS, +) + +java_resource_name_proto_library( + name = "pubsub_resource_name_java_proto", + gapic_yaml = "pubsub_gapic.yaml", + deps = [":pubsub_proto"], +) + +java_gapic_library( + name = "pubsub_java_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = "//google/pubsub:pubsub.yaml", + test_deps = [ + ":pubsub_java_grpc", + "@com_google_api_grpc_grpc_google_iam_v1//jar", + ], + deps = [ + ":pubsub_java_proto", + ":pubsub_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [":pubsub_java_gapic_test"], +) for test_name in [ + "com.google.cloud.pubsub.v1.SubscriptionAdminClientTest", + "com.google.cloud.pubsub.v1.TopicAdminClientTest", +]] + +# Opensource 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 = [ + ":pubsub_java_proto", + ":pubsub_proto", + ":pubsub_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 = "pubsub_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/pubsub/v1", + protos = [":pubsub_proto"], + deps = ["//google/api:annotations_go_proto"], +) + +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"], +) + +go_test( + name = "pubsub_go_gapic_test", + srcs = [":pubsub_go_gapic_srcjar_test"], + embed = [":pubsub_go_gapic"], + importpath = "cloud.google.com/go/pubsub/apiv1", + deps = ["//google/iam/v1:iam_go_proto"], +) + +# Opensource 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", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_proto_library", + "php_grpc_library", + "php_gapic_library", + "php_gapic_assembly_pkg", +) + +php_proto_library( + name = "pubsub_php_proto", + deps = [":pubsub_proto"], +) + +php_grpc_library( + name = "pubsub_php_grpc", + srcs = [":pubsub_proto"], + deps = [":pubsub_php_proto"], +) + +php_gapic_library( + name = "pubsub_php_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = "//google/pubsub:pubsub.yaml", + deps = [ + ":pubsub_php_grpc", + ":pubsub_php_proto", + ], +) + +# Opensource Packages +php_gapic_assembly_pkg( + name = "google-cloud-pubsub-v1-php", + deps = [ + ":pubsub_php_gapic", + ":pubsub_php_grpc", + ":pubsub_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_library", + "nodejs_gapic_assembly_pkg", +) + +nodejs_gapic_library( + name = "pubsub_nodejs_gapic", + src = ":pubsub_proto_with_info", + gapic_yaml = "pubsub_gapic.yaml", + service_yaml = "//google/pubsub:pubsub.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "pubsub-v1-nodejs", + deps = [ + ":pubsub_nodejs_gapic", + ":pubsub_proto", + ], +) diff --git a/google/pubsub/v1/pubsub.proto b/google/pubsub/v1/pubsub.proto index e70440314..7cea47b1e 100644 --- a/google/pubsub/v1/pubsub.proto +++ b/google/pubsub/v1/pubsub.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.pubsub.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -29,13 +31,14 @@ option java_multiple_files = true; option java_outer_classname = "PubsubProto"; option java_package = "com.google.pubsub.v1"; option php_namespace = "Google\\Cloud\\PubSub\\V1"; - +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 { // Creates the given topic with the given name. See the - // resource name rules. + // + // resource name rules. rpc CreateTopic(Topic) returns (Topic) { option (google.api.http) = { put: "/v1/{name=projects/*/topics/*}" @@ -53,8 +56,7 @@ service Publisher { } // Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - // does not exist. The message payload must not be empty; it must contain - // either a non-empty data field, or at least one attribute. + // does not exist. rpc Publish(PublishRequest) returns (PublishResponse) { option (google.api.http) = { post: "/v1/{topic=projects/*/topics/*}:publish" @@ -77,17 +79,21 @@ service Publisher { } // Lists the names of the subscriptions on this topic. - rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { + rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) + returns (ListTopicSubscriptionsResponse) { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/subscriptions" }; } - // Lists the names of the snapshots on this topic.

- // ALPHA: This feature is part of an 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. - rpc ListTopicSnapshots(ListTopicSnapshotsRequest) returns (ListTopicSnapshotsResponse) { + // Lists the names of the snapshots on this topic. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot. + rpc ListTopicSnapshots(ListTopicSnapshotsRequest) + returns (ListTopicSnapshotsResponse) { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/snapshots" }; @@ -105,205 +111,9 @@ service Publisher { } } -// 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 { - // Creates a subscription to a given topic. See the - // resource name rules. - // If the subscription already exists, returns `ALREADY_EXISTS`. - // If the corresponding topic doesn't exist, returns `NOT_FOUND`. - // - // If the name is not provided in the request, the server will assign a random - // name for this subscription on the same project as the topic, conforming - // to the - // [resource name format](https://cloud.google.com/pubsub/docs/overview#names). - // The generated name is populated in the returned Subscription object. - // Note that for REST API requests, you must specify a name in the request. - rpc CreateSubscription(Subscription) returns (Subscription) { - option (google.api.http) = { - put: "/v1/{name=projects/*/subscriptions/*}" - body: "*" - }; - } - - // Gets the configuration details of a subscription. - rpc GetSubscription(GetSubscriptionRequest) returns (Subscription) { - option (google.api.http) = { - get: "/v1/{subscription=projects/*/subscriptions/*}" - }; - } - - // Updates an existing subscription. Note that certain properties of a - // subscription, such as its topic, are not modifiable. - rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) { - option (google.api.http) = { - patch: "/v1/{subscription.name=projects/*/subscriptions/*}" - body: "*" - }; - } - - // Lists matching subscriptions. - rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse) { - option (google.api.http) = { - get: "/v1/{project=projects/*}/subscriptions" - }; - } - - // Deletes an existing subscription. All messages retained in the subscription - // are immediately dropped. Calls to `Pull` after deletion will return - // `NOT_FOUND`. After a subscription is deleted, a new one may be created with - // the same name, but the new one has no association with the old - // subscription or its topic unless the same topic is specified. - rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{subscription=projects/*/subscriptions/*}" - }; - } - - // Modifies the ack deadline for a specific message. This method is useful - // to indicate that more time is needed to process a message by the - // subscriber, or to make the message available for redelivery if the - // processing was interrupted. Note that this does not modify the - // subscription-level `ackDeadlineSeconds` used for subsequent messages. - rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" - body: "*" - }; - } - - // Acknowledges the messages associated with the `ack_ids` in the - // `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages - // from the subscription. - // - // Acknowledging a message whose ack deadline has expired may succeed, - // but such a message may be redelivered later. Acknowledging a message more - // than once will not result in an error. - rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge" - body: "*" - }; - } - - // Pulls messages from the server. Returns an empty list if there are no - // messages available in the backlog. The server may return `UNAVAILABLE` if - // there are too many concurrent pull requests pending for the given - // subscription. - rpc Pull(PullRequest) returns (PullResponse) { - option (google.api.http) = { - post: "/v1/{subscription=projects/*/subscriptions/*}:pull" - body: "*" - }; - } - - // Establishes a stream with the server, which sends messages down to the - // client. The client streams acknowledgements and ack deadline modifications - // back to the server. The server will close the stream and return the status - // on any error. The server may close the stream with status `UNAVAILABLE` to - // reassign server-side resources, in which case, the client should - // re-establish the stream. Flow control can be achieved by configuring the - // underlying RPC channel. - rpc StreamingPull(stream StreamingPullRequest) returns (stream StreamingPullResponse); - - // Modifies the `PushConfig` for a specified subscription. - // - // This may be used to change a push subscription to a pull one (signified by - // an empty `PushConfig`) or vice versa, or change the endpoint URL and other - // attributes of a push subscription. Messages will accumulate for delivery - // continuously through the call regardless of changes to the `PushConfig`. - rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" - body: "*" - }; - } - - // Gets the configuration details of a snapshot.

- // ALPHA: This feature is part of an 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. - rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { - option (google.api.http) = { - get: "/v1/{snapshot=projects/*/snapshots/*}" - }; - } - - // Lists the existing snapshots.

- // ALPHA: This feature is part of an 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. - rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { - option (google.api.http) = { - get: "/v1/{project=projects/*}/snapshots" - }; - } - - // Creates a snapshot from the requested subscription.

- // ALPHA: This feature is part of an 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. - // If the snapshot already exists, returns `ALREADY_EXISTS`. - // If the requested subscription doesn't exist, returns `NOT_FOUND`. - // If the backlog in the subscription is too old -- and the resulting snapshot - // would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. - // See also the `Snapshot.expire_time` field. 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, conforming - // to the [resource name format](https://cloud.google.com/pubsub/docs/overview#names). - // The generated - // name is populated in the returned Snapshot object. Note that for REST API - // requests, you must specify a name in the request. - rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) { - option (google.api.http) = { - put: "/v1/{name=projects/*/snapshots/*}" - body: "*" - }; - } - - // Updates an existing snapshot.

- // ALPHA: This feature is part of an 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. - // Note that certain properties of a snapshot are not modifiable. - rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) { - option (google.api.http) = { - patch: "/v1/{snapshot.name=projects/*/snapshots/*}" - body: "*" - }; - } - - // Removes an existing snapshot.

- // ALPHA: This feature is part of an 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. - // When the snapshot is deleted, all messages retained in the snapshot - // are immediately dropped. After a snapshot is deleted, a new one may be - // created with the same name, but the new one has no association with the old - // snapshot or its subscription, unless the same subscription is specified. - rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{snapshot=projects/*/snapshots/*}" - }; - } - - // Seeks an existing subscription to a point in time or to a given snapshot, - // whichever is provided in the request.

- // ALPHA: This feature is part of an 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. - rpc Seek(SeekRequest) returns (SeekResponse) { - option (google.api.http) = { - post: "/v1/{subscription=projects/*/subscriptions/*}:seek" - body: "*" - }; - } -} - message MessageStoragePolicy { - // The list of GCP regions where messages that are published to the topic may - // be persisted in storage. Messages published by publishers running in + // The list of GCP region IDs 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 @@ -321,7 +131,8 @@ message Topic { // must not start with `"goog"`. string name = 1; - // User labels. + // See Creating and + // managing labels. map labels = 2; // Policy constraining how messages published to the topic may be stored. It @@ -331,12 +142,28 @@ message Topic { // responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the // response, then no constraints are in effect. MessageStoragePolicy message_storage_policy = 3; -} -// A message data and its attributes. The message payload must not be empty; -// it must contain either a non-empty data field, or at least one attribute. + // 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; +} + +// A message that is published by publishers and consumed by subscribers. The +// message must contain either a non-empty data field or at least one attribute. +// Note that client libraries represent this object differently +// depending on the language. See the corresponding +// client +// library documentation for more information. See +// Quotas and limits +// for more information about message limits. message PubsubMessage { - // The message payload. + // The message data field. If this field is empty, the message must contain + // at least one attribute. bytes data = 1; // Optional attributes for this message. @@ -352,6 +179,15 @@ message PubsubMessage { // it receives the `Publish` call. It must not be populated by the // 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. + // 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 ordering_key = 5; } // Request for the GetTopic method. @@ -394,8 +230,8 @@ message PublishResponse { // Request for the `ListTopics` method. message ListTopicsRequest { - // The name of the cloud project that topics belong to. - // Format is `projects/{project}`. + // The name of the project in which to list topics. + // Format is `projects/{project-id}`. string project = 1; // Maximum number of topics to return. @@ -443,10 +279,7 @@ message ListTopicSubscriptionsResponse { string next_page_token = 2; } -// Request for the `ListTopicSnapshots` method.

-// ALPHA: This feature is part of an 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. +// Request for the `ListTopicSnapshots` method. message ListTopicSnapshotsRequest { // The name of the topic that snapshots are attached to. // Format is `projects/{project}/topics/{topic}`. @@ -461,10 +294,7 @@ message ListTopicSnapshotsRequest { string page_token = 3; } -// Response for the `ListTopicSnapshots` method.

-// ALPHA: This feature is part of an 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. +// Response for the `ListTopicSnapshots` method. message ListTopicSnapshotsResponse { // The names of the snapshots that match the request. repeated string snapshots = 1; @@ -482,6 +312,220 @@ message DeleteTopicRequest { string topic = 1; } +// 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 { + // Creates a subscription to a given topic. See the + // + // resource name rules. + // If the subscription already exists, returns `ALREADY_EXISTS`. + // If the corresponding topic doesn't exist, returns `NOT_FOUND`. + // + // If the name is not provided in the request, the server will assign a random + // name for this subscription on the same project as the topic, conforming + // to the + // [resource name + // format](https://cloud.google.com/pubsub/docs/admin#resource_names). The + // generated name is populated in the returned Subscription object. Note that + // for REST API requests, you must specify a name in the request. + rpc CreateSubscription(Subscription) returns (Subscription) { + option (google.api.http) = { + put: "/v1/{name=projects/*/subscriptions/*}" + body: "*" + }; + } + + // Gets the configuration details of a subscription. + rpc GetSubscription(GetSubscriptionRequest) returns (Subscription) { + option (google.api.http) = { + get: "/v1/{subscription=projects/*/subscriptions/*}" + }; + } + + // Updates an existing subscription. Note that certain properties of a + // subscription, such as its topic, are not modifiable. + rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) { + option (google.api.http) = { + patch: "/v1/{subscription.name=projects/*/subscriptions/*}" + body: "*" + }; + } + + // Lists matching subscriptions. + rpc ListSubscriptions(ListSubscriptionsRequest) + returns (ListSubscriptionsResponse) { + option (google.api.http) = { + get: "/v1/{project=projects/*}/subscriptions" + }; + } + + // Deletes an existing subscription. All messages retained in the subscription + // are immediately dropped. Calls to `Pull` after deletion will return + // `NOT_FOUND`. After a subscription is deleted, a new one may be created with + // the same name, but the new one has no association with the old + // subscription or its topic unless the same topic is specified. + rpc DeleteSubscription(DeleteSubscriptionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{subscription=projects/*/subscriptions/*}" + }; + } + + // Modifies the ack deadline for a specific message. This method is useful + // to indicate that more time is needed to process a message by the + // subscriber, or to make the message available for redelivery if the + // processing was interrupted. Note that this does not modify the + // subscription-level `ackDeadlineSeconds` used for subsequent messages. + rpc ModifyAckDeadline(ModifyAckDeadlineRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" + body: "*" + }; + } + + // Acknowledges the messages associated with the `ack_ids` in the + // `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages + // from the subscription. + // + // Acknowledging a message whose ack deadline has expired may succeed, + // but such a message may be redelivered later. Acknowledging a message more + // than once will not result in an error. + rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge" + body: "*" + }; + } + + // Pulls messages from the server. The server may return `UNAVAILABLE` if + // there are too many concurrent pull requests pending for the given + // subscription. + rpc Pull(PullRequest) returns (PullResponse) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:pull" + body: "*" + }; + } + + // Establishes a stream with the server, which sends messages down to the + // client. The client streams acknowledgements and ack deadline modifications + // back to the server. The server will close the stream and return the status + // on any error. The server may close the stream with status `UNAVAILABLE` to + // reassign server-side resources, in which case, the client should + // re-establish the stream. Flow control can be achieved by configuring the + // underlying RPC channel. + rpc StreamingPull(stream StreamingPullRequest) + returns (stream StreamingPullResponse) {} + + // Modifies the `PushConfig` for a specified subscription. + // + // This may be used to change a push subscription to a pull one (signified by + // an empty `PushConfig`) or vice versa, or change the endpoint URL and other + // attributes of a push subscription. Messages will accumulate for delivery + // continuously through the call regardless of changes to the `PushConfig`. + rpc ModifyPushConfig(ModifyPushConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" + body: "*" + }; + } + + // Gets the configuration details of a snapshot. Snapshots are used in + // Seek + // operations, which allow you to manage message acknowledgments in bulk. That + // is, you can set the acknowledgment state of messages in an existing + // subscription to the state captured by a snapshot. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v1/{snapshot=projects/*/snapshots/*}" + }; + } + + // Lists the existing snapshots. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot. + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { + option (google.api.http) = { + get: "/v1/{project=projects/*}/snapshots" + }; + } + + // Creates a snapshot from the requested subscription. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot. + //

If the snapshot already exists, returns `ALREADY_EXISTS`. + // If the requested subscription doesn't exist, returns `NOT_FOUND`. + // If the backlog in the subscription is too old -- and the resulting snapshot + // would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. + // See also the `Snapshot.expire_time` field. 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, conforming + // to the + // [resource name + // format](https://cloud.google.com/pubsub/docs/admin#resource_names). The + // generated name is populated in the returned Snapshot object. Note that for + // REST API requests, you must specify a name in the request. + rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + put: "/v1/{name=projects/*/snapshots/*}" + body: "*" + }; + } + + // Updates an existing snapshot. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot. + rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + patch: "/v1/{snapshot.name=projects/*/snapshots/*}" + body: "*" + }; + } + + // Removes an existing snapshot. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot.

+ // When the snapshot is deleted, all messages retained in the snapshot + // are immediately dropped. After a snapshot is deleted, a new one may be + // created with the same name, but the new one has no association with the old + // snapshot or its subscription, unless the same subscription is specified. + rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{snapshot=projects/*/snapshots/*}" + }; + } + + // Seeks an existing subscription to a point in time or to a given snapshot, + // whichever is provided in the request. Snapshots are used in + // Seek + // operations, which allow + // you to manage message acknowledgments in bulk. That is, you can set the + // acknowledgment state of messages in an existing subscription to the state + // captured by a snapshot. Note that both the subscription and the snapshot + // must be on the same topic. + rpc Seek(SeekRequest) returns (SeekResponse) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:seek" + body: "*" + }; + } +} + // A subscription resource. message Subscription { // The name of the subscription. It must have the format @@ -503,11 +547,11 @@ message Subscription { // will pull and ack messages using API methods. PushConfig push_config = 4; - // This value is the maximum time after a subscriber receives a message - // before the subscriber should acknowledge the message. After message - // delivery but before the ack deadline expires and before the message is - // acknowledged, it is an outstanding message and will not be delivered - // again during that time (on a best-effort basis). + // The approximate amount of time (on a best-effort basis) Pub/Sub waits for + // the subscriber to acknowledge receipt before resending the message. In the + // interval after the message is delivered and before it is acknowledged, it + // is considered to be outstanding. During that time period, the + // message will not be redelivered (on a best-effort basis). // // For pull subscriptions, this value is used as the initial value for the ack // deadline. To override this value for a given message, call @@ -528,10 +572,10 @@ message Subscription { // Indicates whether to retain acknowledged messages. If true, then // messages are not expunged from the subscription's backlog, even if they are // acknowledged, until they fall out of the `message_retention_duration` - // window.

- // ALPHA: This feature is part of an 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. + // window. This must be true if you would like to + // + // Seek to a timestamp. bool retain_acked_messages = 7; // How long to retain unacknowledged messages in the subscription's backlog, @@ -539,18 +583,65 @@ message Subscription { // If `retain_acked_messages` is true, then this also configures the retention // of acknowledged messages, and thus configures how far back in time a `Seek` // can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - // minutes.

- // ALPHA: This feature is part of an 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. + // minutes. google.protobuf.Duration message_retention_duration = 8; - // User labels. + // See Creating and + // managing labels. map labels = 9; + + // If true, messages published with the same `ordering_key` in `PubsubMessage` + // will be delivered to the subscribers in the order in which they + // are received by the Pub/Sub system. Otherwise, they may be delivered in + // any order. + // 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. + bool enable_message_ordering = 10; + + // A policy that specifies the conditions for this subscription's expiration. + // A subscription is considered active as long as any connected subscriber is + // successfully consuming messages from the subscription or is issuing + // operations on the subscription. If `expiration_policy` is not set, a + // *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; +} + +// A policy that specifies the conditions for resource expiration (i.e., +// automatic resource deletion). +message ExpirationPolicy { + // Specifies the "time-to-live" duration for an associated resource. The + // resource expires if it is not active for a period of `ttl`. The definition + // of "activity" depends on the type of the associated resource. The minimum + // and maximum allowed values for `ttl` depend on the type of the associated + // resource, as well. If `ttl` is not set, the associated resource never + // expires. + google.protobuf.Duration ttl = 1; } // Configuration for a push delivery endpoint. message PushConfig { + // Contains information needed for generating an + // [OpenID Connect + // token](https://developers.google.com/identity/protocols/OpenIDConnect). + message OidcToken { + // [Service account + // email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating the OIDC token. The caller (for + // CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must + // have the iam.serviceAccounts.actAs permission for the service account. + string service_account_email = 1; + + // Audience to be used when generating OIDC token. The audience claim + // identifies the recipients that the JWT is intended for. The audience + // value is a single case-sensitive string. Having multiple values (array) + // for the audience field is not supported. More info about the OIDC JWT + // token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 + // Note: if not specified, the Push endpoint URL will be used. + string audience = 2; + } + // A URL locating the endpoint to which messages should be pushed. // For example, a Webhook endpoint might use "https://example.com/push". string push_endpoint = 1; @@ -577,6 +668,17 @@ message PushConfig { // * `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. map attributes = 2; + + // An authentication method used by push endpoints to verify the source of + // push requests. This can be used with push endpoints that are private by + // default to allow requests only from the Cloud Pub/Sub system, for example. + // This field is optional and should be set only by users interested in + // authenticated push. + oneof authentication_method { + // If specified, Pub/Sub will generate and attach an OIDC JWT token as an + // `Authorization` header in the HTTP request for every pushed message. + OidcToken oidc_token = 3; + } } // A message and its corresponding acknowledgment ID. @@ -607,8 +709,8 @@ message UpdateSubscriptionRequest { // Request for the `ListSubscriptions` method. message ListSubscriptionsRequest { - // The name of the cloud project that subscriptions belong to. - // Format is `projects/{project}`. + // The name of the project in which to list subscriptions. + // Format is `projects/{project-id}`. string project = 1; // Maximum number of subscriptions to return. @@ -662,9 +764,7 @@ message PullRequest { // 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. The - // client may cancel the request if it does not wish to wait any longer for - // the response. + // 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 @@ -674,10 +774,10 @@ message PullRequest { // Response for the `Pull` method. message PullResponse { - // Received Pub/Sub messages. The Pub/Sub system will return zero messages if - // there are no more available in the backlog. The Pub/Sub system may return - // fewer than the `maxMessages` requested even if there are more messages - // available in the backlog. + // Received Pub/Sub messages. The list will be empty if there are no more + // messages available in the backlog. For JSON, the response can be entirely + // empty. The Pub/Sub system may return fewer than the `maxMessages` requested + // even if there are more messages available in the backlog. repeated ReceivedMessage received_messages = 1; } @@ -693,8 +793,9 @@ message ModifyAckDeadlineRequest { // 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 may immediately make the message available for - // another pull request. + // 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; @@ -762,15 +863,14 @@ message StreamingPullResponse { repeated ReceivedMessage received_messages = 1; } -// Request for the `CreateSnapshot` method.

-// ALPHA: This feature is part of an 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. +// 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. + // 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; @@ -785,14 +885,12 @@ message CreateSnapshotRequest { // Format is `projects/{project}/subscriptions/{sub}`. string subscription = 2; - // User labels. + // See Creating and + // managing labels. map labels = 3; } -// Request for the UpdateSnapshot method.

-// ALPHA: This feature is part of an 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. +// Request for the UpdateSnapshot method. message UpdateSnapshotRequest { // The updated snapshot object. Snapshot snapshot = 1; @@ -802,10 +900,12 @@ message UpdateSnapshotRequest { google.protobuf.FieldMask update_mask = 2; } -// A snapshot resource.

-// ALPHA: This feature is part of an 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. +// A snapshot resource. Snapshots are used in +// Seek +// operations, which allow +// you to manage message acknowledgments in bulk. That is, you can set the +// acknowledgment state of messages in an existing subscription to the state +// captured by a snapshot. message Snapshot { // The name of the snapshot. string name = 1; @@ -825,27 +925,22 @@ message Snapshot { // snapshot that would expire in less than 1 hour after creation. google.protobuf.Timestamp expire_time = 3; - // User labels. + // See Creating and + // managing labels. map labels = 4; } -// Request for the GetSnapshot method.

-// ALPHA: This feature is part of an 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. +// Request for the GetSnapshot method. message GetSnapshotRequest { // The name of the snapshot to get. // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 1; } -// Request for the `ListSnapshots` method.

-// ALPHA: This feature is part of an 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. +// Request for the `ListSnapshots` method. message ListSnapshotsRequest { - // The name of the cloud project that snapshots belong to. - // Format is `projects/{project}`. + // The name of the project in which to list snapshots. + // Format is `projects/{project-id}`. string project = 1; // Maximum number of snapshots to return. @@ -857,10 +952,7 @@ message ListSnapshotsRequest { string page_token = 3; } -// Response for the `ListSnapshots` method.

-// ALPHA: This feature is part of an 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. +// Response for the `ListSnapshots` method. message ListSnapshotsResponse { // The resulting snapshots. repeated Snapshot snapshots = 1; @@ -870,20 +962,14 @@ message ListSnapshotsResponse { string next_page_token = 2; } -// Request for the `DeleteSnapshot` method.

-// ALPHA: This feature is part of an 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. +// Request for the `DeleteSnapshot` method. message DeleteSnapshotRequest { // The name of the snapshot to delete. // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 1; } -// Request for the `Seek` method.

-// ALPHA: This feature is part of an 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. +// Request for the `Seek` method. message SeekRequest { // The subscription to affect. string subscription = 1; @@ -909,6 +995,5 @@ message SeekRequest { } } -message SeekResponse { - -} +// Response for the `Seek` method (this response is empty). +message SeekResponse {} diff --git a/google/pubsub/v1/pubsub_gapic.yaml b/google/pubsub/v1/pubsub_gapic.yaml index 3416c1598..59354746e 100644 --- a/google/pubsub/v1/pubsub_gapic.yaml +++ b/google/pubsub/v1/pubsub_gapic.yaml @@ -6,29 +6,30 @@ language_settings: 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 + 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 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt -fixed_resource_name_values: -- entity_name: deleted_topic - fixed_value: _deleted-topic_ + release_level: GA collection_oneofs: - oneof_name: topic_oneof collection_names: @@ -55,6 +56,8 @@ collections: language_overrides: - language: java entity_name: project_topic +- name_pattern: _deleted-topic_ + entity_name: deleted_topic interfaces: - name: google.pubsub.v1.Subscriber lang_doc: @@ -62,48 +65,39 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: + - UNKNOWN + - ABORTED - UNAVAILABLE - - DEADLINE_EXCEEDED - name: non_idempotent - retry_codes: [] - - name: pull retry_codes: - - DEADLINE_EXCEEDED - - INTERNAL - - CANCELLED - - RESOURCE_EXHAUSTED - UNAVAILABLE + - name: none + retry_codes: [] 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 + 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 + 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: 12000 # 12 seconds + max_retry_delay_millis: 60000 # 60 seconds + initial_rpc_timeout_millis: 25000 # 25 seconds rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 12000 # 12 seconds - total_timeout_millis: 600000 # 10 minutes + 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 + 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 - experimental_features: - iam_resources: - - type: google.pubsub.v1.Subscription - field: name - - type: google.pubsub.v1.Topic - field: name + max_rpc_timeout_millis: 600000 # 10 minutes + total_timeout_millis: 600000 # 10 minutes methods: - name: CreateSubscription flattening: @@ -116,7 +110,6 @@ interfaces: required_fields: - name - topic - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -131,7 +124,6 @@ interfaces: - subscription required_fields: - subscription - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -142,8 +134,7 @@ interfaces: required_fields: - subscription - update_mask - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: @@ -156,7 +147,6 @@ interfaces: - project required_fields: - project - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -177,13 +167,23 @@ interfaces: - subscription required_fields: - subscription - request_object_method: false resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent + 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: @@ -195,7 +195,6 @@ interfaces: - subscription - ack_ids - ack_deadline_seconds - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -215,7 +214,6 @@ interfaces: required_fields: - subscription - ack_ids - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: messaging @@ -236,9 +234,8 @@ interfaces: required_fields: - subscription - max_messages - request_object_method: true resource_name_treatment: STATIC_TYPES - retry_codes_name: pull + retry_codes_name: idempotent retry_params_name: messaging field_name_patterns: subscription: subscription @@ -255,7 +252,7 @@ interfaces: response: resources_field: received_messages resource_name_treatment: STATIC_TYPES - retry_codes_name: pull + retry_codes_name: none retry_params_name: streaming_messaging field_name_patterns: subscription: subscription @@ -273,7 +270,6 @@ interfaces: required_fields: - subscription - push_config - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -287,7 +283,6 @@ interfaces: - project required_fields: - project - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -310,9 +305,8 @@ interfaces: required_fields: - name - subscription - request_object_method: true resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: snapshot @@ -322,8 +316,7 @@ interfaces: required_fields: - snapshot - update_mask - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 sample_code_init_fields: @@ -336,9 +329,8 @@ interfaces: - snapshot required_fields: - snapshot - request_object_method: false resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: snapshot: snapshot @@ -348,9 +340,8 @@ interfaces: # https://github.com/googleapis/toolkit/issues/1057 required_fields: - subscription - request_object_method: true resource_name_treatment: STATIC_TYPES - retry_codes_name: non_idempotent + retry_codes_name: idempotent retry_params_name: default field_name_patterns: subscription: subscription @@ -364,7 +355,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -382,7 +372,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -402,7 +391,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -423,9 +411,15 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: + - UNKNOWN + - ABORTED - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: one_plus_delivery + - name: non_idempotent + retry_codes: + - UNAVAILABLE + - name: none + retry_codes: [] + - name: publish retry_codes: - ABORTED - CANCELLED @@ -434,31 +428,23 @@ interfaces: - UNKNOWN - 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 # 60 seconds - initial_rpc_timeout_millis: 60000 # 60 seconds + 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 + 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: 12000 # 12 seconds + 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 - experimental_features: - iam_resources: - - type: google.pubsub.v1.Subscription - field: name - - type: google.pubsub.v1.Topic - field: name + max_rpc_timeout_millis: 30000 # 30 seconds + total_timeout_millis: 600000 # 10 minutes methods: - name: CreateTopic flattening: @@ -467,9 +453,8 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: name: topic @@ -478,14 +463,9 @@ interfaces: required_fields: - topic - update_mask - request_object_method: true - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 - surface_treatments: - - include_languages: - - java - visibility: PACKAGE - name: Publish flattening: groups: @@ -495,9 +475,8 @@ interfaces: required_fields: - topic - messages - request_object_method: true resource_name_treatment: STATIC_TYPES - retry_codes_name: one_plus_delivery + retry_codes_name: publish retry_params_name: messaging batching: thresholds: @@ -527,7 +506,6 @@ interfaces: - topic required_fields: - topic - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -541,7 +519,6 @@ interfaces: - project required_fields: - project - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -562,7 +539,6 @@ interfaces: - topic required_fields: - topic - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -576,6 +552,17 @@ interfaces: 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: @@ -583,9 +570,8 @@ interfaces: - topic required_fields: - topic - request_object_method: false resource_name_treatment: STATIC_TYPES - retry_codes_name: idempotent + retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: topic: topic @@ -599,7 +585,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -617,7 +602,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -637,7 +621,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/pubsub/v1beta2/pubsub.proto b/google/pubsub/v1beta2/pubsub.proto index 70dd1556a..354139370 100644 --- a/google/pubsub/v1beta2/pubsub.proto +++ b/google/pubsub/v1beta2/pubsub.proto @@ -23,7 +23,6 @@ option java_multiple_files = true; option java_outer_classname = "PubsubProto"; option java_package = "com.google.pubsub.v1beta2"; - // The service that an application uses to manipulate subscriptions and to // consume messages from a subscription via the Pull method. service Subscriber { @@ -39,20 +38,23 @@ service Subscriber { rpc GetSubscription(GetSubscriptionRequest) returns (Subscription); // Lists matching subscriptions. - rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse); + rpc ListSubscriptions(ListSubscriptionsRequest) + returns (ListSubscriptionsResponse); // Deletes an existing subscription. All pending messages in the subscription // are immediately dropped. Calls to Pull after deletion will return // NOT_FOUND. After a subscription is deleted, a new one may be created with // the same name, but the new one has no association with the old // subscription, or its topic unless the same topic is specified. - rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty); + rpc DeleteSubscription(DeleteSubscriptionRequest) + returns (google.protobuf.Empty); // Modifies the ack deadline for a specific message. This method is useful to // indicate that more time is needed to process a message by the subscriber, // or to make the message available for redelivery if the processing was // interrupted. - rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty); + rpc ModifyAckDeadline(ModifyAckDeadlineRequest) + returns (google.protobuf.Empty); // Acknowledges the messages associated with the ack tokens in the // AcknowledgeRequest. The Pub/Sub system can remove the relevant messages @@ -96,7 +98,8 @@ service Publisher { rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse); // Lists the name of the subscriptions for this topic. - rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse); + rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) + returns (ListTopicSubscriptionsResponse); // Deletes the topic with the given name. Returns NOT_FOUND if the topic does // not exist. After a topic is deleted, a new topic may be created with the diff --git a/google/rpc/BUILD.bazel b/google/rpc/BUILD.bazel new file mode 100644 index 000000000..1daaf649d --- /dev/null +++ b/google/rpc/BUILD.bazel @@ -0,0 +1,87 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +proto_library( + name = "code_proto", + srcs = ["code.proto"], + deps = [], +) + +proto_library( + name = "error_details_proto", + srcs = ["error_details.proto"], + deps = [ + "@com_google_protobuf//:duration_proto", + ], +) + +proto_library( + name = "status_proto", + srcs = ["status.proto"], + deps = [ + "@com_google_protobuf//:any_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") + +java_proto_library( + name = "rpc_java_proto", + deps = [ + ":code_proto", + ":error_details_proto", + ":status_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "code_go_proto", + importpath = "google.golang.org/genproto/googleapis/rpc/code", + protos = [":code_proto"], +) + +go_proto_library( + name = "errdetails_go_proto", + importpath = "google.golang.org/genproto/googleapis/rpc/errdetails", + protos = [":error_details_proto"], +) + +go_proto_library( + name = "status_go_proto", + importpath = "google.golang.org/genproto/googleapis/rpc/status", + protos = [":status_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", +) + +cc_proto_library( + name = "code_cc_proto", + deps = [":code_proto"], +) + +cc_proto_library( + name = "error_details_cc_proto", + deps = [":error_details_proto"], +) + +cc_proto_library( + name = "status_cc_proto", + deps = [":status_proto"], +) diff --git a/google/rpc/code.proto b/google/rpc/code.proto index 8fef41170..142e28d30 100644 --- a/google/rpc/code.proto +++ b/google/rpc/code.proto @@ -22,7 +22,6 @@ option java_outer_classname = "CodeProto"; option java_package = "com.google.rpc"; option objc_class_prefix = "RPC"; - // The canonical error codes for Google APIs. // // diff --git a/google/rpc/error_details.proto b/google/rpc/error_details.proto index f24ae0099..1f9ad5314 100644 --- a/google/rpc/error_details.proto +++ b/google/rpc/error_details.proto @@ -24,7 +24,6 @@ option java_outer_classname = "ErrorDetailsProto"; option java_package = "com.google.rpc"; option objc_class_prefix = "RPC"; - // Describes when the clients can retry a failed request. Clients could ignore // the recommendation here or retry when this information is missing from error // responses. @@ -154,7 +153,8 @@ 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/status.proto b/google/rpc/status.proto index 0839ee966..b0daa3695 100644 --- a/google/rpc/status.proto +++ b/google/rpc/status.proto @@ -24,25 +24,25 @@ option java_outer_classname = "StatusProto"; option java_package = "com.google.rpc"; 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: +// 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: // // - 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. +// 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 // @@ -78,12 +78,14 @@ option objc_class_prefix = "RPC"; // - Logging. If some API errors are stored in logs, the message `Status` could // be used directly after any stripping needed for security/privacy reasons. 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/spanner/BUILD.bazel b/google/spanner/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/spanner/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/spanner/admin/database/BUILD.bazel b/google/spanner/admin/database/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/spanner/admin/database/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/spanner/admin/database/artman_spanner_admin_database.yaml b/google/spanner/admin/database/artman_spanner_admin_database.yaml index 4c678dbe7..dddb18d9a 100644 --- a/google/spanner/admin/database/artman_spanner_admin_database.yaml +++ b/google/spanner/admin/database/artman_spanner_admin_database.yaml @@ -9,86 +9,28 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-spanner-admin-database-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-spanner-admin-database-v1 - - name: proto - dest: generated/java/proto-google-cloud-spanner-admin-database-v1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-spanner-admin-database-v1 - - name: grpc - dest: generated/python/proto-google-cloud-spanner-admin-database-v1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-spanner-admin-database-v1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/spanner-admin-database - dest: google-cloud-spanner/lib/google/cloud/spanner/admin/database - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-spanner-admin-database - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: spanner/admin/database/apiv1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-spanner-admin-database-v1/vendor - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/spanner-admin-database - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src - dest: packages/spanner/src/admin/database - name: gapic_config type: GAPIC_CONFIG diff --git a/google/spanner/admin/database/v1/BUILD.bazel b/google/spanner/admin/database/v1/BUILD.bazel new file mode 100644 index 000000000..ff2e6e98a --- /dev/null +++ b/google/spanner/admin/database/v1/BUILD.bazel @@ -0,0 +1,169 @@ +# 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 = "spanner_admin_database_proto", + srcs = [ + "spanner_database_admin.proto", + ], + deps = [ + "//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", + ], +) + +proto_library_with_info( + name = "spanner_admin_database_proto_with_info", + deps = [":spanner_admin_database_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_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"], +) + +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"], +) + +java_gapic_library( + name = "spanner_admin_database_java_gapic", + src = ":spanner_admin_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"], + deps = [ + ":spanner_admin_database_java_proto", + ":spanner_admin_database_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":spanner_admin_database_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.spanner.admin.database.v1.DatabaseAdminClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "spanner_admin_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"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":spanner_admin_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", + ], +) + +go_test( + name = "spanner_admin_database_go_gapic_test", + srcs = [":spanner_admin_database_go_gapic_srcjar_test"], + embed = [":spanner_admin_database_go_gapic"], + importpath = "cloud.google.com/go/spanner/admin/database/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-spanner-admin-database-v1-go", + 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", + ], +) 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 a0c0d9bb7..719839491 100644 --- a/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml +++ b/google/spanner/admin/database/v1/spanner_admin_database_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: spanner.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.spanner.admin.database.v1.DatabaseAdmin collections: @@ -56,7 +53,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -79,13 +75,12 @@ interfaces: required_fields: - parent - create_statement - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: parent: instance - timeout_millis: 30000 + timeout_millis: 3600000 long_running: return_type: google.spanner.admin.database.v1.Database metadata_type: google.spanner.admin.database.v1.CreateDatabaseMetadata @@ -100,7 +95,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -116,13 +110,12 @@ interfaces: required_fields: - database - statements - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default field_name_patterns: database: database - timeout_millis: 30000 + timeout_millis: 3600000 long_running: return_type: google.protobuf.Empty metadata_type: google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata @@ -137,13 +130,12 @@ interfaces: - database required_fields: - database - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default field_name_patterns: database: database - timeout_millis: 30000 + timeout_millis: 3600000 - name: GetDatabaseDdl flattening: groups: @@ -151,7 +143,6 @@ interfaces: - database required_fields: - database - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -167,7 +158,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -180,7 +170,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -195,7 +184,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/spanner/admin/database/v1/spanner_database_admin.proto b/google/spanner/admin/database/v1/spanner_database_admin.proto index 89f7343c8..491606e6f 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 Inc. +// 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. @@ -30,7 +30,6 @@ option java_outer_classname = "SpannerDatabaseAdminProto"; option java_package = "com.google.spanner.admin.database.v1"; option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1"; - // Cloud Spanner Database Admin API // // The Cloud Spanner Database Admin API can be used to create, drop, and @@ -49,10 +48,11 @@ 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: "*" @@ -72,8 +72,10 @@ 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: "*" @@ -101,7 +103,8 @@ service DatabaseAdmin { // // Authorization requires `spanner.databases.setIamPolicy` permission 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/*/databases/*}:setIamPolicy" body: "*" @@ -113,7 +116,8 @@ service DatabaseAdmin { // // Authorization requires `spanner.databases.getIamPolicy` permission 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/*/databases/*}:getIamPolicy" body: "*" @@ -126,7 +130,8 @@ service DatabaseAdmin { // 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) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions" body: "*" @@ -160,7 +165,8 @@ message Database { State state = 2; } -// 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/`. @@ -171,23 +177,26 @@ message ListDatabasesRequest { 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/`. @@ -214,7 +223,8 @@ message CreateDatabaseMetadata { string database = 1; } -// 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/`. @@ -235,8 +245,8 @@ 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; @@ -251,18 +261,20 @@ 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,19 +294,22 @@ 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; } -// 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; } -// 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. diff --git a/google/spanner/admin/instance/BUILD.bazel b/google/spanner/admin/instance/BUILD.bazel new file mode 100644 index 000000000..1e5b8c2af --- /dev/null +++ b/google/spanner/admin/instance/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*.yaml"])) \ No newline at end of file diff --git a/google/spanner/admin/instance/artman_spanner_admin_instance.yaml b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml index 200992b1e..7317d92a4 100644 --- a/google/spanner/admin/instance/artman_spanner_admin_instance.yaml +++ b/google/spanner/admin/instance/artman_spanner_admin_instance.yaml @@ -9,86 +9,28 @@ common: proto_deps: - name: google-common-protos - name: google-iam-v1 + proto_path: google/iam/v1 artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-spanner-admin-instance-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-spanner-admin-instance-v1 - - name: proto - dest: generated/java/proto-google-cloud-spanner-admin-instance-v1 - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-spanner-admin-instance-v1 - - name: grpc - dest: generated/python/proto-google-cloud-spanner-admin-instance-v1 - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-spanner-admin-instance-v1 - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/spanner-admin-instance - dest: google-cloud-spanner/lib/google/cloud/spanner/admin/instance - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-spanner-admin-instance - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: spanner/admin/instance/apiv1 - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-spanner-admin-instance-v1/vendor - name: csharp_gapic type: GAPIC language: CSHARP - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/spanner-admin-instance - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src - dest: packages/spanner/src/admin/instance - name: gapic_config type: GAPIC_CONFIG diff --git a/google/spanner/admin/instance/v1/BUILD.bazel b/google/spanner/admin/instance/v1/BUILD.bazel new file mode 100644 index 000000000..9736c7aa1 --- /dev/null +++ b/google/spanner/admin/instance/v1/BUILD.bazel @@ -0,0 +1,157 @@ +# 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 = "spanner_admin_instance_proto", + srcs = [ + "spanner_instance_admin.proto", + ], + deps = [ + "//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//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "spanner_admin_instance_proto_with_info", + deps = [":spanner_admin_instance_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", + "@com_google_api_grpc_proto_google_iam_v1//jar", +] + +java_proto_library( + name = "spanner_admin_instance_java_proto", + deps = [":spanner_admin_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"], +) + +java_gapic_library( + name = "spanner_admin_instance_java_gapic", + src = ":spanner_admin_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"], + deps = [ + ":spanner_admin_instance_java_proto", + ":spanner_admin_instance_resource_name_java_proto", + ] + _JAVA_GRPC_DEPS, +) + +[java_test( + name = test_name, + test_class = test_name, + runtime_deps = [ + ":spanner_admin_instance_java_gapic_test", + ], +) for test_name in [ + "com.google.cloud.spanner.admin.instance.v1.InstanceAdminClientTest", +]] + +# Opensource 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", +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", + "go_test", + "go_gapic_library", + "go_gapic_assembly_pkg", +) + +go_proto_library( + name = "spanner_admin_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"], + deps = [ + "//google/api:annotations_go_proto", + "//google/iam/v1:iam_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +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", + deps = [ + ":spanner_admin_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", + ], +) + +go_test( + name = "spanner_admin_instance_go_gapic_test", + srcs = [":spanner_admin_instance_go_gapic_srcjar_test"], + embed = [":spanner_admin_instance_go_gapic"], + importpath = "cloud.google.com/go/spanner/admin/instance/apiv1", +) + +# Opensource Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-spanner-admin-instance-v1-go", + 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", + ], +) 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 623236496..1c0358db5 100644 --- a/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml +++ b/google/spanner/admin/instance/v1/spanner_admin_instance_gapic.yaml @@ -16,9 +16,6 @@ language_settings: nodejs: package_name: spanner.v1 domain_layer_location: google-cloud -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.spanner.admin.instance.v1.InstanceAdmin collections: @@ -58,7 +55,6 @@ interfaces: - parent required_fields: - parent - request_object_method: false resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -79,7 +75,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -93,7 +88,6 @@ interfaces: - parent required_fields: - parent - request_object_method: true resource_name_treatment: STATIC_TYPES page_streaming: request: @@ -114,7 +108,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -132,7 +125,6 @@ interfaces: - parent - instance_id - instance - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -155,7 +147,6 @@ interfaces: required_fields: - instance - field_mask - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent retry_params_name: default @@ -176,7 +167,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -192,7 +182,6 @@ interfaces: required_fields: - resource - policy - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: @@ -205,7 +194,6 @@ interfaces: - resource required_fields: - resource - request_object_method: false retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -220,7 +208,6 @@ interfaces: required_fields: - resource - permissions - request_object_method: true retry_codes_name: non_idempotent retry_params_name: default field_name_patterns: diff --git a/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/google/spanner/admin/instance/v1/spanner_instance_admin.proto index 23d315bc1..c6ca85c9c 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 Inc. +// 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. @@ -31,7 +31,6 @@ option java_outer_classname = "SpannerInstanceAdminProto"; option java_package = "com.google.spanner.admin.instance.v1"; option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1"; - // Cloud Spanner Instance Admin API // // The Cloud Spanner Instance Admin API can be used to create, delete, @@ -55,7 +54,8 @@ option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1"; // databases in that instance, and their performance may suffer. service InstanceAdmin { // 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" }; @@ -116,7 +116,8 @@ 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: "*" @@ -137,9 +138,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 @@ -163,7 +164,8 @@ 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: "*" @@ -192,7 +194,8 @@ 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: "*" @@ -204,7 +207,8 @@ 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: "*" @@ -217,7 +221,8 @@ 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: "*" @@ -273,15 +278,16 @@ message Instance { // Required. The number of nodes allocated to this instance. This may be zero // in API responses for instances that are not yet in state `READY`. // - // See [the documentation](https://cloud.google.com/spanner/docs/instances#node_count) + // See [the + // documentation](https://cloud.google.com/spanner/docs/instances#node_count) // for more information about nodes. 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 @@ -308,7 +314,8 @@ message Instance { map labels = 7; } -// 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 @@ -321,18 +328,20 @@ 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; } @@ -344,14 +353,16 @@ message GetInstanceConfigRequest { string name = 1; } -// 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; } -// 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/`. @@ -367,7 +378,8 @@ message CreateInstanceRequest { Instance instance = 3; } -// 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/`. @@ -378,8 +390,9 @@ message ListInstancesRequest { 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 @@ -404,31 +417,38 @@ 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. + // 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. + // 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; } -// 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/` @@ -442,8 +462,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 @@ -461,7 +481,8 @@ 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.yaml b/google/spanner/artman_spanner.yaml index ac9029132..c5c417530 100644 --- a/google/spanner/artman_spanner.yaml +++ b/google/spanner/artman_spanner.yaml @@ -12,98 +12,31 @@ artifacts: - name: java_gapic type: GAPIC language: JAVA - publish_targets: - - name: java - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-java.git - directory_mappings: - - dest: google-cloud-spanner - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/java/gapic-google-cloud-spanner-v1 - - name: grpc - dest: generated/java/grpc-google-cloud-spanner-v1 - - name: proto - dest: generated/java/proto-google-cloud-spanner-v1 + release_level: GA - name: python_gapic type: GAPIC language: PYTHON - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/python/gapic-google-cloud-spanner-v1 - - name: grpc - dest: generated/python/proto-google-cloud-spanner-v1 - - name: python - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-python.git - directory_mappings: - - src: google/cloud/spanner_v1 - dest: spanner/google/cloud/spanner_v1 - - src: tests/unit/gapic/v1 - dest: spanner/tests/gapic - - name: grpc - src: google/cloud/proto - dest: spanner/google/cloud/proto + release_level: GA - name: php_gapic type: GAPIC language: PHP - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/php/google-cloud-spanner-v1 + release_level: GA - name: ruby_gapic type: GAPIC language: RUBY - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/ruby/google-cloud-spanner - - name: ruby - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-ruby.git - directory_mappings: - - src: lib/google/cloud/spanner/v1 - dest: google-cloud-spanner/lib/google/cloud/spanner/v1 + release_level: GA - name: go_gapic type: GAPIC language: GO - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/go/vendor/cloud.google.com/go/google-spanner-v1/vendor - - name: go - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-go.git - directory_mappings: - - dest: spanner/apiv1 + release_level: GA - name: csharp_gapic type: GAPIC language: CSHARP + release_level: GA - name: nodejs_gapic type: GAPIC language: NODEJS - publish_targets: - - name: staging - type: GITHUB - location: git@github.com:googleapis/api-client-staging.git - directory_mappings: - - dest: generated/nodejs/spanner - - name: nodejs - type: GITHUB - location: git@github.com:GoogleCloudPlatform/google-cloud-node.git - directory_mappings: - - src: src/v1 - dest: packages/spanner/src/v1 + release_level: GA - name: gapic_config type: GAPIC_CONFIG + release_level: GA diff --git a/google/spanner/v1/BUILD.bazel b/google/spanner/v1/BUILD.bazel new file mode 100644 index 000000000..dee071b7a --- /dev/null +++ b/google/spanner/v1/BUILD.bazel @@ -0,0 +1,154 @@ +# 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 = "spanner_proto", + srcs = [ + "keys.proto", + "mutation.proto", + "query_plan.proto", + "result_set.proto", + "spanner.proto", + "transaction.proto", + "type.proto", + ], + deps = [ + "//google/api:annotations_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", + ], +) + +proto_library_with_info( + name = "spanner_proto_with_info", + deps = [":spanner_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 = "spanner_java_proto", + deps = [":spanner_proto"], +) + +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"], +) + +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"], + 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", + ], +) for test_name in [ + "com.google.cloud.spanner.v1.SpannerClientTest", +]] + +# Opensource 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 = [ + ":spanner_java_proto", + ":spanner_proto", + ":spanner_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 = "spanner_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/spanner/v1", + protos = [":spanner_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", + ], +) + +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"], +) + +go_test( + name = "spanner_go_gapic_test", + srcs = [":spanner_go_gapic_srcjar_test"], + embed = [":spanner_go_gapic"], + importpath = "cloud.google.com/go/spanner/apiv1", +) + +# Opensource 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", + ], +) diff --git a/google/spanner/v1/keys.proto b/google/spanner/v1/keys.proto index 463fb689c..1ae957493 100644 --- a/google/spanner/v1/keys.proto +++ b/google/spanner/v1/keys.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -26,7 +26,6 @@ option java_outer_classname = "KeysProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; - // KeyRange represents a range of rows in a table or index. // // A range has a start key and an end key. These keys can be open or @@ -34,7 +33,8 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // // Keys are represented by lists, where the ith value in the list // corresponds to the ith component of the table or index primary key. -// Individual values are encoded as described [here][google.spanner.v1.TypeCode]. +// Individual values are encoded as described +// [here][google.spanner.v1.TypeCode]. // // For example, consider the following table definition: // @@ -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 30ab1e6e7..901e6cfe0 100644 --- a/google/spanner/v1/mutation.proto +++ b/google/spanner/v1/mutation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -27,18 +27,20 @@ option java_outer_classname = "MutationProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; - // A modification to one or more Cloud Spanner rows. Mutations can be // 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 @@ -48,11 +50,13 @@ 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; } @@ -61,9 +65,10 @@ 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. Delete is + // idempotent. The transaction will succeed even if some or all rows do not + // exist. KeySet key_set = 2; } @@ -77,15 +82,16 @@ 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. 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`. 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 44c0dcf4c..3f3fe6733 100644 --- a/google/spanner/v1/query_plan.proto +++ b/google/spanner/v1/query_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -26,8 +26,8 @@ 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 +41,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 +66,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,14 +84,15 @@ 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. @@ -100,7 +101,8 @@ 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. @@ -123,7 +125,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 ce3b3026f..55f612f1b 100644 --- a/google/spanner/v1/result_set.proto +++ b/google/spanner/v1/result_set.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -30,7 +30,6 @@ option java_outer_classname = "ResultSetProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; - // Results from [Read][google.spanner.v1.Spanner.Read] or // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. message ResultSet { @@ -38,15 +37,20 @@ 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 query that produced this - // result set. These can be requested by setting + // Query plan and execution statistics for the SQL statement that + // produced this result set. These can be requested by setting + // [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]. + // Other fields may or may not be populated, based on the // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. ResultSetStats stats = 3; } @@ -70,9 +74,10 @@ 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 @@ -134,9 +139,10 @@ 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 @@ -146,14 +152,16 @@ message PartialResultSet { // same session invalidates the token. bytes resume_token = 4; - // Query plan and execution statistics for the query that produced this + // 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. + // [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 @@ -170,9 +178,11 @@ 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 @@ -185,4 +195,14 @@ message ResultSetStats { // "cpu_time": "1.19 secs" // } google.protobuf.Struct query_stats = 2; + + // The number of rows modified by the DML statement. + oneof row_count { + // Standard DML returns an exact count of rows that were modified. + int64 row_count_exact = 3; + + // Partitioned DML does not offer exactly-once semantics, so it + // returns a lower bound of the rows modified. + int64 row_count_lower_bound = 4; + } } diff --git a/google/spanner/v1/spanner.proto b/google/spanner/v1/spanner.proto index 30eecea9f..b2091c92f 100644 --- a/google/spanner/v1/spanner.proto +++ b/google/spanner/v1/spanner.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -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"; @@ -20,6 +21,7 @@ import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; import "google/spanner/v1/keys.proto"; import "google/spanner/v1/mutation.proto"; import "google/spanner/v1/result_set.proto"; @@ -33,7 +35,6 @@ option java_outer_classname = "SpannerProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; - // Cloud Spanner API // // The Cloud Spanner API can be used to manage sessions and execute @@ -81,24 +82,28 @@ service Spanner { }; } - // Ends a session, releasing server resources associated with it. + // Ends a session, releasing server resources associated with it. This will + // asynchronously trigger cancellation of any operations that are running with + // this session. rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" }; } - // Executes an SQL query, returning all rows in a single reply. This + // Executes an SQL statement, returning all results in a single reply. This // method cannot be used to return a result set larger than 10 MiB; // if the query yields more data than that, the query fails with // a `FAILED_PRECONDITION` error. // - // Queries inside read-write transactions might return `ABORTED`. If + // 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" @@ -106,11 +111,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" @@ -118,16 +123,43 @@ service Spanner { }; } + // Executes a batch of SQL DML statements. This method allows many statements + // 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]. + rpc ExecuteBatchDml(ExecuteBatchDmlRequest) returns (ExecuteBatchDmlResponse) { + option (google.api.http) = { + post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml" + body: "*" + }; + } + // 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. @@ -138,9 +170,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) { @@ -151,7 +183,8 @@ 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) { @@ -178,8 +211,9 @@ service Spanner { // 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 @@ -193,12 +227,16 @@ service Spanner { // 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 or begins a new transaction. + // is deleted, is idle for too long, begins a new transaction, or becomes too + // old. When any of these happen, it is not possible to resume the query, and + // the whole operation must be restarted from the beginning. rpc PartitionQuery(PartitionQueryRequest) returns (PartitionResponse) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery" @@ -208,12 +246,18 @@ 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. + // 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 or begins a new transaction. + // is deleted, is idle for too long, begins a new transaction, or becomes too + // old. When any of these happen, it is not possible to resume the read, and + // the whole operation must be restarted from the beginning. rpc PartitionRead(PartitionReadRequest) returns (PartitionResponse) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead" @@ -272,7 +316,8 @@ message ListSessionsRequest { 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; @@ -295,8 +340,8 @@ 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; } @@ -309,18 +354,17 @@ message DeleteSessionRequest { // The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. message ExecuteSqlRequest { - // Mode in which the query must be processed. + // Mode in which the statement must be processed. enum QueryMode { - // The default mode where only the query result, without any information - // about the query plan is returned. + // The default mode. Only the statement results are returned. NORMAL = 0; - // This mode returns only the query plan, without any result rows or + // This mode returns only the query plan, without any results or // execution statistics information. PLAN = 1; // This mode returns both the query plan and the execution statistics along - // with the result rows. + // with the results. PROFILE = 2; } @@ -329,12 +373,23 @@ message ExecuteSqlRequest { // 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. + // + // Partitioned DML requires an existing PartitionedDml transaction ID. TransactionSelector transaction = 2; - // Required. The SQL query string. + // Required. The SQL string. string sql = 3; - // The SQL query string can contain parameter placeholders. A parameter + // 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. @@ -343,7 +398,7 @@ message ExecuteSqlRequest { // 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. + // It is an error to execute an SQL statement with unbound parameters. // // Parameter values are specified using `params`, which is a JSON // object whose keys are parameter names, and whose values are the @@ -352,25 +407,29 @@ message ExecuteSqlRequest { // 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 query parameters. See the + // SQL type for some or all of the SQL statement parameters. See the // definition of [Type][google.spanner.v1.Type] for more information // about SQL types. map param_types = 5; - // If this request is resuming a previously interrupted SQL query + // 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 query 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 @@ -378,6 +437,109 @@ message ExecuteSqlRequest { // match for the values of fields common to this message and the // PartitionQueryRequest message used to create this partition_token. bytes partition_token = 8; + + // A per-transaction sequence number used to identify this request. This + // 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. + // + // Required for DML statements. Ignored for queries. + int64 seqno = 9; +} + +// 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. + // + // 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. + // + // Parameter values are specified using `params`, which is a JSON + // object whose keys are parameter names, and whose values are the + // corresponding parameter values. + google.protobuf.Struct params = 2; + + // 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.ExecuteBatchDmlRequest.Statement.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 + // definition of [Type][google.spanner.v1.Type] for more information + // about SQL types. + map param_types = 3; + } + + // Required. The session in which the DML statements should be performed. + string session = 1; + + // 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; + + // 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. + // + // REQUIRES: statements_size() > 0. + repeated Statement statements = 3; + + // 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; +} + +// 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: +// +// 1. Check if 'status' field is OkStatus. +// 2. Check if result_sets_size() equals the number of statements in +// [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest]. +// +// 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: 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. +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. + // + // Only the first ResultSet in the response contains a valid + // [ResultSetMetadata][google.spanner.v1.ResultSetMetadata]. + repeated ResultSet result_sets = 1; + + // If all DML statements are executed successfully, status will be OK. + // Otherwise, the error status of the first failed statement. + google.rpc.Status status = 2; } // Options for a PartitionQueryRequest and @@ -417,6 +579,11 @@ message PartitionQueryRequest { // union operator conceptually divides one or more tables into multiple // splits, remotely evaluates a subquery independently on each split, and // 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 + // PartitionedDml transaction for large, partition-friendly DML operations. string sql = 3; // The SQL query string can contain parameter placeholders. A parameter @@ -437,7 +604,8 @@ message PartitionQueryRequest { // 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 @@ -461,18 +629,24 @@ message PartitionReadRequest { // 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. + // 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 @@ -515,24 +689,31 @@ message ReadRequest { // 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. + // 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. + // The columns of [table][google.spanner.v1.ReadRequest.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.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]. + // 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. + // 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. @@ -545,9 +726,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; @@ -558,7 +739,8 @@ 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; diff --git a/google/spanner/v1/spanner_gapic.yaml b/google/spanner/v1/spanner_gapic.yaml index cef88c583..a09c021c6 100644 --- a/google/spanner/v1/spanner_gapic.yaml +++ b/google/spanner/v1/spanner_gapic.yaml @@ -3,23 +3,27 @@ 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 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt + release_level: GA interfaces: - name: google.spanner.v1.Spanner collections: @@ -34,7 +38,6 @@ interfaces: - name: idempotent retry_codes: - UNAVAILABLE - - DEADLINE_EXCEEDED - name: non_idempotent retry_codes: [] - name: long_running @@ -42,15 +45,23 @@ interfaces: - UNAVAILABLE retry_params_def: - name: default - initial_retry_delay_millis: 1000 + initial_retry_delay_millis: 250 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 + - name: streaming + initial_retry_delay_millis: 250 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 32000 + initial_rpc_timeout_millis: 120000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 120000 + total_timeout_millis: 1200000 - name: long_running - initial_retry_delay_millis: 1000 + initial_retry_delay_millis: 250 retry_delay_multiplier: 1.3 max_retry_delay_millis: 32000 initial_rpc_timeout_millis: 3600000 @@ -65,7 +76,6 @@ interfaces: - database required_fields: - database - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -79,7 +89,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -93,7 +102,6 @@ interfaces: - database required_fields: - database - request_object_method: true page_streaming: request: page_size_field: page_size @@ -105,7 +113,7 @@ interfaces: retry_params_name: default field_name_patterns: database: database - timeout_millis: 30000 + timeout_millis: 3600000 - name: DeleteSession flattening: groups: @@ -113,7 +121,6 @@ interfaces: - name required_fields: - name - request_object_method: false resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -124,7 +131,6 @@ interfaces: required_fields: - session - sql - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -135,20 +141,30 @@ interfaces: required_fields: - session - sql - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default + 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 - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -161,10 +177,9 @@ interfaces: - table - columns - key_set - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: non_idempotent - retry_params_name: default + retry_params_name: streaming field_name_patterns: session: session timeout_millis: 3600000 @@ -177,7 +192,6 @@ interfaces: required_fields: - session - options - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -198,7 +212,6 @@ interfaces: required_fields: - session - mutations - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: long_running retry_params_name: long_running @@ -214,7 +227,6 @@ interfaces: required_fields: - session - transaction_id - request_object_method: true resource_name_treatment: STATIC_TYPES retry_codes_name: idempotent retry_params_name: default @@ -225,7 +237,6 @@ interfaces: required_fields: - session - sql - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -236,7 +247,6 @@ interfaces: - session - table - key_set - request_object_method: true retry_codes_name: idempotent retry_params_name: default field_name_patterns: @@ -258,6 +268,9 @@ resource_name_generation: - message_name: ExecuteSqlRequest field_entity_map: session: session +- message_name: ExecuteBatchDmlRequest + field_entity_map: + session: session - message_name: ReadRequest field_entity_map: session: session @@ -270,3 +283,9 @@ resource_name_generation: - 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/transaction.proto b/google/spanner/v1/transaction.proto index d4eb7f956..7253bcbe0 100644 --- a/google/spanner/v1/transaction.proto +++ b/google/spanner/v1/transaction.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -27,7 +27,6 @@ option java_outer_classname = "TransactionProto"; option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; - // # Transactions // // @@ -38,7 +37,7 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // // # Transaction Modes // -// Cloud Spanner supports two transaction modes: +// Cloud Spanner supports three transaction modes: // // 1. Locking read-write. This type of transaction is the only way // to write data into Cloud Spanner. These transactions rely on @@ -52,6 +51,13 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // read at timestamps in the past. Snapshot read-only // transactions do not need to be committed. // +// 3. Partitioned DML. This type of transaction is used to execute +// a single Partitioned DML statement. Partitioned DML partitions +// the key space and runs the DML statement over each partition +// in parallel using separate, internal transactions that commit +// independently. Partitioned DML transactions do not need to be +// committed. +// // For transactions that only read, snapshot read-only transactions // provide simpler semantics and are almost always faster. In // particular, read-only transactions do not take locks, so they do @@ -78,11 +84,8 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // inactivity at the client may cause Cloud Spanner to release a // transaction's locks and abort it. // -// Reads performed within a transaction acquire locks on the data -// being read. Writes can only be done at commit time, after all reads -// have been completed. // Conceptually, a read-write transaction consists of zero or more -// reads or SQL queries followed by +// reads or SQL statements followed by // [Commit][google.spanner.v1.Spanner.Commit]. At any time before // [Commit][google.spanner.v1.Spanner.Commit], the client can send a // [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the @@ -181,7 +184,8 @@ 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 // @@ -202,7 +206,9 @@ 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 @@ -232,7 +238,9 @@ 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 @@ -245,12 +253,69 @@ option php_namespace = "Google\\Cloud\\Spanner\\V1"; // restriction also applies to in-progress reads and/or SQL queries whose // timestamp become too old while executing. Reads and SQL queries with // too-old read timestamps fail with the error `FAILED_PRECONDITION`. +// +// ## Partitioned DML Transactions +// +// Partitioned DML transactions are used to execute DML statements with a +// different execution strategy that provides different, and often better, +// scalability properties for large, table-wide operations than DML in a +// ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, +// should prefer using ReadWrite transactions. +// +// Partitioned DML partitions the keyspace and runs the DML statement on each +// partition in separate, internal transactions. These transactions commit +// automatically when complete, and run independently from one another. +// +// To reduce lock contention, this execution strategy only acquires read locks +// on rows that match the WHERE clause of the statement. Additionally, the +// smaller per-partition transactions hold locks for less time. +// +// That said, Partitioned DML is not a drop-in replacement for standard DML used +// in ReadWrite transactions. +// +// - The DML statement must be fully-partitionable. Specifically, the statement +// must be expressible as the union of many statements which each access only +// a single row of the table. +// +// - The statement is not applied atomically to all rows of the table. Rather, +// the statement is applied atomically to partitions of the table, in +// independent transactions. Secondary index rows are updated atomically +// with the base table rows. +// +// - Partitioned DML does not guarantee exactly-once execution semantics +// against a partition. The statement will be applied at least once to each +// partition. It is strongly recommended that the DML statement should be +// idempotent to avoid unexpected results. For instance, it is potentially +// dangerous to run a statement such as +// `UPDATE table SET column = column + 1` as it could be run multiple times +// against some rows. +// +// - The partitions are committed automatically - there is no support for +// Commit or Rollback. If the call returns an error, or if the client issuing +// the ExecuteSql call dies, it is possible that some rows had the statement +// executed on them successfully. It is also possible that statement was +// never executed against other rows. +// +// - Partitioned DML transactions may only contain the execution of a single +// DML statement via ExecuteSql or ExecuteStreamingSql. +// +// - If any error is encountered during the execution of the partitioned DML +// operation (for instance, a UNIQUE INDEX violation, division by zero, or a +// value that cannot be stored due to schema constraints), then the +// operation is stopped at that point and an error is returned. It is +// possible that at this point, some partitions have been committed (or even +// committed multiple times), and other partitions have not been run at all. +// +// Given the above, Partitioned DML is good fit for large, database-wide, +// operations that are idempotent, such as deleting old rows from a very large +// table. 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 type to initiate a read-only transaction. message ReadOnly { @@ -316,7 +381,8 @@ 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; } @@ -329,6 +395,13 @@ message TransactionOptions { // on the `session` resource. ReadWrite read_write = 1; + // Partitioned DML transaction. + // + // Authorization to begin a Partitioned DML transaction requires + // `spanner.databases.beginPartitionedDmlTransaction` permission + // on the `session` resource. + PartitionedDml partitioned_dml = 3; + // Transaction will not write. // // Authorization to begin a read-only transaction requires @@ -363,7 +436,8 @@ 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. @@ -378,7 +452,8 @@ 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 048cc0b07..1ddbd62be 100644 --- a/google/spanner/v1/type.proto +++ b/google/spanner/v1/type.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -25,23 +25,25 @@ 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. + // 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. + // 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. +// `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 { @@ -61,9 +63,9 @@ message StructType { // 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. + // 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; } @@ -109,7 +111,8 @@ enum TypeCode { BYTES = 7; // Encoded as `list`, where the list elements are represented - // according to [array_element_type][google.spanner.v1.Type.array_element_type]. + // according to + // [array_element_type][google.spanner.v1.Type.array_element_type]. ARRAY = 8; // Encoded as `list`, where list element `i` is represented according diff --git a/google/storagetransfer/v1/transfer.proto b/google/storagetransfer/v1/transfer.proto index c82c51c7a..e2a40b923 100644 --- a/google/storagetransfer/v1/transfer.proto +++ b/google/storagetransfer/v1/transfer.proto @@ -28,7 +28,6 @@ option java_outer_classname = "TransferProto"; option java_package = "com.google.storagetransfer.v1.proto"; option php_namespace = "Google\\Cloud\\StorageTransfer\\V1"; - // Transfers data between between Google Cloud Storage buckets or from a data // source external to Google to a Cloud Storage bucket. service StorageTransferService { @@ -40,40 +39,62 @@ service StorageTransferService { // ACLs to grant access to Storage Transfer Service. This service // account is created and owned by Storage Transfer Service and can // only be used by Storage Transfer Service. - rpc GetGoogleServiceAccount(GetGoogleServiceAccountRequest) returns (GoogleServiceAccount) { - option (google.api.http) = { get: "/v1/googleServiceAccounts/{project_id}" }; + rpc GetGoogleServiceAccount(GetGoogleServiceAccountRequest) + returns (GoogleServiceAccount) { + option (google.api.http) = { + get: "/v1/googleServiceAccounts/{project_id}" + }; } // Creates a transfer job that runs periodically. rpc CreateTransferJob(CreateTransferJobRequest) returns (TransferJob) { - option (google.api.http) = { post: "/v1/transferJobs" body: "transfer_job" }; + option (google.api.http) = { + post: "/v1/transferJobs" + body: "transfer_job" + }; } // Updates a transfer job. Updating a job's transfer spec does not affect // transfer operations that are running already. Updating the scheduling // of a job is not allowed. rpc UpdateTransferJob(UpdateTransferJobRequest) returns (TransferJob) { - option (google.api.http) = { patch: "/v1/{job_name=transferJobs/**}" body: "*" }; + option (google.api.http) = { + patch: "/v1/{job_name=transferJobs/**}" + body: "*" + }; } // Gets a transfer job. rpc GetTransferJob(GetTransferJobRequest) returns (TransferJob) { - option (google.api.http) = { get: "/v1/{job_name=transferJobs/**}" }; + option (google.api.http) = { + get: "/v1/{job_name=transferJobs/**}" + }; } // Lists transfer jobs. - rpc ListTransferJobs(ListTransferJobsRequest) returns (ListTransferJobsResponse) { - option (google.api.http) = { get: "/v1/transferJobs" }; + rpc ListTransferJobs(ListTransferJobsRequest) + returns (ListTransferJobsResponse) { + option (google.api.http) = { + get: "/v1/transferJobs" + }; } // Pauses a transfer operation. - rpc PauseTransferOperation(PauseTransferOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=transferOperations/**}:pause" body: "*" }; + rpc PauseTransferOperation(PauseTransferOperationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=transferOperations/**}:pause" + body: "*" + }; } // Resumes a transfer operation that is paused. - rpc ResumeTransferOperation(ResumeTransferOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=transferOperations/**}:resume" body: "*" }; + rpc ResumeTransferOperation(ResumeTransferOperationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=transferOperations/**}:resume" + body: "*" + }; } } @@ -137,9 +158,9 @@ message ListTransferJobsRequest { // "job_names":["jobid1","jobid2",...], // "job_statuses":["status1","status2",...]}. // Since `job_names` and `job_statuses` support multiple values, their values - // must be specified with array notation. `project_id` is required. `job_names` - // and `job_statuses` are optional. The valid values for `job_statuses` are - // case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. + // must be specified with array notation. `project_id` is required. + // `job_names` and `job_statuses` are optional. The valid values for + // `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. string filter = 1; // The list page size. The max allowed value is 256. diff --git a/google/storagetransfer/v1/transfer_types.proto b/google/storagetransfer/v1/transfer_types.proto index 5b9095ede..1495e42ff 100644 --- a/google/storagetransfer/v1/transfer_types.proto +++ b/google/storagetransfer/v1/transfer_types.proto @@ -30,7 +30,6 @@ option java_outer_classname = "TransferTypes"; option java_package = "com.google.storagetransfer.v1.proto"; option php_namespace = "Google\\Cloud\\StorageTransfer\\V1"; - // Google service account message GoogleServiceAccount { // Required. @@ -38,7 +37,8 @@ message GoogleServiceAccount { } // AWS access key (see -// [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). +// [AWS Security +// Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). message AwsAccessKey { // AWS access key ID. // Required. @@ -66,9 +66,10 @@ message ObjectConditions { // If `includePrefixes` is specified, objects that satisfy the object // conditions must have names that start with one of the `includePrefixes` - // and that do not start with any of the `excludePrefixes`. If `includePrefixes` - // is not specified, all objects except those that have names starting with - // one of the `excludePrefixes` must satisfy the object conditions. + // and that do not start with any of the `excludePrefixes`. If + // `includePrefixes` is not specified, all objects except those that have + // names starting with one of the `excludePrefixes` must satisfy the object + // conditions. // // Requirements: // @@ -111,7 +112,8 @@ message ObjectConditions { // when the content or the metadata of the object is updated. message GcsData { // Google Cloud Storage bucket name (see - // [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + // [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). // Required. string bucket_name = 1; } @@ -120,7 +122,8 @@ message GcsData { // In an AwsS3Data, an object's name is the S3 object's key name. message AwsS3Data { // S3 Bucket name (see - // [Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + // [Creating a + // bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). // Required. string bucket_name = 1; @@ -145,12 +148,13 @@ message AwsS3Data { // * MD5 - The base64-encoded MD5 hash of the object. // // For an example of a valid TSV file, see -// [Transferring data from URLs](https://cloud.google.com/storage/transfer/create-url-list). +// [Transferring data from +// URLs](https://cloud.google.com/storage/transfer/create-url-list). // // When transferring data based on a URL list, keep the following in mind: // -// * When an object located at `http(s)://hostname:port/` is transferred -// to a data sink, the name of the object at the data sink is +// * When an object located at `http(s)://hostname:port/` is +// transferred to a data sink, the name of the object at the data sink is // `/`. // // * If the specified size of an object does not match the actual size of the @@ -417,8 +421,8 @@ message TransferOperation { // A globally unique ID assigned by the system. string name = 1; - // The ID of the Google Cloud Platform Console project that owns the operation. - // Required. + // The ID of the Google Cloud Platform Console project that owns the + // operation. Required. string project_id = 2; // Transfer specification. diff --git a/google/streetview/publish/streetview_publish_gapic.yaml b/google/streetview/publish/streetview_publish_gapic.yaml index 1f67df36a..cdc4c6197 100644 --- a/google/streetview/publish/streetview_publish_gapic.yaml +++ b/google/streetview/publish/streetview_publish_gapic.yaml @@ -17,9 +17,6 @@ language_settings: package_name: Google\Streetview\Publish\V1 nodejs: package_name: google.streetview.publish.v1 -license_header: - copyright_file: copyright-google.txt - license_file: license-header-apache-2.0.txt interfaces: - name: google.streetview.publish.v1.StreetViewPublishService smoke_test: @@ -43,7 +40,6 @@ interfaces: total_timeout_millis: 600000 methods: - name: StartUpload - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -54,7 +50,6 @@ interfaces: - photo required_fields: - photo - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -67,7 +62,6 @@ interfaces: required_fields: - photo_id - view - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -80,7 +74,6 @@ interfaces: required_fields: - photo_ids - view - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -93,7 +86,6 @@ interfaces: required_fields: - view - filter - request_object_method: true page_streaming: request: page_size_field: page_size @@ -113,7 +105,6 @@ interfaces: required_fields: - photo - update_mask - request_object_method: true retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -124,7 +115,6 @@ interfaces: - update_photo_requests required_fields: - update_photo_requests - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 @@ -135,7 +125,6 @@ interfaces: - photo_id required_fields: - photo_id - request_object_method: false retry_codes_name: idempotent retry_params_name: default timeout_millis: 60000 @@ -146,7 +135,6 @@ interfaces: - photo_ids required_fields: - photo_ids - request_object_method: false retry_codes_name: non_idempotent retry_params_name: default timeout_millis: 60000 diff --git a/google/streetview/publish/v1/resources.proto b/google/streetview/publish/v1/resources.proto index 69a75f5ef..2e070b6bf 100644 --- a/google/streetview/publish/v1/resources.proto +++ b/google/streetview/publish/v1/resources.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. @@ -24,18 +24,17 @@ option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1 option java_outer_classname = "StreetViewPublishResources"; option java_package = "com.google.geo.ugc.streetview.publish.v1"; - // Upload reference for media files. message UploadRef { // Required. An upload reference should be unique for each user. It follows // the form: - // "https://streetviewpublish.googleapis.com/media/user//photo/" + // "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}" string upload_url = 1; } -// Identifier for a photo. +// Identifier for a [Photo][google.streetview.publish.v1.Photo]. message PhotoId { - // Required. A base64 encoded identifier. + // Required. A unique identifier for a photo. string id = 1; } @@ -56,19 +55,16 @@ message Level { message Pose { // Latitude and longitude pair of the pose, as explained here: // https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng - // When creating a photo, if the latitude and longitude pair are not provided - // here, the geolocation from the exif header will be used. - // If the latitude and longitude pair is not provided and cannot be found in - // the exif header, the create photo process will fail. + // When creating a [Photo][google.streetview.publish.v1.Photo], if the + // latitude and longitude pair are not provided, the geolocation from the + // exif header is used. A latitude and longitude pair not provided in the + // photo or exif header causes the create photo process to fail. google.type.LatLng lat_lng_pair = 1; - // Altitude of the pose in meters above ground level (as defined by WGS84). + // Altitude of the pose in meters above WGS84 ellipsoid. // NaN indicates an unmeasured quantity. double altitude = 2; - // The following pose parameters pertain to the center of the photo. They - // match https://developers.google.com/streetview/spherical-metadata. - // Compass heading, measured at the center of the photo in degrees clockwise // from North. Value must be >=0 and <360. // NaN indicates an unmeasured quantity. @@ -87,13 +83,28 @@ message Pose { // Level (the floor in a building) used to configure vertical navigation. Level level = 7; + + // The estimated horizontal accuracy of this pose in meters with 68% + // confidence (one standard deviation). For example, on Android, this value is + // available from this method: + // https://developer.android.com/reference/android/location/Location#getAccuracy(). + // Other platforms have different methods of obtaining similar accuracy + // estimations. + float accuracy_meters = 9; } // Place metadata for an entity. message Place { - // Required. Place identifier, as described in + // Place identifier, as described in // https://developers.google.com/places/place-id. string place_id = 1; + + // Output-only. The name of the place, localized to the language_code. + string name = 2; + + // Output-only. The language_code that the name is localized with. This should + // be the language_code specified in the request, but may be a fallback. + string language_code = 3; } // A connection is the link from a source photo to a destination photo. @@ -105,17 +116,20 @@ message Connection { // Photo is used to store 360 photos along with photo metadata. message Photo { - // Output only. Identifier for the photo, which is unique among all photos in + // Required when updating a photo. Output only when creating a photo. + // Identifier for the photo, which is unique among all photos in // Google. PhotoId photo_id = 1; - // Required (when creating photo). Input only. The resource URL where the + // Required when creating a photo. Input only. The resource URL where the // photo bytes are uploaded to. UploadRef upload_reference = 2; // Output only. The download URL for the photo bytes. This field is set only - // when the `view` parameter in a `GetPhotoRequest` is set to - // `INCLUDE_DOWNLOAD_URL`. + // when + // [GetPhotoRequest.view][google.streetview.publish.v1.GetPhotoRequest.view] + // is set to + // [PhotoView.INCLUDE_DOWNLOAD_URL][google.streetview.publish.v1.PhotoView.INCLUDE_DOWNLOAD_URL]. string download_url = 3; // Output only. The thumbnail URL for showing a preview of the given photo. @@ -141,4 +155,52 @@ message Photo { // Output only. View count of the photo. int64 view_count = 10; + + // Status of rights transfer. + enum TransferStatus { + // The status of this transfer is unspecified. + TRANSFER_STATUS_UNKNOWN = 0; + + // This photo has never been in a transfer. + NEVER_TRANSFERRED = 1; + + // This photo transfer has been initiated, but the receiver has not yet + // responded. + PENDING = 2; + + // The photo transfer has been completed, and this photo has been + // transferred to the recipient. + COMPLETED = 3; + + // The recipient rejected this photo transfer. + REJECTED = 4; + + // The photo transfer expired before the recipient took any action. + EXPIRED = 5; + + // The sender cancelled this photo transfer. + CANCELLED = 6; + + // The recipient owns this photo due to a rights transfer. + RECEIVED_VIA_TRANSFER = 7; + } + + // Output only. Status of rights transfer on this photo. + TransferStatus transfer_status = 12; + + // Publication status of the photo in Google Maps. + enum MapsPublishStatus { + // The status of the photo is unknown. + UNSPECIFIED_MAPS_PUBLISH_STATUS = 0; + + // The photo is published to the public through Google Maps. + PUBLISHED = 1; + + // The photo has been rejected for an unknown reason. + REJECTED_UNKNOWN = 2; + } + + // Output only. Status in Google Maps, whether this photo was published or + // rejected. + MapsPublishStatus maps_publish_status = 13; } diff --git a/google/streetview/publish/v1/rpcmessages.proto b/google/streetview/publish/v1/rpcmessages.proto index 1467e9e75..7c52718aa 100644 --- a/google/streetview/publish/v1/rpcmessages.proto +++ b/google/streetview/publish/v1/rpcmessages.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. @@ -24,122 +24,177 @@ option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1 option java_outer_classname = "StreetViewPublishRpcMessages"; option java_package = "com.google.geo.ugc.streetview.publish.v1"; +// Specifies which view of the [Photo][google.streetview.publish.v1.Photo] +// to include in the response. +enum PhotoView { + // Server reponses do not include the download URL for the photo bytes. + // The default value. + BASIC = 0; + + // Server responses include the download URL for the photo bytes. + INCLUDE_DOWNLOAD_URL = 1; +} -// Request to create a photo. +// Request to create a [Photo][google.streetview.publish.v1.Photo]. message CreatePhotoRequest { // Required. Photo to create. Photo photo = 1; } -// Request to get a photo. +// Request to get a [Photo][google.streetview.publish.v1.Photo]. // // By default -// - does not return the download URL for the photo bytes. +// +// * does not return the download URL for the photo bytes. // // Parameters: -// - 'view' controls if the download URL for the photo bytes will be returned. +// +// * `view` controls if the download URL for the photo bytes is returned. message GetPhotoRequest { - // Required. ID of the photo. + // Required. ID of the [Photo][google.streetview.publish.v1.Photo]. string photo_id = 1; // Specifies if a download URL for the photo bytes should be returned in the - // Photo response. + // [Photo][google.streetview.publish.v1.Photo] response. PhotoView view = 2; + + // 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. + // If language_code is unspecified, the user's language preference for Google + // services is used. + string language_code = 3; } -// Request to get one or more photos. +// Request to get one or more [Photos][google.streetview.publish.v1.Photo]. // By default -// - does not return the download URL for the photo bytes. +// +// * does not return the download URL for the photo bytes. // // Parameters: -// - 'view' controls if the download URL for the photo bytes will be returned. +// +// * `view` controls if the download URL for the photo bytes is returned. message BatchGetPhotosRequest { - // Required. IDs of the photos. + // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP GET + // requests require the following syntax for the URL query parameter: + // `photoIds=&photoIds=&...`. repeated string photo_ids = 1; // Specifies if a download URL for the photo bytes should be returned in the // Photo response. PhotoView view = 2; + + // 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. + // If language_code is unspecified, the user's language preference for Google + // services is used. + string language_code = 3; } -// Response to batch get of photos. +// Response to batch get of [Photos][google.streetview.publish.v1.Photo]. message BatchGetPhotosResponse { - // List of results for each individual photo requested, in the same order as - // the request. + // List of results for each individual + // [Photo][google.streetview.publish.v1.Photo] requested, in the same order as + // the requests in + // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]. repeated PhotoResponse results = 1; } -// Response payload for a single `Photo` in batch operations including -// `BatchGetPhotosRequest` and `BatchUpdatePhotosRequest`. +// Response payload for a single +// [Photo][google.streetview.publish.v1.Photo] +// in batch operations including +// [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos] +// and +// [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos]. message PhotoResponse { // The status for the operation to get or update a single photo in the batch // request. google.rpc.Status status = 1; - // The photo resource, if the request was successful. + // The [Photo][google.streetview.publish.v1.Photo] resource, if the request + // was successful. Photo photo = 2; } // Request to list all photos that belong to the user sending the request. // // By default -// - does not return the download URL for the photo bytes. +// +// * does not return the download URL for the photo bytes. // // Parameters: -// - 'view' controls if the download URL for the photo bytes will be returned. -// - 'page_size' determines the maximum number of photos to return. -// - 'page_token' is the next page token value returned from a previous List +// +// * `view` controls if the download URL for the photo bytes is returned. +// * `pageSize` determines the maximum number of photos to return. +// * `pageToken` is the next page token value returned from a previous +// [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos] // request, if any. +// * `filter` allows filtering by a given parameter. 'placeId' is the only +// parameter supported at the moment. message ListPhotosRequest { // Specifies if a download URL for the photos bytes should be returned in the // Photos response. PhotoView view = 1; // The maximum number of photos to return. - // `page_size` must be non-negative. If `page_size` is zero or is not - // provided, the default page size of 100 will be used. - // The number of photos returned in the response may be less than `page_size` - // if the number of photos that belong to the user is less than `page_size`. + // `pageSize` must be non-negative. If `pageSize` is zero or is not provided, + // the default page size of 100 is used. + // The number of photos returned in the response may be less than `pageSize` + // if the number of photos that belong to the user is less than `pageSize`. int32 page_size = 2; - // The next_page_token value returned from a previous List request, if any. + // The + // [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token] + // value returned from a previous + // [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos] + // request, if any. string page_token = 3; - // The filter expression. - // Example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw` + // The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. + // + // The only filter supported at the moment is `placeId`. string filter = 4; + + // 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. + // If language_code is unspecified, the user's language preference for Google + // services is used. + string language_code = 5; } // Response to list all photos that belong to a user. message ListPhotosResponse { - // List of photos. There will be a maximum number of items returned based on - // the page_size field in the request. + // List of photos. The + // [pageSize][google.streetview.publish.v1.ListPhotosRequest.page_size] field + // in the request determines the number of items returned. repeated Photo photos = 1; - // Token to retrieve the next page of results, or empty if there are no - // more results in the list. + // 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 to update the metadata of a photo. -// Updating the pixels of a photo is not supported. +// Request to update the metadata of a +// [Photo][google.streetview.publish.v1.Photo]. Updating the pixels of a photo +// is not supported. message UpdatePhotoRequest { - // Required. Photo object containing the new metadata. Only the fields - // specified in `update_mask` are used. If `update_mask` is not present, the - // update applies to all fields. - // **Note:** To update `pose.altitude`, `pose.latlngpair` has to be filled as - // well. Otherwise, the request will fail. + // Required. [Photo][google.streetview.publish.v1.Photo] object containing the + // new metadata. Photo photo = 1; // Mask that identifies fields on the photo metadata to update. - // If not present, the old Photo metadata will be entirely replaced with the - // new Photo metadata in this request. The update fails if invalid fields are - // specified. Multiple fields can be specified in a comma-delimited list. + // If not present, the old [Photo][google.streetview.publish.v1.Photo] + // metadata is entirely replaced with the + // new [Photo][google.streetview.publish.v1.Photo] metadata in this request. + // The update fails if invalid fields are specified. Multiple fields can be + // specified in a comma-delimited list. // // The following fields are valid: // // * `pose.heading` - // * `pose.latlngpair` + // * `pose.latLngPair` // * `pose.pitch` // * `pose.roll` // * `pose.level` @@ -148,52 +203,51 @@ message UpdatePhotoRequest { // * `places` // // - // **Note:** Repeated fields in `update_mask` mean the entire set of repeated - // values will be replaced with the new contents. For example, if - // `UpdatePhotoRequest.photo.update_mask` contains `connections` and - // `UpdatePhotoRequest.photo.connections` is empty, all connections will be - // removed. + //

google.protobuf.FieldMask update_mask = 2; } // Request to update the metadata of photos. // Updating the pixels of photos is not supported. message BatchUpdatePhotosRequest { - // Required. List of update photo requests. + // Required. List of + // [UpdatePhotoRequests][google.streetview.publish.v1.UpdatePhotoRequest]. repeated UpdatePhotoRequest update_photo_requests = 1; } -// Response to batch update of metadata of one or more photos. +// Response to batch update of metadata of one or more +// [Photos][google.streetview.publish.v1.Photo]. message BatchUpdatePhotosResponse { - // List of results for each individual photo updated, in the same order as + // List of results for each individual + // [Photo][google.streetview.publish.v1.Photo] updated, in the same order as // the request. repeated PhotoResponse results = 1; } -// Request to delete a photo. +// Request to delete a [Photo][google.streetview.publish.v1.Photo]. message DeletePhotoRequest { - // Required. ID of the photo. + // Required. ID of the [Photo][google.streetview.publish.v1.Photo]. string photo_id = 1; } -// Request to delete multiple photos. +// Request to delete multiple [Photos][google.streetview.publish.v1.Photo]. message BatchDeletePhotosRequest { - // Required. List of delete photo requests. + // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP + // GET requests require the following syntax for the URL query parameter: + // `photoIds=&photoIds=&...`. repeated string photo_ids = 1; } -// Response to batch delete of one or more photos. +// Response to batch delete of one or more +// [Photos][google.streetview.publish.v1.Photo]. message BatchDeletePhotosResponse { - // The status for the operation to delete a single photo in the batch request. + // The status for the operation to delete a single + // [Photo][google.streetview.publish.v1.Photo] in the batch request. repeated google.rpc.Status status = 1; } - -// Specifies which view of the `Photo` should be included in the response. -enum PhotoView { - // Server reponses do not include the download URL for the photo bytes. - // The default value. - BASIC = 0; - - // Server responses include the download URL for the photo bytes. - INCLUDE_DOWNLOAD_URL = 1; -} diff --git a/google/streetview/publish/v1/streetview_publish.proto b/google/streetview/publish/v1/streetview_publish.proto index e473dda29..0ea2112be 100644 --- a/google/streetview/publish/v1/streetview_publish.proto +++ b/google/streetview/publish/v1/streetview_publish.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. @@ -27,106 +27,217 @@ option java_package = "com.google.geo.ugc.streetview.publish.v1"; // Definition of the service that backs the Street View Publish API. - - // Publishes and connects user-contributed photos on Street View. service StreetViewPublishService { - // Creates an upload session to start uploading photo data. The upload URL of - // the returned `UploadRef` is used to upload the data for the photo. + // Creates an upload session to start uploading photo bytes. The method uses + // the upload URL of the returned + // [UploadRef][google.streetview.publish.v1.UploadRef] to upload the bytes for + // the [Photo][google.streetview.publish.v1.Photo]. + // + // In addition to the photo requirements shown in + // https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, + // the photo must meet the following requirements: + // + // * Photo Sphere XMP metadata must be included in the photo medadata. See + // https://developers.google.com/streetview/spherical-metadata for the + // required fields. + // * The pixel size of the photo must meet the size requirements listed in + // https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and + // the photo must be a full 360 horizontally. // - // After the upload is complete, the `UploadRef` is used with - // `StreetViewPublishService:CreatePhoto()` to create the `Photo` object - // entry. + // After the upload completes, the method uses + // [UploadRef][google.streetview.publish.v1.UploadRef] with + // [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto] + // to create the [Photo][google.streetview.publish.v1.Photo] object entry. rpc StartUpload(google.protobuf.Empty) returns (UploadRef) { - option (google.api.http) = { post: "/v1/photo:startUpload" body: "*" }; + option (google.api.http) = { + post: "/v1/photo:startUpload" + body: "*" + }; } // After the client finishes uploading the photo with the returned - // `UploadRef`, `photo.create` publishes the uploaded photo to Street View on - // Google Maps. + // [UploadRef][google.streetview.publish.v1.UploadRef], + // [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto] + // publishes the uploaded [Photo][google.streetview.publish.v1.Photo] to + // Street View on Google Maps. + // + // Currently, the only way to set heading, pitch, and roll in CreatePhoto is + // through the [Photo Sphere XMP + // metadata](https://developers.google.com/streetview/spherical-metadata) in + // the photo bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`, + // `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose. // // This method returns the following error codes: // - // * `INVALID_ARGUMENT` if the request is malformed. - // * `NOT_FOUND` if the upload reference does not exist. + // * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if + // the request is malformed or if the uploaded photo is not a 360 photo. + // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the upload + // reference does not exist. + // * [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // if the account has reached the storage limit. rpc CreatePhoto(CreatePhotoRequest) returns (Photo) { - option (google.api.http) = { post: "/v1/photo" body: "photo" }; + option (google.api.http) = { + post: "/v1/photo" + body: "photo" + }; } - // Gets the metadata of the specified `Photo`. + // Gets the metadata of the specified + // [Photo][google.streetview.publish.v1.Photo]. // // This method returns the following error codes: // - // * `PERMISSION_DENIED` if the requesting user did not create the requested - // photo. - // * `NOT_FOUND` if the requested photo does not exist. + // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if + // the requesting user did not create the requested + // [Photo][google.streetview.publish.v1.Photo]. + // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested + // [Photo][google.streetview.publish.v1.Photo] does not exist. + // * [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the + // requested [Photo][google.streetview.publish.v1.Photo] is still being + // indexed. rpc GetPhoto(GetPhotoRequest) returns (Photo) { - option (google.api.http) = { get: "/v1/photo/{photo_id}" }; + option (google.api.http) = { + get: "/v1/photo/{photo_id}" + }; } - // Gets the metadata of the specified `Photo` batch. - // - // Note that if `photos.batchGet` fails, either critical fields are - // missing or there was an authentication error. - // Even if `photos.batchGet` succeeds, there may have been failures - // for single photos in the batch. These failures will be specified in - // `BatchGetPhotosResponse.results.status`. - // See `photo.get` for specific failures that will occur per photo. + // Gets the metadata of the specified + // [Photo][google.streetview.publish.v1.Photo] batch. + // + // Note that if + // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos] + // fails, either critical fields are missing or there is an authentication + // error. Even if + // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos] + // succeeds, individual photos in the batch may have failures. + // These failures are specified in each + // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] + // in + // [BatchGetPhotosResponse.results][google.streetview.publish.v1.BatchGetPhotosResponse.results]. + // See + // [GetPhoto][google.streetview.publish.v1.StreetViewPublishService.GetPhoto] + // for specific failures that can occur per photo. rpc BatchGetPhotos(BatchGetPhotosRequest) returns (BatchGetPhotosResponse) { - option (google.api.http) = { get: "/v1/photos:batchGet" }; + option (google.api.http) = { + get: "/v1/photos:batchGet" + }; } - // Lists all the photos that belong to the user. + // Lists all the [Photos][google.streetview.publish.v1.Photo] that belong to + // the user. + // + // rpc ListPhotos(ListPhotosRequest) returns (ListPhotosResponse) { - option (google.api.http) = { get: "/v1/photos" }; + option (google.api.http) = { + get: "/v1/photos" + }; } - // Updates the metadata of a photo, such as pose, place association, etc. - // Changing the pixels of a photo is not supported. + // Updates the metadata of a [Photo][google.streetview.publish.v1.Photo], such + // as pose, place association, connections, etc. Changing the pixels of a + // photo is not supported. + // + // Only the fields specified in the + // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask] + // field are used. If `updateMask` is not present, the update applies to all + // fields. // // This method returns the following error codes: // - // * `PERMISSION_DENIED` if the requesting user did not create the requested - // photo. - // * `INVALID_ARGUMENT` if the request is malformed. - // * `NOT_FOUND` if the photo ID does not exist. + // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if + // the requesting user did not create the requested photo. + // * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if + // the request is malformed. + // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested + // photo does not exist. + // * [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the + // requested [Photo][google.streetview.publish.v1.Photo] is still being + // indexed. rpc UpdatePhoto(UpdatePhotoRequest) returns (Photo) { - option (google.api.http) = { put: "/v1/photo/{photo.photo_id.id}" body: "photo" }; + option (google.api.http) = { + put: "/v1/photo/{photo.photo_id.id}" + body: "photo" + }; } - // Updates the metadata of photos, such as pose, place association, etc. - // Changing the pixels of a photo is not supported. - // - // Note that if `photos.batchUpdate` fails, either critical fields - // are missing or there was an authentication error. - // Even if `photos.batchUpdate` succeeds, there may have been - // failures for single photos in the batch. These failures will be specified - // in `BatchUpdatePhotosResponse.results.status`. - // See `UpdatePhoto` for specific failures that will occur per photo. - rpc BatchUpdatePhotos(BatchUpdatePhotosRequest) returns (BatchUpdatePhotosResponse) { - option (google.api.http) = { post: "/v1/photos:batchUpdate" body: "*" }; + // Updates the metadata of [Photos][google.streetview.publish.v1.Photo], such + // as pose, place association, connections, etc. Changing the pixels of photos + // is not supported. + // + // Note that if + // [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos] + // fails, either critical fields are missing or there is an authentication + // error. Even if + // [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos] + // succeeds, individual photos in the batch may have failures. + // These failures are specified in each + // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] + // in + // [BatchUpdatePhotosResponse.results][google.streetview.publish.v1.BatchUpdatePhotosResponse.results]. + // See + // [UpdatePhoto][google.streetview.publish.v1.StreetViewPublishService.UpdatePhoto] + // for specific failures that can occur per photo. + // + // Only the fields specified in + // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask] + // field are used. If `updateMask` is not present, the update applies to all + // fields. + // + // The number of + // [UpdatePhotoRequest][google.streetview.publish.v1.UpdatePhotoRequest] + // messages in a + // [BatchUpdatePhotosRequest][google.streetview.publish.v1.BatchUpdatePhotosRequest] + // must not exceed 20. + // + // + rpc BatchUpdatePhotos(BatchUpdatePhotosRequest) + returns (BatchUpdatePhotosResponse) { + option (google.api.http) = { + post: "/v1/photos:batchUpdate" + body: "*" + }; } - // Deletes a photo and its metadata. + // Deletes a [Photo][google.streetview.publish.v1.Photo] and its metadata. // // This method returns the following error codes: // - // * `PERMISSION_DENIED` if the requesting user did not create the requested - // photo. - // * `NOT_FOUND` if the photo ID does not exist. + // * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if + // the requesting user did not create the requested photo. + // * [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the photo ID + // does not exist. rpc DeletePhoto(DeletePhotoRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/photo/{photo_id}" }; + option (google.api.http) = { + delete: "/v1/photo/{photo_id}" + }; } - // Deletes a list of photos and their metadata. - // - // Note that if `photos.batchDelete` fails, either critical fields - // are missing or there was an authentication error. - // Even if `photos.batchDelete` succeeds, there may have been - // failures for single photos in the batch. These failures will be specified - // in `BatchDeletePhotosResponse.status`. - // See `photo.update` for specific failures that will occur per photo. - rpc BatchDeletePhotos(BatchDeletePhotosRequest) returns (BatchDeletePhotosResponse) { - option (google.api.http) = { post: "/v1/photos:batchDelete" body: "*" }; + // Deletes a list of [Photos][google.streetview.publish.v1.Photo] and their + // metadata. + // + // Note that if + // [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos] + // fails, either critical fields are missing or there was an authentication + // error. Even if + // [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos] + // succeeds, individual photos in the batch may have failures. + // These failures are specified in each + // [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] + // in + // [BatchDeletePhotosResponse.results][google.streetview.publish.v1.BatchDeletePhotosResponse.status]. + // See + // [DeletePhoto][google.streetview.publish.v1.StreetViewPublishService.DeletePhoto] + // for specific failures that can occur per photo. + rpc BatchDeletePhotos(BatchDeletePhotosRequest) + returns (BatchDeletePhotosResponse) { + option (google.api.http) = { + post: "/v1/photos:batchDelete" + body: "*" + }; } } diff --git a/google/type/BUILD.bazel b/google/type/BUILD.bazel new file mode 100644 index 000000000..df40256a1 --- /dev/null +++ b/google/type/BUILD.bazel @@ -0,0 +1,219 @@ +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +proto_library( + name = "calendar_period_proto", + srcs = ["calendar_period.proto"], +) + +proto_library( + name = "color_proto", + srcs = ["color.proto"], + deps = [ + "@com_google_protobuf//:wrappers_proto", + ], +) + +proto_library( + name = "date_proto", + srcs = ["date.proto"], +) + +proto_library( + name = "dayofweek_proto", + srcs = ["dayofweek.proto"], +) + +proto_library( + name = "expr_proto", + srcs = ["expr.proto"], +) + +proto_library( + name = "fraction_proto", + srcs = ["fraction.proto"], +) + +proto_library( + name = "latlng_proto", + srcs = ["latlng.proto"], +) + +proto_library( + name = "money_proto", + srcs = ["money.proto"], +) + +proto_library( + name = "postal_address_proto", + srcs = ["postal_address.proto"], +) + +proto_library( + name = "quaternion_proto", + srcs = ["quaternion.proto"], +) + +proto_library( + name = "timeofday_proto", + srcs = ["timeofday.proto"], +) + +############################################################################## +# Java +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "java_proto_library") + +java_proto_library( + name = "type_java_proto", + deps = [ + ":calendar_period_proto", + ":color_proto", + ":date_proto", + ":dayofweek_proto", + ":expr_proto", + ":fraction_proto", + ":latlng_proto", + ":money_proto", + ":postal_address_proto", + ":quaternion_proto", + ":timeofday_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library") + +go_proto_library( + name = "calendar_period_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/calendarperiod", + protos = [":calendar_period_proto"], +) + +go_proto_library( + name = "color_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/color", + protos = [":color_proto"], +) + +go_proto_library( + name = "date_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/date", + protos = [":date_proto"], +) + +go_proto_library( + name = "dayofweek_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/dayofweek", + protos = [":dayofweek_proto"], +) + +go_proto_library( + name = "expr_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/expr", + protos = [":expr_proto"], +) + +go_proto_library( + name = "fraction_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/fraction", + protos = [":fraction_proto"], +) + +go_proto_library( + name = "latlng_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/latlng", + protos = [":latlng_proto"], +) + +go_proto_library( + name = "money_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/money", + protos = [":money_proto"], +) + +go_proto_library( + name = "postaladdress_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/postaladdress", + protos = [":postal_address_proto"], +) + +go_proto_library( + name = "quaternion_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/quaternion", + protos = [":quaternion_proto"], +) + +go_proto_library( + name = "timeofday_go_proto", + importpath = "google.golang.org/genproto/googleapis/type/timeofday", + protos = [":timeofday_proto"], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_proto_library", +) + +cc_proto_library( + name = "calendar_period_cc_proto", + deps = [":calendar_period_proto"], +) + +cc_proto_library( + name = "color_cc_proto", + deps = [":color_proto"], +) + +cc_proto_library( + name = "date_cc_proto", + deps = [":date_proto"], +) + +cc_proto_library( + name = "dayofweek_cc_proto", + deps = [":dayofweek_proto"], +) + +cc_proto_library( + name = "expr_cc_proto", + deps = [":expr_proto"], +) + +cc_proto_library( + name = "fraction_cc_proto", + deps = [":fraction_proto"], +) + +cc_proto_library( + name = "latlng_cc_proto", + deps = [":latlng_proto"], +) + +cc_proto_library( + name = "money_cc_proto", + deps = [":money_proto"], +) + +cc_proto_library( + name = "postal_address_cc_proto", + deps = [":postal_address_proto"], +) + +cc_proto_library( + name = "quaternion_cc_proto", + deps = [":quaternion_proto"], +) + +cc_proto_library( + name = "timeofday_cc_proto", + deps = [":timeofday_proto"], +) diff --git a/google/type/calendar_period.proto b/google/type/calendar_period.proto new file mode 100644 index 000000000..455b4c364 --- /dev/null +++ b/google/type/calendar_period.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.type; + +option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod"; +option java_multiple_files = true; +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. +enum CalendarPeriod { + // Undefined period, raises an error. + CALENDAR_PERIOD_UNSPECIFIED = 0; + + // A day. + DAY = 1; + + // A week. Weeks begin on Monday, following + // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). + WEEK = 2; + + // A fortnight. The first calendar fortnight of the year begins at the start + // of week 1 according to + // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). + FORTNIGHT = 3; + + // A month. + MONTH = 4; + + // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each + // year. + QUARTER = 5; + + // A half-year. Half-years start on dates 1-Jan and 1-Jul. + HALF = 6; + + // A year. + YEAR = 7; +} diff --git a/google/type/color.proto b/google/type/color.proto index 2856ce91e..7982c8b05 100644 --- a/google/type/color.proto +++ b/google/type/color.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,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,6 +19,7 @@ package google.type; import "google/protobuf/wrappers.proto"; +option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/type/color;color"; option java_multiple_files = true; option java_outer_classname = "ColorProto"; @@ -31,7 +33,12 @@ option objc_class_prefix = "GTP"; // can be trivially provided to the constructor of "java.awt.Color" in Java; it // can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" // method in iOS; and, with just a little work, it can be easily formatted into -// a CSS "rgba()" string in JavaScript, as well. Here are some examples: +// a CSS "rgba()" string in JavaScript, as well. +// +// Note: this proto does not carry information about the absolute color space +// that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, +// DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color +// space. // // Example (Java): // @@ -93,7 +100,7 @@ option objc_class_prefix = "GTP"; // if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { // return nil; // } -// Color* result = [Color alloc] init]; +// Color* result = [[Color alloc] init]; // [result setRed:red]; // [result setGreen:green]; // [result setBlue:blue]; diff --git a/google/type/date.proto b/google/type/date.proto index d873ed462..630f620be 100644 --- a/google/type/date.proto +++ b/google/type/date.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,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"; @@ -24,22 +25,27 @@ option java_package = "com.google.type"; option objc_class_prefix = "GTP"; -// Represents a whole calendar date, e.g. date of birth. The time of day and -// time zone are either specified elsewhere or are not significant. The date -// is relative to the Proleptic Gregorian Calendar. The day may be 0 to -// represent a year and month where the day is not significant, e.g. credit card -// expiration date. The year may be 0 to represent a month and day independent -// of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] -// and `google.protobuf.Timestamp`. +// 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: +// +// * A full date, with non-zero year, month and day values +// * A month and day value, with a zero year, e.g. an anniversary +// * A year on its own, with zero month and day values +// * A year and month value, with a zero day, e.g. a credit card expiration date +// +// Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. message Date { // Year of date. Must be from 1 to 9999, or 0 if specifying a date without // a year. int32 year = 1; - // Month of year. Must be from 1 to 12. + // Month of year. Must be from 1 to 12, or 0 if specifying a year without a + // month and day. int32 month = 2; // Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - // if specifying a year/month where the day is not significant. + // if specifying a year by itself or a year and month where the day is not + // significant. int32 day = 3; } diff --git a/google/type/dayofweek.proto b/google/type/dayofweek.proto index 4eaa9e729..951ec247e 100644 --- a/google/type/dayofweek.proto +++ b/google/type/dayofweek.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,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/type/expr.proto b/google/type/expr.proto new file mode 100644 index 000000000..444742513 --- /dev/null +++ b/google/type/expr.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.type; + +option go_package = "google.golang.org/genproto/googleapis/type/expr;expr"; +option java_multiple_files = true; +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" +// description: "Determines whether the request has a user account" +// expression: "size(request.user) > 0" +message Expr { + // Textual representation of an expression in + // Common Expression Language syntax. + // + // The application context of the containing message determines which + // well-known feature set of CEL is supported. + string expression = 1; + + // An optional title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. + string title = 2; + + // An optional description of the expression. This is a longer text which + // describes the expression, e.g. when hovered over it in a UI. + string description = 3; + + // An optional string indicating the location of the expression for error + // reporting, e.g. a file name and a position in the file. + string location = 4; +} diff --git a/google/type/fraction.proto b/google/type/fraction.proto new file mode 100644 index 000000000..031518884 --- /dev/null +++ b/google/type/fraction.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.type; + +option go_package = "google.golang.org/genproto/googleapis/type/fraction;fraction"; +option java_multiple_files = true; +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. + int64 numerator = 1; + + // The value by which the numerator is divided, e.g. 3 in 2/3. Must be + // positive. + int64 denominator = 2; +} diff --git a/google/type/latlng.proto b/google/type/latlng.proto index 4e8c65d22..8aec8c0a0 100644 --- a/google/type/latlng.proto +++ b/google/type/latlng.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/latlng;latlng"; option java_multiple_files = true; option java_outer_classname = "LatLngProto"; @@ -28,40 +30,6 @@ option objc_class_prefix = "GTP"; // specified otherwise, this must conform to the // WGS84 // standard. Values must be within normalized ranges. -// -// Example of normalization code in Python: -// -// def NormalizeLongitude(longitude): -// """Wraps decimal degrees longitude to [-180.0, 180.0].""" -// q, r = divmod(longitude, 360.0) -// if r > 180.0 or (r == 180.0 and q <= -1.0): -// return r - 360.0 -// return r -// -// def NormalizeLatLng(latitude, longitude): -// """Wraps decimal degrees latitude and longitude to -// [-90.0, 90.0] and [-180.0, 180.0], respectively.""" -// r = latitude % 360.0 -// if r <= 90.0: -// return r, NormalizeLongitude(longitude) -// elif r >= 270.0: -// return r - 360, NormalizeLongitude(longitude) -// else: -// return 180 - r, NormalizeLongitude(longitude + 180.0) -// -// assert 180.0 == NormalizeLongitude(180.0) -// assert -180.0 == NormalizeLongitude(-180.0) -// assert -179.0 == NormalizeLongitude(181.0) -// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) -// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) -// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) -// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) -// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) -// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) -// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) -// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) -// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) -// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) message LatLng { // The latitude in degrees. It must be in the range [-90.0, +90.0]. double latitude = 1; diff --git a/google/type/money.proto b/google/type/money.proto index 154acc9f2..dd39c540c 100644 --- a/google/type/money.proto +++ b/google/type/money.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/money;money"; option java_multiple_files = true; option java_outer_classname = "MoneyProto"; diff --git a/google/type/postal_address.proto b/google/type/postal_address.proto index b08b61726..f36150501 100644 --- a/google/type/postal_address.proto +++ b/google/type/postal_address.proto @@ -22,7 +22,6 @@ option java_outer_classname = "PostalAddressProto"; option java_package = "com.google.type"; option objc_class_prefix = "GTP"; - // Represents a postal address, e.g. for postal delivery or payments addresses. // Given a postal address, a postal service can deliver items to a premise, P.O. // Box or similar. @@ -34,7 +33,7 @@ option objc_class_prefix = "GTP"; // // Advice on address input / editing: // - Use an i18n-ready address widget such as -// https://github.com/googlei18n/libaddressinput) +// https://github.com/google/libaddressinput) // - Users should not be presented with UI elements for input or editing of // fields outside countries where that field is used. // diff --git a/google/type/quaternion.proto b/google/type/quaternion.proto new file mode 100644 index 000000000..9d0d98e00 --- /dev/null +++ b/google/type/quaternion.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; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion"; +option java_multiple_files = true; +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). +// +// Quaternions are often used in calculations involving three-dimensional +// rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation), +// as they provide greater mathematical robustness by avoiding the gimbal lock +// problems that can be encountered when using Euler angles +// (https://en.wikipedia.org/wiki/Gimbal_lock). +// +// Quaternions are generally represented in this form: +// +// 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 +// 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. +// +// 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 +// (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 +// +// 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). +// - Unit (or normalized) quaternion: a quaternion whose norm is 1. +// - 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. +// +// A quaternion can be normalized by dividing it by its norm. The resulting +// quaternion maintains the same direction, but has a norm of 1, i.e. it moves +// on the unit sphere. This is generally necessary for rotation and orientation +// 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. +// +// +// Next available tag: 5 +message Quaternion { + // The x component. + double x = 1; + + // The y component. + double y = 2; + + // The z component. + double z = 3; + + // The scalar component. + double w = 4; +} diff --git a/google/type/timeofday.proto b/google/type/timeofday.proto index b130256e2..b8d43122b 100644 --- a/google/type/timeofday.proto +++ b/google/type/timeofday.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/timeofday;timeofday"; option java_multiple_files = true; option java_outer_classname = "TimeOfDayProto"; @@ -24,7 +26,7 @@ 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 chose to allow leap seconds. Related +// 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`. message TimeOfDay { // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose diff --git a/google/type/type.yaml b/google/type/type.yaml new file mode 100644 index 000000000..726216cbf --- /dev/null +++ b/google/type/type.yaml @@ -0,0 +1,33 @@ +type: google.api.Service +config_version: 1 +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 + +enums: + - name: google.type.CalendarPeriod + - name: google.type.DayOfWeek + +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#. + + 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/google/watcher/v1/watch.proto b/google/watcher/v1/watch.proto index b7d1a0bfc..644439827 100644 --- a/google/watcher/v1/watch.proto +++ b/google/watcher/v1/watch.proto @@ -160,14 +160,15 @@ option java_package = "com.google.watcher.v1"; // not deliver any messages for the descendants until the parent // has been recreated. - // The service that a client uses to connect to the watcher system. // The errors returned by the service are in the canonical error space, // see [google.rpc.Code][]. service Watcher { // Start a streaming RPC to get watch information from the server. rpc Watch(Request) returns (stream ChangeBatch) { - option (google.api.http) = { get: "/v1/watch" }; + option (google.api.http) = { + get: "/v1/watch" + }; } } @@ -267,15 +268,15 @@ message Change { State state = 2; // The actual change data. This field is present only when `state() == EXISTS` - // or `state() == ERROR`. Please see [google.protobuf.Any][google.protobuf.Any] about how to use - // the Any type. + // or `state() == ERROR`. Please see + // [google.protobuf.Any][google.protobuf.Any] about how to use the Any type. google.protobuf.Any data = 6; // If present, provides a compact representation of all the messages that have // been received by the caller for the given entity, e.g., it could be a // sequence number or a multi-part timestamp/version vector. This marker can - // be provided in the Request message, allowing the caller to resume the stream - // watching at a specific point without fetching the initial state. + // be provided in the Request message, allowing the caller to resume the + // stream watching at a specific point without fetching the initial state. bytes resume_marker = 4; // If true, this Change is followed by more Changes that are in the same group diff --git a/google/container/artman_container.yaml b/grafeas/artman_grafeas_v1.yaml similarity index 70% rename from google/container/artman_container.yaml rename to grafeas/artman_grafeas_v1.yaml index c02821a9b..26a297f67 100644 --- a/google/container/artman_container.yaml +++ b/grafeas/artman_grafeas_v1.yaml @@ -1,13 +1,14 @@ common: - api_name: container + api_name: grafeas api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos + - name: google-iam-v1 src_proto_paths: - v1 - service_yaml: container.yaml - gapic_yaml: v1/container_gapic.yaml + service_yaml: grafeas_v1.yaml + gapic_yaml: v1/grafeas_gapic.yaml artifacts: - name: gapic_config type: GAPIC_CONFIG @@ -19,16 +20,16 @@ artifacts: type: GITHUB location: git@github.com:googleapis/api-client-staging.git directory_mappings: - - dest: generated/java/gapic-google-cloud-container-v1 + - dest: generated/java/gapic-google-cloud-grafeas-v1 - name: grpc - dest: generated/java/grpc-google-cloud-container-v1 + dest: generated/java/grpc-google-cloud-grafeas-v1 - name: proto - dest: generated/java/proto-google-cloud-container-v1 + dest: generated/java/proto-google-cloud-grafeas-v1 - name: java type: GITHUB location: git@github.com:GoogleCloudPlatform/google-cloud-java.git directory_mappings: - - dest: google-cloud-container + - dest: google-cloud-grafeas - name: python_gapic type: GAPIC language: PYTHON @@ -43,7 +44,7 @@ artifacts: type: GITHUB location: git@github.com:googleapis/api-client-staging.git directory_mappings: - - dest: generated/php/google-cloud-container-v1 + - dest: generated/php/google-cloud-grafeas-v1 - name: go_gapic type: GAPIC language: GO diff --git a/grafeas/grafeas_v1.yaml b/grafeas/grafeas_v1.yaml new file mode 100644 index 000000000..6b0589789 --- /dev/null +++ b/grafeas/grafeas_v1.yaml @@ -0,0 +1,53 @@ +type: google.api.Service +config_version: 3 +name: containeranalysis.googleapis.com +title: Container Analysis API + +apis: +- name: grafeas.v1.Grafeas + +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: grafeas.v1.Grafeas.GetOccurrence + deadline: 30.0 + - selector: grafeas.v1.Grafeas.ListOccurrences + deadline: 30.0 + - selector: grafeas.v1.Grafeas.DeleteOccurrence + deadline: 30.0 + - selector: grafeas.v1.Grafeas.CreateOccurrence + deadline: 30.0 + - selector: grafeas.v1.Grafeas.BatchCreateOccurrences + deadline: 30.0 + - selector: grafeas.v1.Grafeas.UpdateOccurrence + deadline: 30.0 + - selector: grafeas.v1.Grafeas.GetOccurrenceNote + deadline: 30.0 + - selector: grafeas.v1.Grafeas.GetNote + deadline: 30.0 + - selector: grafeas.v1.Grafeas.ListNotes + deadline: 30.0 + - selector: grafeas.v1.Grafeas.DeleteNote + deadline: 30.0 + - selector: grafeas.v1.Grafeas.CreateNote + deadline: 30.0 + - selector: grafeas.v1.Grafeas.BatchCreateNotes + deadline: 30.0 + - selector: grafeas.v1.Grafeas.UpdateNote + deadline: 30.0 + - selector: grafeas.v1.Grafeas.ListNoteOccurrences + deadline: 30.0 + +authentication: + rules: + - selector: '*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/grafeas/v1/attestation.proto b/grafeas/v1/attestation.proto new file mode 100644 index 000000000..61423d3eb --- /dev/null +++ b/grafeas/v1/attestation.proto @@ -0,0 +1,73 @@ +// 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 "grafeas/v1/common.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 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. + +// 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 +// 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 AttestationNote { + // 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 + // 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 + // verify. + message Hint { + // Required. The human readable name of this attestation authority, for + // example "qa". + string human_readable_name = 1; + } + + // Hint hints at the purpose of the attestation authority. + Hint hint = 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 authority to which +// this attestation is attached is primarily useful for lookup (how to find +// this attestation if you already know the authority and artifact to be +// verified) and intent (for which authority this attestation was intended to +// sign. +message AttestationOccurrence { + // Required. The serialized payload that is verified by one or more + // `signatures`. + bytes serialized_payload = 1; + // 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 = 2; +} diff --git a/grafeas/v1/build.proto b/grafeas/v1/build.proto new file mode 100644 index 000000000..c0e9c7566 --- /dev/null +++ b/grafeas/v1/build.proto @@ -0,0 +1,50 @@ +// 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 "grafeas/v1/provenance.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"; + +// Note holding the version of the provider's builder and the signature of the +// provenance message in the build details occurrence. +message BuildNote { + // Required. Immutable. Version of the builder which produced this build. + string builder_version = 1; +} + +// Details of a build occurrence. +message BuildOccurrence { + // Required. The actual provenance for the build. + grafeas.v1.BuildProvenance provenance = 1; + + // Serialized JSON representation of the provenance, used in generating 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 + // 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; +} diff --git a/grafeas/v1/common.proto b/grafeas/v1/common.proto new file mode 100644 index 000000000..846948a52 --- /dev/null +++ b/grafeas/v1/common.proto @@ -0,0 +1,101 @@ +// 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; + +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"; + +// Kind represents the kinds of notes supported. +enum NoteKind { + // Unknown. + NOTE_KIND_UNSPECIFIED = 0; + // The note and occurrence represent a package vulnerability. + VULNERABILITY = 1; + // The note and occurrence assert build provenance. + BUILD = 2; + // This represents an image basis relationship. + IMAGE = 3; + // This represents a package installed via a package manager. + PACKAGE = 4; + // The note and occurrence track deployment events. + DEPLOYMENT = 5; + // The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6; + // This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7; +} + +// Metadata for any related URL information. +message RelatedUrl { + // Specific URL associated with the resource. + string url = 1; + // 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/grafeas/v1/cvss.proto b/grafeas/v1/cvss.proto new file mode 100644 index 000000000..b41cd633d --- /dev/null +++ b/grafeas/v1/cvss.proto @@ -0,0 +1,85 @@ +// 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; + +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"; + +// 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/grafeas/v1/deployment.proto b/grafeas/v1/deployment.proto new file mode 100644 index 000000000..5204004fd --- /dev/null +++ b/grafeas/v1/deployment.proto @@ -0,0 +1,66 @@ +// 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"; + +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 artifact that can be deployed in some runtime. +message DeploymentNote { + // Required. Resource URI for the artifact being deployed. + repeated string resource_uri = 1; +} + +// The period during which some deployable was active in a runtime. +message DeploymentOccurrence { + // Identity of the user that triggered this deployment. + string user_email = 1; + + // Required. 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 = 4; + + // 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; + + // 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; + } + // Platform hosting this deployment. + Platform platform = 7; +} diff --git a/grafeas/v1/discovery.proto b/grafeas/v1/discovery.proto new file mode 100644 index 000000000..ba8034d38 --- /dev/null +++ b/grafeas/v1/discovery.proto @@ -0,0 +1,76 @@ +// 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/rpc/status.proto"; +import "grafeas/v1/common.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"; + +// 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. +message DiscoveryNote { + // Required. Immutable. The kind of analysis that is handled by this + // discovery. + grafeas.v1.NoteKind analysis_kind = 1; +} + +// Provides information about the analysis status of a discovered resource. +message DiscoveryOccurrence { + // Whether the resource is continuously analyzed. + enum ContinuousAnalysis { + // Unknown. + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + // The resource is continuously analyzed. + ACTIVE = 1; + // The resource is ignored for continuous analysis. + INACTIVE = 2; + } + + // Whether the resource is continuously analyzed. + ContinuousAnalysis continuous_analysis = 1; + + // Analysis status for a resource. Currently for initial analysis only (not + // updated in continuous analysis). + 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; + // The resource is known not to be supported + FINISHED_UNSUPPORTED = 5; + } + + // The status of discovery for the resource. + AnalysisStatus analysis_status = 2; + + // When an error is encountered this will contain a LocalizedMessage under + // details to show to the user. The LocalizedMessage is output only and + // populated by the API. + google.rpc.Status analysis_status_error = 3; +} diff --git a/grafeas/v1/grafeas.proto b/grafeas/v1/grafeas.proto new file mode 100644 index 000000000..1364b2aae --- /dev/null +++ b/grafeas/v1/grafeas.proto @@ -0,0 +1,452 @@ +// 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/api/annotations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "grafeas/v1/attestation.proto"; +import "grafeas/v1/build.proto"; +import "grafeas/v1/common.proto"; +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/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"; + +// [Grafeas](https://grafeas.io) API. +// +// Retrieves analysis results of Cloud components such as Docker container +// images. +// +// Analysis results are stored as a series of occurrences. An `Occurrence` +// contains information about a specific analysis instance on a resource. An +// occurrence refers to a `Note`. A note contains details describing the +// analysis and is generally stored in a separate project, called a `Provider`. +// Multiple occurrences can refer to the same note. +// +// For example, an SSL vulnerability could affect multiple images. In this case, +// there would be one note for the vulnerability and an occurrence for each +// image with the vulnerability referring to that note. +service Grafeas { + // Gets the specified occurrence. + rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}" + }; + } + + // Lists occurrences for the specified project. + rpc ListOccurrences(ListOccurrencesRequest) + returns (ListOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/occurrences" + }; + } + + // Deletes the specified occurrence. For example, use this method to delete an + // occurrence when the occurrence is no longer applicable for the given + // resource. + rpc DeleteOccurrence(DeleteOccurrenceRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/occurrences/*}" + }; + } + + // Creates a new occurrence. + rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences" + body: "occurrence" + }; + } + + // Creates new occurrences in batch. + rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) + returns (BatchCreateOccurrencesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/occurrences:batchCreate" + body: "*" + }; + } + + // Updates the specified occurrence. + rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/occurrences/*}" + body: "occurrence" + }; + } + + // Gets the note attached to the specified occurrence. Consumer projects can + // use this method to get a note that belongs to a provider project. + rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/occurrences/*}/notes" + }; + } + + // Gets the specified note. + rpc GetNote(GetNoteRequest) returns (Note) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}" + }; + } + + // Lists notes for the specified project. + rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/notes" + }; + } + + // Deletes the specified note. + rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/notes/*}" + }; + } + + // Creates a new note. + rpc CreateNote(CreateNoteRequest) returns (Note) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes" + body: "note" + }; + } + + // Creates new notes in batch. + rpc BatchCreateNotes(BatchCreateNotesRequest) + returns (BatchCreateNotesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/notes:batchCreate" + body: "*" + }; + } + + // Updates the specified note. + rpc UpdateNote(UpdateNoteRequest) returns (Note) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/notes/*}" + body: "note" + }; + } + + // Lists occurrences referencing the specified note. Provider projects can use + // this method to get all occurrences across consumer projects referencing the + // specified note. + rpc ListNoteOccurrences(ListNoteOccurrencesRequest) + returns (ListNoteOccurrencesResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/notes/*}/occurrences" + }; + } +} + +// An instance of an analysis type that has been found on a resource. +message Occurrence { + // Output only. The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; + + // Required. Immutable. A URI that represents the resource for which the + // occurrence applies. For example, + // `https://gcr.io/project/image@sha256:123abc` for a Docker image. + string resource_uri = 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. + 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. + grafeas.v1.NoteKind kind = 4; + + // 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 = 6; + + // Output only. The time this occurrence was last updated. + google.protobuf.Timestamp update_time = 7; + + // Required. Immutable. Describes the details of the note kind found on this + // resource. + oneof details { + // Describes a security vulnerability. + grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + // Describes a verifiable build. + grafeas.v1.BuildOccurrence build = 9; + // Describes how this resource derives from the basis in the associated + // note. + grafeas.v1.ImageOccurrence image = 10; + // Describes the installation of a package on the linked resource. + grafeas.v1.PackageOccurrence package = 11; + // Describes the deployment of an artifact on a runtime. + grafeas.v1.DeploymentOccurrence deployment = 12; + // Describes when a resource was discovered. + grafeas.v1.DiscoveryOccurrence discovery = 13; + // Describes an attestation of an artifact. + grafeas.v1.AttestationOccurrence attestation = 14; + } +} + +// A type of analysis that can be done for a resource. +message Note { + // Output only. The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + + // A one sentence description of this note. + string short_description = 2; + + // A detailed description of this note. + string long_description = 3; + + // Output only. The type of analysis. This field can be used as a filter in + // list requests. + grafeas.v1.NoteKind kind = 4; + + // URLs associated with this note. + repeated grafeas.v1.RelatedUrl related_url = 5; + + // Time of expiration for this note. Empty if note does not expire. + google.protobuf.Timestamp expiration_time = 6; + + // Output only. The time this note was created. This field can be used as a + // filter in list requests. + google.protobuf.Timestamp create_time = 7; + + // 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 = 8; + + // Other notes related to this note. + repeated string related_note_names = 9; + + // Required. Immutable. The type of analysis this note represents. + oneof type { + // A note describing a package vulnerability. + grafeas.v1.VulnerabilityNote vulnerability = 10; + // A note describing build provenance for a verifiable build. + grafeas.v1.BuildNote build = 11; + // A note describing a base image. + grafeas.v1.ImageNote image = 12; + // A note describing a package hosted by various package managers. + grafeas.v1.PackageNote package = 13; + // A note describing something that can be deployed. + grafeas.v1.DeploymentNote deployment = 14; + // A note describing the initial analysis of a resource. + grafeas.v1.DiscoveryNote discovery = 15; + // A note describing an attestation role. + grafeas.v1.AttestationNote attestation = 16; + } +} + +// Request to get an occurrence. +message GetOccurrenceRequest { + // The name of the occurrence in the form of + // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + string name = 1; +} + +// 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; + + // The filter expression. + string filter = 2; + + // Number of occurrences to return in the list. Must be positive. Max allowed + // page size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing 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 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; + // The occurrence to create. + Occurrence occurrence = 2; +} + +// 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; + // 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 + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; +} + +// 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; +} + +// 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; + + // The filter expression. + string filter = 2; + + // Number of notes to return in the list. Must be positive. Max allowed page + // size is 1000. If not specified, page size defaults to 20. + int32 page_size = 3; + + // Token to provide to skip to a particular spot in the list. + string page_token = 4; +} + +// Response for listing notes. +message ListNotesResponse { + // The notes 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 + // results. + string next_page_token = 2; +} + +// Request to delete a note. +message DeleteNoteRequest { + // The name of the note in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; +} + +// 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; + // The ID to use for this note. + string note_id = 2; + // The note to create. + Note note = 3; +} + +// 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; + // The updated note. + Note note = 2; + // The fields to update. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to list occurrences for a note. +message ListNoteOccurrencesRequest { + // The name of the note to list occurrences for in the form of + // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + string name = 1; + // 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; +} + +// Response for listing occurrences for a note. +message ListNoteOccurrencesResponse { + // The occurrences attached to the specified note. + repeated Occurrence occurrences = 1; + // Token to provide to skip to a particular spot in the list. + string next_page_token = 2; +} + +// Request to create notes in batch. +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; + + // The notes to create. Max allowed length is 1000. + map notes = 2; +} + +// Response for creating notes in batch. +message BatchCreateNotesResponse { + // The notes that were created. + repeated Note notes = 1; +} + +// Request to create occurrences in batch. +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; + + // The occurrences to create. Max allowed length is 1000. + repeated Occurrence occurrences = 2; +} + +// Response for creating occurrences in batch. +message BatchCreateOccurrencesResponse { + // The occurrences that were created. + repeated Occurrence occurrences = 1; +} diff --git a/grafeas/v1/grafeas_gapic.yaml b/grafeas/v1/grafeas_gapic.yaml new file mode 100644 index 000000000..af61e33eb --- /dev/null +++ b/grafeas/v1/grafeas_gapic.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/image.proto b/grafeas/v1/image.proto new file mode 100644 index 000000000..9ac162cec --- /dev/null +++ b/grafeas/v1/image.proto @@ -0,0 +1,83 @@ +// 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; + +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"; + +// Layer holds metadata specific to a layer of a Docker image. +message Layer { + // Required. The recovered Dockerfile directive used to construct this layer. + // See https://docs.docker.com/engine/reference/builder/ for more information. + string 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 { + // Required. The layer ID of the final layer in the Docker image's v1 + // representation. + string v1_name = 1; + + // 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: + // [bottom] := v2_blob[bottom] + // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + // Only the name of the final blob is kept. + 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 ImageNote { + // Required. Immutable. The resource_url for the resource representing the + // basis of associated occurrence images. + string resource_url = 1; + + // Required. Immutable. The fingerprint of the base image. + Fingerprint fingerprint = 2; +} + +// Details of the derived image portion of the DockerImage relationship. This +// image would be produced from a Dockerfile with FROM . +message ImageOccurrence { + // Required. 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. + int32 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/grafeas/v1/package.proto b/grafeas/v1/package.proto new file mode 100644 index 000000000..b04686d9f --- /dev/null +++ b/grafeas/v1/package.proto @@ -0,0 +1,124 @@ +// 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; + +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"; + +// Instruction set architectures supported by various package managers. +enum Architecture { + // Unknown architecture. + ARCHITECTURE_UNSPECIFIED = 0; + // X86 architecture. + X86 = 1; + // X64 architecture. + X64 = 2; +} + +// This represents a particular channel of distribution for a given package. +// E.g., Debian's jessie-backports dpkg mirror. +message Distribution { + // Required. 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. + 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 = 5; + + // The distribution channel-specific description of this package. + string description = 6; +} + +// 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 { + // Required. 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. + 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 PackageNote { + // Required. Immutable. The name of the package. + string name = 1; + + // The various channels by which a package is distributed. + repeated Distribution distribution = 10; +} + +// Details on how a particular software package was installed on a system. +message PackageOccurrence { + // Output only. The name of the installed package. + string name = 1; + + // Required. All of the places within the filesystem versions of this package + // have been found. + repeated Location location = 2; +} + +// Version contains structured information about the version of a package. +message Version { + // Used to correct mistakes in the version numbering scheme. + int32 epoch = 1; + + // 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; + + // Whether this is an ordinary package version or a sentinel MIN/MAX version. + enum VersionKind { + // Unknown. + VERSION_KIND_UNSPECIFIED = 0; + // A standard package version. + NORMAL = 1; + // A special version representing negative infinity. + MINIMUM = 2; + // A special version representing positive infinity. + MAXIMUM = 3; + }; + + // Required. Distinguishes between sentinel MIN/MAX versions and normal + // versions. + VersionKind kind = 4; + + // Human readable version string. This string is of the form + // :- and is only set when kind is NORMAL. + string full_name = 5; +} diff --git a/grafeas/v1/provenance.proto b/grafeas/v1/provenance.proto new file mode 100644 index 000000000..06b109785 --- /dev/null +++ b/grafeas/v1/provenance.proto @@ -0,0 +1,265 @@ +// 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"; + +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"; + +// Provenance of a build. Contains all information needed to verify the full +// details about the build from source to completion. +message BuildProvenance { + // Required. Unique identifier of the build. + string id = 1; + + // ID of the project. + string project_id = 2; + + // Commands requested by the build. + repeated Command commands = 3; + + // Output of the build. + repeated Artifact built_artifacts = 4; + + // Time at which the build was created. + google.protobuf.Timestamp create_time = 5; + + // Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 6; + + // Time at which execution of the build was finished. + google.protobuf.Timestamp end_time = 7; + + // 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 = 8; + + // URI where any logs for this provenance were written. + string logs_uri = 9; + + // Details of the Source input to the build. + Source source_provenance = 10; + + // Trigger identifier if the build was triggered automatically; empty if not. + string trigger_id = 11; + + // Special options applied to this build. This is a catch-all field where + // build providers can enter any desired additional details. + map build_options = 12; + + // Version string of the builder at the time this build was executed. + string builder_version = 13; +} + +// Source describes the location of the source used for the build. +message Source { + // If provided, the input binary artifacts for the build came from this + // location. + string artifact_storage_source_uri = 1; + + // 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 = 2; + + // If provided, the source code used for the build came from this location. + SourceContext context = 3; + + // 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 = 4; +} + +// Container message for hashes of byte content of files, used in source +// messages to verify integrity of source input to the build. +message FileHashes { + // Required. Collection of file hashes. + repeated Hash file_hash = 1; +} + +// Container message for hash values. +message Hash { + // Required. The type of hash that was performed, e.g. "SHA-256". + string type = 1; + // Required. The hash value. + bytes value = 2; +} + +// Command describes a step performed as part of the build pipeline. +message Command { + // 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. + 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 { + // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + // container. + string checksum = 1; + + // Artifact ID, if any; for container images, this will be a URL by digest + // like `gcr.io/projectID/imagename@sha256:123456`. + string id = 2; + + // 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 = 3; +} + +// 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; + + // 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/grafeas/v1/vulnerability.proto b/grafeas/v1/vulnerability.proto new file mode 100644 index 000000000..27a5d238b --- /dev/null +++ b/grafeas/v1/vulnerability.proto @@ -0,0 +1,216 @@ +// 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 "grafeas/v1/common.proto"; +import "grafeas/v1/cvss.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"; + +// Note provider assigned severity/impact ranking. +enum Severity { + // Unknown. + SEVERITY_UNSPECIFIED = 0; + // Minimal severity. + MINIMAL = 1; + // Low severity. + LOW = 2; + // Medium severity. + MEDIUM = 3; + // High severity. + HIGH = 4; + // Critical severity. + CRITICAL = 5; +} + +// A security vulnerability that can be found in resources. +message VulnerabilityNote { + // 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 = 1; + + // The note provider assigned severity of this vulnerability. + Severity severity = 2; + + // Details of all known distros and packages affected by this vulnerability. + repeated Detail details = 3; + + // A detail for a distro and package affected by this vulnerability and its + // associated fix (if one is available). + message Detail { + // The distro assigned severity of this vulnerability. + string severity_name = 1; + + // A vendor-specific description of this vulnerability. + string description = 2; + + // The type of package; whether native or non native (e.g., ruby gems, + // node.js packages, etc.). + string package_type = 3; + + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string affected_cpe_uri = 4; + + // Required. The package this vulnerability affects. + string affected_package = 5; + + // The version number at the start of an interval in which this + // vulnerability exists. A vulnerability can affect a package between + // version numbers that are disjoint sets of intervals (example: + // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + // represented in its own Detail. If a specific affected version is provided + // by a vulnerability database, affected_version_start and + // affected_version_end will be the same in that Detail. + grafeas.v1.Version affected_version_start = 6; + + // The version number at the end of an interval in which this vulnerability + // exists. A vulnerability can affect a package between version numbers + // that are disjoint sets of intervals (example: [1.0.0-1.1.0], + // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + // own Detail. If a specific affected version is provided by a vulnerability + // database, affected_version_start and affected_version_end will be the + // same in that Detail. + grafeas.v1.Version affected_version_end = 7; + + // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + // to update to that contains a fix for this vulnerability. It is possible + // for this to be different from the affected_cpe_uri. + string fixed_cpe_uri = 8; + + // The distro recommended package to update to that contains a fix for this + // vulnerability. It is possible for this to be different from the + // affected_package. + string fixed_package = 9; + + // The distro recommended version to update to that contains a + // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + // such version is yet available. + grafeas.v1.Version fixed_version = 10; + + // Whether this detail is obsolete. Occurrences are expected not to point to + // obsolete details. + bool is_obsolete = 11; + } + + // The full description of the CVSSv3 for this vulnerability. + 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](https://cpe.mitre.org/specification/) this + // vulnerability affects. + string cpe_uri = 1; + + // Required. The name of this vulnerability. + string name = 2; + + // The description of this 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 + // KBs presence is considered a fix. + repeated KnowledgeBase fixing_kbs = 4; + + message KnowledgeBase { + // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + string name = 1; + // A link to the KB in the [Windows update catalog] + // (https://www.catalog.update.microsoft.com/). + string url = 2; + } + } +} + +// An occurrence of a severity vulnerability on a resource. +message VulnerabilityOccurrence { + // The type of package; whether native or non native (e.g., ruby gems, node.js + // packages, etc.). + string type = 1; + + // Output only. The note provider assigned severity of this vulnerability. + Severity severity = 2; + + // 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 = 3; + + // Required. The set of affected locations and their fixes (if available) + // within the associated resource. + repeated PackageIssue package_issue = 4; + + // A detail for a distro and package this vulnerability occurrence was found + // in and its associated fix (if one is available). + message PackageIssue { + // Required. The [CPE URI](https://cpe.mitre.org/specification/) this + // vulnerability was found in. + string affected_cpe_uri = 1; + + // Required. The package this vulnerability was found in. + string affected_package = 2; + + // Required. The version of the package that is installed on the resource + // affected by this vulnerability. + grafeas.v1.Version affected_version = 3; + + // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + // was fixed in. It is possible for this to be different from the + // affected_cpe_uri. + string fixed_cpe_uri = 4; + + // The package this vulnerability was fixed in. It is possible for this to + // be different from the affected_package. + string fixed_package = 5; + + // Required. The version of the package this vulnerability was fixed in. + // Setting this to VersionKind.MAXIMUM means no fix is yet available. + grafeas.v1.Version fixed_version = 6; + + // Output only. Whether a fix is available for this package. + bool fix_available = 7; + } + + // Output only. A one sentence description of this vulnerability. + string short_description = 5; + + // Output only. A detailed description of this vulnerability. + string long_description = 6; + + // Output only. URLs related to this vulnerability. + 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. + Severity effective_severity = 8; + + // Output only. Whether at least one of the affected packages has a fix + // available. + bool fix_available = 9; +} diff --git a/repository_rules.bzl b/repository_rules.bzl new file mode 100644 index 000000000..e75ea9160 --- /dev/null +++ b/repository_rules.bzl @@ -0,0 +1,222 @@ +"""Repository rules and macros which are expected to be called from WORKSPACE file of either +googleapis itself or any third_party repository which consumes googleapis as its dependency. +""" + +def _switched_rules_impl(ctx): + disabled_rule_script = """ +def {rule_name}(**kwargs): + pass +""" + enabled_native_rule_script = """ +{rule_name} = {native_rule_name} +""" + enabled_rule_script = """ +load("{file_label}", _{rule_name} = "{rule_name}") +""" + elabled_rule_scrip_alias = """ +{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(): + 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)) + rules.append(elabled_rule_scrip_alias.format(rule_name = rule_name)) + elif value.startswith("native."): + rules.append( + enabled_native_rule_script.format(rule_name = rule_name, native_rule_name = value), + ) + else: + rules.append(value) + + ctx.file("BUILD.bazel", "") + ctx.file("imports.bzl", "".join(load_rules + rules)) + +switched_rules = repository_rule( + implementation = _switched_rules_impl, + attrs = { + "rules": attr.string_dict( + allow_empty = True, + mandatory = False, + default = {}, + ), + }, +) + +def switched_rules_by_language( + name, + gapic = False, + grpc = False, + java = False, + go = False, + cc = False, + php = False, + nodejs = False, + python = False, + ruby = False, + csharp = False, + rules_override = {}): + """Switches rules in the generated imports.bzl between no-op and the actual implementation. + + This defines which language-specific rules (or client type specific, like grpc or gapic) should + be enabled during the build. All non-enabled language-specific rules will default to no-op + implementations. Examples of the language-specific rules are: java_gapic_library + (Java-specific), go_proto_library (Go-specific), proto_library_with_info (gapic-specific) etc. + Note, proto_library rule is always enabled. + + For example, to use this rule and enable Java and Go rules, add the following in the external + repository which imports com_google_googleapis repository and its corresponding dependencies: + + load("@com_google_googleapis//:repository_rules.bzl", "enabled_rules") + + enabled_rules( + name = "com_google_googleapis_imports", + grpc = True, + gapic = True, + go = True, + java = True, + ) + + Note, for build to work you should also import the language-specific transitive dependencies. + + Args: + name (str): name of a target, is expected to be "com_google_googleapis_imports". + gapic (bool): Enable GAPIC specific rules. The GAPIC rules are also language-specific, so + the actual enabled rules will be determined by the other language-specific arguments of + this rule. False by default. + grpc (bool): Enable gRPC specific rules. The gRPC rules are also language-specific, so + the actual enabled rules will be determined by the other language-specific arguments of + 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. + 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. + rules_override (dict): Custom rule overrides (for advanced usage). + """ + + rules = {} + + # + # Common + # + rules["proto_library_with_info"] = _switch( + gapic, + "@com_google_api_codegen//rules_gapic:gapic.bzl", + ) + + # + # Java + # + rules["java_proto_library"] = _switch( + java, + "native.java_proto_library", + ) + rules["java_grpc_library"] = _switch( + java and grpc, + "@io_grpc_grpc_java//:java_grpc_library.bzl", + ) + rules["java_gapic_library"] = _switch( + java and grpc and gapic, + "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", + ) + rules["java_resource_name_proto_library"] = _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", + ) + + # + # Go + # + rules["go_proto_library"] = _switch( + go, + "@io_bazel_rules_go//proto:def.bzl", + ) + rules["go_library"] = _switch( + go, + "@io_bazel_rules_go//go:def.bzl", + ) + rules["go_test"] = _switch( + go and grpc and gapic, + "@io_bazel_rules_go//go:def.bzl", + ) + rules["go_gapic_library"] = _switch( + go and grpc and gapic, + "@com_google_api_codegen//rules_gapic/go: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", + ) + + # + # C++ + # + rules["cc_proto_library"] = _switch( + cc, + "native.cc_proto_library", + ) + rules["cc_grpc_library"] = _switch( + 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", + ) + + # + # PHP + # + rules["php_proto_library"] = _switch( + php, + "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl", + ) + rules["php_grpc_library"] = _switch( + php and grpc, + "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl", + ) + rules["php_gapic_library"] = _switch( + php and grpc and gapic, + "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl", + ) + rules["php_gapic_assembly_pkg"] = _switch( + php and grpc and gapic, + "@com_google_api_codegen//rules_gapic/php:php_gapic_pkg.bzl", + ) + + # + # Node.js + # + rules["nodejs_gapic_library"] = _switch( + nodejs and grpc and gapic, + "@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic.bzl", + ) + rules["nodejs_gapic_assembly_pkg"] = _switch( + nodejs and grpc and gapic, + "@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic_pkg.bzl", + ) + + rules.update(rules_override) + + switched_rules( + name = name, + rules = rules, + ) + +def _switch(enabled, enabled_value): + return enabled_value if enabled else "" diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel deleted file mode 160000 index 886e7d753..000000000 --- a/third_party/boringssl-with-bazel +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 886e7d75368e3f4fab3f4d0d3584e4abfc557755 diff --git a/third_party/nanopb b/third_party/nanopb deleted file mode 160000 index ac6405b4b..000000000 --- a/third_party/nanopb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ac6405b4b8c7b3f449bd19bc3f8b84e6bc9fff77 diff --git a/third_party/protobuf b/third_party/protobuf deleted file mode 160000 index 593e917c1..000000000 --- a/third_party/protobuf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 593e917c176b5bc5aafa57bf9f6030d749d91cd5 diff --git a/third_party/zlib b/third_party/zlib deleted file mode 160000 index 8003d572d..000000000 --- a/third_party/zlib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8003d572d7a41438a37e58af14302c2c5928cdd5