xref: /aosp_15_r20/external/googleapis/google/cloud/visionai/v1/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.visionai.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/timestamp.proto";
22
23option csharp_namespace = "Google.Cloud.VisionAI.V1";
24option go_package = "cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb";
25option java_multiple_files = true;
26option java_outer_classname = "CommonProto";
27option java_package = "com.google.cloud.visionai.v1";
28option php_namespace = "Google\\Cloud\\VisionAI\\V1";
29option ruby_package = "Google::Cloud::VisionAI::V1";
30
31// Message describing the Cluster object.
32message Cluster {
33  option (google.api.resource) = {
34    type: "visionai.googleapis.com/Cluster"
35    pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
36  };
37
38  // The current state of the cluster.
39  enum State {
40    // Not set.
41    STATE_UNSPECIFIED = 0;
42
43    // The PROVISIONING state indicates the cluster is being created.
44    PROVISIONING = 1;
45
46    // The RUNNING state indicates the cluster has been created and is fully
47    // usable.
48    RUNNING = 2;
49
50    // The STOPPING state indicates the cluster is being deleted.
51    STOPPING = 3;
52
53    // The ERROR state indicates the cluster is unusable. It will be
54    // automatically deleted.
55    ERROR = 4;
56  }
57
58  // Output only. Name of the resource.
59  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
60
61  // Output only. The create timestamp.
62  google.protobuf.Timestamp create_time = 2
63      [(google.api.field_behavior) = OUTPUT_ONLY];
64
65  // Output only. The update timestamp.
66  google.protobuf.Timestamp update_time = 3
67      [(google.api.field_behavior) = OUTPUT_ONLY];
68
69  // Labels as key value pairs
70  map<string, string> labels = 4;
71
72  // Annotations to allow clients to store small amounts of arbitrary data.
73  map<string, string> annotations = 5;
74
75  // Output only. The DNS name of the data plane service
76  string dataplane_service_endpoint = 6
77      [(google.api.field_behavior) = OUTPUT_ONLY];
78
79  // Output only. The current state of the cluster.
80  State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
81
82  // Output only. The private service connection service target name.
83  string psc_target = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
84}
85
86// Represents the metadata of the long-running operation.
87message OperationMetadata {
88  // Output only. The time the operation was created.
89  google.protobuf.Timestamp create_time = 1
90      [(google.api.field_behavior) = OUTPUT_ONLY];
91
92  // Output only. The time the operation finished running.
93  google.protobuf.Timestamp end_time = 2
94      [(google.api.field_behavior) = OUTPUT_ONLY];
95
96  // Output only. Server-defined resource path for the target of the operation.
97  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
98
99  // Output only. Name of the verb executed by the operation.
100  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
101
102  // Output only. Human-readable status of the operation, if any.
103  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
104
105  // Output only. Identifies whether the user has requested cancellation
106  // of the operation. Operations that have successfully been cancelled
107  // have [Operation.error][] value with a
108  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
109  // `Code.CANCELLED`.
110  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
111
112  // Output only. API version used to start the operation.
113  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
114}
115
116// The Google Cloud Storage location for the input content.
117message GcsSource {
118  // Required. References to a Google Cloud Storage paths.
119  repeated string uris = 1 [(google.api.field_behavior) = REQUIRED];
120}
121