xref: /aosp_15_r20/external/googleapis/google/actions/sdk/v2/config_file.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.actions.sdk.v2;
18
19import "google/actions/sdk/v2/account_linking_secret.proto";
20import "google/actions/sdk/v2/action.proto";
21import "google/actions/sdk/v2/interactionmodel/entity_set.proto";
22import "google/actions/sdk/v2/interactionmodel/global_intent_event.proto";
23import "google/actions/sdk/v2/interactionmodel/intent.proto";
24import "google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto";
25import "google/actions/sdk/v2/interactionmodel/scene.proto";
26import "google/actions/sdk/v2/interactionmodel/type/type.proto";
27import "google/actions/sdk/v2/manifest.proto";
28import "google/actions/sdk/v2/settings.proto";
29import "google/actions/sdk/v2/webhook.proto";
30import "google/protobuf/struct.proto";
31
32option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
33option java_multiple_files = true;
34option java_outer_classname = "ConfigFileProto";
35option java_package = "com.google.actions.sdk.v2";
36
37// Wrapper for repeated config files. Repeated fields cannot exist in a oneof.
38message ConfigFiles {
39  // Multiple config files.
40  repeated ConfigFile config_files = 1;
41}
42
43// Represents a single file which contains structured data. Developers can
44// define most of their project using structured config including Actions,
45// Settings, Fulfillment.
46message ConfigFile {
47  // Relative path of the config file from the project root in the SDK file
48  // structure. Each file types below have an allowed file path.
49  // Eg: settings/settings.yaml
50  string file_path = 1;
51
52  // Each type of config file should have a corresponding field in the oneof.
53  oneof file {
54    // Single manifest file.
55    // Allowed file path: `manifest.yaml`
56    Manifest manifest = 2;
57
58    // Single actions file with all the actions defined.
59    // Allowed file paths: `actions/{language}?/actions.yaml`
60    Actions actions = 3;
61
62    // Single settings config which includes non-localizable settings and
63    // settings for the project's default locale (if specified).
64    // For a locale override file, only localized_settings field will be
65    // populated.
66    // Allowed file paths: `settings/{language}?/settings.yaml`
67    // Note that the non-localized settings file `settings/settings.yaml` must
68    // be present in the write flow requests.
69    Settings settings = 4;
70
71    // Single webhook definition.
72    // Allowed file path: `webhooks/{WebhookName}.yaml`
73    Webhook webhook = 6;
74
75    // Single intent definition.
76    // Allowed file paths: `custom/intents/{language}?/{IntentName}.yaml`
77    google.actions.sdk.v2.interactionmodel.Intent intent = 7;
78
79    // Single type definition.
80    // Allowed file paths: `custom/types/{language}?/{TypeName}.yaml`
81    google.actions.sdk.v2.interactionmodel.type.Type type = 8;
82
83    // Single entity set definition.
84    // Allowed file paths: `custom/entitySets/{language}?/{EntitySetName}.yaml`
85    google.actions.sdk.v2.interactionmodel.EntitySet entity_set = 15;
86
87    // Single global intent event definition.
88    // Allowed file paths: `custom/global/{GlobalIntentEventName}.yaml`
89    // The file name (GlobalIntentEventName) should be the name of the intent
90    // that this global intent event corresponds to.
91    google.actions.sdk.v2.interactionmodel.GlobalIntentEvent global_intent_event = 9;
92
93    // Single scene definition.
94    // Allowed file paths: `custom/scenes/{SceneName}.yaml`
95    google.actions.sdk.v2.interactionmodel.Scene scene = 10;
96
97    // Single static prompt definition.
98    // Allowed file paths: `custom/prompts/{language}?/{StaticPromptName}.yaml`
99    google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt static_prompt = 11;
100
101    // Metadata corresponding to the client secret used in account linking.
102    // Allowed file path: `settings/accountLinkingSecret.yaml`
103    AccountLinkingSecret account_linking_secret = 13;
104
105    // Single resource bundle, which is a map from a string to a string or list
106    // of strings. Resource bundles could be used for localizing strings in
107    // static prompts.
108    // Allowed file paths: `resources/strings/{language}?/{multiple
109    // directories}?/{BundleName}.yaml`
110    google.protobuf.Struct resource_bundle = 12;
111  }
112}
113