Browse Source

project: updated

Yi 2 năm trước cách đây
mục cha
commit
288c1af4d3
100 tập tin đã thay đổi với 9561 bổ sung2 xóa
  1. 7 0
      Makefile
  2. 46 0
      backend/ops/fields.proto
  3. 16 0
      backend/ops/service.proto
  4. 3 0
      bin/protobuf.sh
  5. 9 0
      config/app.test.yaml
  6. 0 1
      go.mod
  7. 0 1
      go.sum
  8. 0 0
      google/BUILD.bazel
  9. 107 0
      google/actions/sdk/v2/BUILD.bazel
  10. 126 0
      google/actions/sdk/v2/account_linking.proto
  11. 35 0
      google/actions/sdk/v2/account_linking_secret.proto
  12. 103 0
      google/actions/sdk/v2/action.proto
  13. 16 0
      google/actions/sdk/v2/actions_grpc_service_config.json
  14. 436 0
      google/actions/sdk/v2/actions_sdk.proto
  15. 256 0
      google/actions/sdk/v2/actions_testing.proto
  16. 11 0
      google/actions/sdk/v2/actions_v2.yaml
  17. 112 0
      google/actions/sdk/v2/config_file.proto
  18. 30 0
      google/actions/sdk/v2/conversation/BUILD.bazel
  19. 52 0
      google/actions/sdk/v2/conversation/intent.proto
  20. 30 0
      google/actions/sdk/v2/conversation/prompt/BUILD.bazel
  21. 37 0
      google/actions/sdk/v2/conversation/prompt/content/BUILD.bazel
  22. 50 0
      google/actions/sdk/v2/conversation/prompt/content/canvas.proto
  23. 51 0
      google/actions/sdk/v2/conversation/prompt/content/card.proto
  24. 46 0
      google/actions/sdk/v2/conversation/prompt/content/collection.proto
  25. 57 0
      google/actions/sdk/v2/conversation/prompt/content/content.proto
  26. 64 0
      google/actions/sdk/v2/conversation/prompt/content/image.proto
  27. 51 0
      google/actions/sdk/v2/conversation/prompt/content/link.proto
  28. 41 0
      google/actions/sdk/v2/conversation/prompt/content/list.proto
  29. 97 0
      google/actions/sdk/v2/conversation/prompt/content/media.proto
  30. 92 0
      google/actions/sdk/v2/conversation/prompt/content/table.proto
  31. 81 0
      google/actions/sdk/v2/conversation/prompt/prompt.proto
  32. 38 0
      google/actions/sdk/v2/conversation/prompt/simple.proto
  33. 31 0
      google/actions/sdk/v2/conversation/prompt/suggestion.proto
  34. 92 0
      google/actions/sdk/v2/conversation/scene.proto
  35. 59 0
      google/actions/sdk/v2/data_file.proto
  36. 246 0
      google/actions/sdk/v2/event_logs.proto
  37. 40 0
      google/actions/sdk/v2/files.proto
  38. 38 0
      google/actions/sdk/v2/interactionmodel/BUILD.bazel
  39. 55 0
      google/actions/sdk/v2/interactionmodel/conditional_event.proto
  40. 41 0
      google/actions/sdk/v2/interactionmodel/entity_set.proto
  41. 41 0
      google/actions/sdk/v2/interactionmodel/event_handler.proto
  42. 45 0
      google/actions/sdk/v2/interactionmodel/global_intent_event.proto
  43. 85 0
      google/actions/sdk/v2/interactionmodel/intent.proto
  44. 40 0
      google/actions/sdk/v2/interactionmodel/intent_event.proto
  45. 32 0
      google/actions/sdk/v2/interactionmodel/prompt/BUILD.bazel
  46. 39 0
      google/actions/sdk/v2/interactionmodel/prompt/content/BUILD.bazel
  47. 54 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto
  48. 48 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto
  49. 56 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto
  50. 59 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto
  51. 57 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto
  52. 63 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto
  53. 52 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto
  54. 55 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto
  55. 112 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto
  56. 93 0
      google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto
  57. 96 0
      google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto
  58. 48 0
      google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto
  59. 33 0
      google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto
  60. 54 0
      google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto
  61. 60 0
      google/actions/sdk/v2/interactionmodel/scene.proto
  62. 133 0
      google/actions/sdk/v2/interactionmodel/slot.proto
  63. 33 0
      google/actions/sdk/v2/interactionmodel/type/BUILD.bazel
  64. 36 0
      google/actions/sdk/v2/interactionmodel/type/class_reference.proto
  65. 35 0
      google/actions/sdk/v2/interactionmodel/type/entity_display.proto
  66. 33 0
      google/actions/sdk/v2/interactionmodel/type/free_text_type.proto
  67. 44 0
      google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto
  68. 66 0
      google/actions/sdk/v2/interactionmodel/type/synonym_type.proto
  69. 50 0
      google/actions/sdk/v2/interactionmodel/type/type.proto
  70. 92 0
      google/actions/sdk/v2/localized_settings.proto
  71. 30 0
      google/actions/sdk/v2/manifest.proto
  72. 44 0
      google/actions/sdk/v2/release_channel.proto
  73. 186 0
      google/actions/sdk/v2/settings.proto
  74. 64 0
      google/actions/sdk/v2/surface.proto
  75. 83 0
      google/actions/sdk/v2/theme_customization.proto
  76. 46 0
      google/actions/sdk/v2/validation_results.proto
  77. 91 0
      google/actions/sdk/v2/version.proto
  78. 82 0
      google/actions/sdk/v2/webhook.proto
  79. 167 0
      google/actions/type/BUILD.bazel
  80. 81 0
      google/actions/type/date_range.proto
  81. 66 0
      google/actions/type/datetime_range.proto
  82. 21 0
      google/actions/type/type_aog.yaml
  83. 1 0
      google/ads/admob/BUILD.bazel
  84. 15 0
      google/ads/admob/admob_grpc_service_config.json
  85. 23 0
      google/ads/admob/admob_v1.yaml
  86. 373 0
      google/ads/admob/v1/BUILD.bazel
  87. 224 0
      google/ads/admob/v1/admob_api.proto
  88. 150 0
      google/ads/admob/v1/admob_gapic.yaml
  89. 610 0
      google/ads/admob/v1/admob_resources.proto
  90. 47 0
      google/ads/googleads/README.md
  91. 266 0
      google/ads/googleads/v10/BUILD.bazel
  92. 94 0
      google/ads/googleads/v10/common/BUILD.bazel
  93. 74 0
      google/ads/googleads/v10/common/ad_asset.proto
  94. 796 0
      google/ads/googleads/v10/common/ad_type_infos.proto
  95. 45 0
      google/ads/googleads/v10/common/asset_policy.proto
  96. 979 0
      google/ads/googleads/v10/common/asset_types.proto
  97. 39 0
      google/ads/googleads/v10/common/asset_usage.proto
  98. 173 0
      google/ads/googleads/v10/common/audiences.proto
  99. 199 0
      google/ads/googleads/v10/common/bidding.proto
  100. 46 0
      google/ads/googleads/v10/common/click_location.proto

+ 7 - 0
Makefile

