xref: /aosp_15_r20/external/googleapis/google/cloud/translate/v3/common.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.cloud.translation.v3;
18
19import "google/api/field_behavior.proto";
20
21option cc_enable_arenas = true;
22option csharp_namespace = "Google.Cloud.Translate.V3";
23option go_package = "cloud.google.com/go/translate/apiv3/translatepb;translatepb";
24option java_multiple_files = true;
25option java_outer_classname = "CommonProto";
26option java_package = "com.google.cloud.translate.v3";
27option php_namespace = "Google\\Cloud\\Translate\\V3";
28option ruby_package = "Google::Cloud::Translate::V3";
29
30// The Google Cloud Storage location for the input content.
31message GcsInputSource {
32  // Required. Source data URI. For example, `gs://my_bucket/my_object`.
33  string input_uri = 1 [(google.api.field_behavior) = REQUIRED];
34}
35
36// An inlined file.
37message FileInputSource {
38  // Required. The file's mime type.
39  string mime_type = 1 [(google.api.field_behavior) = REQUIRED];
40
41  // Required. The file's byte contents.
42  bytes content = 2 [(google.api.field_behavior) = REQUIRED];
43
44  // Required. The file's display name.
45  string display_name = 3 [(google.api.field_behavior) = REQUIRED];
46}
47
48// The Google Cloud Storage location for the output content.
49message GcsOutputDestination {
50  // Required. Google Cloud Storage URI to output directory. For example,
51  // `gs://bucket/directory`. The requesting user must have write permission to
52  // the bucket. The directory will be created if it doesn't exist.
53  string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED];
54}
55