diff options
Diffstat (limited to 'third_party/googleapis/google/actions/sdk/v2')
70 files changed, 4989 insertions, 0 deletions
diff --git a/third_party/googleapis/google/actions/sdk/v2/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/BUILD.bazel new file mode 100644 index 0000000..c569d26 --- /dev/null +++ b/third_party/googleapis/google/actions/sdk/v2/BUILD.bazel @@ -0,0 +1,105 @@ +# 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", +    service_yaml = "actions_v2.yaml", +    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", +    ], +) diff --git a/third_party/googleapis/google/actions/sdk/v2/account_linking.proto b/third_party/googleapis/google/actions/sdk/v2/account_linking.proto new file mode 100644 index 0000000..b33299f --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/account_linking_secret.proto b/third_party/googleapis/google/actions/sdk/v2/account_linking_secret.proto new file mode 100644 index 0000000..d016241 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/action.proto b/third_party/googleapis/google/actions/sdk/v2/action.proto new file mode 100644 index 0000000..99ebb11 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/actions_grpc_service_config.json b/third_party/googleapis/google/actions/sdk/v2/actions_grpc_service_config.json new file mode 100644 index 0000000..e78d2db --- /dev/null +++ b/third_party/googleapis/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" +  }] +} diff --git a/third_party/googleapis/google/actions/sdk/v2/actions_sdk.proto b/third_party/googleapis/google/actions/sdk/v2/actions_sdk.proto new file mode 100644 index 0000000..a145b22 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/actions_testing.proto b/third_party/googleapis/google/actions/sdk/v2/actions_testing.proto new file mode 100644 index 0000000..9de13ea --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/actions_v2.yaml b/third_party/googleapis/google/actions/sdk/v2/actions_v2.yaml new file mode 100644 index 0000000..094f8b4 --- /dev/null +++ b/third_party/googleapis/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. diff --git a/third_party/googleapis/google/actions/sdk/v2/config_file.proto b/third_party/googleapis/google/actions/sdk/v2/config_file.proto new file mode 100644 index 0000000..5fd2dae --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/conversation/BUILD.bazel new file mode 100644 index 0000000..56560f2 --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/intent.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/intent.proto new file mode 100644 index 0000000..e2e8bec --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/BUILD.bazel new file mode 100644 index 0000000..bbc997a --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/BUILD.bazel new file mode 100644 index 0000000..3dc7177 --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/canvas.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/canvas.proto new file mode 100644 index 0000000..b99099b --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/card.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/card.proto new file mode 100644 index 0000000..df4ce0e --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/collection.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/collection.proto new file mode 100644 index 0000000..8666fce --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/content.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/content.proto new file mode 100644 index 0000000..4eeeb0a --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/image.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/image.proto new file mode 100644 index 0000000..1ede5d4 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/link.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/link.proto new file mode 100644 index 0000000..a3efc81 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/list.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/list.proto new file mode 100644 index 0000000..901dd10 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/media.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/media.proto new file mode 100644 index 0000000..49e3d26 --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/table.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/content/table.proto new file mode 100644 index 0000000..8e07efb --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/prompt.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/prompt.proto new file mode 100644 index 0000000..a3ce25a --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/simple.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/simple.proto new file mode 100644 index 0000000..4feda06 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/suggestion.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/prompt/suggestion.proto new file mode 100644 index 0000000..228c399 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/conversation/scene.proto b/third_party/googleapis/google/actions/sdk/v2/conversation/scene.proto new file mode 100644 index 0000000..c042eba --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/data_file.proto b/third_party/googleapis/google/actions/sdk/v2/data_file.proto new file mode 100644 index 0000000..5617bd2 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/event_logs.proto b/third_party/googleapis/google/actions/sdk/v2/event_logs.proto new file mode 100644 index 0000000..33e002f --- /dev/null +++ b/third_party/googleapis/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 { + +} diff --git a/third_party/googleapis/google/actions/sdk/v2/files.proto b/third_party/googleapis/google/actions/sdk/v2/files.proto new file mode 100644 index 0000000..529b25e --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/BUILD.bazel new file mode 100644 index 0000000..6c72865 --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/conditional_event.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/conditional_event.proto new file mode 100644 index 0000000..35cb486 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/entity_set.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/entity_set.proto new file mode 100644 index 0000000..2ec47cd --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/event_handler.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/event_handler.proto new file mode 100644 index 0000000..99d0115 --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/global_intent_event.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/global_intent_event.proto new file mode 100644 index 0000000..e825f3b --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/intent.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/intent.proto new file mode 100644 index 0000000..8ed8d04 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/intent_event.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/intent_event.proto new file mode 100644 index 0000000..f765a86 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/BUILD.bazel new file mode 100644 index 0000000..c7eaf2b --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/BUILD.bazel new file mode 100644 index 0000000..213d255 --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto new file mode 100644 index 0000000..ca6e564 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto new file mode 100644 index 0000000..17d59e2 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto new file mode 100644 index 0000000..a2c8b9e --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto new file mode 100644 index 0000000..cfb9fa8 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto new file mode 100644 index 0000000..0d25389 --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto new file mode 100644 index 0000000..34d6e74 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto new file mode 100644 index 0000000..258b724 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto new file mode 100644 index 0000000..6869a69 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto new file mode 100644 index 0000000..4c6d43d --- /dev/null +++ b/third_party/googleapis/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; +  } +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto new file mode 100644 index 0000000..1e67ddd --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto new file mode 100644 index 0000000..f842e92 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto new file mode 100644 index 0000000..0d21f97 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto new file mode 100644 index 0000000..bd84161 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto new file mode 100644 index 0000000..4c7d029 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/scene.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/scene.proto new file mode 100644 index 0000000..e8c4b4b --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/slot.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/slot.proto new file mode 100644 index 0000000..114fe4a --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/BUILD.bazel b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/BUILD.bazel new file mode 100644 index 0000000..9d5191c --- /dev/null +++ b/third_party/googleapis/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", +) diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/class_reference.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/class_reference.proto new file mode 100644 index 0000000..f06fead --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/entity_display.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/entity_display.proto new file mode 100644 index 0000000..92a6648 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/free_text_type.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/free_text_type.proto new file mode 100644 index 0000000..dee041b --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto new file mode 100644 index 0000000..718a46c --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/synonym_type.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/synonym_type.proto new file mode 100644 index 0000000..a64bba0 --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/type.proto b/third_party/googleapis/google/actions/sdk/v2/interactionmodel/type/type.proto new file mode 100644 index 0000000..80140bb --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/localized_settings.proto b/third_party/googleapis/google/actions/sdk/v2/localized_settings.proto new file mode 100644 index 0000000..7a1f44c --- /dev/null +++ b/third_party/googleapis/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]; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/manifest.proto b/third_party/googleapis/google/actions/sdk/v2/manifest.proto new file mode 100644 index 0000000..2bfd70b --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/release_channel.proto b/third_party/googleapis/google/actions/sdk/v2/release_channel.proto new file mode 100644 index 0000000..20c6242 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/settings.proto b/third_party/googleapis/google/actions/sdk/v2/settings.proto new file mode 100644 index 0000000..94835b2 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/surface.proto b/third_party/googleapis/google/actions/sdk/v2/surface.proto new file mode 100644 index 0000000..a68276a --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/theme_customization.proto b/third_party/googleapis/google/actions/sdk/v2/theme_customization.proto new file mode 100644 index 0000000..dc7623c --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/validation_results.proto b/third_party/googleapis/google/actions/sdk/v2/validation_results.proto new file mode 100644 index 0000000..08993c1 --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/version.proto b/third_party/googleapis/google/actions/sdk/v2/version.proto new file mode 100644 index 0000000..3df6f6d --- /dev/null +++ b/third_party/googleapis/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; +} diff --git a/third_party/googleapis/google/actions/sdk/v2/webhook.proto b/third_party/googleapis/google/actions/sdk/v2/webhook.proto new file mode 100644 index 0000000..23f5bad --- /dev/null +++ b/third_party/googleapis/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; +  } +}  | 