@@ -0,0 +1,7 @@
+fmt:
+	bash scripts/format.sh
+
+proto-build:
+	protoc -I=. --go_out=:./proto/go/ --go_opt=paths=source_relative \
+    --go-grpc_out=:./proto/go/ --go-grpc_opt=paths=source_relative ./backend/ops/*.proto
+	protoc -I=. --grpc-gateway_out=logtostderr=true:./proto/go/backend/ops ./backend/ops/*.proto

+ 46 - 0
backend/ops/fields.proto

@@ -0,0 +1,46 @@
+syntax = "proto3";
+package ops;
+
+option go_package = ".;filedPb";
+
+message FieldsType {
+  enum Kind {
+    INVALID_FIELD = 0;
+    DATA_TIME = 1;
+    TIME = 2;
+    VARCHAR = 3;
+    INT = 4;
+    FLOAT = 5;
+    BOOL = 6;
+  }
+}
+
+message ComponentsType {
+  enum Kind {
+    SINGLE_LINE_TEXT = 0;  // 单行文本
+    MULTI_LINE_TEXT = 1;   // 多行文本
+    SELECT_BOX = 2;      // 下拉框
+    Radio_BOX = 3;      // 单选框
+    CHECK_BOX = 4;      // 多选框
+    DATE_TIME_PICKER = 5;  // 日期选择器
+    TIME_PICKER = 6;    // 时间选择器
+    SWITCH = 7;   // 开关
+  }
+}
+
+message CreatedFiledRequest {
+  uint32 first_category_id = 1;   // 字段分类一级id
+  uint32 second_category_id = 2;  // 字段分类二级id
+  uint32 third_category_id = 3; // 字段分类三级id
+  string filed_name = 4;        // 字段名称
+  FieldsType.Kind field_type = 5;   // 字段类型
+  ComponentsType.Kind componentsType = 6;  // 组件类型
+  uint32 filed_len = 7;    // 字段长度
+  int64 min_value = 8;    // 字段取值范围最小值
+  int32 max_value = 9;   // 字段取值范围最大值
+  string calculation_rules = 10; // 计算规则
+}
+
+message CreatedFiledResponse {
+  string id = 1;
+}

+ 16 - 0
backend/ops/service.proto

@@ -0,0 +1,16 @@
+syntax = "proto3";
+package ops;
+
+option go_package = ".;filedPb";
+
+import "backend/ops/fields.proto";
+import "google/api/annotations.proto";
+
+service FieldService {
+  rpc CreateFields(CreatedFiledRequest) returns (CreatedFiledResponse){
+    option (google.api.http) = {
+      post: "/filed/create"
+      body: "*"
+    };
+  }
+}

+ 3 - 0
bin/protobuf.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+make proto-build

+ 9 - 0
config/app.test.yaml

@@ -2,7 +2,16 @@ app_name: kpt-grpc-demo
 app_environment: test
 debug: true
 http_server_addr: ':8000'
+http_metrics_addr: ':23332'
+grpc_server_addr: ':50051'
+grpc_metrics_addr: ':23333'
 
 store:
   kpt_event_rw: "root@tcp(127.0.0.1:3306)/kpt_test?charset=utf8mb4&parseTime=true&loc=Local&allowNativePasswords=true&timeout=300s&readTimeout=300s&writeTimeout=300s"
   kpt_event_migr: "root@tcp(127.0.0.1:3306)/kpt_test?charset=utf8mb4&parseTime=true&loc=Local&allowNativePasswords=true&timeout=300s&readTimeout=300s&writeTimeout=300s"
+
+third_svc_setting:
+  arab_service_lb: "127.0.0.1:8090"
+  bangla_service_lb: ""
+  user_uruma_lb: ""
+

+ 0 - 1
go.mod

@@ -21,7 +21,6 @@ require (
 	github.com/stretchr/testify v1.8.1
 	go.uber.org/dig v1.15.0
 	go.uber.org/zap v1.21.0
-	google.golang.org/appengine v1.6.7
 	google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1
 	google.golang.org/grpc v1.50.1
 	google.golang.org/protobuf v1.28.1

+ 0 - 1
go.sum

@@ -1415,7 +1415,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
 google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
 google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=

+ 0 - 0
google/BUILD.bazel


+ 107 - 0
google/actions/sdk/v2/BUILD.bazel

@@ -0,0 +1,107 @@
+# This file was automatically generated by BuildFileGenerator
+# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
+
+# Most of the manual changes to this file will be overwritten.
+# It's **only** allowed to change the following rule attribute values:
+# - names of *_gapic_assembly_* rules
+# - certain parameters of *_gapic_library rules, including but not limited to:
+#    * extra_protoc_parameters
+#    * extra_protoc_file_parameters
+# The complete list of preserved parameters can be found in the source code.
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "sdk_proto",
+    srcs = [
+        "account_linking.proto",
+        "account_linking_secret.proto",
+        "action.proto",
+        "actions_sdk.proto",
+        "actions_testing.proto",
+        "config_file.proto",
+        "data_file.proto",
+        "event_logs.proto",
+        "files.proto",
+        "localized_settings.proto",
+        "manifest.proto",
+        "release_channel.proto",
+        "settings.proto",
+        "surface.proto",
+        "theme_customization.proto",
+        "validation_results.proto",
+        "version.proto",
+        "webhook.proto",
+    ],
+    deps = [
+        "//google/actions/sdk/v2/conversation:conversation_proto",
+        "//google/actions/sdk/v2/conversation/prompt:prompt_proto",
+        "//google/actions/sdk/v2/conversation/prompt/content:content_proto",
+        "//google/actions/sdk/v2/interactionmodel:interactionmodel_proto",
+        "//google/actions/sdk/v2/interactionmodel/prompt:prompt_proto",
+        "//google/actions/sdk/v2/interactionmodel/prompt/content:content_proto",
+        "//google/actions/sdk/v2/interactionmodel/type:type_proto",
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_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 = "sdk_proto_with_info",
+    deps = [
+        ":sdk_proto",
+        "//google/cloud:common_resources_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "sdk_nodejs_gapic",
+    package_name = "@assistant/actions",
+    src = ":sdk_proto_with_info",
+    extra_protoc_parameters = ["metadata"],
+    grpc_service_config = "actions_grpc_service_config.json",
+    package = "google.actions.sdk.v2",
+    rest_numeric_enums = False,
+    service_yaml = "actions_v2.yaml",
+    transport = "grpc+rest",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "actions-v2-nodejs",
+    deps = [
+        ":sdk_nodejs_gapic",
+        ":sdk_proto",
+        "//google/actions/sdk/v2/conversation:conversation_proto",
+        "//google/actions/sdk/v2/conversation/prompt:prompt_proto",
+        "//google/actions/sdk/v2/conversation/prompt/content:content_proto",
+        "//google/actions/sdk/v2/interactionmodel:interactionmodel_proto",
+        "//google/actions/sdk/v2/interactionmodel/prompt:prompt_proto",
+        "//google/actions/sdk/v2/interactionmodel/prompt/content:content_proto",
+        "//google/actions/sdk/v2/interactionmodel/type:type_proto",
+    ],
+)

+ 126 - 0
google/actions/sdk/v2/account_linking.proto

@@ -0,0 +1,126 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "AccountLinkingProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// AccountLinking allows Google to guide the user to sign-in to the App's web
+// services.
+//
+// For Google Sign In and OAuth + Google Sign In linking types, Google generates
+// a client ID identifying your App to Google ("Client ID issued by Google to
+// your Actions" on Console UI). This field is read-only and can be checked by
+// navigating to the Console UI's Account Linking page.
+// See: https://developers.google.com/assistant/identity/google-sign-in
+//
+// Note: For all account linking setting types (except for Google Sign In), you
+// must provide a username and password for a test account in
+// Settings.testing_instructions for the review team to review the app (they
+// will not be visible to users).
+message AccountLinking {
+  // The type of Account Linking to perform.
+  enum LinkingType {
+    // Unspecified.
+    LINKING_TYPE_UNSPECIFIED = 0;
+
+    // Google Sign In linking type.
+    // If using this linking type, no OAuth-related fields need to be set below.
+    GOOGLE_SIGN_IN = 1;
+
+    // OAuth and Google Sign In linking type.
+    OAUTH_AND_GOOGLE_SIGN_IN = 2;
+
+    // OAuth linking type.
+    OAUTH = 3;
+  }
+
+  // The OAuth2 grant type Google uses to guide the user to sign in to your
+  // App's web service.
+  enum AuthGrantType {
+    // Unspecified.
+    AUTH_GRANT_TYPE_UNSPECIFIED = 0;
+
+    // Authorization code grant. Requires you to provide both
+    // authentication URL and access token URL.
+    AUTH_CODE = 1;
+
+    // Implicit code grant. Only requires you to provide authentication
+    // URL.
+    IMPLICIT = 2;
+  }
+
+  // Required. If `true`, users are allowed to sign up for new accounts via voice.
+  // If `false`, account creation is only allowed on your website. Select this
+  // option if you want to display your terms of service or obtain user consents
+  // during sign-up.
+  // linking_type cannot be GOOGLE_SIGN_IN when this is `false`.
+  // linking_type cannot be OAUTH when this is `true`.
+  bool enable_account_creation = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The linking type to use.
+  // See https://developers.google.com/assistant/identity for further details on
+  // the linking types.
+  LinkingType linking_type = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Indicates the type of authentication for OAUTH linking_type.
+  AuthGrantType auth_grant_type = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Client ID issued by your App to Google.
+  // This is the OAuth2 Client ID identifying Google to your service.
+  // Only set when using OAuth.
+  string app_client_id = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Endpoint for your sign-in web page that supports OAuth2 code or
+  // implicit flows.
+  // URL must use HTTPS.
+  // Only set when using OAuth.
+  string authorization_url = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. OAuth2 endpoint for token exchange.
+  // URL must use HTTPS.
+  // This is not set when only using OAuth with IMPLICIT grant as the
+  // linking type.
+  // Only set when using OAuth.
+  string token_url = 6 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. List of permissions the user must consent to in order to use
+  // your service.
+  // Only set when using OAuth.
+  // Make sure to provide a Terms of Service in the directory information in
+  // LocalizedSettings.terms_of_service_url section if specifying this field.
+  repeated string scopes = 7 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. This is the web page on your service which describes the
+  // permissions the user is granting to Google.
+  // Only set if using OAuth and Google Sign In.
+  // Make sure to provide a Terms of Service in the directory information in
+  // LocalizedSettings.terms_of_service_url section if specifying this field.
+  string learn_more_url = 8 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. If true, allow Google to transmit client ID and secret via HTTP
+  // basic auth header. Otherwise, Google uses the client ID and secret inside
+  // the post body.
+  // Only set when using OAuth.
+  // Make sure to provide a Terms of Service in the directory information in
+  // LocalizedSettings.terms_of_service_url section if specifying this field.
+  bool use_basic_auth_header = 9 [(google.api.field_behavior) = OPTIONAL];
+}

+ 35 - 0
google/actions/sdk/v2/account_linking_secret.proto

@@ -0,0 +1,35 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "AccountLinkingSecretProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Information about the encrypted OAuth client secret used in account linking
+// flows (for AUTH_CODE grant type).
+message AccountLinkingSecret {
+  // Encrypted account linking client secret ciphertext.
+  bytes encrypted_client_secret = 1;
+
+  // The version of the crypto key used to encrypt the account linking client
+  // secret.
+  // Note that this field is ignored in push, preview, and version creation
+  // flows.
+  string encryption_key_version = 2;
+}

+ 103 - 0
google/actions/sdk/v2/action.proto

@@ -0,0 +1,103 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ActionProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Represents the list of Actions defined in a project.
+message Actions {
+  // Defines the engagement mechanisms associated with this action. This
+  // allows end users to subscribe to push notification and daily update.
+  message Engagement {
+    // Defines push notification settings that this engagement supports.
+    message PushNotification {
+
+    }
+
+    // Defines daily update settings that this engagement supports.
+    message DailyUpdate {
+
+    }
+
+    // Indicates whether sharing links is enabled for this action and the
+    // corresponding settings. Action links are used to deep link a user into a
+    // specific action.
+    // ActionLink is deprecated. Use AssistantLink instead.
+    message ActionLink {
+      option deprecated = true;
+
+      // User friendly display title for the link.
+      string title = 1;
+    }
+
+    // Indicates whether sharing links is enabled for this action and the
+    // corresponding settings. Assistant links are used to deep link a user into
+    // a specific action.
+    message AssistantLink {
+      // User friendly display title for the link.
+      string title = 1;
+    }
+
+    // The title of the engagement that will be sent to end users asking for
+    // their permission to receive updates. The prompt sent to end users for
+    // daily updates will look like "What time would you like me to send your
+    // daily {title}" and for push notifications will look like
+    // "Is it ok if I send push notifications for {title}".
+    // **This field is localizable.**
+    string title = 1;
+
+    // Push notification settings that this engagement supports.
+    PushNotification push_notification = 2;
+
+    // Recurring update settings that this engagement supports.
+    oneof recurring_update {
+      // Daily update settings that this engagement supports.
+      DailyUpdate daily_update = 3;
+    }
+
+    // Link config for an action which determines whether sharing links is
+    // enabled for the action and if so, contains the user friendly display name
+    // for the link.
+    // ActionLink is deprecated. Use AssistantLink instead.
+    ActionLink action_link = 4 [deprecated = true];
+
+    // Link config for an action which determines whether sharing links is
+    // enabled for the action and if so, contains the user friendly display name
+    // for the link.
+    AssistantLink assistant_link = 6;
+  }
+
+  // Details regarding a custom action.
+  message CustomAction {
+    // Engagement mechanisms associated with the action to help end users
+    // subscribe to push notifications and daily updates.
+    // Note that the intent name specified in daily updates/push notifications
+    // slot config needs to match the intent corresponding to this action for
+    // end users to subscribe to these updates.
+    Engagement engagement = 2;
+  }
+
+  // Map from intents to custom Actions to configure invocation for the project.
+  // The invocation intents could either be system or custom intents defined
+  // in the "custom/intents/" package. All intents defined here (system
+  // intents & custom intents) must have a corresponding intent file in the
+  // "custom/global/" package.
+  map<string, CustomAction> custom = 3;
+}

+ 16 - 0
google/actions/sdk/v2/actions_grpc_service_config.json

@@ -0,0 +1,16 @@
+{
+  "methodConfig": [{
+    "name": [{ "service": "google.actions.sdk.v2.ActionsSdk" }],
+    "timeout": "60s"
+  },
+  {
+    "name": [
+      { "service": "google.actions.sdk.v2.ActionsSdk", "method": "WritePreview" }
+    ],
+    "timeout": "180s"
+  },
+  {
+    "name": [{ "service": "google.actions.sdk.v2.ActionsTesting" }],
+    "timeout": "60s"
+  }]
+}

+ 436 - 0
google/actions/sdk/v2/actions_sdk.proto

@@ -0,0 +1,436 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/account_linking_secret.proto";
+import "google/actions/sdk/v2/files.proto";
+import "google/actions/sdk/v2/release_channel.proto";
+import "google/actions/sdk/v2/validation_results.proto";
+import "google/actions/sdk/v2/version.proto";
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/wrappers.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ActionsSdkProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Actions SDK API which allows developers to build projects using the SDK.
+service ActionsSdk {
+  option (google.api.default_host) = "actions.googleapis.com";
+
+  // Updates the project draft based on the model.
+  rpc WriteDraft(stream WriteDraftRequest) returns (Draft) {
+    option (google.api.http) = {
+      post: "/v2/{parent=projects/*}/draft:write"
+      body: "*"
+    };
+  }
+
+  // Updates the user's project preview based on the model.
+  rpc WritePreview(stream WritePreviewRequest) returns (Preview) {
+    option (google.api.http) = {
+      post: "/v2/{parent=projects/*}/preview:write"
+      body: "*"
+    };
+  }
+
+  // Creates a project version based on the model and triggers deployment to the
+  // specified release channel, if specified.
+  rpc CreateVersion(stream CreateVersionRequest) returns (Version) {
+    option (google.api.http) = {
+      post: "/v2/{parent=projects/*}/versions:create"
+      body: "*"
+    };
+  }
+
+  // Reads the entire content of the project draft.
+  rpc ReadDraft(ReadDraftRequest) returns (stream ReadDraftResponse) {
+    option (google.api.http) = {
+      post: "/v2/{name=projects/*/draft}:read"
+      body: "*"
+    };
+  }
+
+  // Reads the entire content of a project version.
+  rpc ReadVersion(ReadVersionRequest) returns (stream ReadVersionResponse) {
+    option (google.api.http) = {
+      post: "/v2/{name=projects/*/versions/*}:read"
+      body: "*"
+    };
+  }
+
+  // Encrypts the OAuth client secret used in account linking flows.
+  // This can be used to encrypt the client secret for the first time (e.g.
+  // before the first push or after changing the client secret) or to re-encrypt
+  // a client secret using the latest primary key version (considering key
+  // rotation).
+  rpc EncryptSecret(EncryptSecretRequest) returns (EncryptSecretResponse) {
+    option (google.api.http) = {
+      post: "/v2:encryptSecret"
+      body: "*"
+    };
+  }
+
+  // Decrypts the OAuth client secret used in account linking flows.
+  // This can be used to view the client secret (e.g. after pulling a project).
+  rpc DecryptSecret(DecryptSecretRequest) returns (DecryptSecretResponse) {
+    option (google.api.http) = {
+      post: "/v2:decryptSecret"
+      body: "*"
+    };
+  }
+
+  // Lists all the sample projects supported by the gactions CLI.
+  rpc ListSampleProjects(ListSampleProjectsRequest) returns (ListSampleProjectsResponse) {
+    option (google.api.http) = {
+      get: "/v2/sampleProjects"
+    };
+  }
+
+  // Lists all release channels and corresponding versions, if any.
+  rpc ListReleaseChannels(ListReleaseChannelsRequest) returns (ListReleaseChannelsResponse) {
+    option (google.api.http) = {
+      get: "/v2/{parent=projects/*}/releaseChannels"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Lists all versions and their current states.
+  rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
+    option (google.api.http) = {
+      get: "/v2/{parent=projects/*}/versions"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+}
+
+// Streaming RPC request for WriteDraft.
+message WriteDraftRequest {
+  // Required. The parent resource name in the format `projects/{project}`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "actions.googleapis.com/Draft"
+    }
+  ];
+
+  // Required. List of files sent to the server at a time. This is a list of config files
+  // or data files.
+  // 1. The first request must be a ConfigFiles.
+  // 2. The first request must have a ConfigFile with 'settings'.
+  // 3. The first request must have a ConfigFile with 'manifest'.
+  // 4. The webhook ConfigFile corresponding to inline cloud function must be
+  //    streamed before the DataFile corresponding to its source code.
+  Files files = 4 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Definition of draft resource.
+message Draft {
+  option (google.api.resource) = {
+    type: "actions.googleapis.com/Draft"
+    pattern: "projects/{project}/draft"
+  };
+
+  // The unique identifier of the draft in the following format.
+  // `projects/{project}/draft`
+  string name = 1;
+
+  // Validation results associated with the project draft content. Note that
+  // WriteDraft updates the draft despite the warnings as warnings are not draft
+  // blocking.
+  ValidationResults validation_results = 2;
+}
+
+// Streaming RPC request for WritePreview.
+message WritePreviewRequest {
+  // Indicates the preview content will be coming from the Draft.
+  message ContentFromDraft {
+
+  }
+
+  // Indicates the preview content will be coming from an exiting version.
+  message ContentFromSubmittedVersion {
+    // Required. Submitted version of the project to be used to create a preview.
+    // Format: `projects/{project}/versions/{version}`
+    string version = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {
+        type: "actions.googleapis.com/Version"
+      }
+    ];
+  }
+
+  // Settings for updating the preview.
+  message PreviewSettings {
+    // Indicates whether or not to run certain operations, such as transactions,
+    // in sandbox mode. By default, preview requests run these operations in
+    // sandbox mode. In other words, the default value for `sandbox` is `true`.
+    google.protobuf.BoolValue sandbox = 1;
+  }
+
+  // Required. The parent resource name in the format `projects/{project}`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "actions.googleapis.com/Preview"
+    }
+  ];
+
+  // Data source used to created the preview.
+  oneof source {
+    // List of files sent to the server at a time. This is a list of config
+    // files or data files.
+    // 1. The first request must be a ConfigFiles.
+    // 2. The first request must have a ConfigFile with 'settings'.
+    // 3. The first request must have a ConfigFile with 'manifest'.
+    // 4. The webhook ConfigFile corresponding to inline cloud function must be
+    //    streamed before the DataFile corresponding to its source code.
+    Files files = 5;
+
+    // Content sourced from the project draft.
+    ContentFromDraft draft = 6;
+
+    // Content sourced from the an exiting version.
+    ContentFromSubmittedVersion submitted_version = 7;
+  }
+
+  // Required. The settings for updating the user's preview.
+  PreviewSettings preview_settings = 4 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Definition of preview resource.
+message Preview {
+  option (google.api.resource) = {
+    type: "actions.googleapis.com/Preview"
+    pattern: "projects/{project}/previews/{preview}"
+  };
+
+  // The unique identifier of the preview.
+  // Format: `projects/{project}/preview`
+  string name = 1;
+
+  // Validation results associated with the user project preview content.
+  ValidationResults validation_results = 2;
+
+  // The simulator URL to test the user preview.
+  string simulator_url = 3;
+}
+
+// Streaming RPC request for CreateVersion.
+message CreateVersionRequest {
+  // Required. The parent resource name in the format `projects/{project}`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "actions.googleapis.com/Version"
+    }
+  ];
+
+  // Required. List of files sent to the server at a time. This is a list of config files
+  // or data files.
+  // 1. The first request must be a ConfigFiles.
+  // 2. The first request must have a ConfigFile with 'settings'.
+  // 3. The first request must have a ConfigFile with 'manifest'.
+  // 4. The webhook ConfigFile corresponding to inline cloud function must be
+  //    streamed before the DataFile corresponding to its source code.
+  Files files = 5 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The release channel to deploy the version, if specified. The supported
+  // built in release channels are actions.channels.Production,
+  // actions.channels.ClosedBeta, actions.channels.Alpha.
+  // .
+  string release_channel = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// RPC request for ReadDraft.
+message ReadDraftRequest {
+  // Required. The name of the resource in the format `projects/{project}/draft`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The version of the crypto key used to encrypt the account linking OAuth
+  // client secret. If not specified, the primary key version is used for
+  // encryption. Only relevant for projects with account linking with client
+  // secret.
+  string client_secret_encryption_key_version = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Streaming RPC response for ReadDraft.
+message ReadDraftResponse {
+  // List of files sent from the server at a time.
+  Files files = 3;
+}
+
+// RPC request for ReadVersion.
+message ReadVersionRequest {
+  // Required. The name of the version resource in the format
+  // `projects/{project}/versions/{version}`. `{project}` is the
+  // cloud project ID associated with the project, `{version}` is the
+  // identifier of the version being read.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The version of the crypto key used to encrypt the account linking OAuth
+  // client secret. If not specified, the primary key version is used for
+  // encryption. Only relevant for projects with account linking with client
+  // secret.
+  string client_secret_encryption_key_version = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Streaming RPC response for ReadVersion.
+message ReadVersionResponse {
+  // List of files sent from the server at a time.
+  Files files = 1;
+}
+
+// RPC request for EncryptSecret.
+message EncryptSecretRequest {
+  // Required. The account linking client secret plaintext.
+  string client_secret = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// RPC response for EncryptSecret.
+message EncryptSecretResponse {
+  // Contains the encrypted account linking client secret and the key version
+  // used to encrypt the secret.
+  AccountLinkingSecret account_linking_secret = 1;
+}
+
+// RPC request for DecryptSecret.
+message DecryptSecretRequest {
+  // Required. The account linking client secret ciphertext.
+  bytes encrypted_client_secret = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// RPC response for DecryptSecret.
+message DecryptSecretResponse {
+  // The account linking client secret plaintext.
+  string client_secret = 1;
+}
+
+// RPC request for ListSampleProjects.
+message ListSampleProjectsRequest {
+  // Optional. The maximum number of sample projects to return. The service may return
+  // fewer than this value.
+  // If unspecified, at most 1000 sample projects will be returned. Values above
+  // 1000 will be coerced to 1000.
+  int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. A page token, received from a previous 'ListSampleProjects' call.
+  // Provide this to retrieve the subsequent page.
+  string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// RPC response for ListSampleProjects.
+message ListSampleProjectsResponse {
+  // The list of sample projects supported.
+  repeated SampleProject sample_projects = 1;
+
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// Definition of sample project resource.
+message SampleProject {
+  option (google.api.resource) = {
+    type: "actions.googleapis.com/SampleProject"
+    pattern: "sampleProjects/{sample_project}"
+  };
+
+  // The name of the sample project.
+  // Format: `sampleProjects/{sample_project}`
+  string name = 1;
+
+  // The URL to the zip file where the sample is hosted.
+  string hosted_url = 2;
+
+  // The description of the sample project.
+  string description = 3;
+}
+
+// RPC request for listing release channels
+message ListReleaseChannelsRequest {
+  // Required. The name of the resource in the format `projects/{project}`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "actions.googleapis.com/ReleaseChannel"
+    }
+  ];
+
+  // The maximum number of release channels to return. The service may return
+  // fewer than this value. If unspecified, at most 50 release channels will be
+  // returned.
+  int32 page_size = 2;
+
+  // A page token, received from a previous `ListReleaseChannels` call.
+  // Provide this to retrieve the subsequent page.
+  // When paginating, all other parameters provided to `ListReleaseChannels`
+  // must match the call that provided the page token.
+  string page_token = 3;
+}
+
+// RPC response for listing release channels
+message ListReleaseChannelsResponse {
+  // List of the release channels for the given project id.
+  repeated ReleaseChannel release_channels = 1;
+
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// RPC request for listing versions
+message ListVersionsRequest {
+  // Required. The name of the resource in the format `projects/{project}`. The
+  // `{project}` is the cloud project ID associated with the project.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      child_type: "actions.googleapis.com/Version"
+    }
+  ];
+
+  // The maximum number of versions to return. The service may return
+  // fewer than this value. If unspecified, at most 50 versions will be
+  // returned.
+  int32 page_size = 2;
+
+  // A page token, received from a previous `ListVersions` call.
+  // Provide this to retrieve the subsequent page.
+  // When paginating, all other parameters provided to `ListVersions`
+  // must match the call that provided the page token.
+  string page_token = 3;
+}
+
+// RPC response for listing versions
+message ListVersionsResponse {
+  // List of the versions for the given project id.
+  repeated Version versions = 1;
+
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}

+ 256 - 0
google/actions/sdk/v2/actions_testing.proto

@@ -0,0 +1,256 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/conversation/intent.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto";
+import "google/actions/sdk/v2/conversation/prompt/prompt.proto";
+import "google/actions/sdk/v2/event_logs.proto";
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/empty.proto";
+import "google/type/latlng.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ActionsTestingProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Actions Testing API which allows developers to run automated tests.
+service ActionsTesting {
+  option (google.api.default_host) = "actions.googleapis.com";
+
+  // Plays one round of the conversation.
+  rpc SendInteraction(SendInteractionRequest) returns (SendInteractionResponse) {
+    option (google.api.http) = {
+      post: "/v2/{project=projects/*}:sendInteraction"
+      body: "*"
+    };
+  }
+
+  // Finds the intents that match a given query.
+  rpc MatchIntents(MatchIntentsRequest) returns (MatchIntentsResponse) {
+    option (google.api.http) = {
+      post: "/v2/{project=projects/*}:matchIntents"
+      body: "*"
+    };
+    option (google.api.method_signature) = "project,query,locale";
+  }
+
+  // Sets the Web & App Activity control on a service account.
+  //
+  // It is necessary to have this setting enabled in order to use call Actions.
+  // The setting is originally disabled for service accounts, and it is
+  // preserved until set to a different value. This means it only needs to be
+  // enabled once per account (and not necessarily once per test), unless it is
+  // later disabled.
+  //
+  // Returns an error if the caller is not a service account. User accounts can
+  // change this setting via the Activity Controls page. See
+  // https://support.google.com/websearch/answer/54068.
+  rpc SetWebAndAppActivityControl(SetWebAndAppActivityControlRequest) returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      post: "/v2:setWebAndAppActivityControl"
+      body: "*"
+    };
+    option (google.api.method_signature) = "enabled";
+  }
+}
+
+// Request for playing a round of the conversation.
+message SendInteractionRequest {
+  // Required. The project being tested, indicated by the Project ID.
+  // Format: projects/{project}
+  string project = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Input provided by the user.
+  UserInput input = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Properties of the device used for interacting with the Action.
+  DeviceProperties device_properties = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Opaque token that must be passed as received from SendInteractionResponse
+  // on the previous interaction. This can be left unset in order to start a new
+  // conversation, either as the first interaction of a testing session or to
+  // abandon a previous conversation and start a new one.
+  string conversation_token = 4;
+}
+
+// User input provided on a conversation round.
+message UserInput {
+  // Indicates the input source, typed query or voice query.
+  enum InputType {
+    // Unspecified input source.
+    INPUT_TYPE_UNSPECIFIED = 0;
+
+    // Query from a GUI interaction.
+    TOUCH = 1;
+
+    // Voice query.
+    VOICE = 2;
+
+    // Typed query.
+    KEYBOARD = 3;
+
+    // The action was triggered by a URL link.
+    URL = 4;
+  }
+
+  // Content of the input sent by the user.
+  string query = 1;
+
+  // Type of the input.
+  InputType type = 2;
+}
+
+// Properties of device relevant to a conversation round.
+message DeviceProperties {
+  // Possible surfaces used to interact with the Action.
+  // Additional values may be included in the future.
+  enum Surface {
+    // Default value. This value is unused.
+    SURFACE_UNSPECIFIED = 0;
+
+    // Speaker (e.g. Google Home).
+    SPEAKER = 1;
+
+    // Phone.
+    PHONE = 2;
+
+    // Allo Chat.
+    ALLO = 3;
+
+    // Smart Display Device.
+    SMART_DISPLAY = 4;
+
+    // KaiOS.
+    KAI_OS = 5;
+  }
+
+  // Surface used for interacting with the Action.
+  Surface surface = 1;
+
+  // Device location such as latitude, longitude, and formatted address.
+  Location location = 2;
+
+  // Locale as set on the device.
+  // The format should follow BCP 47: https://tools.ietf.org/html/bcp47
+  // Examples: en, en-US, es-419 (more examples at
+  // https://tools.ietf.org/html/bcp47#appendix-A).
+  string locale = 3;
+
+  // Time zone as set on the device.
+  // The format should follow the IANA Time Zone Database, e.g.
+  // "America/New_York": https://www.iana.org/time-zones
+  string time_zone = 4;
+}
+
+// Container that represents a location.
+message Location {
+  // Geo coordinates.
+  // Requires the [DEVICE_PRECISE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] permission.
+  google.type.LatLng coordinates = 1;
+
+  // Display address, e.g., "1600 Amphitheatre Pkwy, Mountain View, CA 94043".
+  // Requires the [DEVICE_PRECISE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] permission.
+  string formatted_address = 2;
+
+  // Zip code.
+  // Requires the [DEVICE_PRECISE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] or
+  // [DEVICE_COARSE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_COARSE_LOCATION] permission.
+  string zip_code = 3;
+
+  // City.
+  // Requires the [DEVICE_PRECISE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] or
+  // [DEVICE_COARSE_LOCATION]
+  // [google.actions.v2.Permission.DEVICE_COARSE_LOCATION] permission.
+  string city = 4;
+}
+
+// Response to a round of the conversation.
+message SendInteractionResponse {
+  // Output provided to the user.
+  Output output = 1;
+
+  // Diagnostics information that explains how the request was handled.
+  Diagnostics diagnostics = 2;
+
+  // Opaque token to be set on SendInteractionRequest on the next RPC call in
+  // order to continue the same conversation.
+  string conversation_token = 3;
+}
+
+// User-visible output to the conversation round.
+message Output {
+  // Spoken response sent to user as a plain string.
+  string text = 1;
+
+  // Speech content produced by the Action. This may include markup elements
+  // such as SSML.
+  repeated string speech = 2;
+
+  // Interactive Canvas content.
+  google.actions.sdk.v2.conversation.Canvas canvas = 3;
+
+  // State of the prompt at the end of the conversation round.
+  // More information about the prompt:
+  // https://developers.google.com/assistant/conversational/prompts
+  google.actions.sdk.v2.conversation.Prompt actions_builder_prompt = 4;
+}
+
+// Diagnostics information related to the conversation round.
+message Diagnostics {
+  // List of events with details about processing of the conversation round
+  // throughout the stages of the Actions Builder interaction model.
+  // Populated for Actions Builder & Actions SDK apps only.
+  repeated ExecutionEvent actions_builder_events = 1;
+}
+
+// Request for finding matching intents.
+message MatchIntentsRequest {
+  // Required. The project being tested, indicated by the Project ID.
+  // Format: projects/{project}
+  string project = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. User query as plain text.
+  string query = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Locale to use to evaluate the query, such as "en".
+  // The format should follow BCP 47: https://tools.ietf.org/html/bcp47
+  // See the list of supported languages in
+  // https://developers.google.com/assistant/console/languages-locales
+  string locale = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Response for finding matching intents.
+message MatchIntentsResponse {
+  // Intents matched, ordered from most to least relevant. Only the first
+  // 50 matches are returned.
+  repeated google.actions.sdk.v2.conversation.Intent matched_intents = 1;
+}
+
+// Request for setting Web & App Activity preferences.
+message SetWebAndAppActivityControlRequest {
+  // Whether the setting should be set to an enabled or disabled state.
+  bool enabled = 1;
+}

+ 11 - 0
google/actions/sdk/v2/actions_v2.yaml

@@ -0,0 +1,11 @@
+type: google.api.Service
+config_version: 3
+name: actions.googleapis.com
+title: Actions API
+
+apis:
+- name: google.actions.sdk.v2.ActionsSdk
+- name: google.actions.sdk.v2.ActionsTesting
+
+documentation:
+  summary: A RESTful service for the Actions API.

+ 112 - 0
google/actions/sdk/v2/config_file.proto

@@ -0,0 +1,112 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/account_linking_secret.proto";
+import "google/actions/sdk/v2/action.proto";
+import "google/actions/sdk/v2/interactionmodel/entity_set.proto";
+import "google/actions/sdk/v2/interactionmodel/global_intent_event.proto";
+import "google/actions/sdk/v2/interactionmodel/intent.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/scene.proto";
+import "google/actions/sdk/v2/interactionmodel/type/type.proto";
+import "google/actions/sdk/v2/manifest.proto";
+import "google/actions/sdk/v2/settings.proto";
+import "google/actions/sdk/v2/webhook.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ConfigFileProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Wrapper for repeated config files. Repeated fields cannot exist in a oneof.
+message ConfigFiles {
+  // Multiple config files.
+  repeated ConfigFile config_files = 1;
+}
+
+// Represents a single file which contains structured data. Developers can
+// define most of their project using structured config including Actions,
+// Settings, Fulfillment.
+message ConfigFile {
+  // Relative path of the config file from the project root in the SDK file
+  // structure. Each file types below have an allowed file path.
+  // Eg: settings/settings.yaml
+  string file_path = 1;
+
+  // Each type of config file should have a corresponding field in the oneof.
+  oneof file {
+    // Single manifest file.
+    // Allowed file path: `manifest.yaml`
+    Manifest manifest = 2;
+
+    // Single actions file with all the actions defined.
+    // Allowed file paths: `actions/{language}?/actions.yaml`
+    Actions actions = 3;
+
+    // Single settings config which includes non-localizable settings and
+    // settings for the project's default locale (if specified).
+    // For a locale override file, only localized_settings field will be
+    // populated.
+    // Allowed file paths: `settings/{language}?/settings.yaml`
+    // Note that the non-localized settings file `settings/settings.yaml` must
+    // be present in the write flow requests.
+    Settings settings = 4;
+
+    // Single webhook definition.
+    // Allowed file path: `webhooks/{WebhookName}.yaml`
+    Webhook webhook = 6;
+
+    // Single intent definition.
+    // Allowed file paths: `custom/intents/{language}?/{IntentName}.yaml`
+    google.actions.sdk.v2.interactionmodel.Intent intent = 7;
+
+    // Single type definition.
+    // Allowed file paths: `custom/types/{language}?/{TypeName}.yaml`
+    google.actions.sdk.v2.interactionmodel.type.Type type = 8;
+
+    // Single entity set definition.
+    // Allowed file paths: `custom/entitySets/{language}?/{EntitySetName}.yaml`
+    google.actions.sdk.v2.interactionmodel.EntitySet entity_set = 15;
+
+    // Single global intent event definition.
+    // Allowed file paths: `custom/global/{GlobalIntentEventName}.yaml`
+    // The file name (GlobalIntentEventName) should be the name of the intent
+    // that this global intent event corresponds to.
+    google.actions.sdk.v2.interactionmodel.GlobalIntentEvent global_intent_event = 9;
+
+    // Single scene definition.
+    // Allowed file paths: `custom/scenes/{SceneName}.yaml`
+    google.actions.sdk.v2.interactionmodel.Scene scene = 10;
+
+    // Single static prompt definition.
+    // Allowed file paths: `custom/prompts/{language}?/{StaticPromptName}.yaml`
+    google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt static_prompt = 11;
+
+    // Metadata corresponding to the client secret used in account linking.
+    // Allowed file path: `settings/accountLinkingSecret.yaml`
+    AccountLinkingSecret account_linking_secret = 13;
+
+    // Single resource bundle, which is a map from a string to a string or list
+    // of strings. Resource bundles could be used for localizing strings in
+    // static prompts.
+    // Allowed file paths: `resources/strings/{language}?/{multiple
+    // directories}?/{BundleName}.yaml`
+    google.protobuf.Struct resource_bundle = 12;
+  }
+}

+ 30 - 0
google/actions/sdk/v2/conversation/BUILD.bazel

@@ -0,0 +1,30 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "conversation_proto",
+    srcs = [
+        "intent.proto",
+        "scene.proto",
+    ],
+    deps = [
+        "//google/actions/sdk/v2/conversation/prompt:prompt_proto",
+        "@com_google_protobuf//:struct_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 52 - 0
google/actions/sdk/v2/conversation/intent.proto

@@ -0,0 +1,52 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "IntentProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represents an intent.
+message Intent {
+  // Required. The name of the last matched intent.
+  string name = 1;
+
+  // Required. Represents parameters identified as part of intent matching.
+  // This is a map of the name of the identified parameter to the value of the
+  // parameter identified from user input. All parameters defined in
+  // the matched intent that are identified will be surfaced here.
+  map<string, IntentParameterValue> params = 2;
+
+  // Optional. Typed or spoken input from the end user that matched this intent.
+  // This will be populated when an intent is matched, based on the user input.
+  string query = 3;
+}
+
+// Represents a value for intent parameter.
+message IntentParameterValue {
+  // Required. Original text value extracted from user utterance.
+  string original = 1;
+
+  // Required. Structured value for parameter extracted from user input.
+  // This will only be populated if the parameter is defined in the matched
+  // intent and the value of the parameter could be identified during intent
+  // matching.
+  google.protobuf.Value resolved = 2;
+}

+ 30 - 0
google/actions/sdk/v2/conversation/prompt/BUILD.bazel

@@ -0,0 +1,30 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "prompt_proto",
+    srcs = [
+        "prompt.proto",
+        "simple.proto",
+        "suggestion.proto",
+    ],
+    deps = [
+        "//google/actions/sdk/v2/conversation/prompt/content:content_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 37 - 0
google/actions/sdk/v2/conversation/prompt/content/BUILD.bazel

@@ -0,0 +1,37 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "content_proto",
+    srcs = [
+        "canvas.proto",
+        "card.proto",
+        "collection.proto",
+        "content.proto",
+        "image.proto",
+        "link.proto",
+        "list.proto",
+        "media.proto",
+        "table.proto",
+    ],
+    deps = [
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:struct_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 50 - 0
google/actions/sdk/v2/conversation/prompt/content/canvas.proto

@@ -0,0 +1,50 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "CanvasProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represents an Interactive Canvas response to be sent to the user.
+// This can be used in conjunction with the "first_simple" field in the
+// containing prompt to speak to the user in addition to displaying a
+// interactive canvas response. The maximum size of the response is 50k bytes.
+message Canvas {
+  // URL of the interactive canvas web app to load. If not set, the url from
+  // current active canvas will be reused.
+  string url = 1;
+
+  // Optional. JSON data to be passed through to the immersive experience
+  // web page as an event.
+  // If the "override" field in the containing prompt is "false" data values
+  // defined in this Canvas prompt will be added after data values defined in
+  // previous Canvas prompts.
+  repeated google.protobuf.Value data = 4;
+
+  // Optional. Default value: false.
+  bool suppress_mic = 3;
+
+  // If `true` the canvas application occupies the full screen and won't
+  // have a header at the top. A toast message will also be displayed on the
+  // loading screen that includes the Action's display name, the developer's
+  // name, and instructions for exiting the Action. Default value: `false`.
+  bool enable_full_screen = 8;
+}

+ 51 - 0
google/actions/sdk/v2/conversation/prompt/content/card.proto

@@ -0,0 +1,51 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/image.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/link.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "CardProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// A basic card for displaying some information, e.g. an image and/or text.
+message Card {
+  // Overall title of the card.
+  // Optional.
+  string title = 1;
+
+  // Optional.
+  string subtitle = 2;
+
+  // Body text of the card.
+  // Supports a limited set of markdown syntax for formatting.
+  // Required, unless image is present.
+  string text = 3;
+
+  // A hero image for the card. The height is fixed to 192dp.
+  // Optional.
+  Image image = 4;
+
+  // How the image background will be filled. Optional.
+  Image.ImageFill image_fill = 5;
+
+  // Button.
+  // Optional.
+  Link button = 6;
+}

+ 46 - 0
google/actions/sdk/v2/conversation/prompt/content/collection.proto

@@ -0,0 +1,46 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/image.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "CollectionProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// A card for presenting a collection of options to select from.
+message Collection {
+  // An item in the collection
+  message CollectionItem {
+    // Required. The NLU key that matches the entry key name in the associated
+    // Type.
+    string key = 1;
+  }
+
+  // Title of the collection. Optional.
+  string title = 1;
+
+  // Subtitle of the collection. Optional.
+  string subtitle = 2;
+
+  // min: 2 max: 10
+  repeated CollectionItem items = 3;
+
+  // How the image backgrounds of collection items will be filled. Optional.
+  Image.ImageFill image_fill = 4;
+}

+ 57 - 0
google/actions/sdk/v2/conversation/prompt/content/content.proto

@@ -0,0 +1,57 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/card.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/collection.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/image.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/list.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/media.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/table.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "ContentProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Content to be shown.
+message Content {
+  // Content.
+  oneof content {
+    // A basic card.
+    Card card = 1;
+
+    // An image.
+    Image image = 2;
+
+    // Table card.
+    Table table = 3;
+
+    // Response indicating a set of media to be played.
+    Media media = 4;
+
+    // A response to be used for interactive canvas experience.
+    Canvas canvas = 5 [deprecated = true];
+
+    // A card presenting a collection of options to select from.
+    Collection collection = 6;
+
+    // A card presenting a list of options to select from.
+    List list = 7;
+  }
+}

+ 64 - 0
google/actions/sdk/v2/conversation/prompt/content/image.proto

@@ -0,0 +1,64 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "ImageProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// An image displayed in the card.
+message Image {
+  // Possible image display options for affecting the presentation of the image.
+  // This should be used for when the image's aspect ratio does not match the
+  // image container's aspect ratio.
+  enum ImageFill {
+    // Unspecified image fill.
+    UNSPECIFIED = 0;
+
+    // Fill the gaps between the image and the image container with gray bars.
+    GRAY = 1;
+
+    // Fill the gaps between the image and the image container with white bars.
+    WHITE = 2;
+
+    // Image is scaled such that the image width and height match or exceed the
+    // container dimensions. This may crop the top and bottom of the image if
+    // the scaled image height is greater than the container height, or crop the
+    // left and right of the image if the scaled image width is greater than the
+    // container width. This is similar to "Zoom Mode" on a widescreen TV when
+    // playing a 4:3 video.
+    CROPPED = 3;
+  }
+
+  // The source url of the image. Images can be JPG, PNG and GIF (animated and
+  // non-animated). For example,`https://www.agentx.com/logo.png`. Required.
+  string url = 1;
+
+  // A text description of the image to be used for accessibility, e.g. screen
+  // readers.
+  // Required.
+  string alt = 2;
+
+  // The height of the image in pixels.
+  // Optional.
+  int32 height = 3;
+
+  // The width of the image in pixels.
+  // Optional.
+  int32 width = 4;
+}

+ 51 - 0
google/actions/sdk/v2/conversation/prompt/content/link.proto

@@ -0,0 +1,51 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "LinkProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Link content.
+message Link {
+  // Name of the link
+  string name = 1;
+
+  // What happens when a user opens the link
+  OpenUrl open = 2;
+}
+
+// Action taken when a user opens a link.
+message OpenUrl {
+  // The url field which could be any of:
+  // - http/https urls for opening an App-linked App or a webpage
+  string url = 1;
+
+  // Indicates a hint for the url type.
+  UrlHint hint = 2;
+}
+
+// Different types of url hints.
+enum UrlHint {
+  // Unspecified
+  LINK_UNSPECIFIED = 0;
+
+  // URL that points directly to AMP content, or to a canonical URL
+  // which refers to AMP content via <link rel="amphtml">.
+  AMP = 1;
+}

+ 41 - 0
google/actions/sdk/v2/conversation/prompt/content/list.proto

@@ -0,0 +1,41 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "ListProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// A card for presenting a list of options to select from.
+message List {
+  // An item in the list
+  message ListItem {
+    // Required. The NLU key that matches the entry key name in the associated
+    // Type.
+    string key = 1;
+  }
+
+  // Title of the list. Optional.
+  string title = 1;
+
+  // Subtitle of the list. Optional.
+  string subtitle = 2;
+
+  // min: 2 max: 30
+  repeated ListItem items = 3;
+}

+ 97 - 0
google/actions/sdk/v2/conversation/prompt/content/media.proto

@@ -0,0 +1,97 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/image.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "MediaProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represents one media object.
+// Contains information about the media, such as name, description, url, etc.
+message Media {
+  // Media type of this response.
+  enum MediaType {
+    // Unspecified media type.
+    MEDIA_TYPE_UNSPECIFIED = 0;
+
+    // Audio file.
+    AUDIO = 1;
+
+    // Response to acknowledge a media status report.
+    MEDIA_STATUS_ACK = 2;
+  }
+
+  // Optional media control types the media response can support
+  enum OptionalMediaControls {
+    // Unspecified value
+    OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0;
+
+    // Paused event. Triggered when user pauses the media.
+    PAUSED = 1;
+
+    // Stopped event. Triggered when user exits out of 3p session during media
+    // play.
+    STOPPED = 2;
+  }
+
+  // Media type.
+  MediaType media_type = 8;
+
+  // Start offset of the first media object.
+  google.protobuf.Duration start_offset = 5;
+
+  // Optional media control types this media response session can support.
+  // If set, request will be made to 3p when a certain media event happens.
+  // If not set, 3p must still handle two default control type, FINISHED and
+  // FAILED.
+  repeated OptionalMediaControls optional_media_controls = 6;
+
+  // List of Media Objects
+  repeated MediaObject media_objects = 7;
+}
+
+// Represents a single media object
+message MediaObject {
+  // Name of this media object.
+  string name = 1;
+
+  // Description of this media object.
+  string description = 2;
+
+  // The url pointing to the media content.
+  string url = 3;
+
+  // Image to show with the media card.
+  MediaImage image = 4;
+}
+
+// Image to show with the media card.
+message MediaImage {
+  // Image.
+  oneof image {
+    // A large image, such as the cover of the album, etc.
+    Image large = 1;
+
+    // A small image icon displayed on the right from the title.
+    // It's resized to 36x36 dp.
+    Image icon = 2;
+  }
+}

+ 92 - 0
google/actions/sdk/v2/conversation/prompt/content/table.proto

@@ -0,0 +1,92 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/image.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/link.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "TableProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// A table card for displaying a table of text.
+message Table {
+  // Overall title of the table. Optional but must be set if subtitle is set.
+  string title = 1;
+
+  // Subtitle for the table. Optional.
+  string subtitle = 2;
+
+  // Image associated with the table. Optional.
+  Image image = 4;
+
+  // Headers and alignment of columns.
+  repeated TableColumn columns = 5;
+
+  // Row data of the table. The first 3 rows are guaranteed to be shown but
+  // others might be cut on certain surfaces. Please test with the simulator to
+  // see which rows will be shown for a given surface. On surfaces that support
+  // the WEB_BROWSER capability, you can point the user to
+  // a web page with more data.
+  repeated TableRow rows = 6;
+
+  // Button.
+  Link button = 7;
+}
+
+// Describes a column in a table.
+message TableColumn {
+  // The alignment of the content within the cell.
+  enum HorizontalAlignment {
+    // Unspecified horizontal alignment.
+    UNSPECIFIED = 0;
+
+    // Leading edge of the cell. This is the default.
+    LEADING = 1;
+
+    // Content is aligned to the center of the column.
+    CENTER = 2;
+
+    // Content is aligned to the trailing edge of the column.
+    TRAILING = 3;
+  }
+
+  // Header text for the column.
+  string header = 1;
+
+  // Horizontal alignment of content w.r.t column. If unspecified, content
+  // will be aligned to the leading edge.
+  HorizontalAlignment align = 2;
+}
+
+// Describes a cell in a row.
+message TableCell {
+  // Text content of the cell.
+  string text = 1;
+}
+
+// Describes a row in the table.
+message TableRow {
+  // Cells in this row. The first 3 cells are guaranteed to be shown but
+  // others might be cut on certain surfaces. Please test with the simulator
+  // to see which cells will be shown for a given surface.
+  repeated TableCell cells = 1;
+
+  // Indicates whether there should be a divider after each row.
+  bool divider = 2;
+}

+ 81 - 0
google/actions/sdk/v2/conversation/prompt/prompt.proto

@@ -0,0 +1,81 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/content.proto";
+import "google/actions/sdk/v2/conversation/prompt/content/link.proto";
+import "google/actions/sdk/v2/conversation/prompt/simple.proto";
+import "google/actions/sdk/v2/conversation/prompt/suggestion.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "PromptProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represent a response to a user.
+message Prompt {
+  // Optional. Mode for how this messages should be merged with previously
+  // defined messages.
+  // "false" will clear all previously defined messages (first and last
+  // simple, content, suggestions link and canvas) and add messages defined in
+  // this prompt.
+  // "true" will add messages defined in this prompt to messages defined in
+  // previous responses. Setting this field to "true" will also enable appending
+  // to some fields inside Simple prompts, the Suggestion prompt and the Canvas
+  // prompt (part of the Content prompt). The Content and Link messages will
+  // always be overwritten if defined in the prompt.
+  // Default value is "false".
+  bool append = 1 [deprecated = true];
+
+  // Optional. Mode for how this messages should be merged with previously
+  // defined messages.
+  // "true" clears all previously defined messages (first and last
+  // simple, content, suggestions link and canvas) and adds messages defined in
+  // this prompt.
+  // "false" adds messages defined in this prompt to messages defined in
+  // previous responses. Leaving this field to "false" also enables
+  // appending to some fields inside Simple prompts, the Suggestions prompt,
+  // and the Canvas prompt (part of the Content prompt). The Content and Link
+  // messages are always overwritten if defined in the prompt. Default
+  // value is "false".
+  bool override = 8;
+
+  // Optional. The first voice and text-only response.
+  Simple first_simple = 2;
+
+  // Optional. A content like a card, list or media to display to the user.
+  Content content = 3;
+
+  // Optional. The last voice and text-only response.
+  Simple last_simple = 4;
+
+  // Optional. Suggestions to be displayed to the user which will always appear
+  // at the end of the response.
+  // If the "override" field in the containing prompt is "false", the titles
+  // defined in this field will be added to titles defined in any previously
+  // defined suggestions prompts and duplicate values will be removed.
+  repeated Suggestion suggestions = 5;
+
+  // Optional. An additional suggestion chip that can link out to the associated app
+  // or site.
+  // The chip will be rendered with the title "Open <name>". Max 20 chars.
+  Link link = 6;
+
+  // Optional. Represents a Interactive Canvas response to be sent to the user.
+  Canvas canvas = 9;
+}

+ 38 - 0
google/actions/sdk/v2/conversation/prompt/simple.proto

@@ -0,0 +1,38 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "SimpleProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represents a simple prompt to be send to a user.
+message Simple {
+  // Optional. Represents the speech to be spoken to the user. Can be SSML or
+  // text to speech.
+  // If the "override" field in the containing prompt is "true", the speech
+  // defined in this field replaces the previous Simple prompt's speech.
+  string speech = 1;
+
+  // Optional text to display in the chat bubble. If not given, a display
+  // rendering of the speech field above will be used. Limited to 640
+  // chars.
+  // If the "override" field in the containing prompt is "true", the text
+  // defined in this field replaces to the previous Simple prompt's text.
+  string text = 2;
+}

+ 31 - 0
google/actions/sdk/v2/conversation/prompt/suggestion.proto

@@ -0,0 +1,31 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "SuggestionProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Input suggestion to be presented to the user.
+message Suggestion {
+  // Required. The text shown in the suggestion chip. When tapped, this text will be
+  // posted back to the conversation verbatim as if the user had typed it.
+  // Each title must be unique among the set of suggestion chips.
+  // Max 25 chars
+  string title = 1;
+}

+ 92 - 0
google/actions/sdk/v2/conversation/scene.proto

@@ -0,0 +1,92 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.conversation;
+
+import "google/actions/sdk/v2/conversation/prompt/prompt.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
+option java_multiple_files = true;
+option java_outer_classname = "SceneProto";
+option java_package = "com.google.actions.sdk.v2.conversation";
+
+// Represents the current status of slot filling.
+enum SlotFillingStatus {
+  // Fallback value when the usage field is not populated.
+  UNSPECIFIED = 0;
+
+  // The slots have been initialized but slot filling has not started.
+  INITIALIZED = 1;
+
+  // The slot values are being collected.
+  COLLECTING = 2;
+
+  // All slot values are final and cannot be changed.
+  FINAL = 4;
+}
+
+// Represents a slot.
+message Slot {
+  // Represents the mode of a slot, that is, if it is required or not.
+  enum SlotMode {
+    // Fallback value when the usage field is not populated.
+    MODE_UNSPECIFIED = 0;
+
+    // Indicates that the slot is not required to complete slot filling.
+    OPTIONAL = 1;
+
+    // Indicates that the slot is required to complete slot filling.
+    REQUIRED = 2;
+  }
+
+  // Represents the status of a slot.
+  enum SlotStatus {
+    // Fallback value when the usage field is not populated.
+    SLOT_UNSPECIFIED = 0;
+
+    // Indicates that the slot does not have any values. This status cannot be
+    // modified through the response.
+    EMPTY = 1;
+
+    // Indicates that the slot value is invalid. This status can be set
+    // through the response.
+    INVALID = 2;
+
+    // Indicates that the slot has a value. This status cannot be modified
+    // through the response.
+    FILLED = 3;
+  }
+
+  // The mode of the slot (required or optional). Can be set by developer.
+  SlotMode mode = 1;
+
+  // The status of the slot.
+  SlotStatus status = 2;
+
+  // The value of the slot. Changing this value in the response, will
+  // modify the value in slot filling.
+  google.protobuf.Value value = 3;
+
+  // Indicates if the slot value was collected on the last turn.
+  // This field is read-only.
+  bool updated = 4;
+
+  // Optional. This prompt is sent to the user when needed to fill a required
+  // slot. This prompt overrides the existing prompt defined in the console.
+  // This field is not included in the webhook request.
+  Prompt prompt = 5;
+}

+ 59 - 0
google/actions/sdk/v2/data_file.proto

@@ -0,0 +1,59 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "DataFileProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Wrapper for repeated data file. Repeated fields cannot exist in a oneof.
+message DataFiles {
+  // Multiple data files.
+  repeated DataFile data_files = 1;
+}
+
+// Represents a single file which contains unstructured data. Examples include
+// image files, audio files, and cloud function source code.
+message DataFile {
+  // Relative path of the data file from the project root in the SDK file
+  // structure.
+  // Allowed file paths:
+  //     - Images: `resources/images/{multiple
+  //     directories}?/{ImageName}.{extension}`
+  //     - Audio: `resources/audio/{multiple
+  //     directories}?/{AudioFileName}.{extension}`
+  //     - Inline Cloud Function Code: `webhooks/{WebhookName}.zip`
+  // Allowed extensions:
+  //     - Images: `png`, `jpg`, `jpeg`
+  //     - Audio: `mp3`, `mpeg`
+  //     - Inline Cloud Functions: `zip`
+  string file_path = 1;
+
+  // Required. The content type of this asset. Example: `text/html`. The content
+  // type must comply with the specification
+  // (http://www.w3.org/Protocols/rfc1341/4_Content-Type.html).
+  // Cloud functions must be in zip format and the content type should
+  // be `application/zip;zip_type=cloud_function`. The zip_type parameter
+  // indicates that the zip is for a cloud function.
+  string content_type = 2;
+
+  // Content of the data file. Examples would be raw bytes of images, audio
+  // files, or cloud function zip format.
+  // There is 10 MB strict limit on the payload size.
+  bytes payload = 3;
+}

+ 246 - 0
google/actions/sdk/v2/event_logs.proto

@@ -0,0 +1,246 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/conversation/intent.proto";
+import "google/actions/sdk/v2/conversation/prompt/prompt.proto";
+import "google/actions/sdk/v2/conversation/scene.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "EventLogsProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Contains information about execution event which happened during processing
+// Actions Builder conversation request. For an overview of the stages involved
+// in a conversation request, see
+// https://developers.google.com/assistant/conversational/actions.
+message ExecutionEvent {
+  // Timestamp when the event happened.
+  google.protobuf.Timestamp event_time = 1;
+
+  // State of the execution during this event.
+  ExecutionState execution_state = 2;
+
+  // Resulting status of particular execution step.
+  google.rpc.Status status = 3;
+
+  // Detailed information specific to different of events that may be involved
+  // in processing a conversation round. The field set here defines the type of
+  // this event.
+  oneof EventData {
+    // User input handling event.
+    UserConversationInput user_input = 4;
+
+    // Intent matching event.
+    IntentMatch intent_match = 5;
+
+    // Condition evaluation event.
+    ConditionsEvaluated conditions_evaluated = 6;
+
+    // OnSceneEnter execution event.
+    OnSceneEnter on_scene_enter = 7;
+
+    // Webhook request dispatch event.
+    WebhookRequest webhook_request = 8;
+
+    // Webhook response receipt event.
+    WebhookResponse webhook_response = 9;
+
+    // Webhook-initiated transition event.
+    WebhookInitiatedTransition webhook_initiated_transition = 10;
+
+    // Slot matching event.
+    SlotMatch slot_match = 11;
+
+    // Slot requesting event.
+    SlotRequested slot_requested = 12;
+
+    // Slot validation event.
+    SlotValidated slot_validated = 13;
+
+    // Form filling event.
+    FormFilled form_filled = 14;
+
+    // Waiting-for-user-input event.
+    WaitingForUserInput waiting_user_input = 15;
+
+    // End-of-conversation event.
+    EndConversation end_conversation = 16;
+  }
+
+  // List of warnings generated during execution of this Event. Warnings are
+  // tips for the developer discovered during the conversation request. These
+  // are usually non-critical and do not halt the execution of the request. For
+  // example, a warnings might be generated when webhook tries to override a
+  // custom Type which does not exist. Errors are reported as a failed status
+  // code, but warnings can be present even when the status is OK.
+  repeated string warning_messages = 17;
+}
+
+// Current state of the execution.
+message ExecutionState {
+  // ID of the scene which is currently  active.
+  string current_scene_id = 1;
+
+  // State of the session storage:
+  // https://developers.google.com/assistant/conversational/storage-session
+  google.protobuf.Struct session_storage = 2;
+
+  // State of the slots filling, if applicable:
+  // https://developers.google.com/assistant/conversational/scenes#slot_filling
+  Slots slots = 5;
+
+  // Prompt queue:
+  // https://developers.google.com/assistant/conversational/prompts
+  repeated google.actions.sdk.v2.conversation.Prompt prompt_queue = 7;
+
+  // State of the user storage:
+  // https://developers.google.com/assistant/conversational/storage-user
+  google.protobuf.Struct user_storage = 6;
+
+  // State of the home storage:
+  // https://developers.google.com/assistant/conversational/storage-home
+  google.protobuf.Struct household_storage = 8;
+}
+
+// Represents the current state of a the scene's slots.
+message Slots {
+  // The current status of slot filling.
+  google.actions.sdk.v2.conversation.SlotFillingStatus status = 2;
+
+  // The slots associated with the current scene.
+  map<string, google.actions.sdk.v2.conversation.Slot> slots = 3;
+}
+
+// Information related to user input.
+message UserConversationInput {
+  // Type of user input. E.g. keyboard, voice, touch, etc.
+  string type = 1;
+
+  // Original text input from the user.
+  string original_query = 2;
+}
+
+// Information about triggered intent match (global or within a scene):
+// https://developers.google.com/assistant/conversational/intents
+message IntentMatch {
+  // Intent id which triggered this interaction.
+  string intent_id = 1;
+
+  // Parameters of intent which triggered this interaction.
+  map<string, google.actions.sdk.v2.conversation.IntentParameterValue> intent_parameters = 5;
+
+  // Name of the handler attached to this interaction.
+  string handler = 3;
+
+  // Scene to which this interaction leads to.
+  string next_scene_id = 4;
+}
+
+// Results of conditions evaluation:
+// https://developers.google.com/assistant/conversational/scenes#conditions
+message ConditionsEvaluated {
+  // List of conditions which were evaluated to 'false'.
+  repeated Condition failed_conditions = 1;
+
+  // The first condition which was evaluated to 'true', if any.
+  Condition success_condition = 2;
+}
+
+// Evaluated condition.
+message Condition {
+  // Expression specified in this condition.
+  string expression = 1;
+
+  // Handler name specified in evaluated condition.
+  string handler = 2;
+
+  // Destination scene specified in evaluated condition.
+  string next_scene_id = 3;
+}
+
+// Information about execution of onSceneEnter stage:
+// https://developers.google.com/assistant/conversational/scenes#on_enter
+message OnSceneEnter {
+  // Handler name specified in onSceneEnter event.
+  string handler = 1;
+}
+
+// Event triggered by destination scene returned from webhook:
+// https://developers.google.com/assistant/conversational/webhooks#transition_scenes
+message WebhookInitiatedTransition {
+  // ID of the scene the transition is leading to.
+  string next_scene_id = 1;
+}
+
+// Information about a request dispatched to the Action webhook:
+// https://developers.google.com/assistant/conversational/webhooks#payloads
+message WebhookRequest {
+  // Payload of the webhook request.
+  string request_json = 1;
+}
+
+// Information about a response received from the Action webhook:
+// https://developers.google.com/assistant/conversational/webhooks#payloads
+message WebhookResponse {
+  // Payload of the webhook response.
+  string response_json = 1;
+}
+
+// Information about matched slot(s):
+// https://developers.google.com/assistant/conversational/scenes#slot_filling
+message SlotMatch {
+  // Parameters extracted by NLU from user input.
+  map<string, google.actions.sdk.v2.conversation.IntentParameterValue> nlu_parameters = 2;
+}
+
+// Information about currently requested slot:
+// https://developers.google.com/assistant/conversational/scenes#slot_filling
+message SlotRequested {
+  // Name of the requested slot.
+  string slot = 1;
+
+  // Slot prompt.
+  google.actions.sdk.v2.conversation.Prompt prompt = 3;
+}
+
+// Event which happens after webhook validation was finished for slot(s):
+// https://developers.google.com/assistant/conversational/scenes#slot_filling
+message SlotValidated {
+
+}
+
+// Event which happens when form is fully filled:
+// https://developers.google.com/assistant/conversational/scenes#slot_filling
+message FormFilled {
+
+}
+
+// Event which happens when system needs user input:
+// https://developers.google.com/assistant/conversational/scenes#input
+message WaitingForUserInput {
+
+}
+
+// Event which informs that conversation with agent was ended.
+message EndConversation {
+
+}

+ 40 - 0
google/actions/sdk/v2/files.proto

@@ -0,0 +1,40 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/config_file.proto";
+import "google/actions/sdk/v2/data_file.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "FilesProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Wrapper for a list of files.
+message Files {
+  // Only one type of files can be sent to the server at a time, config files or
+  // data files.
+  oneof file_type {
+    // List of config files. This includes manifest, settings, interaction model
+    // resource bundles and more.
+    ConfigFiles config_files = 1;
+
+    // List of data files. This includes image, audio file, cloud function
+    // source code.
+    DataFiles data_files = 2;
+  }
+}

+ 38 - 0
google/actions/sdk/v2/interactionmodel/BUILD.bazel

@@ -0,0 +1,38 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "interactionmodel_proto",
+    srcs = [
+        "conditional_event.proto",
+        "entity_set.proto",
+        "event_handler.proto",
+        "global_intent_event.proto",
+        "intent.proto",
+        "intent_event.proto",
+        "scene.proto",
+        "slot.proto",
+    ],
+    deps = [
+        "//google/actions/sdk/v2/interactionmodel/prompt:prompt_proto",
+        "//google/actions/sdk/v2/interactionmodel/type:type_proto",
+        "//google/api:field_behavior_proto",
+        "@com_google_protobuf//:struct_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 55 - 0
google/actions/sdk/v2/interactionmodel/conditional_event.proto

@@ -0,0 +1,55 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/event_handler.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "ConditionalEventProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Registers events that trigger as the result of a true condition.
+message ConditionalEvent {
+  // Required. Filter condition for this event to trigger. If condition is evaluated to
+  // true then the associated `handler` will be triggered.
+  // The following variable references are supported:
+  //   `$session` - To reference data in session storage.
+  //   `$user` - To reference data in user storage.
+  // The following boolean operators are supported (with examples):
+  //   `&&` - `session.params.counter > 0 && session.params.counter < 100`
+  //   `||` - `session.params.foo == "John" || session.params.counter == "Adam"`
+  //   `!`  - `!(session.params.counter == 5)`
+  // The following comparisons are supported:
+  //   `==`, `!=`, `<`, `>`, `<=`, `>=`
+  // The following list and string operators are supported (with examples):
+  //   `in`        - "Watermelon" in `session.params.fruitList`
+  //   `size`      - `size(session.params.fruitList) > 2`
+  //   `substring` - `session.params.fullName.contains("John")`
+  string condition = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Destination scene which the conversation should jump to when the associated
+  // condition is evaluated to true. The state of the current scene is destroyed
+  // on the transition.
+  string transition_to_scene = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Event handler which is triggered when the associated condition is evaluated
+  // to `true`. Should execute before transitioning to the destination scene.
+  // Useful to generate Prompts in response to events.
+  EventHandler handler = 3 [(google.api.field_behavior) = OPTIONAL];
+}

+ 41 - 0
google/actions/sdk/v2/interactionmodel/entity_set.proto

@@ -0,0 +1,41 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "EntitySetProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Entity sets describe the pre-defined set of entities that the values of
+// built-in intent parameters can come from. Entity sets can be referenced from
+// entity_set in built-in intent parameters.
+message EntitySet {
+  // An entity a built-in intent parameter value can come from.
+  message Entity {
+    // Required. The ID of the entity.
+    // For a list of built-in-intent parameters and their supported entities,
+    // see
+    // https://developers.google.com/assistant/conversational/build/built-in-intents
+    string id = 1 [(google.api.field_behavior) = REQUIRED];
+  }
+
+  // Required. The list of entities this entity set supports.
+  repeated Entity entities = 1 [(google.api.field_behavior) = REQUIRED];
+}

+ 41 - 0
google/actions/sdk/v2/interactionmodel/event_handler.proto

@@ -0,0 +1,41 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "EventHandlerProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Defines a handler to be executed after an event. Examples of events are
+// intent and condition based events in a scene.
+message EventHandler {
+  // Name of the webhook handler to call.
+  string webhook_handler = 1;
+
+  // Prompts can either be inlined or referenced by name.
+  oneof prompt {
+    // Inlined static prompt. Can contain references to string resources in
+    // bundles.
+    google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt static_prompt = 2;
+
+    // Name of the static prompt to invoke.
+    string static_prompt_name = 3;
+  }
+}

+ 45 - 0
google/actions/sdk/v2/interactionmodel/global_intent_event.proto

@@ -0,0 +1,45 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/event_handler.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "GlobalIntentEventProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Defines a global intent handler. Global intent events are scoped to the
+// entire Actions project and may be overridden by intent handlers in a scene.
+// Intent names must be unique within an Actions project.
+//
+// Global intents can be matched anytime during a session, allowing users to
+// access common flows like  "get help" or "go back home." They can also be
+// used to deep link users into specific flows when they invoke an Action.
+//
+// Note, the intent name is specified in the name of the file.
+message GlobalIntentEvent {
+  // Optional. Destination scene which the conversation should jump to. The state of the
+  // current scene is destroyed on the transition.
+  string transition_to_scene = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Event handler which is triggered when the intent is matched. Should execute
+  // before transitioning to the destination scene. Useful to generate Prompts
+  // in response to events.
+  EventHandler handler = 2 [(google.api.field_behavior) = OPTIONAL];
+}

+ 85 - 0
google/actions/sdk/v2/interactionmodel/intent.proto

@@ -0,0 +1,85 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/type/class_reference.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "IntentProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Intents map open-ended user input to structured objects. Spoken
+// phrases are matched to intents with Google's Natural Language Understanding
+// (NLU). Intent matches can trigger events in your conversation design to
+// progress the user's conversation.
+// The intent name is specified in the name of the file.
+message Intent {
+  // Definition of a parameter which can be used inside training phrases.
+  message IntentParameter {
+    // Entity set references for an intent parameter.
+    message EntitySetReferences {
+      // A reference to the set of allowed entities for this intent parameter.
+      message EntitySetReference {
+        // Required. Identifies the specific collection of entities to be considered for a
+        // given parameter. The corresponding entity set definition should be
+        // present in the custom/entitySets/ directory.
+        string entity_set = 1 [(google.api.field_behavior) = REQUIRED];
+      }
+
+      // Required. Entity set references for an intent parameter.
+      repeated EntitySetReference entity_set_references = 1 [(google.api.field_behavior) = REQUIRED];
+    }
+
+    // Required. Unique name of the intent parameter. Can be used in conditions and
+    // responses to reference intent parameters extracted by NLU with
+    // $intent.params.[name].resolved
+    string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+    // The type of the intent parameter.
+    oneof parameter_type {
+      // Optional. Declares the data type of this parameter.
+      // This should not be set for built-in intents.
+      google.actions.sdk.v2.interactionmodel.type.ClassReference type = 2 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. References to the sets of allowed entities for this intent parameter.
+      // Only valid for parameters of a built-in intent. These
+      // references point to entity sets in the 'custom/entitySets' directory.
+      EntitySetReferences entity_set_references = 3 [(google.api.field_behavior) = OPTIONAL];
+    }
+  }
+
+  // The list of parameters within the training phrases. All parameters must be
+  // defined here to be used in the training phrase.
+  repeated IntentParameter parameters = 1;
+
+  // Training phrases allow Google’s NLU to automatically match intents with
+  // user input. The more unique phrases that are provided, the better chance
+  // this intent will be matched.
+  // The following is the format of training phrase part which are annotated.
+  // Note that `auto` field is optional and the default behavior when `auto` is
+  // not specified is equivalent to `auto=false`.
+  // `($<paramName> '<sample text>' auto=<true or false>)`
+  // `auto = true` means the part was auto annotated by NLU.
+  // `auto = false` means the part was annotated by the user. This is the
+  //     default when auto is not specified.
+  // Example:
+  // "Book a flight from ($source 'San Francisco' auto=false) to ($dest
+  // 'Vancouver')"
+  repeated string training_phrases = 2;
+}

+ 40 - 0
google/actions/sdk/v2/interactionmodel/intent_event.proto

@@ -0,0 +1,40 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/event_handler.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "IntentEventProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Registers Events which trigger as the result of an intent match.
+message IntentEvent {
+  // Required. Intent triggering the event.
+  string intent = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Destination scene which the conversation should jump to. The state of the
+  // current scene is destroyed on the transition.
+  string transition_to_scene = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Event handler which is triggered when the intent is matched. Should execute
+  // before transitioning to the destination scene. Useful to generate prompts
+  // in response to events.
+  EventHandler handler = 3 [(google.api.field_behavior) = OPTIONAL];
+}

+ 32 - 0
google/actions/sdk/v2/interactionmodel/prompt/BUILD.bazel

@@ -0,0 +1,32 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "prompt_proto",
+    srcs = [
+        "static_prompt.proto",
+        "static_simple_prompt.proto",
+        "suggestion.proto",
+        "surface_capabilities.proto",
+    ],
+    deps = [
+        "//google/actions/sdk/v2/interactionmodel/prompt/content:content_proto",
+        "//google/api:field_behavior_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 39 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/BUILD.bazel

@@ -0,0 +1,39 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "content_proto",
+    srcs = [
+        "static_canvas_prompt.proto",
+        "static_card_prompt.proto",
+        "static_collection_browse_prompt.proto",
+        "static_collection_prompt.proto",
+        "static_content_prompt.proto",
+        "static_image_prompt.proto",
+        "static_link_prompt.proto",
+        "static_list_prompt.proto",
+        "static_media_prompt.proto",
+        "static_table_prompt.proto",
+    ],
+    deps = [
+        "//google/api:field_behavior_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:struct_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 54 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto

@@ -0,0 +1,54 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/api/field_behavior.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticCanvasPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Represents a Interactive Canvas response to be sent to the user.
+// This can be used in conjunction with the `first_simple` field in the
+// containing prompt to speak to the user in addition to displaying a
+// interactive canvas response.
+message StaticCanvasPrompt {
+  // Required. URL of the web view to load.
+  string url = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. JSON data to be passed through to the immersive experience web page as an
+  // event. If the `override` field in the containing prompt is `false` data
+  // values defined in this Canvas prompt will be added after data values
+  // defined in previous Canvas prompts.
+  repeated google.protobuf.Value data = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. A true value means that the mic won't be opened for capturing input after
+  // this immersive response is presented to the user.
+  bool suppress_mic = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. If `true`, conversation related metadata is included and send back to the
+  // canvas application.
+  bool send_state_data_to_canvas_app = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. If `true` the canvas application occupies the full screen and won't
+  // have a header at the top. A toast message will also be displayed on the
+  // loading screen that includes the Action's display name, the developer's
+  // name, and instructions for exiting the Action. Default value: `false`.
+  bool enable_full_screen = 6 [(google.api.field_behavior) = OPTIONAL];
+}

+ 48 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto

@@ -0,0 +1,48 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticCardPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// A basic card for displaying some information, e.g. an image and/or text.
+message StaticCardPrompt {
+  // Optional. Overall title of the card.
+  string title = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Subtitle of the card.
+  string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. Body text of the card which is needed unless image is present. Supports a
+  // limited set of markdown syntax for formatting.
+  string text = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. A hero image for the card. The height is fixed to 192dp.
+  StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. How the image background will be filled.
+  StaticImagePrompt.ImageFill image_fill = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. A clickable button to be shown in the Card.
+  StaticLinkPrompt button = 6 [(google.api.field_behavior) = OPTIONAL];
+}

+ 56 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto

@@ -0,0 +1,56 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticCollectionBrowsePromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Presents a set of web documents as a collection of large-tile items. Items
+// may be selected to launch their associated web document in a web viewer.
+message StaticCollectionBrowsePrompt {
+  // Item in the collection.
+  message CollectionBrowseItem {
+    // Required. Title of the collection item.
+    string title = 1 [(google.api.field_behavior) = REQUIRED];
+
+    // Description of the collection item.
+    string description = 2;
+
+    // Footer text for the collection item, displayed below the description.
+    // Single line of text, truncated with an ellipsis.
+    string footer = 3;
+
+    // Image for the collection item.
+    StaticImagePrompt image = 4;
+
+    // Required. URI to open if the item selected.
+    OpenUrl open_uri_action = 5 [(google.api.field_behavior) = REQUIRED];
+  }
+
+  // Items in the browse collection. The list size should be in the range [2,
+  // 10].
+  repeated CollectionBrowseItem items = 1;
+
+  // Image display option for images in the collection.
+  StaticImagePrompt.ImageFill image_fill = 2;
+}

+ 59 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto

@@ -0,0 +1,59 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticCollectionPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// A card for presenting a collection of options to select from.
+message StaticCollectionPrompt {
+  // An item in the collection.
+  message CollectionItem {
+    // Required. The NLU key that matches the entry key name in the associated
+    // Type. When item tapped, this key will be posted back as a select option
+    // parameter.
+    string key = 1 [(google.api.field_behavior) = REQUIRED];
+
+    // Required. Title of the item. When tapped, this text will be
+    // posted back to the conversation verbatim as if the user had typed it.
+    // Each title must be unique among the set of items.
+    string title = 2 [(google.api.field_behavior) = REQUIRED];
+
+    // Optional. Body text of the item.
+    string description = 3 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Item image.
+    StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // Optional. Title of the collection.
+  string title = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Subtitle of the collection.
+  string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. Collection items.
+  repeated CollectionItem items = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Type of image display option.
+  StaticImagePrompt.ImageFill image_fill = 4 [(google.api.field_behavior) = OPTIONAL];
+}

+ 57 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto

@@ -0,0 +1,57 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticContentPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// A placeholder for the Content part of a StaticPrompt.
+message StaticContentPrompt {
+  // Only one type of content can be present in a Prompt.
+  oneof content {
+    // A basic card.
+    StaticCardPrompt card = 1;
+
+    // An image.
+    StaticImagePrompt image = 2;
+
+    // Table card.
+    StaticTablePrompt table = 3;
+
+    // Response indicating a set of media to be played.
+    StaticMediaPrompt media = 4;
+
+    // A card for presenting a list of options to select from.
+    StaticListPrompt list = 5;
+
+    // A card presenting a list of options to select from.
+    StaticCollectionPrompt collection = 6;
+
+    // A card presenting a collection of web pages to open.
+    StaticCollectionBrowsePrompt collection_browse = 7;
+  }
+}

+ 63 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto

@@ -0,0 +1,63 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticImagePromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// An image displayed in the card.
+message StaticImagePrompt {
+  // Possible image display options for affecting the presentation of the image.
+  // This should be used for when the image's aspect ratio does not match the
+  // image container's aspect ratio.
+  enum ImageFill {
+    // ImageFill unspecified.
+    UNSPECIFIED = 0;
+
+    // Fill the gaps between the image and the image container with gray bars.
+    GRAY = 1;
+
+    // Fill the gaps between the image and the image container with white bars.
+    WHITE = 2;
+
+    // Image is scaled such that the image width and height match or exceed the
+    // container dimensions. This may crop the top and bottom of the image if
+    // the scaled image height is greater than the container height, or crop the
+    // left and right of the image if the scaled image width is greater than the
+    // container width. This is similar to "Zoom Mode" on a widescreen TV when
+    // playing a 4:3 video.
+    CROPPED = 3;
+  }
+
+  // Required. The source url of the image. Images can be JPG, PNG and GIF (animated and
+  // non-animated). For example,`https://www.agentx.com/logo.png`.
+  string url = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. A text description of the image to be used for accessibility, e.g. screen
+  // readers.
+  string alt = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The height of the image in pixels.
+  int32 height = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The width of the image in pixels.
+  int32 width = 4 [(google.api.field_behavior) = OPTIONAL];
+}

+ 52 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto

@@ -0,0 +1,52 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticLinkPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Defines a link which will be displayed as a suggestion chip and can be opened
+// by the user.
+message StaticLinkPrompt {
+  // Name of the link
+  string name = 1;
+
+  // Defines behavior when the user opens the link.
+  OpenUrl open = 2;
+}
+
+// Defines behavior when the user opens the link.
+message OpenUrl {
+  // The url field which could be any of:
+  // - http/https urls for opening an App-linked App or a webpage
+  string url = 1;
+
+  // Indicates a hint for the url type.
+  UrlHint hint = 2;
+}
+
+// Different types of url hints.
+enum UrlHint {
+  // Unspecified
+  HINT_UNSPECIFIED = 0;
+
+  // URL that points directly to AMP content, or to a canonical URL
+  // which refers to AMP content via `<link rel="amphtml">`.
+  AMP = 1;
+}

+ 55 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto

@@ -0,0 +1,55 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticListPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// A card for presenting a list of options to select from.
+message StaticListPrompt {
+  // An item in the list.
+  message ListItem {
+    // Required. The NLU key that matches the entry key name in the associated type. When
+    // item tapped, this key will be posted back as a select option parameter.
+    string key = 1 [(google.api.field_behavior) = REQUIRED];
+
+    // Required. Title of the item. When tapped, this text will be posted back to the
+    // conversation verbatim as if the user had typed it. Each title must be
+    // unique among the set of items.
+    string title = 2 [(google.api.field_behavior) = REQUIRED];
+
+    // Optional. Body text of the item.
+    string description = 3 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Item image.
+    StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // Optional. Title of the list.
+  string title = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Subtitle of the list.
+  string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. List items.
+  repeated ListItem items = 3 [(google.api.field_behavior) = REQUIRED];
+}

+ 112 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto

@@ -0,0 +1,112 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/protobuf/duration.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticMediaPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Contains information about the media, such as name, description, url, etc.
+// Next id: 11
+message StaticMediaPrompt {
+  // Media type of this response.
+  enum MediaType {
+    // UNSPECIFIED value
+    MEDIA_TYPE_UNSPECIFIED = 0;
+
+    // Audio file.
+    AUDIO = 1;
+
+    // Response to acknowledge a media status report.
+    MEDIA_STATUS_ACK = 2;
+  }
+
+  // Media control types the media response can supported optionally
+  enum OptionalMediaControls {
+    // Unspecified value
+    OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0;
+
+    // Paused event. Triggered when user pauses the media.
+    PAUSED = 1;
+
+    // Stopped event. Triggered when user exit out 3p session during media play.
+    STOPPED = 2;
+  }
+
+  // The types of repeat mode for a list of media objects.
+  enum RepeatMode {
+    // Equivalent to OFF.
+    REPEAT_MODE_UNSPECIFIED = 0;
+
+    // End media session at the end of the last media object.
+    OFF = 1;
+
+    // Loop to the beginning of the first media object when the end of the last
+    // media object is reached.
+    ALL = 2;
+  }
+
+  // Media type of this response.
+  MediaType media_type = 8;
+
+  // Start offset of the first media object.
+  google.protobuf.Duration start_offset = 5;
+
+  // Optional media control types this media response session can support.
+  // If set, request will be made to 3p when a certain media event happens.
+  // If not set, 3p must still handle two default control type, FINISHED and
+  // FAILED.
+  repeated OptionalMediaControls optional_media_controls = 6;
+
+  // List of media objects.
+  repeated MediaObject media_objects = 7;
+
+  // Repeat mode for the list of Media Objects.
+  RepeatMode repeat_mode = 9;
+}
+
+// Represents a single media object.
+message MediaObject {
+  // Name of this media object.
+  string name = 1;
+
+  // Description of this media object.
+  string description = 2;
+
+  // The url pointing to the media content.
+  string url = 3;
+
+  // Image to show with the media card.
+  MediaImage image = 4;
+}
+
+// Image to be shown inside a MediaPrompt.
+message MediaImage {
+  // Only one type of MediaImage is allowed.
+  oneof image {
+    // A large image, such as the cover of the album, etc.
+    StaticImagePrompt large = 1;
+
+    // A small image icon displayed on the right from the title.
+    // It's resized to 36x36 dp.
+    StaticImagePrompt icon = 2;
+  }
+}

+ 93 - 0
google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto

@@ -0,0 +1,93 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticTablePromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// A table card for displaying a table of text.
+message StaticTablePrompt {
+  // Optional. Overall title of the table. Must be set if subtitle is set.
+  string title = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Subtitle for the table.
+  string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Image associated with the table.
+  StaticImagePrompt image = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Headers and alignment of columns.
+  repeated TableColumn columns = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Row data of the table. The first 3 rows are guaranteed to be shown but
+  // others might be cut on certain surfaces. Please test with the simulator to
+  // see which rows will be shown for a given surface. On surfaces that support
+  // the `WEB_BROWSER` capability, you can point the user to
+  // a web page with more data.
+  repeated TableRow rows = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Button.
+  StaticLinkPrompt button = 6 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Describes a column in the table.
+message TableColumn {
+  // The alignment of the content within the cell.
+  enum HorizontalAlignment {
+    // HorizontalAlignment unspecified.
+    UNSPECIFIED = 0;
+
+    // Leading edge of the cell. This is the default.
+    LEADING = 1;
+
+    // Content is aligned to the center of the column.
+    CENTER = 2;
+
+    // Content is aligned to the trailing edge of the column.
+    TRAILING = 3;
+  }
+
+  // Header text for the column.
+  string header = 1;
+
+  // Horizontal alignment of content w.r.t column. If unspecified, content
+  // will be aligned to the leading edge.
+  HorizontalAlignment align = 2;
+}
+
+// Describes a cell in a row.
+message TableCell {
+  // Text content of the cell.
+  string text = 1;
+}
+
+// Describes a row in the table.
+message TableRow {
+  // Cells in this row. The first 3 cells are guaranteed to be shown but
+  // others might be cut on certain surfaces. Please test with the simulator
+  // to see which cells will be shown for a given surface.
+  repeated TableCell cells = 1;
+
+  // Indicates whether there should be a divider after each row.
+  bool divider = 2;
+}

+ 96 - 0
google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto

@@ -0,0 +1,96 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto";
+import "google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticPromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Represents a list of prompt candidates, one of which will be selected as the
+// prompt to be shown in the response to the user.
+// **This message is localizable.**
+message StaticPrompt {
+  // Represents a static prompt candidate.
+  message StaticPromptCandidate {
+    // Represents structured responses to send to the user, such as text,
+    // speech, cards, canvas data, suggestion chips, etc.
+    message StaticPromptResponse {
+      // Optional. The first voice and text-only response.
+      StaticSimplePrompt first_simple = 2 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. A content like a card, list or media to display to the user.
+      StaticContentPrompt content = 3 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. The last voice and text-only response.
+      StaticSimplePrompt last_simple = 4 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. Suggestions to be displayed to the user which will always
+      // appear at the end of the response. If the `append` field in the
+      // containing prompt is `true` the titles defined in this field will be
+      // added to titles defined in any previously defined suggestions prompts
+      // and duplicate values will be removed.
+      repeated Suggestion suggestions = 5 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. An additional suggestion chip that can link out to the associated app
+      // or site.
+      // The chip will be rendered with the title "Open <name>". Max 20 chars.
+      StaticLinkPrompt link = 6 [(google.api.field_behavior) = OPTIONAL];
+
+      // Optional. Mode for how this messages should be merged with previously defined
+      // messages.
+      // `true` will clear all previously defined messages (first and last
+      // simple, content, suggestions link and canvas) and add messages defined
+      // in this prompt. `false` will add messages defined in this prompt to
+      // messages defined in previous responses. Setting this field to `false`
+      // will also enable appending to some fields inside Simple prompts, the
+      // Suggestions prompt and the Canvas prompt (part of the Content prompt).
+      // The Content and Link messages will always be overwritten if defined in
+      // the prompt. Default value is `false`.
+      bool override = 7 [(google.api.field_behavior) = OPTIONAL];
+
+      // A response to be used for interactive canvas experience.
+      StaticCanvasPrompt canvas = 8;
+    }
+
+    // Optional. The criteria for whether this prompt matches a request. If the selector
+    // is empty, this prompt will always be triggered.
+    Selector selector = 1 [(google.api.field_behavior) = OPTIONAL];
+
+    // The prompt response associated with the selector.
+    StaticPromptResponse prompt_response = 2;
+  }
+
+  // Defines the criteria for whether a prompt matches a request.
+  message Selector {
+    // The set of required surface capabilities.
+    SurfaceCapabilities surface_capabilities = 1;
+  }
+
+  // The list of candidate prompts to be sent to the client. Each prompt has a
+  // selector to determine when it can be used. The first selector that matches
+  // a request will be sent and the rest will be ignored.
+  repeated StaticPromptCandidate candidates = 1;
+}

+ 48 - 0
google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto

@@ -0,0 +1,48 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "StaticSimplePromptProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Represents a simple prompt to be send to a user.
+message StaticSimplePrompt {
+  // Represents a variant which is part of the simple prompt.
+  message Variant {
+    // Optional. Represents the speech to be spoken to the user.  Can be SSML or text to
+    // speech.
+    // By default, speech will be appended to previous Simple prompt's
+    // speech. If the `override` field in the containing prompt is `true` the
+    // speech defined in this field will override previous Simple prompt's
+    // speech.
+    string speech = 1 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Text to display in the chat bubble. If not given, a display rendering of
+    // the speech field above will be used. Limited to 640 chars.
+    // By default, text will be appended to previous Simple prompt's text.
+    // If the `override` field in the containing prompt is `true` the text
+    // defined in this field will override previous Simple prompt's text.
+    string text = 2 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // List of possible variants.
+  repeated Variant variants = 1;
+}

+ 33 - 0
google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto

@@ -0,0 +1,33 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "SuggestionProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Represents a suggestion chip, a UI element shown to the user for convenience.
+message Suggestion {
+  // Required. The text shown in the suggestion chip. When tapped, this text will be
+  // posted back to the conversation verbatim as if the user had typed it.
+  // Each title must be unique among the set of suggestion chips.
+  // Max 25 chars
+  string title = 1 [(google.api.field_behavior) = REQUIRED];
+}

+ 54 - 0
google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto

@@ -0,0 +1,54 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.prompt;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
+option java_multiple_files = true;
+option java_outer_classname = "SurfaceCapabilitiesProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
+
+// Represents the surface the user is using to make a request to the Action.
+message SurfaceCapabilities {
+  // Capabilities the device surface supports at the time of the request.
+  enum Capability {
+    // Unspecified surface capability.
+    UNSPECIFIED = 0;
+
+    // Device can speak to the user via text-to-speech or SSML.
+    SPEECH = 1;
+
+    // Device can display rich responses like cards, lists and tables.
+    RICH_RESPONSE = 2;
+
+    // Device can play long form audio media like music and podcasts.
+    LONG_FORM_AUDIO = 3;
+
+    // Device can display a interactive canvas response.
+    INTERACTIVE_CANVAS = 4;
+
+    // Device can use web links in rich responses to open a web browser.
+    WEB_LINK = 5;
+
+    // Device can support saving and fetching home storage.
+    HOME_STORAGE = 6;
+  }
+
+  // Required. The capabilities of the surface making a request to the Action.
+  repeated Capability capabilities = 1 [(google.api.field_behavior) = REQUIRED];
+}

+ 60 - 0
google/actions/sdk/v2/interactionmodel/scene.proto

@@ -0,0 +1,60 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/conditional_event.proto";
+import "google/actions/sdk/v2/interactionmodel/event_handler.proto";
+import "google/actions/sdk/v2/interactionmodel/intent_event.proto";
+import "google/actions/sdk/v2/interactionmodel/slot.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "SceneProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Scene is the basic unit of control flow when designing a conversation. They
+// can be chained together with other scenes, generate prompts for the end user,
+// and define slots.
+// The scene name is specified in the name of the file.
+message Scene {
+  // Handler to invoke when transitioning into this scene.
+  EventHandler on_enter = 1;
+
+  // The list of events that trigger based on intents. These events can
+  // be triggered at any time after the on_load Handler has been called.
+  // Important - these events define the set of intents which are scoped to
+  // this scene and will take precedence over any globally defined events that
+  // have the same intents or their triggering phrases. Intent names must be
+  // unique within a scene.
+  repeated IntentEvent intent_events = 2;
+
+  // The list of events to trigger based on conditional statements. These are
+  // evaluated after the form has been filled or immediately after on_load if
+  // this scene does not have a form (evaluation is only done once). Only the
+  // first matching event will be triggered.
+  repeated ConditionalEvent conditional_events = 3;
+
+  // Ordered list of slots. Each slot defines the type of data
+  // that it will resolve and configuration to customize the experience of this
+  // resolution (e.g. prompts).
+  repeated Slot slots = 4;
+
+  // Handler called when there is a change in state of a slot not
+  // caused by updates within another Handler. This allows slots to be
+  // invalidated, the scene invalidated or other changes to scene state.
+  EventHandler on_slot_updated = 5;
+}

+ 133 - 0
google/actions/sdk/v2/interactionmodel/slot.proto

@@ -0,0 +1,133 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel;
+
+import "google/actions/sdk/v2/interactionmodel/event_handler.proto";
+import "google/actions/sdk/v2/interactionmodel/type/class_reference.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/struct.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel";
+option java_multiple_files = true;
+option java_outer_classname = "SlotProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel";
+
+// Configuration for a slot. Slots are single units of data that can be filled
+// through natural language (ie. intent parameters), session parameters, and
+// other sources.
+message Slot {
+  // A single place where slot prompts are defined.
+  message PromptSettings {
+    // Prompt for the slot value itself. Example: "What size did you want?"
+    EventHandler initial_prompt = 1;
+
+    // Prompt to give when the user's input does not match the expected
+    // value type for the slot for the first time. Example: "Sorry, I
+    // didn't get that."
+    EventHandler no_match_prompt1 = 2;
+
+    // Prompt to give when the user's input does not match the expected
+    // value type for the slot for the second time. Example: "Sorry, I
+    // didn't get that."
+    EventHandler no_match_prompt2 = 3;
+
+    // Prompt to give when the user's input does not match the expected
+    // value type for the slot for the last time. Example: "Sorry, I
+    // didn't get that."
+    EventHandler no_match_final_prompt = 4;
+
+    // Prompt to give when the user does not provide an input for the first
+    // time. Example: "Sorry, I didn't get that."
+    EventHandler no_input_prompt1 = 5;
+
+    // Prompt to give when the user does not provide an input for the second
+    // time. Example: "Sorry, I didn't get that."
+    EventHandler no_input_prompt2 = 6;
+
+    // Prompt to give when the user does not provide an input for the last
+    // time. Example: "Sorry, I didn't get that."
+    EventHandler no_input_final_prompt = 7;
+  }
+
+  // Message describing the commit behavior associated with the slot after it
+  // has been successfully filled.
+  message CommitBehavior {
+    // The session parameter to write the slot value after it is filled. Note
+    // that nested paths are not currently supported. "$$" is used to write the
+    // slot value to a session parameter with same name as the slot.
+    // Eg: write_session_param = "fruit" corresponds to "$session.params.fruit".
+    // write_session_param = "ticket" corresponds to "$session.params.ticket".
+    string write_session_param = 1;
+  }
+
+  // Configuration to populate a default value for this slot.
+  message DefaultValue {
+    // Optional. The session parameter to be used to initialize the slot value, if it has
+    // a non-empty value. The type of the value must match the type of the slot.
+    // Note that nested paths are not currently supported.
+    // Eg: `session_param = "fruit"` corresponds to `$session.params.fruit`.
+    // `session_param = "ticket"` corresponds to `$session.params.ticket`.
+    string session_param = 1 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. Constant default value for the slot. This will only be used if a value
+    // for this slot was not populated through the `session_param`. The
+    // type for this value must match the type of the slot.
+    google.protobuf.Value constant = 2 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // Required. Name of the slot.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Declares the data type of this slot.
+  google.actions.sdk.v2.interactionmodel.type.ClassReference type = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Indicates whether the slot is required to be filled before
+  // advancing. Required slots that are not filled will trigger a customizable
+  // prompt to the user.
+  bool required = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Registers Prompts for different stages of slot filling.
+  PromptSettings prompt_settings = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Commit behavior associated with the slot.
+  CommitBehavior commit_behavior = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Additional configuration associated with the slot which is
+  // used for filling the slot. The format of the config is specific to the
+  // type of the slot. Resource references to user or session parameter can be
+  // added to this config. This config is needed for filling slots related to
+  // transactions and user engagement.
+  //
+  // Example:
+  //  For a slot of type actions.type.CompletePurchaseValue, the following
+  //  config proposes a digital good order with a reference to a client defined
+  //  session parameter `userSelectedSkuId`:
+  //
+  //    {
+  //      "@type": "type.googleapis.com/
+  //                  google.actions.transactions.v3.CompletePurchaseValueSpec",
+  //      "skuId": {
+  //        "skuType": "SKU_TYPE_IN_APP",
+  //        "id": "$session.params.userSelectedSkuId",
+  //        "packageName": "com.example.company"
+  //      }
+  //    }
+  google.protobuf.Value config = 6 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Configuration to populate a default value for this slot.
+  DefaultValue default_value = 7 [(google.api.field_behavior) = OPTIONAL];
+}

+ 33 - 0
google/actions/sdk/v2/interactionmodel/type/BUILD.bazel

@@ -0,0 +1,33 @@
+# This file was automatically generated by BuildFileGenerator
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+    name = "type_proto",
+    srcs = [
+        "class_reference.proto",
+        "entity_display.proto",
+        "free_text_type.proto",
+        "regular_expression_type.proto",
+        "synonym_type.proto",
+        "type.proto",
+    ],
+    deps = [
+        "//google/api:field_behavior_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)

+ 36 - 0
google/actions/sdk/v2/interactionmodel/type/class_reference.proto

@@ -0,0 +1,36 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "ClassReferenceProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// A reference to a class which is used to declare the type of a field or return
+// value. Enums are also a type of class that can be referenced using
+// ClassReference.
+message ClassReference {
+  // Required. Name of a built-in type or custom type of the parameter. Examples:
+  // `PizzaToppings`, `actions.type.Number`
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Indicates whether the data type represents a list of values.
+  bool list = 2 [(google.api.field_behavior) = OPTIONAL];
+}

+ 35 - 0
google/actions/sdk/v2/interactionmodel/type/entity_display.proto

@@ -0,0 +1,35 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "EntityDisplayProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// Elements that will be displayed on the canvas once a particular type's entity
+// is extracted from a query. Only relevant for canvas enabled apps.
+// **This message is localizable.**
+message EntityDisplay {
+  // Optional. Title of the icon.
+  string icon_title = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. Url of the icon.
+  string icon_url = 2 [(google.api.field_behavior) = REQUIRED];
+}

+ 33 - 0
google/actions/sdk/v2/interactionmodel/type/free_text_type.proto

@@ -0,0 +1,33 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "FreeTextTypeProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// Type that matches any text if surrounding words context is close to provided
+// training examples.
+message FreeTextType {
+  // Optional. Elements that will be displayed on the canvas once an entity is extracted
+  // from a query. Only relevant for canvas enabled apps.
+  EntityDisplay display = 2 [(google.api.field_behavior) = OPTIONAL];
+}

+ 44 - 0
google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto

@@ -0,0 +1,44 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "RegularExpressionTypeProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// Type that matches text by regular expressions.
+// **This message is localizable.**
+message RegularExpressionType {
+  // Represents an entity object that contains the regular expression that is
+  // used for comparison.
+  message Entity {
+    // Optional. Elements that will be displayed on the canvas once an entity is
+    // extracted from a query. Only relevant for canvas enabled apps.
+    EntityDisplay display = 1 [(google.api.field_behavior) = OPTIONAL];
+
+    // Required. Uses RE2 regex syntax (See
+    // https://github.com/google/re2/wiki/Syntax for more details)
+    repeated string regular_expressions = 2 [(google.api.field_behavior) = REQUIRED];
+  }
+
+  // Required. Named map of entities which each contain Regex strings.
+  map<string, Entity> entities = 1 [(google.api.field_behavior) = REQUIRED];
+}

+ 66 - 0
google/actions/sdk/v2/interactionmodel/type/synonym_type.proto

@@ -0,0 +1,66 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "SynonymTypeProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// Type that matches text by set of synonyms.
+message SynonymType {
+  // Represents a synonym entity field that contains the details of a single
+  // entry inside the type.
+  message Entity {
+    // Optional. The entity display details.
+    EntityDisplay display = 1 [(google.api.field_behavior) = OPTIONAL];
+
+    // Optional. The list of synonyms for the entity.
+    // **This field is localizable.**
+    repeated string synonyms = 2 [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // The type of matching that entries in this type will use. This will ensure
+  // all of the types use the same matching method and allow variation of
+  // matching for synonym matching (i.e. fuzzy versus exact). If the value is
+  // `UNSPECIFIED` it will be defaulted to `EXACT_MATCH`.
+  enum MatchType {
+    // Defaults to `EXACT_MATCH`.
+    UNSPECIFIED = 0;
+
+    // Looks for an exact match of the synonym or name.
+    EXACT_MATCH = 1;
+
+    // Looser than `EXACT_MATCH`. Looks for similar matches as well as exact
+    // matches.
+    FUZZY_MATCH = 2;
+  }
+
+  // Optional. The match type for the synonym.
+  MatchType match_type = 1 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. When set to true this will match unknown words or phrases based on
+  // surrounding input and intent training data, such as items that might be
+  // added to a grocery list.
+  bool accept_unknown_values = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. Named map of synonym entities.
+  map<string, Entity> entities = 2 [(google.api.field_behavior) = REQUIRED];
+}

+ 50 - 0
google/actions/sdk/v2/interactionmodel/type/type.proto

@@ -0,0 +1,50 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2.interactionmodel.type;
+
+import "google/actions/sdk/v2/interactionmodel/type/free_text_type.proto";
+import "google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto";
+import "google/actions/sdk/v2/interactionmodel/type/synonym_type.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type";
+option java_multiple_files = true;
+option java_outer_classname = "TypeProto";
+option java_package = "com.google.actions.sdk.v2.interactionmodel.type";
+
+// Declaration of a custom type, as opposed to built-in types. Types can be
+// assigned to slots in a scene or parameters of an intent's training phrases.
+// Practically, Types can be thought of as enums.
+// Note, type name is specified in the name of the file.
+message Type {
+  // Selection of sub type based on the type of matching to be done.
+  oneof sub_type {
+    // Synonyms type, which is essentially an enum.
+    SynonymType synonym = 1;
+
+    // Regex type, allows regular expression matching.
+    RegularExpressionType regular_expression = 2;
+
+    // FreeText type.
+    FreeTextType free_text = 3;
+  }
+
+  // Set of exceptional words/phrases that shouldn't be matched by type.
+  // Note: If word/phrase is matched by the type but listed as an exclusion it
+  // won't be returned in parameter extraction result.
+  // **This field is localizable.**
+  repeated string exclusions = 4;
+}

+ 92 - 0
google/actions/sdk/v2/localized_settings.proto

@@ -0,0 +1,92 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/theme_customization.proto";
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "LocalizedSettingsProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Represents settings of an Actions project that are specific to a user locale.
+// In this instance, user means the end user who invokes your Actions.
+// **This message is localizable.**
+message LocalizedSettings {
+  // Required. The default display name for this Actions project (if there is no
+  // translation available)
+  string display_name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The pronunciation of the display name to invoke it within a voice
+  // (spoken) context.
+  string pronunciation = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The default short description for the Actions project (if there is no
+  // translation available). 80 character limit.
+  string short_description = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The default long description for the Actions project (if there is no
+  // translation available). 4000 character limit.
+  string full_description = 4 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Small square image, 192 x 192 px.
+  // This should be specified as a reference to the corresponding image in the
+  // `resources/images/` directory. For example, `$resources.images.foo` (without the
+  // extension) for image in `resources/images/foo.jpg`
+  // When working on a project pulled from Console, the Google-managed URL
+  // pulled could be used. URLs from external sources are not allowed.
+  string small_logo_image = 5 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Large landscape image, 1920 x 1080 px.
+  // This should be specified as a reference to the corresponding image in the
+  // `resources/images/` directory. For example, `$resources.images.foo` (without the
+  // extension) for image in `resources/images/foo.jpg`
+  // When working on a project pulled from Console, the Google-managed URL
+  // pulled could be used. URLs from external sources are not allowed.
+  string large_banner_image = 6 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. The name of the developer to be displayed to users.
+  string developer_name = 7 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The contact email address for the developer.
+  string developer_email = 8 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The terms of service URL.
+  string terms_of_service_url = 9 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. The Google Assistant voice type that users hear when they interact with
+  // your Actions. The supported values are "male_1", "male_2", "female_1", and
+  // "female_2".
+  string voice = 10 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The locale for the specified voice. If not specified, this resolves
+  // to the user's Assistant locale. If specified, the voice locale must have
+  // the same root language as the locale specified in LocalizedSettings.
+  string voice_locale = 14 [(google.api.field_behavior) = OPTIONAL];
+
+  // Required. The privacy policy URL.
+  string privacy_policy_url = 11 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Sample invocation phrases displayed as part of your Actions project's
+  // description in the Assistant directory. This will help users learn how to
+  // use it.
+  repeated string sample_invocations = 12 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Theme customizations for visual components of your Actions.
+  ThemeCustomization theme_customization = 13 [(google.api.field_behavior) = OPTIONAL];
+}

+ 30 - 0
google/actions/sdk/v2/manifest.proto

@@ -0,0 +1,30 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ManifestProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Contains information that's "transportable" i.e. not specific to any given
+// project and can be moved between projects.
+message Manifest {
+  // Version of the file format. The current file format version is 1.0
+  // Example: "1.0"
+  string version = 1;
+}

+ 44 - 0
google/actions/sdk/v2/release_channel.proto

@@ -0,0 +1,44 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/api/resource.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ReleaseChannelProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Definition of release channel resource.
+message ReleaseChannel {
+  option (google.api.resource) = {
+    type: "actions.googleapis.com/ReleaseChannel"
+    pattern: "projects/{project}/releaseChannels/{release_channel}"
+  };
+
+  // The unique name of the release channel in the following format.
+  // `projects/{project}/releaseChannels/{release_channel}`.
+  string name = 1;
+
+  // Version currently deployed to this release channel in the following format:
+  // `projects/{project}/versions/{version}`.
+  string current_version = 2;
+
+  // Version to be deployed to this release channel in the following format:
+  // `projects/{project}/versions/{version}`.
+  string pending_version = 3;
+}

+ 186 - 0
google/actions/sdk/v2/settings.proto

@@ -0,0 +1,186 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/actions/sdk/v2/account_linking.proto";
+import "google/actions/sdk/v2/localized_settings.proto";
+import "google/actions/sdk/v2/surface.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "SettingsProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Represents settings of an Actions project that are not locale specific.
+message Settings {
+  // The category choices for an Actions project.
+  enum Category {
+    // Unknown / Unspecified.
+    CATEGORY_UNSPECIFIED = 0;
+
+    // Business and Finance category.
+    BUSINESS_AND_FINANCE = 2;
+
+    // Education and Reference category.
+    EDUCATION_AND_REFERENCE = 3;
+
+    // Food and Drink category.
+    FOOD_AND_DRINK = 4;
+
+    // Games and Trivia category.
+    GAMES_AND_TRIVIA = 5;
+
+    // Health and Fitness category.
+    HEALTH_AND_FITNESS = 6;
+
+    // Kids and Family category.
+    KIDS_AND_FAMILY = 20;
+
+    // Lifestyle category.
+    LIFESTYLE = 7;
+
+    // Local category.
+    LOCAL = 8;
+
+    // Movies and TV category.
+    MOVIES_AND_TV = 9;
+
+    // Music and Audio category.
+    MUSIC_AND_AUDIO = 10;
+
+    // News category,
+    NEWS = 1;
+
+    // Novelty and Humor category.
+    NOVELTY_AND_HUMOR = 11;
+
+    // Productivity category.
+    PRODUCTIVITY = 12;
+
+    // Shopping category.
+    SHOPPING = 13;
+
+    // Social category.
+    SOCIAL = 14;
+
+    // Sports category.
+    SPORTS = 15;
+
+    // Travel and Transportation category.
+    TRAVEL_AND_TRANSPORTATION = 16;
+
+    // Utilities category.
+    UTILITIES = 17;
+
+    // Weather category.
+    WEATHER = 18;
+
+    // Home Control category.
+    HOME_CONTROL = 19;
+  }
+
+  // Actions project id.
+  string project_id = 1;
+
+  // Locale which is default for the project. For all files except under
+  // `resources/` with no locale in the path, the localized data is attributed
+  // to this `default_locale`. For files under `resources/` no locale means that
+  // the resource is applicable to all locales.
+  string default_locale = 2;
+
+  // Represents the regions where users can invoke your Actions, which is
+  // based on the user's location of presence. Cannot be set if
+  // `disabled_regions` is set. If both `enabled_regions` and `disabled_regions`
+  // are not specified, users can invoke your Actions in all regions. Each
+  // region is represented using the Canonical Name of Adwords geotargets. See
+  // https://developers.google.com/adwords/api/docs/appendix/geotargeting
+  // Examples include:
+  // - "Germany"
+  // - "Ghana"
+  // - "Greece"
+  // - "Grenada"
+  // - "United Kingdom"
+  // - "United States"
+  // - "United States Minor Outlying Islands"
+  // - "Uruguay"
+  repeated string enabled_regions = 3;
+
+  // Represents the regions where your Actions are blocked, based on the user's
+  // location of presence. Cannot be set if `enabled_regions` is set.
+  // Each region is represented using the Canonical Name of Adwords geotargets.
+  // See https://developers.google.com/adwords/api/docs/appendix/geotargeting
+  // Examples include:
+  // - "Germany"
+  // - "Ghana"
+  // - "Greece"
+  // - "Grenada"
+  // - "United Kingdom"
+  // - "United States"
+  // - "United States Minor Outlying Islands"
+  // - "Uruguay"
+  repeated string disabled_regions = 4;
+
+  // The category for this Actions project.
+  Category category = 5;
+
+  // Whether Actions can use transactions (for example, making
+  // reservations, taking orders, etc.). If false, then attempts to use the
+  // Transactions APIs fail.
+  bool uses_transactions_api = 6;
+
+  // Whether Actions can perform transactions for digital goods.
+  bool uses_digital_purchase_api = 7;
+
+  // Whether Actions use Interactive Canvas.
+  bool uses_interactive_canvas = 8;
+
+  // Whether Actions use the home storage feature.
+  bool uses_home_storage = 17;
+
+  // Whether Actions content is designed for family (DFF).
+  bool designed_for_family = 9;
+
+  // Whether Actions contains alcohol or tobacco related content.
+  bool contains_alcohol_or_tobacco_content = 11;
+
+  // Whether Actions may leave mic open without an explicit prompt during
+  // conversation.
+  bool keeps_mic_open = 12;
+
+  // The surface requirements that a client surface must support to invoke
+  // Actions in this project.
+  SurfaceRequirements surface_requirements = 13;
+
+  // Free-form testing instructions for Actions reviewer (for example, account
+  // linking instructions).
+  string testing_instructions = 14;
+
+  // Localized settings for the project's default locale. Every additional
+  // locale should have its own settings file in its own directory.
+  LocalizedSettings localized_settings = 15;
+
+  // Allow users to create or link accounts through Google sign-in and/or your
+  // own OAuth service.
+  AccountLinking account_linking = 16;
+
+  // Android apps selected to acccess Google Play purchases for transactions.
+  // This is a selection from the Android apps connected to the actions project
+  // to verify brand ownership and enable additional features. See
+  // https://developers.google.com/assistant/console/brand-verification for more
+  // information.
+  repeated string selected_android_apps = 20;
+}

+ 64 - 0
google/actions/sdk/v2/surface.proto

@@ -0,0 +1,64 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "SurfaceProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Contains a set of requirements that the client surface must support to invoke
+// Actions in your project.
+message SurfaceRequirements {
+  // The minimum set of capabilities needed to invoke the Actions in your
+  // project. If the surface is missing any of these, the Action will not be
+  // triggered.
+  repeated CapabilityRequirement minimum_requirements = 1;
+}
+
+// Represents a requirement about the availability of a given capability.
+message CapabilityRequirement {
+  // Possible set of surface capabilities.
+  enum SurfaceCapability {
+    // Unknown / Unspecified.
+    SURFACE_CAPABILITY_UNSPECIFIED = 0;
+
+    // Surface supports audio output.
+    AUDIO_OUTPUT = 1;
+
+    // Surface supports screen/visual output.
+    SCREEN_OUTPUT = 2;
+
+    // Surface supports media response audio.
+    MEDIA_RESPONSE_AUDIO = 3;
+
+    // Surface supports web browsers.
+    WEB_BROWSER = 4;
+
+    // Surface supports account linking.
+    ACCOUNT_LINKING = 7;
+
+    // Surface supports Interactive Canvas.
+    INTERACTIVE_CANVAS = 8;
+
+    // Surface supports home storage.
+    HOME_STORAGE = 9;
+  }
+
+  // The type of capability.
+  SurfaceCapability capability = 1;
+}

+ 83 - 0
google/actions/sdk/v2/theme_customization.proto

@@ -0,0 +1,83 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ThemeCustomizationProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Styles applied to cards that are presented to users
+message ThemeCustomization {
+  // Describes how the borders of images should be rendered.
+  enum ImageCornerStyle {
+    // Undefined / Unspecified.
+    IMAGE_CORNER_STYLE_UNSPECIFIED = 0;
+
+    // Round corner for image.
+    CURVED = 1;
+
+    // Rectangular corner for image.
+    ANGLED = 2;
+  }
+
+  // Background color of cards. Acts as a fallback if `background_image` is
+  // not provided by developers or `background_image` doesn't fit for certain
+  // surfaces.
+  // Example usage: #FAFAFA
+  string background_color = 1;
+
+  // Primary theme color of the Action will be used to set text color of title,
+  // action item background color for Actions on Google cards.
+  // Example usage: #FAFAFA
+  string primary_color = 2;
+
+  // The font family that will be used for title of cards.
+  // Supported fonts:
+  // - Sans Serif
+  // - Sans Serif Medium
+  // - Sans Serif Bold
+  // - Sans Serif Black
+  // - Sans Serif Condensed
+  // - Sans Serif Condensed Medium
+  // - Serif
+  // - Serif Bold
+  // - Monospace
+  // - Cursive
+  // - Sans Serif Smallcaps
+  string font_family = 3;
+
+  // Border style of foreground image of cards. For example, can be applied on
+  // the foreground image of a basic card or carousel card.
+  ImageCornerStyle image_corner_style = 4;
+
+  // Landscape mode (minimum 1920x1200 pixels).
+  // This should be specified as a reference to the corresponding image in the
+  // `resources/images/` directory. Eg: `$resources.images.foo` (without the
+  // extension) for image in `resources/images/foo.jpg`
+  // When working on a project pulled from Console the Google managed url pulled
+  // could be used.
+  string landscape_background_image = 5;
+
+  // Portrait mode (minimum 1200x1920 pixels).
+  // This should be specified as a reference to the corresponding image in the
+  // `resources/images/` directory. Eg: `$resources.images.foo` (without the
+  // extension) for image in `resources/images/foo.jpg`
+  // When working on a project pulled from Console the Google managed url pulled
+  // could be used.
+  string portrait_background_image = 6;
+}

+ 46 - 0
google/actions/sdk/v2/validation_results.proto

@@ -0,0 +1,46 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "ValidationResultsProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Wrapper for repeated validation result.
+message ValidationResults {
+  // Multiple validation results.
+  repeated ValidationResult results = 1;
+}
+
+// Represents a validation result associated with the app content.
+message ValidationResult {
+  // Context to identify the resource the validation message relates to.
+  message ValidationContext {
+    // Language code of the lozalized resource.
+    // Empty if the error is for non-localized resource.
+    // See the list of supported languages in
+    // https://developers.google.com/assistant/console/languages-locales
+    string language_code = 1;
+  }
+
+  // Holds the validation message.
+  string validation_message = 1;
+
+  // Context to identify the resource the validation message relates to.
+  ValidationContext validation_context = 2;
+}

+ 91 - 0
google/actions/sdk/v2/version.proto

@@ -0,0 +1,91 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "VersionProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Definition of version resource.
+message Version {
+  option (google.api.resource) = {
+    type: "actions.googleapis.com/Version"
+    pattern: "projects/{project}/versions/{version}"
+  };
+
+  // Represents the current state of the version.
+  message VersionState {
+    // Enum indicating the states that a Version can take. This enum is not yet
+    // frozen and values maybe added later.
+    enum State {
+      // Default value of State.
+      STATE_UNSPECIFIED = 0;
+
+      // The version creation is in progress.
+      CREATION_IN_PROGRESS = 1;
+
+      // The version creation failed.
+      CREATION_FAILED = 2;
+
+      // The version has been successfully created.
+      CREATED = 3;
+
+      // The version is under policy review (aka Approval).
+      REVIEW_IN_PROGRESS = 4;
+
+      // The version has been approved for policy review and can be deployed.
+      APPROVED = 5;
+
+      // The version has been conditionally approved but is pending final
+      // review. It may be rolled back if final review is denied.
+      CONDITIONALLY_APPROVED = 6;
+
+      // The version has been denied for policy review.
+      DENIED = 7;
+
+      // The version is taken down as entire agent and all versions are taken
+      // down.
+      UNDER_TAKEDOWN = 8;
+
+      // The version has been deleted.
+      DELETED = 9;
+    }
+
+    // The current state of the version.
+    State state = 1;
+
+    // User-friendly message for the current state of the version.
+    string message = 2;
+  }
+
+  // The unique identifier of the version in the following format.
+  // `projects/{project}/versions/{version}`.
+  string name = 1;
+
+  // The current state of the version.
+  VersionState version_state = 2;
+
+  // Email of the user who created this version.
+  string creator = 3;
+
+  // Timestamp of the last change to this version.
+  google.protobuf.Timestamp update_time = 4;
+}

+ 82 - 0
google/actions/sdk/v2/webhook.proto

@@ -0,0 +1,82 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.actions.sdk.v2;
+
+import "google/api/field_behavior.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
+option java_multiple_files = true;
+option java_outer_classname = "WebhookProto";
+option java_package = "com.google.actions.sdk.v2";
+
+// Metadata for different types of webhooks. If you're using
+// `inlineCloudFunction`, your source code must be in a directory with the same
+// name as the value for the `executeFunction` key.
+// For example, a value of `my_webhook` for the`executeFunction` key would have
+// a code structure like this:
+//  - `/webhooks/my_webhook.yaml`
+//  - `/webhooks/my_webhook/index.js`
+//  - `/webhooks/my_webhook/package.json`
+message Webhook {
+  // Declares the name of the webhoook handler. A webhook can have
+  // multiple handlers registered. These handlers can be called from multiple
+  // places in your Actions project.
+  message Handler {
+    // Required. Name of the handler. Must be unique across all handlers the Actions
+    // project. You can check the name of this handler to invoke the correct
+    // function in your fulfillment source code.
+    string name = 1 [(google.api.field_behavior) = REQUIRED];
+  }
+
+  // REST endpoint to notify if you're not using the inline editor.
+  message HttpsEndpoint {
+    // The HTTPS base URL for your fulfillment endpoint (HTTP is not supported).
+    // Handler names are appended to the base URL path after a colon
+    // (following the style guide in
+    // https://cloud.google.com/apis/design/custom_methods).
+    // For example a base URL of 'https://gactions.service.com/api' would
+    // receive requests with URL 'https://gactions.service.com/api:{method}'.
+    string base_url = 1;
+
+    // Map of HTTP parameters to be included in the POST request.
+    map<string, string> http_headers = 2;
+
+    // Version of the protocol used by the endpoint. This is the protocol shared
+    // by all fulfillment types and not specific to Google fulfillment type.
+    int32 endpoint_api_version = 3;
+  }
+
+  // Holds the metadata of an inline Cloud Function deployed from the
+  // webhooks folder.
+  message InlineCloudFunction {
+    // The name of the Cloud Function entry point. The value of this field
+    // should match the name of the method exported from the source code.
+    string execute_function = 1;
+  }
+
+  // List of handlers for this webhook.
+  repeated Handler handlers = 1;
+
+  // Only one webhook type is supported.
+  oneof webhook_type {
+    // Custom webhook HTTPS endpoint.
+    HttpsEndpoint https_endpoint = 2;
+
+    // Metadata for cloud function deployed from code in the webhooks folder.
+    InlineCloudFunction inline_cloud_function = 3;
+  }
+}

+ 167 - 0
google/actions/type/BUILD.bazel

@@ -0,0 +1,167 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "date_range_proto",
+    srcs = ["date_range.proto"],
+    deps = [
+        "//google/type:date_proto",
+    ],
+)
+
+proto_library(
+    name = "datetime_range_proto",
+    srcs = ["datetime_range.proto"],
+    deps = [
+        "//google/type:datetime_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "type_java_proto",
+    deps = [
+        ":date_range_proto",
+        ":datetime_range_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_proto_library",
+)
+
+go_proto_library(
+    name = "date_range_go_proto",
+    importpath = "google.golang.org/genproto/googleapis/type/date_range",
+    protos = [
+        ":date_range_proto",
+    ],
+    deps = ["//google/type:date_go_proto"],
+)
+
+
+go_proto_library(
+    name = "datetime_range_go_proto",
+    importpath = "google.golang.org/genproto/googleapis/type/datetime_range",
+    protos = [
+        ":datetime_range_proto",
+    ],
+    deps = ["//google/type:datetime_go_proto"],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "py_proto_library",
+)
+
+py_proto_library(
+    name = "date_range_py_proto",
+    deps = [":date_range_proto"],
+)
+
+py_proto_library(
+    name = "datetime_range_py_proto",
+    deps = [":datetime_range_proto"],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "date_range_php_proto",
+    deps = [":date_range_proto"],
+)
+
+php_proto_library(
+    name = "datetime_range_php_proto",
+    deps = [":datetime_range_proto"],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "date_range_ruby_proto",
+    deps = [":date_range_proto"],
+)
+
+ruby_proto_library(
+    name = "datetime_range_ruby_proto",
+    deps = [":datetime_range_proto"],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "date_range_csharp_proto",
+    deps = [":date_range_proto"],
+)
+
+csharp_proto_library(
+    name = "datetime_range_csharp_proto",
+    deps = [":datetime_range_proto"],
+)
+
+##############################################################################
+# C++
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "cc_proto_library",
+)
+
+cc_proto_library(
+    name = "date_range_cc_proto",
+    deps = [
+        ":date_range_proto",
+    ],
+)
+
+cc_proto_library(
+    name = "datetime_range_cc_proto",
+    deps = [
+        ":datetime_range_proto",
+    ],
+)

+ 81 - 0
google/actions/type/date_range.proto

@@ -0,0 +1,81 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.actions.type;
+
+import "google/type/date.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/type/date_range;date_range";
+option java_multiple_files = true;
+option java_outer_classname = "DateRangeProto";
+option java_package = "com.google.actions.type";
+option objc_class_prefix = "AOGTP";
+
+// Represents a range based on whole or partial calendar dates, e.g. the
+// duration of a hotel reservation or the Common Era. This can represent:
+//
+// * A range between full dates, e.g. the duration of a hotel reservation
+// * A range between years, e.g. a historical era
+// * A range between year/month dates, e.g. the duration of a job on a resume
+// * A range beginning in a year, e.g. the Common Era
+// * A range ending on a specific date, e.g. the period of time before an event
+//
+// While [google.type.Date][google.type.Date] allows zero years, DateRange does not. Year must
+// always be non-zero.
+//
+// End cannot be chronologically before start. For example, if start has year
+// 2000, end cannot have year 1999.
+//
+// When both set, start and end must have exactly the same precision. That is,
+// they must have the same fields populated with non-zero values. For example,
+// if start specifies only year and month, then end must also specify only year
+// and month (but not day).
+//
+// The date range is inclusive. That is, the dates specified by start and end
+// are part of the date range. For example, the date January 1, 2000 falls
+// within any date with start or end equal to January 1, 2000. When determining
+// whether a date is inside a date range, the date should only be compared to
+// start and end when those values are set.
+//
+// When a date and date range are specified to different degrees of precision,
+// the rules for evaluating whether that date is inside the date range are as
+// follows:
+//
+//  * When comparing the date to the start of the date range, unspecified months
+//    should be replaced with 1, and unspecified days should be replaced with 1.
+//    For example, the year 2000 is within the date range with start equal to
+//    January 1, 2000 and no end. And the date January 1, 2000 is within the
+//    date range with start equal to the year 2000 and no end.
+//
+//  * When comparing the date to the end of the date range, unspecified months
+//    should be replaced with 12, and unspecified days should be replaced with
+//    the last valid day for the month/year. For example, the year 2000 is
+//    within the date range with start equal to January 1, 1999 and end equal to
+//    December 31, 2000. And the date December 31, 2001 is within the date range
+//    with start equal to the year 2000 and end equal to the year 2001.
+//
+// The semantics of start and end are the same as those of [google.type.Date][google.type.Date],
+// except that year must always be non-zero in DateRange.
+message DateRange {
+  // Date at which the date range begins. If unset, the date range has no
+  // beginning bound.
+  google.type.Date start = 1;
+
+  // Date at which the date range ends. If unset, the date range has no ending
+  // bound.
+  google.type.Date end = 2;
+}

+ 66 - 0
google/actions/type/datetime_range.proto

@@ -0,0 +1,66 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.actions.type;
+
+import "google/type/datetime.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/type/date_time_range;date_time_range";
+option java_multiple_files = true;
+option java_outer_classname = "DateTimeRangeProto";
+option java_package = "com.google.actions.type";
+option objc_class_prefix = "AOGTP";
+
+// Represents a date and time range. This can represent:
+//
+// * A range between points in time with time zone or offset, e.g. the duration
+//   of a flight which starts in the "America/New_York" time zone and ends in
+//   the "Australia/Sydney" time zone
+// * A range between points in time without time zone/offset info, e.g. an
+//   appointment in local time
+// * A range starting at a specific date and time, e.g. the range of time which
+//   can be measured in milliseconds since the Unix epoch (period starting with
+//   1970-01-01T00:00:00Z)
+// * A range ending at a specific date and time, e.g. range of time before
+//   a deadline
+//
+// When considering whether a DateTime falls within a DateTimeRange, the start
+// of the range is inclusive and the end is exclusive.
+//
+// While [google.type.DateTime][google.type.DateTime] allows zero years, DateTimeRange does not.
+// Year must always be non-zero.
+//
+// When both start and end are set, either both or neither must have a
+// time_offset. When set, time_offset can be specified by either utc_offset or
+// time_zone and must match for start and end, that is if start has utc_offset
+// set then end must also have utc_offset set. The values of utc_offset or
+// time_zone need not be the same for start and end.
+//
+// When both start and end are set, start must be chronologically less than or
+// equal to end. When start and end are equal, the range is empty.
+//
+// The semantics of start and end are the same as those of
+// [google.type.DateTime][google.type.DateTime].
+message DateTimeRange {
+  // DateTime at which the date range begins. If unset, the range has no
+  // beginning bound.
+  google.type.DateTime start = 1;
+
+  // DateTime at which the date range ends. If unset, the range has no ending
+  // bound.
+  google.type.DateTime end = 2;
+}

+ 21 - 0
google/actions/type/type_aog.yaml

@@ -0,0 +1,21 @@
+type: google.api.Service
+config_version: 1
+name: type.aog.googleapis.com
+title: Common Actions on Google Types
+
+types:
+- name: google.actions.type.DateRange
+- name: google.actions.type.DateTimeRange
+
+documentation:
+  summary: Defines common types for Actions on Google APIs.
+  overview: |-
+    This package contains definitions of common types for Actions on Google
+    APIs, which are used in addition to the common Google API types in the
+    google.type package. These types are not versioned, and must go through
+    extensive review before being created.
+
+    Like the types in google.type, all types defined in this package are
+    suitable for different APIs to exchange data, and will never break binary
+    compatibility. They should have design quality comparable to major
+    programming languages like Java and C#.

+ 1 - 0
google/ads/admob/BUILD.bazel

@@ -0,0 +1 @@
+exports_files(["admob_grpc_service_config.json"] + glob(["*.yaml"]))

+ 15 - 0
google/ads/admob/admob_grpc_service_config.json

@@ -0,0 +1,15 @@
+{
+  "methodConfig": [{
+    "name": [
+      { "service": "google.ads.admob.v1.AdMobApi" }
+    ],
+    "timeout": "120s",
+    "retryPolicy": {
+      "maxAttempts": 5,
+      "initialBackoff": "1s",
+      "maxBackoff": "10s",
+      "backoffMultiplier": 1.3,
+      "retryableStatusCodes": ["UNAVAILABLE"]
+    }
+  }]
+}

+ 23 - 0
google/ads/admob/admob_v1.yaml

@@ -0,0 +1,23 @@
+type: google.api.Service
+config_version: 3
+name: admob.googleapis.com
+title: AdMob API
+
+apis:
+- name: google.ads.admob.v1.AdMobApi
+
+documentation:
+  summary: The AdMob API allows publishers to programmatically get information about their AdMob
+           account.
+
+backend:
+  rules:
+  - selector: 'google.ads.admob.v1.AdMobApi.*'
+    deadline: 120.0
+
+authentication:
+  rules:
+  - selector: 'google.ads.admob.v1.AdMobApi.*'
+    oauth:
+      canonical_scopes: |-
+        https://www.googleapis.com/auth/admob.report

+ 373 - 0
google/ads/admob/v1/BUILD.bazel

@@ -0,0 +1,373 @@
+# This file was automatically generated by BuildFileGenerator
+# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
+
+# Most of the manual changes to this file will be overwritten.
+# It's **only** allowed to change the following rule attribute values:
+# - names of *_gapic_assembly_* rules
+# - certain parameters of *_gapic_library rules, including but not limited to:
+#    * extra_protoc_parameters
+#    * extra_protoc_file_parameters
+# The complete list of preserved parameters can be found in the source code.
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "admob_proto",
+    srcs = [
+        "admob_api.proto",
+        "admob_resources.proto",
+    ],
+    deps = [
+        "//google/api:annotations_proto",
+        "//google/api:client_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "//google/cloud:common_resources_proto",
+        "//google/type:date_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "admob_proto_with_info",
+    deps = [
+        ":admob_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+    "java_grpc_library",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "admob_java_proto",
+    deps = [":admob_proto"],
+)
+
+java_grpc_library(
+    name = "admob_java_grpc",
+    srcs = [":admob_proto"],
+    deps = [":admob_java_proto"],
+)
+
+java_gapic_library(
+    name = "admob_java_gapic",
+    srcs = [
+        ":admob_proto_with_info",
+    ],
+    gapic_yaml = "admob_gapic.yaml",
+    grpc_service_config = "//google/ads/admob:admob_grpc_service_config.json",
+    rest_numeric_enums = False,
+    test_deps = [
+        ":admob_java_grpc",
+    ],
+    transport = "rest",
+    deps = [
+        ":admob_java_proto",
+    ],
+)
+
+java_gapic_test(
+    name = "admob_java_gapic_test_suite",
+    test_classes = [
+        "com.google.ads.admob.v1.AdMobApiClientTest",
+    ],
+    runtime_deps = [":admob_java_gapic_test"],
+)
+
+# Open Source Packages
+java_gapic_assembly_gradle_pkg(
+    name = "google-ads-admob-v1-java",
+    transport = "rest",
+    deps = [
+        ":admob_java_gapic",
+        ":admob_java_grpc",
+        ":admob_java_proto",
+        ":admob_proto",
+    ],
+)
+
+##############################################################################
+# Go
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "go_gapic_assembly_pkg",
+    "go_gapic_library",
+    "go_proto_library",
+    "go_test",
+)
+
+go_proto_library(
+    name = "admob_go_proto",
+    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+    importpath = "google.golang.org/genproto/googleapis/ads/admob/v1",
+    protos = [":admob_proto"],
+    deps = [
+        "//google/api:annotations_go_proto",
+        "//google/type:date_go_proto",
+    ],
+)
+
+go_gapic_library(
+    name = "admob_go_gapic",
+    srcs = [":admob_proto_with_info"],
+    grpc_service_config = None,
+    importpath = "google.golang.org/google/ads/admob/v1;admob",
+    rest_numeric_enums = False,
+    service_yaml = "//google/ads/admob:admob_v1.yaml",
+    transport = "rest",
+    deps = [
+        ":admob_go_proto",
+    ],
+)
+
+go_test(
+    name = "admob_go_gapic_test",
+    srcs = [":admob_go_gapic_srcjar_test"],
+    embed = [":admob_go_gapic"],
+    importpath = "google.golang.org/google/ads/admob/v1",
+)
+
+# Open Source Packages
+go_gapic_assembly_pkg(
+    name = "gapi-ads-admob-v1-go",
+    deps = [
+        ":admob_go_gapic",
+        ":admob_go_gapic_srcjar-test.srcjar",
+        ":admob_go_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+    "py_grpc_library",
+    "py_proto_library",
+    "py_test",
+)
+
+py_proto_library(
+    name = "admob_py_proto",
+    deps = [":admob_proto"],
+)
+
+py_grpc_library(
+    name = "admob_py_grpc",
+    srcs = [":admob_proto"],
+    deps = [":admob_py_proto"],
+)
+
+py_gapic_library(
+    name = "admob_py_gapic",
+    srcs = [
+        ":admob_proto_with_info",
+    ],
+    rest_numeric_enums = False,
+    transport = "rest",
+)
+
+py_test(
+    name = "admob_py_gapic_test",
+    srcs = [
+        "admob_py_gapic_pytest.py",
+        "admob_py_gapic_test.py",
+    ],
+    legacy_create_init = False,
+    deps = [":admob_py_gapic"],
+)
+
+# Open Source Packages
+py_gapic_assembly_pkg(
+    name = "ads-admob-v1-py",
+    deps = [
+        ":admob_py_gapic",
+        ":admob_py_grpc",
+        ":admob_py_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "admob_php_proto",
+    deps = [":admob_proto"],
+)
+
+php_grpc_library(
+    name = "admob_php_grpc",
+    srcs = [":admob_proto"],
+    deps = [":admob_php_proto"],
+)
+
+php_gapic_library(
+    name = "admob_php_gapic",
+    srcs = [":admob_proto"],
+    gapic_yaml = "admob_gapic.yaml",
+    grpc_service_config = None,
+    rest_numeric_enums = False,
+    service_yaml = "//google/ads/admob:admob_v1.yaml",
+    transport = "rest",
+    deps = [
+        ":admob_php_grpc",
+        ":admob_php_proto",
+    ],
+)
+
+# Open Source Packages
+php_gapic_assembly_pkg(
+    name = "google-ads-admob-v1-php",
+    deps = [
+        ":admob_php_gapic",
+        ":admob_php_grpc",
+        ":admob_php_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "admob_nodejs_gapic",
+    src = ":admob_proto_with_info",
+    extra_protoc_parameters = ["metadata"],
+    grpc_service_config = None,
+    package = "google.ads.admob.v1",
+    rest_numeric_enums = False,
+    service_yaml = "//google/ads/admob:admob_v1.yaml",
+    transport = "rest",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "ads-admob-v1-nodejs",
+    deps = [
+        ":admob_nodejs_gapic",
+        ":admob_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_cloud_gapic_library",
+    "ruby_gapic_assembly_pkg",
+    "ruby_grpc_library",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "admob_ruby_proto",
+    deps = [":admob_proto"],
+)
+
+ruby_grpc_library(
+    name = "admob_ruby_grpc",
+    srcs = [":admob_proto"],
+    deps = [":admob_ruby_proto"],
+)
+
+ruby_cloud_gapic_library(
+    name = "admob_ruby_gapic",
+    srcs = [":admob_proto_with_info"],
+    extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-admob-v1"],
+    grpc_service_config = None,
+    rest_numeric_enums = False,
+    deps = [
+        ":admob_ruby_grpc",
+        ":admob_ruby_proto",
+    ],
+)
+
+# Open Source Packages
+ruby_gapic_assembly_pkg(
+    name = "google-ads-admob-v1-ruby",
+    deps = [
+        ":admob_ruby_gapic",
+        ":admob_ruby_grpc",
+        ":admob_ruby_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+    "csharp_grpc_library",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "admob_csharp_proto",
+    deps = [":admob_proto"],
+)
+
+csharp_grpc_library(
+    name = "admob_csharp_grpc",
+    srcs = [":admob_proto"],
+    deps = [":admob_csharp_proto"],
+)
+
+csharp_gapic_library(
+    name = "admob_csharp_gapic",
+    srcs = [":admob_proto_with_info"],
+    common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
+    rest_numeric_enums = False,
+    deps = [
+        ":admob_csharp_grpc",
+        ":admob_csharp_proto",
+    ],
+)
+
+# Open Source Packages
+csharp_gapic_assembly_pkg(
+    name = "google-ads-admob-v1-csharp",
+    deps = [
+        ":admob_csharp_gapic",
+        ":admob_csharp_grpc",
+        ":admob_csharp_proto",
+    ],
+)
+
+##############################################################################
+# C++
+##############################################################################
+# Put your C++ rules here

+ 224 - 0
google/ads/admob/v1/admob_api.proto

@@ -0,0 +1,224 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.admob.v1;
+
+import "google/ads/admob/v1/admob_resources.proto";
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/ads/admob/v1;admob";
+option java_outer_classname = "AdMobApiProto";
+option java_package = "com.google.ads.admob.v1";
+
+// The AdMob API allows AdMob publishers programmatically get information about
+// their AdMob account.
+service AdMobApi {
+  option (google.api.default_host) = "admob.googleapis.com";
+  option (google.api.oauth_scopes) =
+      "https://www.googleapis.com/auth/admob.report";
+
+  // Gets information about the specified AdMob publisher account.
+  rpc GetPublisherAccount(GetPublisherAccountRequest)
+      returns (PublisherAccount) {
+    option (google.api.http) = {
+      get: "/v1/{name=accounts/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Lists the AdMob publisher account accessible with the client credential.
+  // Currently, all credentials have access to at most one AdMob account.
+  rpc ListPublisherAccounts(ListPublisherAccountsRequest)
+      returns (ListPublisherAccountsResponse) {
+    option (google.api.http) = {
+      get: "/v1/accounts"
+    };
+  }
+
+  // Generates an AdMob Network report based on the provided report
+  // specification.
+  rpc GenerateNetworkReport(GenerateNetworkReportRequest)
+      returns (stream GenerateNetworkReportResponse) {
+    option (google.api.http) = {
+      post: "/v1/{parent=accounts/*}/networkReport:generate"
+      body: "*"
+    };
+  }
+
+  // Generates an AdMob Mediation report based on the provided report
+  // specification.
+  rpc GenerateMediationReport(GenerateMediationReportRequest)
+      returns (stream GenerateMediationReportResponse) {
+    option (google.api.http) = {
+      post: "/v1/{parent=accounts/*}/mediationReport:generate"
+      body: "*"
+    };
+  }
+}
+
+// Request to retrieve the specified publisher account.
+message GetPublisherAccountRequest {
+  // Resource name of the publisher account to retrieve.
+  // Example: accounts/pub-9876543210987654
+  string name = 1;
+}
+
+// Request to retrieve the AdMob publisher account accessible with the client
+// credential. Currently all credentials have access to at most 1 account.
+message ListPublisherAccountsRequest {
+  // Maximum number of accounts to return.
+  int32 page_size = 1;
+
+  // The value returned by the last `ListPublisherAccountsResponse`; indicates
+  // that this is a continuation of a prior `ListPublisherAccounts` call, and
+  // that the system should return the next page of data.
+  string page_token = 2;
+}
+
+// Response for the publisher account list request.
+message ListPublisherAccountsResponse {
+  // Publisher that the client credentials can access.
+  repeated PublisherAccount account = 1;
+
+  // If not empty, indicates that there might be more accounts for the request;
+  // you must pass this value in a new `ListPublisherAccountsRequest`.
+  string next_page_token = 2;
+}
+
+// Request to generate an AdMob Mediation report.
+message GenerateMediationReportRequest {
+  // Resource name of the account to generate the report for.
+  // Example: accounts/pub-9876543210987654
+  string parent = 1;
+
+  // Network report specification.
+  MediationReportSpec report_spec = 2;
+}
+
+// The streaming response for the AdMob Mediation report where the first
+// response contains the report header, then a stream of row responses, and
+// finally a footer as the last response message.
+//
+// For example:
+//
+//     [{
+//       "header": {
+//         "date_range": {
+//           "start_date": {"year": 2018, "month": 9, "day": 1},
+//           "end_date": {"year": 2018, "month": 9, "day": 1}
+//         },
+//         "localization_settings": {
+//           "currency_code": "USD",
+//           "language_code": "en-US"
+//         }
+//       }
+//     },
+//     {
+//       "row": {
+//         "dimension_values": {
+//           "DATE": {"value": "20180918"},
+//           "APP": {
+//             "value": "ca-app-pub-8123415297019784~1001342552",
+//              "display_label": "My app name!"
+//           }
+//         },
+//         "metric_values": {
+//           "ESTIMATED_EARNINGS": {"decimal_value": "1324746"}
+//         }
+//       }
+//     },
+//     {
+//       "footer": {"matching_row_count": 1}
+//     }]
+message GenerateMediationReportResponse {
+  // Each stream response message contains one type of payload.
+  oneof payload {
+    // Report generation settings that describes the report contents, such as
+    // the report date range and localization settings.
+    ReportHeader header = 1;
+
+    // Actual report data.
+    ReportRow row = 2;
+
+    // Additional information about the generated report, such as warnings about
+    // the data.
+    ReportFooter footer = 3;
+  }
+}
+
+// Request to generate an AdMob Network report.
+message GenerateNetworkReportRequest {
+  // Resource name of the account to generate the report for.
+  // Example: accounts/pub-9876543210987654
+  string parent = 1;
+
+  // Network report specification.
+  NetworkReportSpec report_spec = 2;
+}
+
+// The streaming response for the AdMob Network report where the first response
+// contains the report header, then a stream of row responses, and finally a
+// footer as the last response message.
+//
+// For example:
+//
+//     [{
+//       "header": {
+//         "dateRange": {
+//           "startDate": {"year": 2018, "month": 9, "day": 1},
+//           "endDate": {"year": 2018, "month": 9, "day": 1}
+//         },
+//         "localizationSettings": {
+//           "currencyCode": "USD",
+//           "languageCode": "en-US"
+//         }
+//       }
+//     },
+//     {
+//       "row": {
+//         "dimensionValues": {
+//           "DATE": {"value": "20180918"},
+//           "APP": {
+//             "value": "ca-app-pub-8123415297019784~1001342552",
+//              displayLabel: "My app name!"
+//           }
+//         },
+//         "metricValues": {
+//           "ESTIMATED_EARNINGS": {"microsValue": 6500000}
+//         }
+//       }
+//     },
+//     {
+//       "footer": {"matchingRowCount": 1}
+//     }]
+message GenerateNetworkReportResponse {
+  // Each stream response message contains one type of payload.
+  oneof payload {
+    // Report generation settings that describes the report contents, such as
+    // the report date range and localization settings.
+    ReportHeader header = 1;
+
+    // Actual report data.
+    ReportRow row = 2;
+
+    // Additional information about the generated report, such as warnings about
+    // the data.
+    ReportFooter footer = 3;
+  }
+}

+ 150 - 0
google/ads/admob/v1/admob_gapic.yaml

@@ -0,0 +1,150 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+  java:
+    package_name: com.google.ads.admob.v1
+  python:
+    package_name: google.ads.admob_v1.gapic
+  go:
+    package_name: google.golang.org/api/admob/v1
+  csharp:
+    package_name: Google.Ads.Admob.V1
+  ruby:
+    package_name: Google::Ads::Admob::V1
+  php:
+    package_name: Google\Ads\Admob\V1
+  nodejs:
+    package_name: admob.v1
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.ads.admob.v1.AdMobApi
+  # A list of resource collection configurations.
+  # Consists of a name_pattern and an entity_name.
+  # The name_pattern is a pattern to describe the names of the resources of this
+  # collection, using the platform's conventions for URI patterns. A generator
+  # may use this to generate methods to compose and decompose such names. The
+  # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+  # those will be taken as hints for the parameter names of the generated
+  # methods. If empty, no name methods are generated.
+  # The entity_name is the name to be used as a basis for generated methods and
+  # classes.
+  collections:
+  - name_pattern: accounts/{account}
+    entity_name: account
+  # Definition for retryable codes.
+  retry_codes_def:
+  - name: idempotent
+    retry_codes:
+    - DEADLINE_EXCEEDED
+    - UNAVAILABLE
+  - name: non_idempotent
+    retry_codes: []
+  # Definition for retry/backoff parameters.
+  retry_params_def:
+  - name: default
+    initial_retry_delay_millis: 100
+    retry_delay_multiplier: 1.3
+    max_retry_delay_millis: 60000
+    initial_rpc_timeout_millis: 20000
+    rpc_timeout_multiplier: 1
+    max_rpc_timeout_millis: 20000
+    total_timeout_millis: 600000
+  # A list of method configurations.
+  # Common properties:
+  #
+  #   name - The simple name of the method.
+  #
+  #   flattening - Specifies the configuration for parameter flattening.
+  #   Describes the parameter groups for which a generator should produce method
+  #   overloads which allow a client to directly pass request message fields as
+  #   method parameters. This information may or may not be used, depending on
+  #   the target language.
+  #   Consists of groups, which each represent a list of parameters to be
+  #   flattened. Each parameter listed must be a field of the request message.
+  #
+  #   required_fields - Fields that are always required for a request to be
+  #   valid.
+  #
+  #   page_streaming - Specifies the configuration for paging.
+  #   Describes information for generating a method which transforms a paging
+  #   list RPC into a stream of resources.
+  #   Consists of a request and a response.
+  #   The request specifies request information of the list method. It defines
+  #   which fields match the paging pattern in the request. The request consists
+  #   of a page_size_field and a token_field. The page_size_field is the name of
+  #   the optional field specifying the maximum number of elements to be
+  #   returned in the response. The token_field is the name of the field in the
+  #   request containing the page token.
+  #   The response specifies response information of the list method. It defines
+  #   which fields match the paging pattern in the response. The response
+  #   consists of a token_field and a resources_field. The token_field is the
+  #   name of the field in the response containing the next page token. The
+  #   resources_field is the name of the field in the response containing the
+  #   list of resources belonging to the page.
+  #
+  #   retry_codes_name - Specifies the configuration for retryable codes. The
+  #   name must be defined in interfaces.retry_codes_def.
+  #
+  #   retry_params_name - Specifies the configuration for retry/backoff
+  #   parameters. The name must be defined in interfaces.retry_params_def.
+  #
+  #   field_name_patterns - Maps the field name of the request type to
+  #   entity_name of interfaces.collections.
+  #   Specifies the string pattern that the field must follow.
+  #
+  #   timeout_millis - Specifies the default timeout for a non-retrying call. If
+  #   the call is retrying, refer to retry_params_name instead.
+  methods:
+  - name: GetPublisherAccount
+    flattening:
+      groups:
+      - parameters:
+        - name
+    required_fields:
+    - name
+    retry_codes_name: idempotent
+    retry_params_name: default
+    field_name_patterns:
+      name: account
+    timeout_millis: 60000
+  - name: ListPublisherAccounts
+    page_streaming:
+      request:
+        page_size_field: page_size
+        token_field: page_token
+      response:
+        token_field: next_page_token
+        resources_field: account
+    retry_codes_name: idempotent
+    retry_params_name: default
+    timeout_millis: 60000
+  - name: GenerateNetworkReport
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - report_spec
+    required_fields:
+    - parent
+    - report_spec
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: account
+    timeout_millis: 60000
+  - name: GenerateMediationReport
+    flattening:
+      groups:
+      - parameters:
+        - parent
+        - report_spec
+    required_fields:
+    - parent
+    - report_spec
+    retry_codes_name: non_idempotent
+    retry_params_name: default
+    field_name_patterns:
+      parent: account
+    timeout_millis: 60000

+ 610 - 0
google/ads/admob/v1/admob_resources.proto

@@ -0,0 +1,610 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.admob.v1;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/type/date.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/ads/admob/v1;admob";
+option java_outer_classname = "AdMobResourcesProto";
+option java_package = "com.google.ads.admob.v1";
+
+// The sorting order.
+enum SortOrder {
+  // Default value for an unset field. Do not use.
+  SORT_ORDER_UNSPECIFIED = 0;
+
+  // Sort dimension value or metric value in ascending order.
+  ASCENDING = 1;
+
+  // Sort dimension value or metric value in descending order.
+  DESCENDING = 2;
+}
+
+// A publisher account contains information relevant to the use of this API,
+// such as the time zone used for the reports.
+message PublisherAccount {
+  option (google.api.resource) = {
+    type: "admob.googleapis.com/PublisherAccount"
+    pattern: "accounts/{publisher}"
+  };
+
+  // Resource name of this account.
+  // Format is accounts/{publisher_id}.
+  string name = 1;
+
+  // The unique ID by which this publisher account can be identified
+  // in the API requests (for example, pub-1234567890).
+  string publisher_id = 2;
+
+  // The time zone that is used in reports that are generated for this account.
+  // The value is a time-zone ID as specified by the CLDR project,
+  // for example, "America/Los_Angeles".
+  string reporting_time_zone = 3;
+
+  // Currency code of the earning-related metrics, which is the 3-letter code
+  // defined in ISO 4217. The daily average rate is used for the currency
+  // conversion.
+  string currency_code = 4;
+}
+
+// The specification for generating an AdMob Network report.
+// For example, the specification to get clicks and estimated earnings for only
+// the 'US' and 'CN' countries can look like the following example:
+//
+//     {
+//       'date_range': {
+//         'start_date': {'year': 2018, 'month': 9, 'day': 1},
+//         'end_date': {'year': 2018, 'month': 9, 'day': 30}
+//       },
+//       'dimensions': ['DATE', 'APP', 'COUNTRY'],
+//       'metrics': ['CLICKS', 'ESTIMATED_EARNINGS'],
+//       'dimension_filters': [
+//         {
+//           'dimension': 'COUNTRY',
+//           'matches_any': {'values': [{'value': 'US', 'value': 'CN'}]}
+//         }
+//       ],
+//       'sort_conditions': [
+//         {'dimension':'APP', order: 'ASCENDING'},
+//         {'metric':'CLICKS', order: 'DESCENDING'}
+//       ],
+//       'localization_settings': {
+//         'currency_code': 'USD',
+//         'language_code': 'en-US'
+//       }
+//     }
+//
+// For a better understanding, you can treat the preceding specification like
+// the following pseudo SQL:
+//
+//     SELECT DATE, APP, COUNTRY, CLICKS, ESTIMATED_EARNINGS
+//     FROM NETWORK_REPORT
+//     WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30'
+//         AND COUNTRY IN ('US', 'CN')
+//     GROUP BY DATE, APP, COUNTRY
+//     ORDER BY APP ASC, CLICKS DESC;
+message NetworkReportSpec {
+  // Describes which report rows to match based on their dimension values.
+  message DimensionFilter {
+    // Filter operator to be applied.
+    oneof operator {
+      // Matches a row if its value for the specified dimension is in one of the
+      // values specified in this condition.
+      StringList matches_any = 2;
+    }
+
+    // Applies the filter criterion to the specified dimension.
+    Dimension dimension = 1;
+  }
+
+  // Sorting direction to be applied on a dimension or a metric.
+  message SortCondition {
+    // Identifies which values to sort on.
+    oneof sort_on {
+      // Sort by the specified dimension.
+      Dimension dimension = 1;
+
+      // Sort by the specified metric.
+      Metric metric = 2;
+    }
+
+    // Sorting order of the dimension or metric.
+    SortOrder order = 3;
+  }
+
+  // The dimensions of the network report. Dimensions are data attributes to
+  // break down or refine the quantitative measurements (metrics) by certain
+  // attributes, such as the ad format or the platform an ad was viewed on.
+  enum Dimension {
+    // Default value for an unset field. Do not use.
+    DIMENSION_UNSPECIFIED = 0;
+
+    // A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can
+    // specify at most one time dimension.
+    DATE = 1;
+
+    // A month in the YYYY-MM format (for example, "2018-12"). Requests can
+    // specify at most one time dimension.
+    MONTH = 2;
+
+    // The date of the first day of a week in the YYYY-MM-DD format
+    // (for example, "2018-12-21"). Requests can specify at most one time
+    // dimension.
+    WEEK = 3;
+
+    // The unique ID of the ad unit (for example, "ca-app-pub-1234/1234").
+    // If AD_UNIT dimension is specified, then APP is included automatically.
+    AD_UNIT = 4;
+
+    // The unique ID of the mobile application (for example,
+    // "ca-app-pub-1234~1234").
+    APP = 5;
+
+    // Type of the ad (for example, "text" or "image"), an ad delivery
+    // dimension.
+    //
+    // **Warning:** The dimension is incompatible with
+    // [AD_REQUESTS](#Metric.ENUM_VALUES.AD_REQUESTS),
+    // [MATCH_RATE](#Metric.ENUM_VALUES.MATCH_RATE) and
+    // [IMPRESSION_RPM](#Metric.ENUM_VALUES.IMPRESSION_RPM) metrics.
+    AD_TYPE = 6;
+
+    // CLDR country code of the place where the ad views/clicks occur (for
+    // example, "US" or "FR"). This is a geography dimension.
+    COUNTRY = 7;
+
+    // Format of the ad unit (for example, "banner", "native"), an ad delivery
+    // dimension.
+    FORMAT = 8;
+
+    // Mobile OS platform of the app (for example, "Android" or "iOS").
+    PLATFORM = 9;
+  }
+
+  // The metrics of the network report. Metrics are quantitative measurements
+  // indicating how the publisher business is performing. They are aggregated
+  // from the individual ad events and grouped by the report dimensions. The
+  // metric value is either integer, or decimal (without rounding).
+  enum Metric {
+    // Default value for an unset field. Do not use.
+    METRIC_UNSPECIFIED = 0;
+
+    // The number of ad requests. The value is an integer.
+    //
+    // **Warning:** The metric is incompatible with
+    // [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
+    AD_REQUESTS = 1;
+
+    // The number of times a user clicks an ad. The value is an integer.
+    CLICKS = 2;
+
+    // The estimated earnings of the AdMob publisher. The currency unit (USD,
+    // EUR, or other) of the earning metrics are determined by the localization
+    // setting for currency. The amount is in micros. For example, $6.50 would
+    // be represented as 6500000.
+    ESTIMATED_EARNINGS = 3;
+
+    // The total number of ads shown to users. The value is an integer.
+    IMPRESSIONS = 4;
+
+    // The ratio of clicks over impressions. The value is a double precision
+    // (approximate) decimal value.
+    IMPRESSION_CTR = 5;
+
+    // The estimated earnings per thousand ad impressions. The value is in
+    // micros. For example, $1.03 would be represented as 1030000.
+    //
+    // **Warning:** The metric is incompatible with
+    // [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
+    IMPRESSION_RPM = 6;
+
+    // The number of times ads are returned in response to a request. The value
+    // is an integer.
+    MATCHED_REQUESTS = 7;
+
+    // The ratio of matched ad requests over the total ad requests. The value is
+    // a double precision (approximate) decimal value.
+    //
+    // **Warning:** The metric is incompatible with
+    // [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
+    MATCH_RATE = 8;
+
+    // The ratio of ads that are displayed over ads that are returned, defined
+    // as impressions / matched requests. The value is a double precision
+    // (approximate) decimal value.
+    SHOW_RATE = 9;
+  }
+
+  // The date range for which the report is generated.
+  DateRange date_range = 1;
+
+  // List of dimensions of the report. The value combination of these dimensions
+  // determines the row of the report. If no dimensions are specified, the
+  // report returns a single row of requested metrics for the entire account.
+  repeated Dimension dimensions = 2;
+
+  // List of metrics of the report. A report must specify at least one metric.
+  repeated Metric metrics = 3;
+
+  // Describes which report rows to match based on their dimension values.
+  repeated DimensionFilter dimension_filters = 4;
+
+  // Describes the sorting of report rows. The order of the condition in the
+  // list defines its precedence; the earlier the condition, the higher its
+  // precedence. If no sort conditions are specified, the row ordering is
+  // undefined.
+  repeated SortCondition sort_conditions = 5;
+
+  // Localization settings of the report.
+  LocalizationSettings localization_settings = 6;
+
+  // Maximum number of report data rows to return. If the value is not set, the
+  // API returns as many rows as possible, up to 100000. Acceptable values are
+  // 1-100000, inclusive. Any other values are treated as 100000.
+  int32 max_report_rows = 7;
+
+  // A report time zone. Accepts an IANA TZ name values, such as
+  // "America/Los_Angeles."  If no time zone is defined, the account default
+  // takes effect. Check default value by the get account action.
+  //
+  // **Warning:** The "America/Los_Angeles" is the only supported value at
+  // the moment.
+  string time_zone = 8;
+}
+
+// The specification for generating an AdMob Mediation report.
+// For example, the specification to get observed ECPM sliced by ad source and
+// app for the 'US' and 'CN' countries can look like the following example:
+//
+//     {
+//       "date_range": {
+//         "start_date": {"year": 2018, "month": 9, "day": 1},
+//         "end_date": {"year": 2018, "month": 9, "day": 30}
+//       },
+//       "dimensions": ["AD_SOURCE", "APP", "COUNTRY"],
+//       "metrics": ["OBSERVED_ECPM"],
+//       "dimension_filters": [
+//         {
+//           "dimension": "COUNTRY",
+//           "matches_any": {"values": [{"value": "US", "value": "CN"}]}
+//         }
+//       ],
+//       "sort_conditions": [
+//         {"dimension":"APP", order: "ASCENDING"}
+//       ],
+//       "localization_settings": {
+//         "currency_code": "USD",
+//         "language_code": "en-US"
+//       }
+//     }
+//
+// For a better understanding, you can treat the preceding specification like
+// the following pseudo SQL:
+//
+//     SELECT AD_SOURCE, APP, COUNTRY, OBSERVED_ECPM
+//     FROM MEDIATION_REPORT
+//     WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30'
+//         AND COUNTRY IN ('US', 'CN')
+//     GROUP BY AD_SOURCE, APP, COUNTRY
+//     ORDER BY APP ASC;
+message MediationReportSpec {
+  // Describes which report rows to match based on their dimension values.
+  message DimensionFilter {
+    // Filter operator to be applied.
+    oneof operator {
+      // Matches a row if its value for the specified dimension is in one of the
+      // values specified in this condition.
+      StringList matches_any = 2;
+    }
+
+    // Applies the filter criterion to the specified dimension.
+    Dimension dimension = 1;
+  }
+
+  // Sorting direction to be applied on a dimension or a metric.
+  message SortCondition {
+    // Identifies which values to sort on.
+    oneof sort_on {
+      // Sort by the specified dimension.
+      Dimension dimension = 1;
+
+      // Sort by the specified metric.
+      Metric metric = 2;
+    }
+
+    // Sorting order of the dimension or metric.
+    SortOrder order = 3;
+  }
+
+  // The dimensions of the mediation report. Dimensions are data attributes to
+  // break down or refine the quantitative measurements (metrics) by certain
+  // attributes, such as the ad format or the platform an ad was viewed on.
+  enum Dimension {
+    // Default value for an unset field. Do not use.
+    DIMENSION_UNSPECIFIED = 0;
+
+    // A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can
+    // specify at most one time dimension.
+    DATE = 1;
+
+    // A month in the YYYY-MM format (for example, "2018-12"). Requests can
+    // specify at most one time dimension.
+    MONTH = 2;
+
+    // The date of the first day of a week in the YYYY-MM-DD format
+    // (for example, "2018-12-21"). Requests can specify at most one time
+    // dimension.
+    WEEK = 3;
+
+    // The [unique ID of the ad source](/admob/api/v1/ad_sources) (for example,
+    // "5450213213286189855" and "AdMob Network" as label value).
+    AD_SOURCE = 4;
+
+    // The unique ID of the ad source instance (for example,
+    // "ca-app-pub-1234#5678" and "AdMob (default)" as label value).
+    AD_SOURCE_INSTANCE = 5;
+
+    // The unique ID of the ad unit (for example, "ca-app-pub-1234/8790").
+    // If AD_UNIT dimension is specified, then APP is included automatically.
+    AD_UNIT = 6;
+
+    // The unique ID of the mobile application (for example,
+    // "ca-app-pub-1234~1234").
+    APP = 7;
+
+    // The unique ID of the mediation group (for example,
+    // "ca-app-pub-1234:mg:1234" and "AdMob (default)" as label value).
+    MEDIATION_GROUP = 11;
+
+    // CLDR country code of the place where the ad views/clicks occur (for
+    // example, "US" or "FR"). This is a geography dimension.
+    COUNTRY = 8;
+
+    // Format of the ad unit (for example, "banner", "native"), an ad delivery
+    // dimension.
+    FORMAT = 9;
+
+    // Mobile OS platform of the app (for example, "Android" or "iOS").
+    PLATFORM = 10;
+  }
+
+  // The metrics of the mediation report. Metrics are quantitative measurements
+  // indicating how the publisher business is performing. They are aggregated
+  // from the individual ad events and grouped by the report dimensions. The
+  // metric value is either integer, or decimal (without rounding).
+  enum Metric {
+    // Default value for an unset field. Do not use.
+    METRIC_UNSPECIFIED = 0;
+
+    // The number of requests. The value is an integer.
+    AD_REQUESTS = 1;
+
+    // The number of times a user clicks an ad. The value is an integer.
+    CLICKS = 2;
+
+    // The estimated earnings of the AdMob publisher. The currency unit (USD,
+    // EUR, or other) of the earning metrics are determined by the localization
+    // setting for currency. The amount is in micros. For example, $6.50 would
+    // be represented as 6500000.
+    //
+    // Estimated earnings per mediation group and per ad source instance level
+    // is supported dating back to October 20, 2019. Third-party estimated
+    // earnings will show 0 for dates prior to October 20, 2019.
+    ESTIMATED_EARNINGS = 3;
+
+    // The total number of ads shown to users. The value is an integer.
+    IMPRESSIONS = 4;
+
+    // The ratio of clicks over impressions. The value is a double precision
+    // (approximate) decimal value.
+    IMPRESSION_CTR = 5;
+
+    // The number of times ads are returned in response to a request. The value
+    // is an integer.
+    MATCHED_REQUESTS = 6;
+
+    // The ratio of matched ad requests over the total ad requests. The value is
+    // a double precision (approximate) decimal value.
+    MATCH_RATE = 7;
+
+    // The third-party ad network's estimated average eCPM. The currency unit
+    // (USD, EUR, or other) of the earning metrics are determined by the
+    // localization setting for currency. The amount is in micros. For example,
+    // $2.30 would be represented as 2300000.
+    //
+    // The estimated average eCPM per mediation group and per ad source instance
+    // level is supported dating back to October 20, 2019. Third-party estimated
+    // average eCPM will show 0 for dates prior to October 20, 2019.
+    OBSERVED_ECPM = 8;
+  }
+
+  // The date range for which the report is generated.
+  DateRange date_range = 1;
+
+  // List of dimensions of the report. The value combination of these dimensions
+  // determines the row of the report. If no dimensions are specified, the
+  // report returns a single row of requested metrics for the entire account.
+  repeated Dimension dimensions = 2;
+
+  // List of metrics of the report. A report must specify at least one metric.
+  repeated Metric metrics = 3;
+
+  // Describes which report rows to match based on their dimension values.
+  repeated DimensionFilter dimension_filters = 4;
+
+  // Describes the sorting of report rows. The order of the condition in the
+  // list defines its precedence; the earlier the condition, the higher its
+  // precedence. If no sort conditions are specified, the row ordering is
+  // undefined.
+  repeated SortCondition sort_conditions = 5;
+
+  // Localization settings of the report.
+  LocalizationSettings localization_settings = 6;
+
+  // Maximum number of report data rows to return. If the value is not set, the
+  // API returns as many rows as possible, up to 100000. Acceptable values are
+  // 1-100000, inclusive. Any other values are treated as 100000.
+  int32 max_report_rows = 7;
+
+  // A report time zone. Accepts an IANA TZ name values, such as
+  // "America/Los_Angeles."  If no time zone is defined, the account default
+  // takes effect. Check default value by the get account action.
+  //
+  // **Warning:** The "America/Los_Angeles" is the only supported value at
+  // the moment.
+  string time_zone = 8;
+}
+
+// A row of the returning report.
+message ReportRow {
+  // Representation of a dimension value.
+  message DimensionValue {
+    // Dimension value in the format specified in the report's spec Dimension
+    // enum.
+    string value = 1;
+
+    // The localized string representation of the value. If unspecified, the
+    // display label should be derived from the value.
+    string display_label = 2;
+  }
+
+  // Representation of a metric value.
+  message MetricValue {
+    // Metric value in the format specified in the report's spec Metric enum
+    // name.
+    oneof value {
+      // Metric integer value.
+      int64 integer_value = 1;
+
+      // Double precision (approximate) decimal values. Rates are from 0 to 1.
+      double double_value = 2;
+
+      // Amount in micros. One million is equivalent to one unit. Currency value
+      // is in the unit (USD, EUR or other) specified by the request.
+      // For example, $6.50 whould be represented as 6500000 micros.
+      int64 micros_value = 3;
+    }
+  }
+
+  // Map of dimension values in a row, with keys as enum name of the dimensions.
+  map<string, DimensionValue> dimension_values = 1;
+
+  // Map of metric values in a row, with keys as enum name of the metrics. If
+  // a metric being requested has no value returned, the map will not include
+  // it.
+  map<string, MetricValue> metric_values = 2;
+}
+
+// Warnings associated with generation of the report.
+message ReportWarning {
+  // Warning type.
+  enum Type {
+    // Default value for an unset field. Do not use.
+    TYPE_UNSPECIFIED = 0;
+
+    // Some data in this report is aggregated based on a time zone different
+    // from the requested time zone. This could happen if a local time-zone
+    // report has the start time before the last time this time zone changed.
+    // The description field will contain the date of the last time zone
+    // change.
+    DATA_BEFORE_ACCOUNT_TIMEZONE_CHANGE = 1;
+
+    // There is an unusual delay in processing the source data for the
+    // requested date range. The report results might be less up to date than
+    // usual. AdMob is aware of the issue and is actively working to resolve
+    // it.
+    DATA_DELAYED = 2;
+
+    // Warnings that are exposed without a specific type. Useful when new
+    // warning types are added but the API is not changed yet.
+    OTHER = 3;
+
+    // The currency being requested is not the account currency. The earning
+    // metrics will be based on the requested currency, and thus not a good
+    // estimation of the final payment anymore, due to the currency rate
+    // fluctuation.
+    REPORT_CURRENCY_NOT_ACCOUNT_CURRENCY = 4;
+  }
+
+  // Type of the warning.
+  Type type = 1;
+
+  // Describes the details of the warning message, in English.
+  string description = 2;
+}
+
+// Groups data helps to treat the generated report. Always sent as a first
+// message in the stream response.
+message ReportHeader {
+  // The date range for which the report is generated. This is identical to the
+  // range specified in the report request.
+  DateRange date_range = 1;
+
+  // Localization settings of the report. This is identical to the settings
+  // in the report request.
+  LocalizationSettings localization_settings = 2;
+
+  // The report time zone. The value is a time-zone ID as specified by the CLDR
+  // project, for example, "America/Los_Angeles".
+  string reporting_time_zone = 3;
+}
+
+// Groups data available after report generation, for example, warnings and row
+// counts. Always sent as the last message in the stream response.
+message ReportFooter {
+  // Warnings associated with generation of the report.
+  repeated ReportWarning warnings = 1;
+
+  // Total number of rows that matched the request.
+  //
+  // Warning: This count does NOT always match the number of rows in the
+  // response. Do not make that assumption when processing the response.
+  int64 matching_row_count = 2;
+}
+
+// Specification of a single date range. Both dates are inclusive.
+message DateRange {
+  // Start date of the date range, inclusive. Must be less than or equal to the
+  // end date.
+  google.type.Date start_date = 1;
+
+  // End date of the date range, inclusive. Must be greater than or equal to the
+  // start date.
+  google.type.Date end_date = 2;
+}
+
+// Localization settings for reports, such as currency and language. It affects
+// how metrics are calculated.
+message LocalizationSettings {
+  // Currency code of the earning related metrics, which is the 3-letter code
+  // defined in ISO 4217. The daily average rate is used for the currency
+  // conversion. Defaults to the account currency code if unspecified.
+  string currency_code = 1;
+
+  // Language used for any localized text, such as some dimension value display
+  // labels. The language tag defined in the IETF BCP47. Defaults to 'en-US' if
+  // unspecified.
+  string language_code = 2;
+}
+
+// List of string values.
+message StringList {
+  // The string values.
+  repeated string values = 1;
+}

+ 47 - 0
google/ads/googleads/README.md

@@ -0,0 +1,47 @@
+# Google Ads API
+
+This folder contains the [protocol
+buffer](https://developers.google.com/protocol-buffers/) definitions and
+**experimental** build files (see below) 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.
+
+## Build files (experimental)
+
+> **IMPORTANT** The Bazel build files are **experimental**. The structure and
+> content of the Bazel packages are subject to change, and the resulting
+> generated API clients are not officially supported Google products.
+
+The [Bazel](https://bazel.build/) build files contain targets for building
+**generated API clients (GAPICs)** from the Google Ads API protocol buffer
+descriptors. Our [officially supported
+client libraries](https://developers.google.com/google-ads/api/docs/client-libs)
+are built upon these GAPIC artifacts, but add significant performance and
+usability enhancements. Thus, we strongly recommend using an official
+client library.
+
+However, developers looking to understand the internals of the API's client
+libraries or build their own custom [gRPC](https://grpc.io/)-based clients can
+use these build files as reference points.
+
+For details on using these files, see the
+[Bazel section](https://github.com/googleapis/googleapis#bazel) of the
+repository's main
+[README.md](https://github.com/googleapis/googleapis/blob/master/README.md).

+ 266 - 0
google/ads/googleads/v10/BUILD.bazel

@@ -0,0 +1,266 @@
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+package(default_visibility = ["//visibility:public"])
+
+exports_files(["googleads_grpc_service_config.json"] + ["*.yaml"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
+
+proto_library(
+    name = "googleads_proto",
+    srcs = [],
+    deps = [
+        "//google/ads/googleads/v10/common:common_proto",
+        "//google/ads/googleads/v10/enums:enums_proto",
+        "//google/ads/googleads/v10/errors:errors_proto",
+        "//google/ads/googleads/v10/resources:resources_proto",
+        "//google/ads/googleads/v10/services:services_proto",
+    ],
+)
+
+proto_library_with_info(
+    name = "googleads_proto_with_info",
+    deps = [
+        ":googleads_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_gapic_assembly_gradle_pkg",
+    "java_gapic_library",
+    "java_gapic_test",
+)
+
+java_gapic_library(
+    name = "googleads_java_gapic",
+    srcs = [
+        ":googleads_proto_with_info",
+    ],
+    gapic_yaml = "googleads_gapic.yaml",
+    grpc_service_config = ":googleads_grpc_service_config.json",
+    deps = [
+        "//google/ads/googleads/v10/common:common_java_proto",
+        "//google/ads/googleads/v10/enums:enums_java_proto",
+        "//google/ads/googleads/v10/resources:resources_java_proto",
+        "//google/ads/googleads/v10/services:services_java_grpc",
+        "//google/ads/googleads/v10/services:services_java_proto",
+    ],
+)
+
+# TODO(ohren): Add more test classes when java_gapic_test is able to run more
+# than a single test. Having at least one verifies proper compilation at least.
+java_gapic_test(
+    name = "googleads_java_gapic_suite",
+    test_classes = [
+        "com.google.ads.googleads.v10.services.CampaignServiceClientTest",
+    ],
+    runtime_deps = [":googleads_java_gapic_test"],
+)
+
+java_gapic_assembly_gradle_pkg(
+    name = "googleads-java",
+    deps = [
+        ":googleads_java_gapic",
+        "//google/ads/googleads/v10:googleads_proto",
+        "//google/ads/googleads/v10/common:common_java_proto",
+        "//google/ads/googleads/v10/enums:enums_java_proto",
+        "//google/ads/googleads/v10/errors:errors_java_proto",
+        "//google/ads/googleads/v10/resources:resources_java_proto",
+        "//google/ads/googleads/v10/services:services_java_grpc",
+        "//google/ads/googleads/v10/services:services_java_proto",
+    ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "php_gapic_assembly_pkg",
+    "php_gapic_library",
+    "php_grpc_library",
+    "php_proto_library",
+)
+
+php_proto_library(
+    name = "googleads_php_proto",
+    plugin_args = ["aggregate_metadata=google.ads.googleads"],
+    deps = [":googleads_proto"],
+)
+
+php_grpc_library(
+    name = "googleads_php_grpc",
+    srcs = [":googleads_proto"],
+    deps = [":googleads_php_proto"],
+)
+
+php_gapic_library(
+    name = "googleads_php_gapic",
+    srcs = [":googleads_proto"],
+    gapic_yaml = "googleads_gapic.yaml",
+    grpc_service_config = "googleads_grpc_service_config.json",
+    service_yaml = "googleads_v10.yaml",
+    deps = [
+        ":googleads_php_grpc",
+        ":googleads_php_proto",
+    ],
+)
+
+php_gapic_assembly_pkg(
+    name = "googleads-php",
+    deps = [
+        ":googleads_php_gapic",
+        ":googleads_php_grpc",
+        ":googleads_php_proto",
+    ],
+)
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_gapic_assembly_pkg",
+    "csharp_gapic_library",
+)
+
+csharp_gapic_library(
+    name = "googleads_csharp_gapic",
+    srcs = [
+        ":googleads_proto_with_info",
+    ],
+    grpc_service_config = "googleads_grpc_service_config.json",
+    deps = [
+        "//google/ads/googleads/v10/services:services_csharp_grpc",
+    ],
+)
+
+csharp_gapic_assembly_pkg(
+    name = "googleads-csharp",
+    deps = [
+        ":googleads_csharp_gapic",
+        "//google/ads/googleads/v10/common:common_csharp_proto",
+        "//google/ads/googleads/v10/enums:enums_csharp_proto",
+        "//google/ads/googleads/v10/errors:errors_csharp_proto",
+        "//google/ads/googleads/v10/resources:resources_csharp_proto",
+        "//google/ads/googleads/v10/services:services_csharp_grpc",
+        "//google/ads/googleads/v10/services:services_csharp_proto",
+    ],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_ads_gapic_library",
+    "ruby_gapic_assembly_pkg",
+)
+
+ruby_ads_gapic_library(
+    name = "googleads_ruby_gapic",
+    srcs = ["googleads_proto_with_info"],
+    extra_protoc_parameters = [
+        ":gem.:name=google-ads-googleads",
+        ":defaults.:service.:default_host=googleads.googleapis.com",
+        ":overrides.:namespace.Googleads=GoogleAds",
+    ],
+    grpc_service_config = "googleads_grpc_service_config.json",
+)
+
+ruby_gapic_assembly_pkg(
+    name = "googleads-ruby",
+    deps = [
+        ":googleads_ruby_gapic",
+        "//google/ads/googleads/v10/common:common_ruby_proto",
+        "//google/ads/googleads/v10/enums:enums_ruby_proto",
+        "//google/ads/googleads/v10/errors:errors_ruby_proto",
+        "//google/ads/googleads/v10/resources:resources_ruby_proto",
+        "//google/ads/googleads/v10/services:services_ruby_grpc",
+        "//google/ads/googleads/v10/services:services_ruby_proto",
+    ],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "py_gapic_assembly_pkg",
+    "py_gapic_library",
+)
+
+py_gapic_library(
+    name = "googleads_py_gapic",
+    srcs = [":googleads_proto_with_info"],
+    grpc_service_config = "googleads_grpc_service_config.json",
+    opt_args = [
+        "old-naming",
+        "lazy-import",
+        "python-gapic-name=googleads",
+        "python-gapic-templates=ads-templates",
+        "warehouse-package-name=google-ads",
+    ],
+)
+
+py_gapic_assembly_pkg(
+    name = "googleads-py",
+    deps = [
+        ":googleads_py_gapic",
+        "//google/ads/googleads/v10/common:common_py_proto",
+        "//google/ads/googleads/v10/enums:enums_py_proto",
+        "//google/ads/googleads/v10/errors:errors_py_proto",
+        "//google/ads/googleads/v10/resources:resources_py_proto",
+        "//google/ads/googleads/v10/services:services_py_grpc",
+        "//google/ads/googleads/v10/services:services_py_proto",
+    ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "nodejs_gapic_assembly_pkg",
+    "nodejs_gapic_library",
+)
+
+nodejs_gapic_library(
+    name = "googleads_nodejs_gapic",
+    package_name = "google-ads",
+    src = ":googleads_proto_with_info",
+    extra_protoc_parameters = ["metadata"],
+    grpc_service_config = "googleads_grpc_service_config.json",
+    main_service = "GoogleAdsService",
+    package = "google.ads.googleads.v10",
+    service_yaml = "googleads_v10.yaml",
+    deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+    name = "googleads-nodejs",
+    deps = [
+        ":googleads_nodejs_gapic",
+        ":googleads_proto",
+    ],
+)

+ 94 - 0
google/ads/googleads/v10/common/BUILD.bazel

@@ -0,0 +1,94 @@
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+# TODO(ohren): Change srcs to use an enumeration of each individual proto
+# instead of *.proto globbing once the build file generator supports
+# subpackages.
+proto_library(
+    name = "common_proto",
+    srcs = glob(["*.proto"]),
+    deps = [
+        "//google/ads/googleads/v10/enums:enums_proto",
+        "//google/api:annotations_proto",
+        "//google/api:field_behavior_proto",
+        "//google/api:resource_proto",
+        "@com_google_protobuf//:wrappers_proto",
+    ],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "java_proto_library",
+)
+
+java_proto_library(
+    name = "common_java_proto",
+    deps = [":common_proto"],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+
+# PHP targets are in the parent directory's BUILD.bazel file to facilitate
+# aggregating metadata using a single underlying call to protoc.
+
+##############################################################################
+# C#
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "csharp_proto_library",
+)
+
+csharp_proto_library(
+    name = "common_csharp_proto",
+    deps = [":common_proto"],
+)
+
+##############################################################################
+# Ruby
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "ruby_proto_library",
+)
+
+ruby_proto_library(
+    name = "common_ruby_proto",
+    deps = [":common_proto"],
+)
+
+##############################################################################
+# Python
+##############################################################################
+load(
+    "@com_google_googleapis_imports//:imports.bzl",
+    "py_proto_library",
+)
+
+py_proto_library(
+    name = "common_py_proto",
+    deps = [":common_proto"],
+)

+ 74 - 0
google/ads/googleads/v10/common/ad_asset.proto

@@ -0,0 +1,74 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/common/asset_policy.proto";
+import "google/ads/googleads/v10/enums/asset_performance_label.proto";
+import "google/ads/googleads/v10/enums/served_asset_field_type.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AdAssetProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Proto file describing assets used inside an ad.
+
+// A text asset used inside an ad.
+message AdTextAsset {
+  // Asset text.
+  optional string text = 4;
+
+  // 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.v10.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType pinned_field = 2;
+
+  // The performance label of this text asset.
+  google.ads.googleads.v10.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel asset_performance_label = 5;
+
+  // The policy summary of this text asset.
+  AdAssetPolicySummary policy_summary_info = 6;
+}
+
+// An image asset used inside an ad.
+message AdImageAsset {
+  // The Asset resource name of this image.
+  optional string asset = 2;
+}
+
+// A video asset used inside an ad.
+message AdVideoAsset {
+  // The Asset resource name of this video.
+  optional string asset = 2;
+}
+
+// A media bundle asset used inside an ad.
+message AdMediaBundleAsset {
+  // The Asset resource name of this media bundle.
+  optional string asset = 2;
+}
+
+// A discovery carousel card asset used inside an ad.
+message AdDiscoveryCarouselCardAsset {
+  // The Asset resource name of this discovery carousel card.
+  optional string asset = 1;
+}

+ 796 - 0
google/ads/googleads/v10/common/ad_type_infos.proto

@@ -0,0 +1,796 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/common/ad_asset.proto";
+import "google/ads/googleads/v10/enums/call_conversion_reporting_state.proto";
+import "google/ads/googleads/v10/enums/display_ad_format_setting.proto";
+import "google/ads/googleads/v10/enums/display_upload_product_type.proto";
+import "google/ads/googleads/v10/enums/legacy_app_install_ad_app_store.proto";
+import "google/ads/googleads/v10/enums/mime_type.proto";
+import "google/ads/googleads/v10/enums/video_thumbnail.proto";
+import "google/api/field_behavior.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AdTypeInfosProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Proto file containing info messages for specific ad types.
+
+// A text ad.
+message TextAdInfo {
+  // The headline of the ad.
+  optional string headline = 4;
+
+  // The first line of the ad's description.
+  optional string description1 = 5;
+
+  // The second line of the ad's description.
+  optional string description2 = 6;
+}
+
+// An expanded text ad.
+message ExpandedTextAdInfo {
+  // The first part of the ad's headline.
+  optional string headline_part1 = 8;
+
+  // The second part of the ad's headline.
+  optional string headline_part2 = 9;
+
+  // The third part of the ad's headline.
+  optional string headline_part3 = 10;
+
+  // The description of the ad.
+  optional string description = 11;
+
+  // The second description of the ad.
+  optional string description2 = 12;
+
+  // The text that can appear alongside the ad's displayed URL.
+  optional string path1 = 13;
+
+  // Additional text that can appear alongside the ad's displayed URL.
+  optional string path2 = 14;
+}
+
+// An expanded dynamic search ad.
+message ExpandedDynamicSearchAdInfo {
+  // The description of the ad.
+  optional string description = 3;
+
+  // The second description of the ad.
+  optional string description2 = 4;
+}
+
+// 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.
+  optional string headline = 2;
+}
+
+// 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%).
+  optional string header_image = 10;
+
+  // 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%)
+  optional string marketing_image = 11;
+
+  // Headline of the marketing image.
+  optional string marketing_image_headline = 12;
+
+  // Description of the marketing image.
+  optional string marketing_image_description = 13;
+
+  // 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.
+  optional string headline = 5;
+
+  // Description of the teaser.
+  optional string description = 6;
+
+  // Business name of the advertiser.
+  optional string business_name = 7;
+
+  // 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%).
+  optional string logo_image = 8;
+}
+
+// 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.
+  optional string text = 5;
+
+  // Text color for the display-call-to-action in hexadecimal, e.g. #ffffff for
+  // white.
+  optional string text_color = 6;
+
+  // Identifies the URL collection in the `ad.url_collections` field. If not
+  // set, the URL defaults to `final_url`.
+  optional string url_collection_id = 7;
+}
+
+// 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%).
+  optional string product_image = 4;
+
+  // Description of the product.
+  optional string description = 5;
+
+  // 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.
+  optional string product_video = 2;
+}
+
+// An image ad.
+message ImageAdInfo {
+  // Width in pixels of the full size image.
+  optional int64 pixel_width = 15;
+
+  // Height in pixels of the full size image.
+  optional int64 pixel_height = 16;
+
+  // URL of the full size image.
+  optional string image_url = 17;
+
+  // Width in pixels of the preview size image.
+  optional int64 preview_pixel_width = 18;
+
+  // Height in pixels of the preview size image.
+  optional int64 preview_pixel_height = 19;
+
+  // URL of the preview size image.
+  optional string preview_image_url = 20;
+
+  // The mime type of the image.
+  google.ads.googleads.v10.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.
+  optional string name = 21;
+
+  // 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.
+    string media_file = 12;
+
+    // Raw image data as bytes.
+    bytes data = 13;
+
+    // An ad ID to copy the image from.
+    int64 ad_id_to_copy_image_from = 14;
+  }
+}
+
+// Representation of video bumper in-stream ad format (very short in-stream
+// non-skippable video ad).
+message VideoBumperInStreamAdInfo {
+  // The image assets of the companion banner used with the ad.
+  AdImageAsset companion_banner = 3;
+}
+
+// Representation of video non-skippable in-stream ad format (15 second
+// in-stream non-skippable video ad).
+message VideoNonSkippableInStreamAdInfo {
+  // The image assets of the companion banner used with the ad.
+  AdImageAsset companion_banner = 5;
+
+  // Label on the "Call To Action" button taking the user to the video ad's
+  // final URL.
+  string action_button_label = 3;
+
+  // Additional text displayed with the "Call To Action" button to give
+  // context and encourage clicking on the button.
+  string action_headline = 4;
+}
+
+// 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.
+  string action_button_label = 4;
+
+  // Additional text displayed with the CTA (call-to-action) button to give
+  // context and encourage clicking on the button.
+  string action_headline = 5;
+
+  // The image assets of the companion banner used with the ad.
+  AdImageAsset companion_banner = 7;
+}
+
+// Representation of video out-stream ad format (ad shown alongside a feed
+// with automatic playback, without sound).
+message VideoOutstreamAdInfo {
+  // The headline of the ad.
+  string headline = 3;
+
+  // The description line.
+  string description = 4;
+}
+
+// Representation of In-feed video ad format.
+message InFeedVideoAdInfo {
+  // The headline of the ad.
+  string headline = 1;
+
+  // First text line for the ad.
+  string description1 = 2;
+
+  // Second text line for the ad.
+  string description2 = 3;
+
+  // Video thumbnail image to use.
+  google.ads.googleads.v10.enums.VideoThumbnailEnum.VideoThumbnail thumbnail = 4;
+}
+
+// A video ad.
+message VideoAdInfo {
+  // The YouTube video assets used for the ad.
+  AdVideoAsset video = 8;
+
+  // 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;
+
+    // In-feed video ad format.
+    InFeedVideoAdInfo in_feed = 9;
+  }
+}
+
+// A video responsive ad.
+message VideoResponsiveAdInfo {
+  // List of text assets used for the short headline, e.g. the "Call To Action"
+  // banner. Currently, only a single value for the short headline is supported.
+  repeated AdTextAsset headlines = 1;
+
+  // List of text assets used for the long headline.
+  // Currently, only a single value for the long headline is supported.
+  repeated AdTextAsset long_headlines = 2;
+
+  // List of text assets used for the description.
+  // Currently, only a single value for the description is supported.
+  repeated AdTextAsset descriptions = 3;
+
+  // List of text assets used for the button, e.g. the "Call To Action" button.
+  // Currently, only a single value for the button is supported.
+  repeated AdTextAsset call_to_actions = 4;
+
+  // List of YouTube video assets used for the ad.
+  // Currently, only a single value for the YouTube video asset is supported.
+  repeated AdVideoAsset videos = 5;
+
+  // List of image assets used for the companion banner.
+  // Currently, only a single value for the companion banner asset is supported.
+  repeated AdImageAsset companion_banners = 6;
+
+  // First part of text that appears in the ad with the displayed URL.
+  string breadcrumb1 = 7;
+
+  // Second part of text that appears in the ad with the displayed URL.
+  string breadcrumb2 = 8;
+}
+
+// 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 can be appended to the URL in the ad.
+  optional string path1 = 5;
+
+  // Second part of text that can be appended to the URL in the ad. This field
+  // can only be set when `path1` is also set.
+  optional string path2 = 6;
+}
+
+// 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.
+  optional string short_headline = 16;
+
+  // The long version of the ad's headline.
+  optional string long_headline = 17;
+
+  // The description of the ad.
+  optional string description = 18;
+
+  // The business name in the ad.
+  optional string business_name = 19;
+
+  // 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.
+  optional bool allow_flexible_color = 20;
+
+  // 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.
+  optional string accent_color = 21;
+
+  // 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.
+  optional string main_color = 22;
+
+  // The call-to-action text for the ad.
+  optional string call_to_action_text = 23;
+
+  // The MediaFile resource name of the logo image used in the ad.
+  optional string logo_image = 24;
+
+  // The MediaFile resource name of the square logo image used in the ad.
+  optional string square_logo_image = 25;
+
+  // The MediaFile resource name of the marketing image used in the ad.
+  optional string marketing_image = 26;
+
+  // The MediaFile resource name of the square marketing image used in the ad.
+  optional string square_marketing_image = 27;
+
+  // Specifies which format the ad will be served in. Default is ALL_FORMATS.
+  google.ads.googleads.v10.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 13;
+
+  // Prefix before price. E.g. 'as low as'.
+  optional string price_prefix = 28;
+
+  // Promotion text used for dynamic formats of responsive ads. For example
+  // 'Free two-day shipping'.
+  optional string promo_text = 29;
+}
+
+// An app ad.
+message AppAdInfo {
+  // Mandatory ad text.
+  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;
+}
+
+// App pre-registration ads link to your app or game listing on Google Play, and
+// can run on Google Play, on YouTube (in-stream only), and within other apps
+// and mobile websites on the Display Network. It will help capture people's
+// interest in your app or game and generate an early install base for your app
+// or game before a launch.
+message AppPreRegistrationAdInfo {
+  // 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 asset IDs whose images may be displayed with the ad.
+  repeated AdImageAsset images = 3;
+
+  // List of YouTube video asset IDs whose videos may be displayed with the ad.
+  repeated AdVideoAsset youtube_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.
+  optional string app_id = 6;
+
+  // The app store the mobile app is available in.
+  google.ads.googleads.v10.enums.LegacyAppInstallAdAppStoreEnum.LegacyAppInstallAdAppStore app_store = 2;
+
+  // The headline of the ad.
+  optional string headline = 7;
+
+  // The first description line of the ad.
+  optional string description1 = 8;
+
+  // The second description line of the ad.
+  optional string description2 = 9;
+}
+
+// A responsive display ad.
+message ResponsiveDisplayAdInfo {
+  // Marketing images to be used in the ad. Valid image types are GIF,
+  // JPEG, and PNG. The minimum size is 600x314 and the aspect ratio must
+  // be 1.91:1 (+-1%). At least one `marketing_image` is required. Combined
+  // with `square_marketing_images`, the maximum is 15.
+  repeated AdImageAsset marketing_images = 1;
+
+  // Square marketing images to be used in the ad. Valid image types are GIF,
+  // JPEG, and PNG. The minimum size is 300x300 and the aspect ratio must
+  // be 1:1 (+-1%). At least one square `marketing_image` is required. Combined
+  // with `marketing_images`, the maximum is 15.
+  repeated AdImageAsset square_marketing_images = 2;
+
+  // Logo images to be used in the ad. Valid image types are GIF,
+  // JPEG, and PNG. The minimum size is 512x128 and the aspect ratio must
+  // be 4:1 (+-1%). Combined with `square_logo_images`, the maximum is 5.
+  repeated AdImageAsset logo_images = 3;
+
+  // Square logo images to be used in the ad. Valid image types are GIF,
+  // JPEG, and PNG. The minimum size is 128x128 and the aspect ratio must
+  // be 1:1 (+-1%). Combined with `square_logo_images`, the maximum is 5.
+  repeated AdImageAsset square_logo_images = 4;
+
+  // Short format headlines for the ad. The maximum length is 30 characters.
+  // At least 1 and max 5 headlines can be specified.
+  repeated AdTextAsset headlines = 5;
+
+  // A required long format headline. The maximum length is 90 characters.
+  AdTextAsset long_headline = 6;
+
+  // Descriptive texts for the ad. The maximum length is 90 characters. At
+  // least 1 and max 5 headlines can be specified.
+  repeated AdTextAsset descriptions = 7;
+
+  // Optional YouTube videos for the ad. A maximum of 5 videos can be specified.
+  repeated AdVideoAsset youtube_videos = 8;
+
+  // The advertiser/brand name. Maximum display width is 25.
+  optional string business_name = 17;
+
+  // 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.
+  optional string main_color = 18;
+
+  // 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.
+  optional string accent_color = 19;
+
+  // 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.
+  optional bool allow_flexible_color = 20;
+
+  // The call-to-action text for the ad. Maximum display width is 30.
+  optional string call_to_action_text = 21;
+
+  // Prefix before price. E.g. 'as low as'.
+  optional string price_prefix = 22;
+
+  // Promotion text used for dynamic formats of responsive ads. For example
+  // 'Free two-day shipping'.
+  optional string promo_text = 23;
+
+  // Specifies which format the ad will be served in. Default is ALL_FORMATS.
+  google.ads.googleads.v10.enums.DisplayAdFormatSettingEnum.DisplayAdFormatSetting format_setting = 16;
+
+  // Specification for various creative controls.
+  ResponsiveDisplayAdControlSpec control_spec = 24;
+}
+
+// A local ad.
+message LocalAdInfo {
+  // List of text assets for headlines. When the ad serves the headlines will
+  // be selected from this list. At least 1 and at most 5 headlines must be
+  // specified.
+  repeated AdTextAsset headlines = 1;
+
+  // List of text assets for descriptions. When the ad serves the descriptions
+  // will be selected from this list. At least 1 and at most 5 descriptions must
+  // be specified.
+  repeated AdTextAsset descriptions = 2;
+
+  // List of text assets for call-to-actions. When the ad serves the
+  // call-to-actions will be selected from this list. Call-to-actions are
+  // optional and at most 5 can be specified.
+  repeated AdTextAsset call_to_actions = 3;
+
+  // List of marketing image assets that may be displayed with the ad. The
+  // images must be 314x600 pixels or 320x320 pixels. At least 1 and at most
+  // 20 image assets must be specified.
+  repeated AdImageAsset marketing_images = 4;
+
+  // List of logo image assets that may be displayed with the ad. The images
+  // must be 128x128 pixels and not larger than 120KB. At least 1 and at most 5
+  // image assets must be specified.
+  repeated AdImageAsset logo_images = 5;
+
+  // List of YouTube video assets that may be displayed with the ad. Videos
+  // are optional and at most 20 can be specified.
+  repeated AdVideoAsset videos = 6;
+
+  // First part of optional text that can be appended to the URL in the ad.
+  optional string path1 = 9;
+
+  // Second part of optional text that can be appended to the URL in the ad.
+  // This field can only be set when `path1` is also set.
+  optional string path2 = 10;
+}
+
+// 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.v10.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;
+  }
+}
+
+// Specification for various creative controls for a responsive display ad.
+message ResponsiveDisplayAdControlSpec {
+  // Whether the advertiser has opted into the asset enhancements feature.
+  bool enable_asset_enhancements = 1;
+
+  // Whether the advertiser has opted into auto-gen video feature.
+  bool enable_autogen_video = 2;
+}
+
+// A Smart campaign ad.
+message SmartCampaignAdInfo {
+  // List of text assets for headlines. When the ad serves the headlines will
+  // be selected from this list. 3 headlines must be specified.
+  repeated AdTextAsset headlines = 1;
+
+  // List of text assets for descriptions. When the ad serves the descriptions
+  // will be selected from this list. 2 descriptions must be specified.
+  repeated AdTextAsset descriptions = 2;
+}
+
+// A call ad.
+message CallAdInfo {
+  // The country code in the ad.
+  string country_code = 1;
+
+  // The phone number in the ad.
+  string phone_number = 2;
+
+  // The business name in the ad.
+  string business_name = 3;
+
+  // First headline in the ad.
+  string headline1 = 11;
+
+  // Second headline in the ad.
+  string headline2 = 12;
+
+  // The first line of the ad's description.
+  string description1 = 4;
+
+  // The second line of the ad's description.
+  string description2 = 5;
+
+  // Whether to enable call tracking for the creative. Enabling call
+  // tracking also enables call conversions.
+  bool 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.
+  bool disable_call_conversion = 7;
+
+  // The URL to be used for phone number verification.
+  string 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.
+  string conversion_action = 9;
+
+  // The call conversion behavior of this call ad. It can use its own call
+  // conversion setting, inherit the account level setting, or be disabled.
+  google.ads.googleads.v10.enums.CallConversionReportingStateEnum.CallConversionReportingState conversion_reporting_state = 10;
+
+  // First part of text that can be appended to the URL in the ad. Optional.
+  string path1 = 13;
+
+  // Second part of text that can be appended to the URL in the ad. This field
+  // can only be set when `path1` is also set. Optional.
+  string path2 = 14;
+}
+
+// A discovery multi asset ad.
+message DiscoveryMultiAssetAdInfo {
+  // Marketing image assets 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%). Required if square_marketing_images is
+  // not present. Combined with `square_marketing_images` and
+  // `portrait_marketing_images` the maximum is 20.
+  repeated AdImageAsset marketing_images = 1;
+
+  // Square marketing image assets 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%). Required if marketing_images is not present.  Combined with
+  // `marketing_images` and `portrait_marketing_images` the maximum is 20.
+  repeated AdImageAsset square_marketing_images = 2;
+
+  // Portrait marketing image assets to be used in the ad. Valid image types are
+  // GIF, JPEG, and PNG. The minimum size is 480x600 and the aspect ratio must
+  // be 4:5 (+-1%).  Combined with `marketing_images` and
+  // `square_marketing_images` the maximum is 20.
+  repeated AdImageAsset portrait_marketing_images = 3;
+
+  // Logo image assets 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%). At least 1 and max 5 logo images can be specified.
+  repeated AdImageAsset logo_images = 4;
+
+  // Headline text asset of the ad. Maximum display width is 30. At least 1 and
+  // max 5 headlines can be specified.
+  repeated AdTextAsset headlines = 5;
+
+  // The descriptive text of the ad. Maximum display width is 90. At least 1 and
+  // max 5 descriptions can be specified.
+  repeated AdTextAsset descriptions = 6;
+
+  // The Advertiser/brand name. Maximum display width is 25. Required.
+  optional string business_name = 7;
+
+  // Call to action text.
+  optional string call_to_action_text = 8;
+
+  // Boolean flag that indicates if this ad must be served with lead form.
+  optional bool lead_form_only = 9;
+}
+
+// A discovery carousel ad.
+message DiscoveryCarouselAdInfo {
+  // Required. The Advertiser/brand name.
+  string business_name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Logo image to be used in the ad.  The minimum size is 128x128 and the
+  // aspect ratio must be 1:1(+-1%).
+  AdImageAsset logo_image = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Headline of the ad.
+  AdTextAsset headline = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The descriptive text of the ad.
+  AdTextAsset description = 4 [(google.api.field_behavior) = REQUIRED];
+
+  // Call to action text.
+  string call_to_action_text = 5;
+
+  // Required. Carousel cards that will display with the ad. Min 2 max 10.
+  repeated AdDiscoveryCarouselCardAsset carousel_cards = 6 [(google.api.field_behavior) = REQUIRED];
+}

+ 45 - 0
google/ads/googleads/v10/common/asset_policy.proto

@@ -0,0 +1,45 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/common/policy.proto";
+import "google/ads/googleads/v10/enums/policy_approval_status.proto";
+import "google/ads/googleads/v10/enums/policy_review_status.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AssetPolicyProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Proto file describing asset policies.
+
+// Contains policy information for an asset inside an ad.
+message AdAssetPolicySummary {
+  // The list of policy findings for this asset.
+  repeated PolicyTopicEntry policy_topic_entries = 1;
+
+  // Where in the review process this asset.
+  google.ads.googleads.v10.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2;
+
+  // The overall approval status of this asset, which is calculated based on
+  // the status of its individual policy topic entries.
+  google.ads.googleads.v10.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3;
+}

+ 979 - 0
google/ads/googleads/v10/common/asset_types.proto

@@ -0,0 +1,979 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/common/criteria.proto";
+import "google/ads/googleads/v10/common/feed_common.proto";
+import "google/ads/googleads/v10/enums/call_conversion_reporting_state.proto";
+import "google/ads/googleads/v10/enums/call_to_action_type.proto";
+import "google/ads/googleads/v10/enums/lead_form_call_to_action_type.proto";
+import "google/ads/googleads/v10/enums/lead_form_desired_intent.proto";
+import "google/ads/googleads/v10/enums/lead_form_field_user_input_type.proto";
+import "google/ads/googleads/v10/enums/lead_form_post_submit_call_to_action_type.proto";
+import "google/ads/googleads/v10/enums/mime_type.proto";
+import "google/ads/googleads/v10/enums/mobile_app_vendor.proto";
+import "google/ads/googleads/v10/enums/price_extension_price_qualifier.proto";
+import "google/ads/googleads/v10/enums/price_extension_price_unit.proto";
+import "google/ads/googleads/v10/enums/price_extension_type.proto";
+import "google/ads/googleads/v10/enums/promotion_extension_discount_modifier.proto";
+import "google/ads/googleads/v10/enums/promotion_extension_occasion.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AssetTypesProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::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.
+  optional string youtube_video_id = 2;
+
+  // YouTube video title.
+  string youtube_video_title = 3;
+}
+
+// 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.
+  optional bytes data = 2;
+}
+
+// An Image asset.
+message ImageAsset {
+  // The raw bytes data of an image. This field is mutate only.
+  optional bytes data = 5;
+
+  // File size of the image asset in bytes.
+  optional int64 file_size = 6;
+
+  // MIME type of the image asset.
+  google.ads.googleads.v10.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.
+  optional int64 height_pixels = 4;
+
+  // Width of the image.
+  optional int64 width_pixels = 5;
+
+  // A URL that returns the image with this height and width.
+  optional string url = 6;
+}
+
+// A Text asset.
+message TextAsset {
+  // Text content of the text asset.
+  optional string text = 2;
+}
+
+// A Lead Form asset.
+message LeadFormAsset {
+  // Required. The name of the business being advertised.
+  string business_name = 10 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Pre-defined display text that encourages user to expand the form.
+  google.ads.googleads.v10.enums.LeadFormCallToActionTypeEnum.LeadFormCallToActionType call_to_action_type = 17 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Text giving a clear value proposition of what users expect once they expand
+  // the form.
+  string call_to_action_description = 18 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Headline of the expanded form to describe what the form is asking for or
+  // facilitating.
+  string headline = 12 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Detailed description of the expanded form to describe what the form is
+  // asking for or facilitating.
+  string description = 13 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Link to a page describing the policy on how the collected data is handled
+  // by the advertiser/business.
+  string privacy_policy_url = 14 [(google.api.field_behavior) = REQUIRED];
+
+  // Headline of text shown after form submission that describes how the
+  // advertiser will follow up with the user.
+  optional string post_submit_headline = 15;
+
+  // Detailed description shown after form submission that describes how the
+  // advertiser will follow up with the user.
+  optional string post_submit_description = 16;
+
+  // Ordered list of input fields.
+  repeated LeadFormField fields = 8;
+
+  // Ordered list of custom question fields.
+  repeated LeadFormCustomQuestionField custom_question_fields = 23;
+
+  // Configured methods for collected lead data to be delivered to advertiser.
+  // Only one method typed as WebhookDelivery can be configured.
+  repeated LeadFormDeliveryMethod delivery_methods = 9;
+
+  // Pre-defined display text that encourages user action after the form is
+  // submitted.
+  google.ads.googleads.v10.enums.LeadFormPostSubmitCallToActionTypeEnum.LeadFormPostSubmitCallToActionType post_submit_call_to_action_type = 19;
+
+  // Asset resource name of the background image. The minimum size is 600x314
+  // and the aspect ratio must be 1.91:1 (+-1%).
+  optional string background_image_asset = 20;
+
+  // Desired intent for the lead form, e.g. more volume or more qualified.
+  google.ads.googleads.v10.enums.LeadFormDesiredIntentEnum.LeadFormDesiredIntent desired_intent = 21;
+
+  // Custom disclosure shown along with Google disclaimer on the lead form.
+  // Accessible to allowed customers only.
+  optional string custom_disclosure = 22;
+}
+
+// One input field instance within a form.
+message LeadFormField {
+  // Describes the input type, which may be a predefined type such as
+  // "full name" or a pre-vetted question like "Do you own a car?".
+  google.ads.googleads.v10.enums.LeadFormFieldUserInputTypeEnum.LeadFormFieldUserInputType input_type = 1;
+
+  // Defines answer configuration that this form field accepts. If oneof is not
+  // set, this is a free-text answer.
+  oneof answers {
+    // Answer configuration for a single choice question. Can be set only for
+    // pre-vetted question fields. Minimum of 2 answers required and maximum of
+    // 12 allowed.
+    LeadFormSingleChoiceAnswers single_choice_answers = 2;
+  }
+}
+
+// One custom question input field instance within a form.
+message LeadFormCustomQuestionField {
+  // The exact custom question field text (e.g. "Do you own a car?").
+  string custom_question_text = 1;
+
+  // Defines answer configuration that this form field accepts. If
+  // oneof is not set, this is a free-text answer.
+  oneof answers {
+    // Answer configuration for a single choice question.
+    // Minimum of 2 answers and maximum of 12 allowed.
+    LeadFormSingleChoiceAnswers single_choice_answers = 2;
+  }
+}
+
+// Defines possible answers for a single choice question, usually presented as
+// a single-choice drop-down list.
+message LeadFormSingleChoiceAnswers {
+  // List of choices for a single question field. The order of entries defines
+  // UI order. Minimum of 2 answers required and maximum of 12 allowed.
+  repeated string answers = 1;
+}
+
+// A configuration of how leads are delivered to the advertiser.
+message LeadFormDeliveryMethod {
+  // Various subtypes of delivery.
+  oneof delivery_details {
+    // Webhook method of delivery.
+    WebhookDelivery webhook = 1;
+  }
+}
+
+// Google notifies the advertiser of leads by making HTTP calls to an
+// endpoint they specify. The requests contain JSON matching a schema that
+// Google publishes as part of form ads documentation.
+message WebhookDelivery {
+  // Webhook url specified by advertiser to send the lead.
+  optional string advertiser_webhook_url = 4;
+
+  // Anti-spoofing secret set by the advertiser as part of the webhook payload.
+  optional string google_secret = 5;
+
+  // The schema version that this delivery instance will use.
+  optional int64 payload_schema_version = 6;
+}
+
+// A Book on Google asset. Used to redirect user to book through Google.
+// Book on Google will change the redirect url to book directly through
+// Google.
+message BookOnGoogleAsset {
+
+}
+
+// A Promotion asset.
+message PromotionAsset {
+  // Required. A freeform description of what the promotion is targeting.
+  string promotion_target = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // A modifier for qualification of the discount.
+  google.ads.googleads.v10.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2;
+
+  // Start date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
+  // format.
+  string redemption_start_date = 7;
+
+  // Last date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
+  // format.
+  string redemption_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.v10.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9;
+
+  // The language of the promotion.
+  // Represented as BCP 47 language tag.
+  string language_code = 10;
+
+  // Start date of when this asset is effective and can begin serving, in
+  // yyyy-MM-dd format.
+  string start_date = 11;
+
+  // Last date of when this asset is effective and still serving, in yyyy-MM-dd
+  // format.
+  string end_date = 12;
+
+  // List of non-overlapping schedules specifying all time intervals for which
+  // the asset may serve. There can be a maximum of 6 schedules per day, 42 in
+  // total.
+  repeated AdScheduleInfo ad_schedule_targets = 13;
+
+  // Discount type, can be percentage off or amount off.
+  oneof discount_type {
+    // Percentage off discount in the promotion. 1,000,000 = 100%.
+    // Either this or money_amount_off is required.
+    int64 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.
+    string 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;
+  }
+}
+
+// A Callout asset.
+message CalloutAsset {
+  // Required. The callout text.
+  // The length of this string should be between 1 and 25, inclusive.
+  string callout_text = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Start date of when this asset is effective and can begin serving, in
+  // yyyy-MM-dd format.
+  string start_date = 2;
+
+  // Last date of when this asset is effective and still serving, in yyyy-MM-dd
+  // format.
+  string end_date = 3;
+
+  // List of non-overlapping schedules specifying all time intervals for which
+  // the asset may serve. There can be a maximum of 6 schedules per day, 42 in
+  // total.
+  repeated AdScheduleInfo ad_schedule_targets = 4;
+}
+
+// A Structured Snippet asset.
+message StructuredSnippetAsset {
+  // Required. The header of the snippet.
+  // This string should be one of the predefined values at
+  // https://developers.google.com/google-ads/api/reference/data/structured-snippet-headers
+  string header = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The values in the snippet.
+  // The size of this collection should be between 3 and 10, inclusive.
+  // The length of each value should be between 1 and 25 characters, inclusive.
+  repeated string values = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// A Sitelink asset.
+message SitelinkAsset {
+  // Required. URL display text for the sitelink.
+  // The length of this string should be between 1 and 25, inclusive.
+  string link_text = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // First line of the description for the sitelink.
+  // If set, the length should be between 1 and 35, inclusive, and description2
+  // must also be set.
+  string description1 = 2;
+
+  // Second line of the description for the sitelink.
+  // If set, the length should be between 1 and 35, inclusive, and description1
+  // must also be set.
+  string description2 = 3;
+
+  // Start date of when this asset is effective and can begin serving, in
+  // yyyy-MM-dd format.
+  string start_date = 4;
+
+  // Last date of when this asset is effective and still serving, in yyyy-MM-dd
+  // format.
+  string end_date = 5;
+
+  // List of non-overlapping schedules specifying all time intervals for which
+  // the asset may serve. There can be a maximum of 6 schedules per day, 42 in
+  // total.
+  repeated AdScheduleInfo ad_schedule_targets = 6;
+}
+
+// A Page Feed asset.
+message PageFeedAsset {
+  // Required. The webpage that advertisers want to target.
+  string page_url = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Labels used to group the page urls.
+  repeated string labels = 2;
+}
+
+// A Dynamic Education asset.
+message DynamicEducationAsset {
+  // Required. Program ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string program_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Location ID which can be any sequence of letters and digits and must be
+  // unique.
+  string location_id = 2;
+
+  // Required. Program name, e.g. Nursing. Required.
+  string program_name = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Subject of study, e.g. Health.
+  string subject = 4;
+
+  // Program description, e.g. Nursing Certification.
+  string program_description = 5;
+
+  // School name, e.g. Mountain View School of Nursing.
+  string school_name = 6;
+
+  // School address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403
+  string address = 7;
+
+  // Contextual keywords, e.g. Nursing certification, Health, Mountain View.
+  repeated string contextual_keywords = 8;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 9;
+
+  // Similar program IDs.
+  repeated string similar_program_ids = 10;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 11;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 12;
+
+  // Thumbnail image url, e.g. http://www.example.com/thumbnail.png. The
+  // thumbnail image will not be uploaded as image asset.
+  string thumbnail_image_url = 13;
+
+  // Image url, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 14;
+}
+
+// An asset representing a mobile app.
+message MobileAppAsset {
+  // Required. A string that uniquely identifies a mobile application. It should just
+  // contain the platform native id, like "com.android.ebay" for Android or
+  // "12345689" for iOS.
+  string app_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The application store that distributes this specific app.
+  google.ads.googleads.v10.enums.MobileAppVendorEnum.MobileAppVendor app_store = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The visible text displayed when the link is rendered in an ad.
+  // The length of this string should be between 1 and 25, inclusive.
+  string link_text = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Start date of when this asset is effective and can begin serving, in
+  // yyyy-MM-dd format.
+  string start_date = 4;
+
+  // Last date of when this asset is effective and still serving, in yyyy-MM-dd
+  // format.
+  string end_date = 5;
+}
+
+// An asset representing a hotel callout.
+message HotelCalloutAsset {
+  // Required. The text of the hotel callout asset.
+  // The length of this string should be between 1 and 25, inclusive.
+  string text = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The language of the hotel callout.
+  // Represented as BCP 47 language tag.
+  string language_code = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// A Call asset.
+message CallAsset {
+  // Required. Two-letter country code of the phone number. Examples: 'US', 'us'.
+  string country_code = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The advertiser's raw phone number. Examples: '1234567890', '(123)456-7890'
+  string phone_number = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Indicates whether this CallAsset should use its own call conversion
+  // setting, follow the account level setting, or disable call conversion.
+  google.ads.googleads.v10.enums.CallConversionReportingStateEnum.CallConversionReportingState call_conversion_reporting_state = 3;
+
+  // The conversion action to attribute a call conversion to. If not set, the
+  // default conversion action is used. This field only has effect if
+  // call_conversion_reporting_state is set to
+  // USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
+  string call_conversion_action = 4 [(google.api.resource_reference) = {
+                                       type: "googleads.googleapis.com/ConversionAction"
+                                     }];
+
+  // List of non-overlapping schedules specifying all time intervals for which
+  // the asset may serve. There can be a maximum of 6 schedules per day, 42 in
+  // total.
+  repeated AdScheduleInfo ad_schedule_targets = 5;
+}
+
+// An asset representing a list of price offers.
+message PriceAsset {
+  // Required. The type of the price asset.
+  google.ads.googleads.v10.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // The price qualifier of the price asset.
+  google.ads.googleads.v10.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
+
+  // Required. The language of the price asset.
+  // Represented as BCP 47 language tag.
+  string language_code = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // The price offerings of the price asset.
+  // The size of this collection should be between 3 and 8, inclusive.
+  repeated PriceOffering price_offerings = 4;
+}
+
+// A single price offering within a PriceAsset.
+message PriceOffering {
+  // Required. The header of the price offering.
+  // The length of this string should be between 1 and 25, inclusive.
+  string header = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The description of the price offering.
+  // The length of this string should be between 1 and 25, inclusive.
+  string description = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The price value of the price offering.
+  Money price = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // The price unit of the price offering.
+  google.ads.googleads.v10.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
+
+  // Required. The final URL after all cross domain redirects.
+  string final_url = 5 [(google.api.field_behavior) = REQUIRED];
+
+  // The final mobile URL after all cross domain redirects.
+  string final_mobile_url = 6;
+}
+
+// A call to action asset.
+message CallToActionAsset {
+  // Call to action.
+  google.ads.googleads.v10.enums.CallToActionTypeEnum.CallToActionType call_to_action = 1;
+}
+
+// A dynamic real estate asset.
+message DynamicRealEstateAsset {
+  // Required. Listing ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string listing_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Listing name, e.g. Boulevard Bungalow. Required.
+  string listing_name = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // City name, e.g. Mountain View, California.
+  string city_name = 3;
+
+  // Description, e.g. 3 beds, 2 baths, 1568 sq. ft.
+  string description = 4;
+
+  // Address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403
+  string address = 5;
+
+  // Price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark. e.g. 200,000.00 USD.
+  string price = 6;
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 7;
+
+  // Property type, e.g. House.
+  string property_type = 8;
+
+  // Listing type, e.g. For sale.
+  string listing_type = 9;
+
+  // Contextual keywords, e.g. For sale; Houses for sale.
+  repeated string contextual_keywords = 10;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $200,000.00.
+  string formatted_price = 11;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 12;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 13;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 14;
+
+  // Similar listing IDs.
+  repeated string similar_listing_ids = 15;
+}
+
+// A dynamic custom asset.
+message DynamicCustomAsset {
+  // Required. ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag, e.g. sedan. Required.
+  string id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // ID2 which can be any sequence of letters and digits, e.g. red. ID sequence
+  // (ID + ID2) must be unique.
+  string id2 = 2;
+
+  // Required. Item title, e.g. Mid-size sedan. Required.
+  string item_title = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Item subtitle, e.g. At your Mountain View dealership.
+  string item_subtitle = 4;
+
+  // Item description, e.g. Best selling mid-size car.
+  string item_description = 5;
+
+  // Item address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403
+  string item_address = 6;
+
+  // Item category, e.g. Sedans.
+  string item_category = 7;
+
+  // Price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 20,000.00 USD.
+  string price = 8;
+
+  // Sale price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 15,000.00 USD.
+  // Must be less than the 'price' field.
+  string sale_price = 9;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $20,000.00.
+  string formatted_price = 10;
+
+  // Formatted sale price which can be any characters. If set, this attribute
+  // will be used instead of 'sale price', e.g. On sale for $15,000.00.
+  string formatted_sale_price = 11;
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 12;
+
+  // Contextual keywords, e.g. Sedans, 4 door sedans.
+  repeated string contextual_keywords = 13;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 14;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 16;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 17;
+
+  // Similar IDs.
+  repeated string similar_ids = 15;
+}
+
+// A dynamic hotels and rentals asset.
+message DynamicHotelsAndRentalsAsset {
+  // Required. Property ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string property_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Property name, e.g. Mountain View Hotel. Required.
+  string property_name = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 3;
+
+  // Destination name, e.g. Downtown Mountain View.
+  string destination_name = 4;
+
+  // Description, e.g. Close to SJC Airport.
+  string description = 5;
+
+  // Price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 100.00 USD.
+  string price = 6;
+
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 80.00 USD.
+  // Must be less than the 'price' field.
+  string sale_price = 7;
+
+  // Star rating. Must be a number between 1–5, inclusive.
+  int64 star_rating = 8;
+
+  // Category, e.g. Hotel suite.
+  string category = 9;
+
+  // Contextual keywords, e.g. Mountain View "Hotels", South Bay hotels.
+  repeated string contextual_keywords = 10;
+
+  // Address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403
+  string address = 11;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 12;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 13;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 14;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $100.00.
+  string formatted_price = 15;
+
+  // Formatted sale price which can be any characters. If set, this attribute
+  // will be used instead of 'sale price', e.g. On sale for $80.00.
+  string formatted_sale_price = 16;
+
+  // Similar property IDs.
+  repeated string similar_property_ids = 17;
+}
+
+// A dynamic flights asset.
+message DynamicFlightsAsset {
+  // Required. Destination ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string destination_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Origin ID which can be any sequence of letters and digits. The ID sequence
+  // (destination ID + origin ID) must be unique.
+  string origin_id = 2;
+
+  // Required. Flight description, e.g. Book your ticket. Required.
+  string flight_description = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 4;
+
+  // Destination name, e.g. Paris.
+  string destination_name = 5;
+
+  // Origin name, e.g. London.
+  string origin_name = 6;
+
+  // Flight price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark. e.g. 100.00 USD.
+  string flight_price = 7;
+
+  // Flight sale price which can be number followed by the alphabetic currency
+  // code, ISO 4217 standard. Use '.' as the decimal mark, e.g. 80.00 USD.
+  // Must be less than the 'flight_price' field.
+  string flight_sale_price = 8;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $100.00.
+  string formatted_price = 9;
+
+  // Formatted sale price which can be any characters. If set, this attribute
+  // will be used instead of 'sale price', e.g. On sale for $80.00.
+  string formatted_sale_price = 10;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 11;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 12;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 13;
+
+  // Similar destination IDs, e.g. PAR,LON.
+  repeated string similar_destination_ids = 14;
+
+  // A custom field which can be multiple key to values mapping separated by
+  // delimiters (",", "|" and ":"), in the forms of
+  // "<KEY_1>: <VALUE_1>, <VALUE_2>, ... ,<VALUE_N> | <KEY_2>: <VALUE_1>, ...
+  // ,<VALUE_N> | ... | <KEY_N>: <VALUE_1>, ... ,<VALUE_N>" e.g. wifi: most |
+  // aircraft: 320, 77W | flights: 42 | legroom: 32".
+  string custom_mapping = 15;
+}
+
+// A Discovery Carousel Card asset.
+message DiscoveryCarouselCardAsset {
+  // Asset resource name of the associated 1.91:1 marketing image. This and/or
+  // square marketing image asset is required.
+  string marketing_image_asset = 1;
+
+  // Asset resource name of the associated square marketing image. This
+  // and/or a marketing image asset is required.
+  string square_marketing_image_asset = 2;
+
+  // Asset resource name of the associated 4:5 portrait marketing image.
+  string portrait_marketing_image_asset = 3;
+
+  // Required. Headline of the carousel card.
+  string headline = 4 [(google.api.field_behavior) = REQUIRED];
+
+  // Call to action text.
+  string call_to_action_text = 5;
+}
+
+// A dynamic travel asset.
+message DynamicTravelAsset {
+  // Required. Destination ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string destination_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Origin ID which can be any sequence of letters and digits. The ID sequence
+  // (destination ID + origin ID) must be unique.
+  string origin_id = 2;
+
+  // Required. Title, e.g. Book your train ticket. Required.
+  string title = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Destination name, e.g. Paris.
+  string destination_name = 4;
+
+  // Destination address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403.
+  string destination_address = 5;
+
+  // Origin name, e.g. London.
+  string origin_name = 6;
+
+  // Price which can be a number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark. e.g. 100.00 USD.
+  string price = 7;
+
+  // Sale price which can be a number followed by the alphabetic currency
+  // code, ISO 4217 standard. Use '.' as the decimal mark, e.g. 80.00 USD.
+  // Must be less than the 'price' field.
+  string sale_price = 8;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $100.00.
+  string formatted_price = 9;
+
+  // Formatted sale price which can be any characters. If set, this attribute
+  // will be used instead of 'sale price', e.g. On sale for $80.00.
+  string formatted_sale_price = 10;
+
+  // Category, e.g. Express.
+  string category = 11;
+
+  // Contextual keywords, e.g. Paris trains.
+  repeated string contextual_keywords = 12;
+
+  // Similar destination IDs, e.g. NYC.
+  repeated string similar_destination_ids = 13;
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 14;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 15;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 16;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 17;
+}
+
+// A dynamic local asset.
+message DynamicLocalAsset {
+  // Required. Deal ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string deal_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. Deal name, e.g. 50% off at Mountain View Grocers. Required.
+  string deal_name = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Subtitle, e.g. Groceries.
+  string subtitle = 3;
+
+  // Description, e.g. Save on your weekly bill.
+  string description = 4;
+
+  // Price which can be a number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 100.00 USD.
+  string price = 5;
+
+  // Sale price which can be number followed by the alphabetic currency code,
+  // ISO 4217 standard. Use '.' as the decimal mark, e.g. 80.00 USD.
+  // Must be less than the 'price' field.
+  string sale_price = 6;
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 7;
+
+  // Address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403.
+  string address = 8;
+
+  // Category, e.g. Food.
+  string category = 9;
+
+  // Contextual keywords, e.g. Save groceries coupons.
+  repeated string contextual_keywords = 10;
+
+  // Formatted price which can be any characters. If set, this attribute will be
+  // used instead of 'price', e.g. Starting at $100.00.
+  string formatted_price = 11;
+
+  // Formatted sale price which can be any characters. If set, this attribute
+  // will be used instead of 'sale price', e.g. On sale for $80.00.
+  string formatted_sale_price = 12;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 13;
+
+  // Similar deal IDs, e.g. 1275.
+  repeated string similar_deal_ids = 14;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 15;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 16;
+}
+
+// A dynamic jobs asset.
+message DynamicJobsAsset {
+  // Required. Job ID which can be any sequence of letters and digits, and must be
+  // unique and match the values of remarketing tag. Required.
+  string job_id = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Location ID which can be any sequence of letters and digits. The ID
+  // sequence (job ID + location ID) must be unique.
+  string location_id = 2;
+
+  // Required. Job title, e.g. Software engineer. Required.
+  string job_title = 3 [(google.api.field_behavior) = REQUIRED];
+
+  // Job subtitle, e.g. Level II.
+  string job_subtitle = 4;
+
+  // Description, e.g. Apply your technical skills.
+  string description = 5;
+
+  // Image URL, e.g. http://www.example.com/image.png. The image will not be
+  // uploaded as image asset.
+  string image_url = 6;
+
+  // Job category, e.g. Technical.
+  string job_category = 7;
+
+  // Contextual keywords, e.g. Software engineering job.
+  repeated string contextual_keywords = 8;
+
+  // Address which can be specified in one of the following formats.
+  // (1) City, state, code, country, e.g. Mountain View, CA, USA.
+  // (2) Full address, e.g. 123 Boulevard St, Mountain View, CA 94043.
+  // (3) Latitude-longitude in the DDD format, e.g. 41.40338, 2.17403.
+  string address = 9;
+
+  // Salary, e.g. $100,000.
+  string salary = 10;
+
+  // Android deep link, e.g.
+  // android-app://com.example.android/http/example.com/gizmos?1234.
+  string android_app_link = 11;
+
+  // Similar job IDs, e.g. 1275.
+  repeated string similar_job_ids = 12;
+
+  // iOS deep link, e.g. exampleApp://content/page.
+  string ios_app_link = 13;
+
+  // iOS app store ID. This is used to check if the user has the app installed
+  // on their device before deep linking. If this field is set, then the
+  // ios_app_link field must also be present.
+  int64 ios_app_store_id = 14;
+}

+ 39 - 0
google/ads/googleads/v10/common/asset_usage.proto

@@ -0,0 +1,39 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/enums/served_asset_field_type.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AssetUsageProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Proto file describing asset usage.
+
+// Contains the usage information of the asset.
+message AssetUsage {
+  // Resource name of the asset.
+  string asset = 1;
+
+  // The served field type of the asset.
+  google.ads.googleads.v10.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType served_asset_field_type = 2;
+}

+ 173 - 0
google/ads/googleads/v10/common/audiences.proto

@@ -0,0 +1,173 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/enums/gender_type.proto";
+import "google/ads/googleads/v10/enums/income_range_type.proto";
+import "google/ads/googleads/v10/enums/parental_status_type.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "AudiencesProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Positive dimension specifying user's audience.
+message AudienceDimension {
+  // Dimension specifying users who belong to the audience.
+  oneof dimension {
+    // Dimension specifying users by their age.
+    AgeDimension age = 1;
+
+    // Dimension specifying users by their gender.
+    GenderDimension gender = 2;
+
+    // Dimension specifying users by their household income.
+    HouseholdIncomeDimension household_income = 3;
+
+    // Dimension specifying users by their parental status.
+    ParentalStatusDimension parental_status = 4;
+
+    // Dimension specifying users by their membership in other audience
+    // segments.
+    AudienceSegmentDimension audience_segments = 5;
+  }
+}
+
+// Negative dimension specifying users to exclude from the audience.
+message AudienceExclusionDimension {
+  // Audience segment to be excluded.
+  repeated ExclusionSegment exclusions = 1;
+}
+
+// An audience segment to be excluded from an audience.
+message ExclusionSegment {
+  // Segment to be excluded.
+  oneof segment {
+    // User list segment to be excluded.
+    UserListSegment user_list = 1;
+  }
+}
+
+// Dimension specifying users by their age.
+message AgeDimension {
+  // Contiguous age range to be included in the dimension.
+  repeated AgeSegment age_ranges = 1;
+
+  // Include users whose age is not determined.
+  optional bool include_undetermined = 2;
+}
+
+// Contiguous age range.
+message AgeSegment {
+  // Minimum age to include. A minimum age must be specified and must be at
+  // least 18. Allowed values are 18, 25, 35, 45, 55, and 65.
+  optional int32 min_age = 1;
+
+  // Maximum age to include. A maximum age need not be specified. If specified,
+  // max_age must be greater than min_age, and allowed values are 24, 34, 44,
+  // 54, and 64.
+  optional int32 max_age = 2;
+}
+
+// Dimension specifying users by their gender.
+message GenderDimension {
+  // Included gender demographic segments.
+  repeated google.ads.googleads.v10.enums.GenderTypeEnum.GenderType genders = 1;
+
+  // Include users whose gender is not determined.
+  optional bool include_undetermined = 2;
+}
+
+// Dimension specifying users by their household income.
+message HouseholdIncomeDimension {
+  // Included household income demographic segments.
+  repeated google.ads.googleads.v10.enums.IncomeRangeTypeEnum.IncomeRangeType income_ranges = 1;
+
+  // Include users whose household income is not determined.
+  optional bool include_undetermined = 2;
+}
+
+// Dimension specifying users by their parental status.
+message ParentalStatusDimension {
+  // Included parental status demographic segments.
+  repeated google.ads.googleads.v10.enums.ParentalStatusTypeEnum.ParentalStatusType parental_statuses = 1;
+
+  // Include users whose parental status is undetermined.
+  optional bool include_undetermined = 2;
+}
+
+// Dimension specifying users by their membership in other audience segments.
+message AudienceSegmentDimension {
+  // Included audience segments. Users are included if they belong to at least
+  // one segment.
+  repeated AudienceSegment segments = 1;
+}
+
+// Positive audience segment.
+message AudienceSegment {
+  // Positive segment.
+  oneof segment {
+    // User list segment.
+    UserListSegment user_list = 1;
+
+    // Affinity or In-market segment.
+    UserInterestSegment user_interest = 2;
+
+    // Live-event audience segment.
+    LifeEventSegment life_event = 3;
+
+    // Detailed demographic segment.
+    DetailedDemographicSegment detailed_demographic = 4;
+
+    // Custom audience segment.
+    CustomAudienceSegment custom_audience = 5;
+  }
+}
+
+// User list segment.
+message UserListSegment {
+  // The user list resource.
+  optional string user_list = 1;
+}
+
+// User interest segment.
+message UserInterestSegment {
+  // The user interest resource.
+  optional string user_interest_category = 1;
+}
+
+// Live event segment.
+message LifeEventSegment {
+  // The life event resource.
+  optional string life_event = 1;
+}
+
+// Detailed demographic segment.
+message DetailedDemographicSegment {
+  // The detailed demographic resource.
+  optional string detailed_demographic = 1;
+}
+
+// Custom audience segment.
+message CustomAudienceSegment {
+  // The custom audience resource.
+  optional string custom_audience = 1;
+}

+ 199 - 0
google/ads/googleads/v10/common/bidding.proto

@@ -0,0 +1,199 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+import "google/ads/googleads/v10/enums/target_impression_share_location.proto";
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "BiddingProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::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%).
+  optional int64 commission_rate_micros = 2;
+}
+
+// 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.
+  optional bool enhanced_cpc_enabled = 2;
+}
+
+// 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 to help get the most conversions for your
+// campaigns while spending your budget.
+message MaximizeConversions {
+  // The target cost-per-action (CPA) option. This is the average amount that
+  // you would like to spend per conversion action specified in micro units of
+  // the bidding strategy's currency. If set, the bid strategy will get as many
+  // conversions as possible at or below the target cost-per-action. If the
+  // target CPA is not set, the bid strategy will aim to achieve the lowest
+  // possible CPA given the budget.
+  int64 target_cpa = 1;
+
+  // Maximum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // Mutable for portfolio bidding strategies only.
+  int64 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.
+  // Mutable for portfolio bidding strategies only.
+  int64 cpc_bid_floor_micros = 3;
+}
+
+// An automated bidding strategy to help get the most conversion value for your
+// campaigns while spending your 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.
+  double target_roas = 2;
+
+  // Maximum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // Mutable for portfolio bidding strategies only.
+  int64 cpc_bid_ceiling_micros = 3;
+
+  // Minimum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // Mutable for portfolio bidding strategies only.
+  int64 cpc_bid_floor_micros = 4;
+}
+
+// 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.
+  optional int64 target_cpa_micros = 4;
+
+  // Maximum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // This should only be set for portfolio bid strategies.
+  optional int64 cpc_bid_ceiling_micros = 5;
+
+  // Minimum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // This should only be set for portfolio bid strategies.
+  optional int64 cpc_bid_floor_micros = 6;
+}
+
+// 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).
+message TargetImpressionShare {
+  // The targeted location on the search results page.
+  google.ads.googleads.v10.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.
+  optional int64 location_fraction_micros = 4;
+
+  // 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.
+  optional int64 cpc_bid_ceiling_micros = 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.
+  optional double target_roas = 4;
+
+  // Maximum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // This should only be set for portfolio bid strategies.
+  optional int64 cpc_bid_ceiling_micros = 5;
+
+  // Minimum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  // This should only be set for portfolio bid strategies.
+  optional int64 cpc_bid_floor_micros = 6;
+}
+
+// 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.
+  // This field is deprecated and should no longer be used. See
+  // https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html
+  // for details.
+  optional int64 target_spend_micros = 3 [deprecated = true];
+
+  // Maximum bid limit that can be set by the bid strategy.
+  // The limit applies to all keywords managed by the strategy.
+  optional int64 cpc_bid_ceiling_micros = 4;
+}
+
+// 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.
+  optional int64 cpc_bid_ceiling_micros = 3;
+
+  // 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.
+  optional bool enhanced_cpc_enabled = 4;
+}

+ 46 - 0
google/ads/googleads/v10/common/click_location.proto

@@ -0,0 +1,46 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.ads.googleads.v10.common;
+
+option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
+option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
+option java_multiple_files = true;
+option java_outer_classname = "ClickLocationProto";
+option java_package = "com.google.ads.googleads.v10.common";
+option objc_class_prefix = "GAA";
+option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
+option ruby_package = "Google::Ads::GoogleAds::V10::Common";
+
+// Proto file describing a ClickLocation.
+
+// Location criteria associated with a click.
+message ClickLocation {
+  // The city location criterion associated with the impression.
+  optional string city = 6;
+
+  // The country location criterion associated with the impression.
+  optional string country = 7;
+
+  // The metro location criterion associated with the impression.
+  optional string metro = 8;
+
+  // The most specific location criterion associated with the impression.
+  optional string most_specific = 9;
+
+  // The region location criterion associated with the impression.
+  optional string region = 10;
+}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác