google_cloud_rust_raw/spanner/admin/instance/v1/
common.rs1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20#[derive(PartialEq,Clone,Default)]
27pub struct OperationProgress {
28 pub progress_percent: i32,
30 pub start_time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
31 pub end_time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
32 pub unknown_fields: ::protobuf::UnknownFields,
34 pub cached_size: ::protobuf::CachedSize,
35}
36
37impl<'a> ::std::default::Default for &'a OperationProgress {
38 fn default() -> &'a OperationProgress {
39 <OperationProgress as ::protobuf::Message>::default_instance()
40 }
41}
42
43impl OperationProgress {
44 pub fn new() -> OperationProgress {
45 ::std::default::Default::default()
46 }
47
48 pub fn get_progress_percent(&self) -> i32 {
52 self.progress_percent
53 }
54 pub fn clear_progress_percent(&mut self) {
55 self.progress_percent = 0;
56 }
57
58 pub fn set_progress_percent(&mut self, v: i32) {
60 self.progress_percent = v;
61 }
62
63 pub fn get_start_time(&self) -> &::protobuf::well_known_types::Timestamp {
67 self.start_time.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance())
68 }
69 pub fn clear_start_time(&mut self) {
70 self.start_time.clear();
71 }
72
73 pub fn has_start_time(&self) -> bool {
74 self.start_time.is_some()
75 }
76
77 pub fn set_start_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
79 self.start_time = ::protobuf::SingularPtrField::some(v);
80 }
81
82 pub fn mut_start_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
85 if self.start_time.is_none() {
86 self.start_time.set_default();
87 }
88 self.start_time.as_mut().unwrap()
89 }
90
91 pub fn take_start_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
93 self.start_time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
94 }
95
96 pub fn get_end_time(&self) -> &::protobuf::well_known_types::Timestamp {
100 self.end_time.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance())
101 }
102 pub fn clear_end_time(&mut self) {
103 self.end_time.clear();
104 }
105
106 pub fn has_end_time(&self) -> bool {
107 self.end_time.is_some()
108 }
109
110 pub fn set_end_time(&mut self, v: ::protobuf::well_known_types::Timestamp) {
112 self.end_time = ::protobuf::SingularPtrField::some(v);
113 }
114
115 pub fn mut_end_time(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
118 if self.end_time.is_none() {
119 self.end_time.set_default();
120 }
121 self.end_time.as_mut().unwrap()
122 }
123
124 pub fn take_end_time(&mut self) -> ::protobuf::well_known_types::Timestamp {
126 self.end_time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
127 }
128}
129
130impl ::protobuf::Message for OperationProgress {
131 fn is_initialized(&self) -> bool {
132 for v in &self.start_time {
133 if !v.is_initialized() {
134 return false;
135 }
136 };
137 for v in &self.end_time {
138 if !v.is_initialized() {
139 return false;
140 }
141 };
142 true
143 }
144
145 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
146 while !is.eof()? {
147 let (field_number, wire_type) = is.read_tag_unpack()?;
148 match field_number {
149 1 => {
150 if wire_type != ::protobuf::wire_format::WireTypeVarint {
151 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
152 }
153 let tmp = is.read_int32()?;
154 self.progress_percent = tmp;
155 },
156 2 => {
157 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start_time)?;
158 },
159 3 => {
160 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.end_time)?;
161 },
162 _ => {
163 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
164 },
165 };
166 }
167 ::std::result::Result::Ok(())
168 }
169
170 #[allow(unused_variables)]
172 fn compute_size(&self) -> u32 {
173 let mut my_size = 0;
174 if self.progress_percent != 0 {
175 my_size += ::protobuf::rt::value_size(1, self.progress_percent, ::protobuf::wire_format::WireTypeVarint);
176 }
177 if let Some(ref v) = self.start_time.as_ref() {
178 let len = v.compute_size();
179 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
180 }
181 if let Some(ref v) = self.end_time.as_ref() {
182 let len = v.compute_size();
183 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
184 }
185 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
186 self.cached_size.set(my_size);
187 my_size
188 }
189
190 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
191 if self.progress_percent != 0 {
192 os.write_int32(1, self.progress_percent)?;
193 }
194 if let Some(ref v) = self.start_time.as_ref() {
195 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
196 os.write_raw_varint32(v.get_cached_size())?;
197 v.write_to_with_cached_sizes(os)?;
198 }
199 if let Some(ref v) = self.end_time.as_ref() {
200 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
201 os.write_raw_varint32(v.get_cached_size())?;
202 v.write_to_with_cached_sizes(os)?;
203 }
204 os.write_unknown_fields(self.get_unknown_fields())?;
205 ::std::result::Result::Ok(())
206 }
207
208 fn get_cached_size(&self) -> u32 {
209 self.cached_size.get()
210 }
211
212 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
213 &self.unknown_fields
214 }
215
216 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
217 &mut self.unknown_fields
218 }
219
220 fn as_any(&self) -> &dyn (::std::any::Any) {
221 self as &dyn (::std::any::Any)
222 }
223 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
224 self as &mut dyn (::std::any::Any)
225 }
226 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
227 self
228 }
229
230 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
231 Self::descriptor_static()
232 }
233
234 fn new() -> OperationProgress {
235 OperationProgress::new()
236 }
237
238 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
239 static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
240 descriptor.get(|| {
241 let mut fields = ::std::vec::Vec::new();
242 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
243 "progress_percent",
244 |m: &OperationProgress| { &m.progress_percent },
245 |m: &mut OperationProgress| { &mut m.progress_percent },
246 ));
247 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
248 "start_time",
249 |m: &OperationProgress| { &m.start_time },
250 |m: &mut OperationProgress| { &mut m.start_time },
251 ));
252 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
253 "end_time",
254 |m: &OperationProgress| { &m.end_time },
255 |m: &mut OperationProgress| { &mut m.end_time },
256 ));
257 ::protobuf::reflect::MessageDescriptor::new_pb_name::<OperationProgress>(
258 "OperationProgress",
259 fields,
260 file_descriptor_proto()
261 )
262 })
263 }
264
265 fn default_instance() -> &'static OperationProgress {
266 static instance: ::protobuf::rt::LazyV2<OperationProgress> = ::protobuf::rt::LazyV2::INIT;
267 instance.get(OperationProgress::new)
268 }
269}
270
271impl ::protobuf::Clear for OperationProgress {
272 fn clear(&mut self) {
273 self.progress_percent = 0;
274 self.start_time.clear();
275 self.end_time.clear();
276 self.unknown_fields.clear();
277 }
278}
279
280impl ::std::fmt::Debug for OperationProgress {
281 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
282 ::protobuf::text_format::fmt(self, f)
283 }
284}
285
286impl ::protobuf::reflect::ProtobufValue for OperationProgress {
287 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
288 ::protobuf::reflect::ReflectValueRef::Message(self)
289 }
290}
291
292static file_descriptor_proto_data: &'static [u8] = b"\
293 \n-google/spanner/admin/instance/v1/common.proto\x12\x20google.spanner.a\
294 dmin.instance.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x01\n\x11O\
295 perationProgress\x12)\n\x10progress_percent\x18\x01\x20\x01(\x05R\x0fpro\
296 gressPercent\x129\n\nstart_time\x18\x02\x20\x01(\x0b2\x1a.google.protobu\
297 f.TimestampR\tstartTime\x125\n\x08end_time\x18\x03\x20\x01(\x0b2\x1a.goo\
298 gle.protobuf.TimestampR\x07endTimeB\xfd\x01\n$com.google.spanner.admin.i\
299 nstance.v1B\x0bCommonProtoP\x01ZFcloud.google.com/go/spanner/admin/insta\
300 nce/apiv1/instancepb;instancepb\xaa\x02&Google.Cloud.Spanner.Admin.Insta\
301 nce.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\xea\x02+Googl\
302 e::Cloud::Spanner::Admin::Instance::V1J\xd6\t\n\x06\x12\x04\x0e\0)\x01\n\
303 \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202022\x20Go\
304 ogle\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Ver\
305 sion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20th\
306 is\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\
307 \x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\
308 \x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Un\
309 less\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\
310 \x20writing,\x20software\n\x20distributed\x20under\x20the\x20License\x20\
311 is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20\
312 WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20expres\
313 s\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\
314 \x20language\x20governing\x20permissions\x20and\n\x20limitations\x20unde\
315 r\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0)\n\t\n\x02\x03\0\
316 \x12\x03\x12\0)\n\x08\n\x01\x08\x12\x03\x14\0C\n\t\n\x02\x08%\x12\x03\
317 \x14\0C\n\x08\n\x01\x08\x12\x03\x15\0]\n\t\n\x02\x08\x0b\x12\x03\x15\0]\
318 \n\x08\n\x01\x08\x12\x03\x16\0\"\n\t\n\x02\x08\n\x12\x03\x16\0\"\n\x08\n\
319 \x01\x08\x12\x03\x17\0,\n\t\n\x02\x08\x08\x12\x03\x17\0,\n\x08\n\x01\x08\
320 \x12\x03\x18\0=\n\t\n\x02\x08\x01\x12\x03\x18\0=\n\x08\n\x01\x08\x12\x03\
321 \x19\0E\n\t\n\x02\x08)\x12\x03\x19\0E\n\x08\n\x01\x08\x12\x03\x1a\0D\n\t\
322 \n\x02\x08-\x12\x03\x1a\0D\nn\n\x02\x04\0\x12\x04\x1e\0)\x01\x1ab\x20Enc\
323 apsulates\x20progress\x20related\x20information\x20for\x20a\x20Cloud\x20\
324 Spanner\x20long\n\x20running\x20instance\x20operations.\n\n\n\n\x03\x04\
325 \0\x01\x12\x03\x1e\x08\x19\n\\\n\x04\x04\0\x02\0\x12\x03!\x02\x1d\x1aO\
326 \x20Percent\x20completion\x20of\x20the\x20operation.\n\x20Values\x20are\
327 \x20between\x200\x20and\x20100\x20inclusive.\n\n\x0c\n\x05\x04\0\x02\0\
328 \x05\x12\x03!\x02\x07\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03!\x08\x18\n\x0c\
329 \n\x05\x04\0\x02\0\x03\x12\x03!\x1b\x1c\n-\n\x04\x04\0\x02\x01\x12\x03$\
330 \x02+\x1a\x20\x20Time\x20the\x20request\x20was\x20received.\n\n\x0c\n\
331 \x05\x04\0\x02\x01\x06\x12\x03$\x02\x1b\n\x0c\n\x05\x04\0\x02\x01\x01\
332 \x12\x03$\x1c&\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03$)*\n^\n\x04\x04\0\
333 \x02\x02\x12\x03(\x02)\x1aQ\x20If\x20set,\x20the\x20time\x20at\x20which\
334 \x20this\x20operation\x20failed\x20or\x20was\x20completed\n\x20successfu\
335 lly.\n\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03(\x02\x1b\n\x0c\n\x05\x04\0\
336 \x02\x02\x01\x12\x03(\x1c$\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03('(b\x06\
337 proto3\
338";
339
340static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
341
342fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
343 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
344}
345
346pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
347 file_descriptor_proto_lazy.get(|| {
348 parse_descriptor_proto()
349 })
350}