private/google/actions/sdk/v2/actions_sdk.proto
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF 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/validation_results.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 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: "*"
};
}
}
// 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'.
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;
}