sui_rpc/proto/generated/
google.rpc.accessors.rs

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