1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
mod _accessor_impls {
#![allow(clippy::useless_conversion)]
impl super::BadRequest {
pub const fn const_default() -> Self {
Self {
field_violations: Vec::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::BadRequest = super::BadRequest::const_default();
&DEFAULT
}
///Returns the value of `field_violations`, or the default value if `field_violations` is unset.
pub fn field_violations(&self) -> &[super::bad_request::FieldViolation] {
&self.field_violations
}
///Returns a mutable reference to `field_violations`.
///If the field is unset, it is first initialized with the default value.
pub fn field_violations_mut(
&mut self,
) -> &mut Vec<super::bad_request::FieldViolation> {
&mut self.field_violations
}
///Sets `field_violations` with the provided value.
pub fn set_field_violations(
&mut self,
field: Vec<super::bad_request::FieldViolation>,
) {
self.field_violations = field;
}
///Sets `field_violations` with the provided value.
pub fn with_field_violations(
mut self,
field: Vec<super::bad_request::FieldViolation>,
) -> Self {
self.set_field_violations(field);
self
}
}
impl super::bad_request::FieldViolation {
pub const fn const_default() -> Self {
Self {
field: String::new(),
description: String::new(),
reason: String::new(),
localized_message: None,
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::bad_request::FieldViolation = super::bad_request::FieldViolation::const_default();
&DEFAULT
}
///Returns a mutable reference to `field`.
///If the field is unset, it is first initialized with the default value.
pub fn field_mut(&mut self) -> &mut String {
&mut self.field
}
///Sets `field` with the provided value.
pub fn set_field<T: Into<String>>(&mut self, field: T) {
self.field = field.into().into();
}
///Sets `field` with the provided value.
pub fn with_field<T: Into<String>>(mut self, field: T) -> Self {
self.set_field(field.into());
self
}
///Returns a mutable reference to `description`.
///If the field is unset, it is first initialized with the default value.
pub fn description_mut(&mut self) -> &mut String {
&mut self.description
}
///Sets `description` with the provided value.
pub fn set_description<T: Into<String>>(&mut self, field: T) {
self.description = field.into().into();
}
///Sets `description` with the provided value.
pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
self.set_description(field.into());
self
}
///Returns a mutable reference to `reason`.
///If the field is unset, it is first initialized with the default value.
pub fn reason_mut(&mut self) -> &mut String {
&mut self.reason
}
///Sets `reason` with the provided value.
pub fn set_reason<T: Into<String>>(&mut self, field: T) {
self.reason = field.into().into();
}
///Sets `reason` with the provided value.
pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
self.set_reason(field.into());
self
}
///Returns the value of `localized_message`, or the default value if `localized_message` is unset.
pub fn localized_message(&self) -> &super::LocalizedMessage {
self.localized_message
.as_ref()
.map(|field| field as _)
.unwrap_or_else(|| super::LocalizedMessage::default_instance() as _)
}
///If `localized_message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
pub fn localized_message_opt_mut(
&mut self,
) -> Option<&mut super::LocalizedMessage> {
self.localized_message.as_mut().map(|field| field as _)
}
///Returns a mutable reference to `localized_message`.
///If the field is unset, it is first initialized with the default value.
pub fn localized_message_mut(&mut self) -> &mut super::LocalizedMessage {
self.localized_message.get_or_insert_default()
}
///If `localized_message` is set, returns [`Some`] with the value; otherwise returns [`None`].
pub fn localized_message_opt(&self) -> Option<&super::LocalizedMessage> {
self.localized_message.as_ref().map(|field| field as _)
}
///Sets `localized_message` with the provided value.
pub fn set_localized_message<T: Into<super::LocalizedMessage>>(
&mut self,
field: T,
) {
self.localized_message = Some(field.into().into());
}
///Sets `localized_message` with the provided value.
pub fn with_localized_message<T: Into<super::LocalizedMessage>>(
mut self,
field: T,
) -> Self {
self.set_localized_message(field.into());
self
}
}
impl super::DebugInfo {
pub const fn const_default() -> Self {
Self {
stack_entries: Vec::new(),
detail: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::DebugInfo = super::DebugInfo::const_default();
&DEFAULT
}
///Returns the value of `stack_entries`, or the default value if `stack_entries` is unset.
pub fn stack_entries(&self) -> &[String] {
&self.stack_entries
}
///Returns a mutable reference to `stack_entries`.
///If the field is unset, it is first initialized with the default value.
pub fn stack_entries_mut(&mut self) -> &mut Vec<String> {
&mut self.stack_entries
}
///Sets `stack_entries` with the provided value.
pub fn set_stack_entries(&mut self, field: Vec<String>) {
self.stack_entries = field;
}
///Sets `stack_entries` with the provided value.
pub fn with_stack_entries(mut self, field: Vec<String>) -> Self {
self.set_stack_entries(field);
self
}
///Returns a mutable reference to `detail`.
///If the field is unset, it is first initialized with the default value.
pub fn detail_mut(&mut self) -> &mut String {
&mut self.detail
}
///Sets `detail` with the provided value.
pub fn set_detail<T: Into<String>>(&mut self, field: T) {
self.detail = field.into().into();
}
///Sets `detail` with the provided value.
pub fn with_detail<T: Into<String>>(mut self, field: T) -> Self {
self.set_detail(field.into());
self
}
}
impl super::ErrorInfo {
pub const fn const_default() -> Self {
Self {
reason: String::new(),
domain: String::new(),
metadata: std::collections::BTreeMap::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::ErrorInfo = super::ErrorInfo::const_default();
&DEFAULT
}
///Returns a mutable reference to `reason`.
///If the field is unset, it is first initialized with the default value.
pub fn reason_mut(&mut self) -> &mut String {
&mut self.reason
}
///Sets `reason` with the provided value.
pub fn set_reason<T: Into<String>>(&mut self, field: T) {
self.reason = field.into().into();
}
///Sets `reason` with the provided value.
pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
self.set_reason(field.into());
self
}
///Returns a mutable reference to `domain`.
///If the field is unset, it is first initialized with the default value.
pub fn domain_mut(&mut self) -> &mut String {
&mut self.domain
}
///Sets `domain` with the provided value.
pub fn set_domain<T: Into<String>>(&mut self, field: T) {
self.domain = field.into().into();
}
///Sets `domain` with the provided value.
pub fn with_domain<T: Into<String>>(mut self, field: T) -> Self {
self.set_domain(field.into());
self
}
///Returns the value of `metadata`, or the default value if `metadata` is unset.
pub fn metadata(&self) -> &::std::collections::BTreeMap<String, String> {
&self.metadata
}
///Returns a mutable reference to `metadata`.
///If the field is unset, it is first initialized with the default value.
pub fn metadata_mut(
&mut self,
) -> &mut ::std::collections::BTreeMap<String, String> {
&mut self.metadata
}
///Sets `metadata` with the provided value.
pub fn set_metadata(
&mut self,
field: ::std::collections::BTreeMap<String, String>,
) {
self.metadata = field;
}
///Sets `metadata` with the provided value.
pub fn with_metadata(
mut self,
field: ::std::collections::BTreeMap<String, String>,
) -> Self {
self.set_metadata(field);
self
}
}
impl super::Help {
pub const fn const_default() -> Self {
Self { links: Vec::new() }
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::Help = super::Help::const_default();
&DEFAULT
}
///Returns the value of `links`, or the default value if `links` is unset.
pub fn links(&self) -> &[super::help::Link] {
&self.links
}
///Returns a mutable reference to `links`.
///If the field is unset, it is first initialized with the default value.
pub fn links_mut(&mut self) -> &mut Vec<super::help::Link> {
&mut self.links
}
///Sets `links` with the provided value.
pub fn set_links(&mut self, field: Vec<super::help::Link>) {
self.links = field;
}
///Sets `links` with the provided value.
pub fn with_links(mut self, field: Vec<super::help::Link>) -> Self {
self.set_links(field);
self
}
}
impl super::help::Link {
pub const fn const_default() -> Self {
Self {
description: String::new(),
url: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::help::Link = super::help::Link::const_default();
&DEFAULT
}
///Returns a mutable reference to `description`.
///If the field is unset, it is first initialized with the default value.
pub fn description_mut(&mut self) -> &mut String {
&mut self.description
}
///Sets `description` with the provided value.
pub fn set_description<T: Into<String>>(&mut self, field: T) {
self.description = field.into().into();
}
///Sets `description` with the provided value.
pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
self.set_description(field.into());
self
}
///Returns a mutable reference to `url`.
///If the field is unset, it is first initialized with the default value.
pub fn url_mut(&mut self) -> &mut String {
&mut self.url
}
///Sets `url` with the provided value.
pub fn set_url<T: Into<String>>(&mut self, field: T) {
self.url = field.into().into();
}
///Sets `url` with the provided value.
pub fn with_url<T: Into<String>>(mut self, field: T) -> Self {
self.set_url(field.into());
self
}
}
impl super::LocalizedMessage {
pub const fn const_default() -> Self {
Self {
locale: String::new(),
message: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::LocalizedMessage = super::LocalizedMessage::const_default();
&DEFAULT
}
///Returns a mutable reference to `locale`.
///If the field is unset, it is first initialized with the default value.
pub fn locale_mut(&mut self) -> &mut String {
&mut self.locale
}
///Sets `locale` with the provided value.
pub fn set_locale<T: Into<String>>(&mut self, field: T) {
self.locale = field.into().into();
}
///Sets `locale` with the provided value.
pub fn with_locale<T: Into<String>>(mut self, field: T) -> Self {
self.set_locale(field.into());
self
}
///Returns a mutable reference to `message`.
///If the field is unset, it is first initialized with the default value.
pub fn message_mut(&mut self) -> &mut String {
&mut self.message
}
///Sets `message` with the provided value.
pub fn set_message<T: Into<String>>(&mut self, field: T) {
self.message = field.into().into();
}
///Sets `message` with the provided value.
pub fn with_message<T: Into<String>>(mut self, field: T) -> Self {
self.set_message(field.into());
self
}
}
impl super::PreconditionFailure {
pub const fn const_default() -> Self {
Self { violations: Vec::new() }
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::PreconditionFailure = super::PreconditionFailure::const_default();
&DEFAULT
}
///Returns the value of `violations`, or the default value if `violations` is unset.
pub fn violations(&self) -> &[super::precondition_failure::Violation] {
&self.violations
}
///Returns a mutable reference to `violations`.
///If the field is unset, it is first initialized with the default value.
pub fn violations_mut(
&mut self,
) -> &mut Vec<super::precondition_failure::Violation> {
&mut self.violations
}
///Sets `violations` with the provided value.
pub fn set_violations(
&mut self,
field: Vec<super::precondition_failure::Violation>,
) {
self.violations = field;
}
///Sets `violations` with the provided value.
pub fn with_violations(
mut self,
field: Vec<super::precondition_failure::Violation>,
) -> Self {
self.set_violations(field);
self
}
}
impl super::precondition_failure::Violation {
pub const fn const_default() -> Self {
Self {
r#type: String::new(),
subject: String::new(),
description: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::precondition_failure::Violation = super::precondition_failure::Violation::const_default();
&DEFAULT
}
///Returns a mutable reference to `r#type`.
///If the field is unset, it is first initialized with the default value.
pub fn type_mut(&mut self) -> &mut String {
&mut self.r#type
}
///Sets `r#type` with the provided value.
pub fn set_type<T: Into<String>>(&mut self, field: T) {
self.r#type = field.into().into();
}
///Sets `r#type` with the provided value.
pub fn with_type<T: Into<String>>(mut self, field: T) -> Self {
self.set_type(field.into());
self
}
///Returns a mutable reference to `subject`.
///If the field is unset, it is first initialized with the default value.
pub fn subject_mut(&mut self) -> &mut String {
&mut self.subject
}
///Sets `subject` with the provided value.
pub fn set_subject<T: Into<String>>(&mut self, field: T) {
self.subject = field.into().into();
}
///Sets `subject` with the provided value.
pub fn with_subject<T: Into<String>>(mut self, field: T) -> Self {
self.set_subject(field.into());
self
}
///Returns a mutable reference to `description`.
///If the field is unset, it is first initialized with the default value.
pub fn description_mut(&mut self) -> &mut String {
&mut self.description
}
///Sets `description` with the provided value.
pub fn set_description<T: Into<String>>(&mut self, field: T) {
self.description = field.into().into();
}
///Sets `description` with the provided value.
pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
self.set_description(field.into());
self
}
}
impl super::QuotaFailure {
pub const fn const_default() -> Self {
Self { violations: Vec::new() }
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::QuotaFailure = super::QuotaFailure::const_default();
&DEFAULT
}
///Returns the value of `violations`, or the default value if `violations` is unset.
pub fn violations(&self) -> &[super::quota_failure::Violation] {
&self.violations
}
///Returns a mutable reference to `violations`.
///If the field is unset, it is first initialized with the default value.
pub fn violations_mut(&mut self) -> &mut Vec<super::quota_failure::Violation> {
&mut self.violations
}
///Sets `violations` with the provided value.
pub fn set_violations(&mut self, field: Vec<super::quota_failure::Violation>) {
self.violations = field;
}
///Sets `violations` with the provided value.
pub fn with_violations(
mut self,
field: Vec<super::quota_failure::Violation>,
) -> Self {
self.set_violations(field);
self
}
}
impl super::quota_failure::Violation {
pub const fn const_default() -> Self {
Self {
subject: String::new(),
description: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::quota_failure::Violation = super::quota_failure::Violation::const_default();
&DEFAULT
}
///Returns a mutable reference to `subject`.
///If the field is unset, it is first initialized with the default value.
pub fn subject_mut(&mut self) -> &mut String {
&mut self.subject
}
///Sets `subject` with the provided value.
pub fn set_subject<T: Into<String>>(&mut self, field: T) {
self.subject = field.into().into();
}
///Sets `subject` with the provided value.
pub fn with_subject<T: Into<String>>(mut self, field: T) -> Self {
self.set_subject(field.into());
self
}
///Returns a mutable reference to `description`.
///If the field is unset, it is first initialized with the default value.
pub fn description_mut(&mut self) -> &mut String {
&mut self.description
}
///Sets `description` with the provided value.
pub fn set_description<T: Into<String>>(&mut self, field: T) {
self.description = field.into().into();
}
///Sets `description` with the provided value.
pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
self.set_description(field.into());
self
}
}
impl super::RequestInfo {
pub const fn const_default() -> Self {
Self {
request_id: String::new(),
serving_data: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::RequestInfo = super::RequestInfo::const_default();
&DEFAULT
}
///Returns a mutable reference to `request_id`.
///If the field is unset, it is first initialized with the default value.
pub fn request_id_mut(&mut self) -> &mut String {
&mut self.request_id
}
///Sets `request_id` with the provided value.
pub fn set_request_id<T: Into<String>>(&mut self, field: T) {
self.request_id = field.into().into();
}
///Sets `request_id` with the provided value.
pub fn with_request_id<T: Into<String>>(mut self, field: T) -> Self {
self.set_request_id(field.into());
self
}
///Returns a mutable reference to `serving_data`.
///If the field is unset, it is first initialized with the default value.
pub fn serving_data_mut(&mut self) -> &mut String {
&mut self.serving_data
}
///Sets `serving_data` with the provided value.
pub fn set_serving_data<T: Into<String>>(&mut self, field: T) {
self.serving_data = field.into().into();
}
///Sets `serving_data` with the provided value.
pub fn with_serving_data<T: Into<String>>(mut self, field: T) -> Self {
self.set_serving_data(field.into());
self
}
}
impl super::ResourceInfo {
pub const fn const_default() -> Self {
Self {
resource_type: String::new(),
resource_name: String::new(),
owner: String::new(),
description: String::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::ResourceInfo = super::ResourceInfo::const_default();
&DEFAULT
}
///Returns a mutable reference to `resource_type`.
///If the field is unset, it is first initialized with the default value.
pub fn resource_type_mut(&mut self) -> &mut String {
&mut self.resource_type
}
///Sets `resource_type` with the provided value.
pub fn set_resource_type<T: Into<String>>(&mut self, field: T) {
self.resource_type = field.into().into();
}
///Sets `resource_type` with the provided value.
pub fn with_resource_type<T: Into<String>>(mut self, field: T) -> Self {
self.set_resource_type(field.into());
self
}
///Returns a mutable reference to `resource_name`.
///If the field is unset, it is first initialized with the default value.
pub fn resource_name_mut(&mut self) -> &mut String {
&mut self.resource_name
}
///Sets `resource_name` with the provided value.
pub fn set_resource_name<T: Into<String>>(&mut self, field: T) {
self.resource_name = field.into().into();
}
///Sets `resource_name` with the provided value.
pub fn with_resource_name<T: Into<String>>(mut self, field: T) -> Self {
self.set_resource_name(field.into());
self
}
///Returns a mutable reference to `owner`.
///If the field is unset, it is first initialized with the default value.
pub fn owner_mut(&mut self) -> &mut String {
&mut self.owner
}
///Sets `owner` with the provided value.
pub fn set_owner<T: Into<String>>(&mut self, field: T) {
self.owner = field.into().into();
}
///Sets `owner` with the provided value.
pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
self.set_owner(field.into());
self
}
///Returns a mutable reference to `description`.
///If the field is unset, it is first initialized with the default value.
pub fn description_mut(&mut self) -> &mut String {
&mut self.description
}
///Sets `description` with the provided value.
pub fn set_description<T: Into<String>>(&mut self, field: T) {
self.description = field.into().into();
}
///Sets `description` with the provided value.
pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
self.set_description(field.into());
self
}
}
impl super::RetryInfo {
pub const fn const_default() -> Self {
Self { retry_delay: None }
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::RetryInfo = super::RetryInfo::const_default();
&DEFAULT
}
///If `retry_delay` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
pub fn retry_delay_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
self.retry_delay.as_mut().map(|field| field as _)
}
///Returns a mutable reference to `retry_delay`.
///If the field is unset, it is first initialized with the default value.
pub fn retry_delay_mut(&mut self) -> &mut ::prost_types::Duration {
self.retry_delay.get_or_insert_default()
}
///If `retry_delay` is set, returns [`Some`] with the value; otherwise returns [`None`].
pub fn retry_delay_opt(&self) -> Option<&::prost_types::Duration> {
self.retry_delay.as_ref().map(|field| field as _)
}
///Sets `retry_delay` with the provided value.
pub fn set_retry_delay<T: Into<::prost_types::Duration>>(&mut self, field: T) {
self.retry_delay = Some(field.into().into());
}
///Sets `retry_delay` with the provided value.
pub fn with_retry_delay<T: Into<::prost_types::Duration>>(
mut self,
field: T,
) -> Self {
self.set_retry_delay(field.into());
self
}
}
impl super::Status {
pub const fn const_default() -> Self {
Self {
code: 0,
message: String::new(),
details: Vec::new(),
}
}
#[doc(hidden)]
pub fn default_instance() -> &'static Self {
static DEFAULT: super::Status = super::Status::const_default();
&DEFAULT
}
///Returns a mutable reference to `code`.
///If the field is unset, it is first initialized with the default value.
pub fn code_mut(&mut self) -> &mut i32 {
&mut self.code
}
///Sets `code` with the provided value.
pub fn set_code(&mut self, field: i32) {
self.code = field;
}
///Sets `code` with the provided value.
pub fn with_code(mut self, field: i32) -> Self {
self.set_code(field);
self
}
///Returns a mutable reference to `message`.
///If the field is unset, it is first initialized with the default value.
pub fn message_mut(&mut self) -> &mut String {
&mut self.message
}
///Sets `message` with the provided value.
pub fn set_message<T: Into<String>>(&mut self, field: T) {
self.message = field.into().into();
}
///Sets `message` with the provided value.
pub fn with_message<T: Into<String>>(mut self, field: T) -> Self {
self.set_message(field.into());
self
}
///Returns the value of `details`, or the default value if `details` is unset.
pub fn details(&self) -> &[::prost_types::Any] {
&self.details
}
///Returns a mutable reference to `details`.
///If the field is unset, it is first initialized with the default value.
pub fn details_mut(&mut self) -> &mut Vec<::prost_types::Any> {
&mut self.details
}
///Sets `details` with the provided value.
pub fn set_details(&mut self, field: Vec<::prost_types::Any>) {
self.details = field;
}
///Sets `details` with the provided value.
pub fn with_details(mut self, field: Vec<::prost_types::Any>) -> Self {
self.set_details(field);
self
}
}
}