1#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct OperationParams {
5 #[prost(enumeration = "operation_params::OperationMode", tag = "1")]
6 pub operation_mode: i32,
7 #[prost(message, optional, tag = "2")]
14 pub operation_timeout: ::core::option::Option<
15 super::super::google::protobuf::Duration,
16 >,
17 #[prost(message, optional, tag = "3")]
23 pub cancel_after: ::core::option::Option<super::super::google::protobuf::Duration>,
24 #[prost(map = "string, string", tag = "4")]
26 pub labels: ::std::collections::HashMap<
27 ::prost::alloc::string::String,
28 ::prost::alloc::string::String,
29 >,
30 #[prost(enumeration = "super::feature_flag::Status", tag = "5")]
33 pub report_cost_info: i32,
34}
35pub mod operation_params {
37 #[derive(serde::Serialize, serde::Deserialize)]
38 #[derive(
39 Clone,
40 Copy,
41 Debug,
42 PartialEq,
43 Eq,
44 Hash,
45 PartialOrd,
46 Ord,
47 ::prost::Enumeration
48 )]
49 #[repr(i32)]
50 pub enum OperationMode {
51 Unspecified = 0,
52 Sync = 1,
55 Async = 2,
56 }
57 impl OperationMode {
58 pub fn as_str_name(&self) -> &'static str {
62 match self {
63 Self::Unspecified => "OPERATION_MODE_UNSPECIFIED",
64 Self::Sync => "SYNC",
65 Self::Async => "ASYNC",
66 }
67 }
68 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
70 match value {
71 "OPERATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
72 "SYNC" => Some(Self::Sync),
73 "ASYNC" => Some(Self::Async),
74 _ => None,
75 }
76 }
77 }
78}
79#[derive(serde::Serialize, serde::Deserialize)]
80#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
81pub struct GetOperationRequest {
82 #[prost(string, tag = "1")]
83 pub id: ::prost::alloc::string::String,
84}
85#[derive(serde::Serialize, serde::Deserialize)]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct GetOperationResponse {
88 #[prost(message, optional, tag = "1")]
89 pub operation: ::core::option::Option<Operation>,
90}
91#[derive(serde::Serialize, serde::Deserialize)]
92#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
93pub struct CancelOperationRequest {
94 #[prost(string, tag = "1")]
95 pub id: ::prost::alloc::string::String,
96}
97#[derive(serde::Serialize, serde::Deserialize)]
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct CancelOperationResponse {
100 #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
101 pub status: i32,
102 #[prost(message, repeated, tag = "2")]
103 pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
104}
105#[derive(serde::Serialize, serde::Deserialize)]
106#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
107pub struct ForgetOperationRequest {
108 #[prost(string, tag = "1")]
109 pub id: ::prost::alloc::string::String,
110}
111#[derive(serde::Serialize, serde::Deserialize)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct ForgetOperationResponse {
114 #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
115 pub status: i32,
116 #[prost(message, repeated, tag = "2")]
117 pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
118}
119#[derive(serde::Serialize, serde::Deserialize)]
120#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
121pub struct ListOperationsRequest {
122 #[prost(string, tag = "1")]
123 pub kind: ::prost::alloc::string::String,
124 #[prost(uint64, tag = "2")]
125 pub page_size: u64,
126 #[prost(string, tag = "3")]
127 pub page_token: ::prost::alloc::string::String,
128}
129#[derive(serde::Serialize, serde::Deserialize)]
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct ListOperationsResponse {
132 #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
133 pub status: i32,
134 #[prost(message, repeated, tag = "2")]
135 pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
136 #[prost(message, repeated, tag = "3")]
137 pub operations: ::prost::alloc::vec::Vec<Operation>,
138 #[prost(string, tag = "4")]
139 pub next_page_token: ::prost::alloc::string::String,
140}
141#[derive(serde::Serialize, serde::Deserialize)]
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct Operation {
144 #[prost(string, tag = "1")]
147 pub id: ::prost::alloc::string::String,
148 #[prost(bool, tag = "2")]
152 pub ready: bool,
153 #[prost(enumeration = "super::status_ids::StatusCode", tag = "3")]
154 pub status: i32,
155 #[prost(message, repeated, tag = "4")]
156 pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
157 #[prost(message, optional, tag = "5")]
159 pub result: ::core::option::Option<super::super::google::protobuf::Any>,
160 #[prost(message, optional, tag = "6")]
161 pub metadata: ::core::option::Option<super::super::google::protobuf::Any>,
162 #[prost(message, optional, tag = "7")]
166 pub cost_info: ::core::option::Option<super::CostInfo>,
167}