368 368 | }
|
369 369 | }
|
370 370 | /// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
|
371 371 | pub mod response_code_http_fallback_operation_output {
|
372 372 |
|
373 373 | impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
|
374 374 | fn from(builder: Builder) -> Self {
|
375 375 | builder.build()
|
376 376 | }
|
377 377 | }
|
378 378 | /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
|
379 379 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
380 380 | pub struct Builder {}
|
381 381 | impl Builder {
|
382 382 | /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
|
383 383 | pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
|
384 384 | self.build_enforcing_required_and_enum_traits()
|
385 385 | }
|
386 386 | fn build_enforcing_required_and_enum_traits(
|
387 387 | self,
|
388 388 | ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
|
389 389 | crate::output::ResponseCodeHttpFallbackOperationOutput {}
|
390 390 | }
|
391 391 | }
|
392 392 | }
|
393 393 | /// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
|
394 394 | pub mod response_code_required_operation_output {
|
395 395 |
|
396 396 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
397 397 | /// Holds one variant for each of the ways the builder can fail.
|
398 - |
|
399 398 | #[allow(clippy::enum_variant_names)]
|
400 399 | pub enum ConstraintViolation {
|
401 400 | /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
|
402 401 | MissingResponseCode,
|
403 402 | }
|
404 403 | impl ::std::fmt::Display for ConstraintViolation {
|
405 404 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
406 405 | match self {
|
407 406 | ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
|
408 407 | }
|
409 408 | }
|
410 409 | }
|
411 410 | impl ::std::error::Error for ConstraintViolation {}
|
412 411 | impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
|
413 412 | type Error = ConstraintViolation;
|
414 413 |
|
415 414 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
416 415 | builder.build()
|
417 416 | }
|
418 417 | }
|
419 418 | /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
|
420 419 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
421 420 | pub struct Builder {
|
422 421 | pub(crate) response_code: ::std::option::Option<i32>,
|
423 422 | }
|
424 423 | impl Builder {
|
425 424 | #[allow(missing_docs)] // documentation missing in model
|
426 425 | pub fn response_code(mut self, input: i32) -> Self {
|
427 426 | self.response_code = Some(input);
|
428 427 | self
|
429 428 | }
|
430 429 | /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
|
431 430 | ///
|
432 431 | /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if you do not provide a value for all non-`Option`al members.
|
433 432 | ///
|
434 433 | pub fn build(
|
435 434 | self,
|
436 435 | ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
|
437 436 | {
|
438 437 | self.build_enforcing_required_and_enum_traits()
|
439 438 | }
|
440 439 | fn build_enforcing_required_and_enum_traits(
|
441 440 | self,
|
442 441 | ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
|
443 442 | {
|
444 443 | Ok(crate::output::ResponseCodeRequiredOperationOutput {
|
445 444 | response_code: self
|
446 445 | .response_code
|
447 446 | .ok_or(ConstraintViolation::MissingResponseCode)?,
|
448 447 | })
|
449 448 | }
|
450 449 | }
|
451 450 | }
|
452 451 | /// See [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
|
453 452 | pub mod required_header_collection_operation_output {
|
454 453 |
|
455 454 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
456 455 | /// Holds one variant for each of the ways the builder can fail.
|
457 - |
|
458 456 | #[allow(clippy::enum_variant_names)]
|
459 457 | pub enum ConstraintViolation {
|
460 458 | /// `required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
|
461 459 | MissingRequiredHeaderList,
|
462 460 | /// `required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
|
463 461 | MissingRequiredHeaderSet,
|
464 462 | }
|
465 463 | impl ::std::fmt::Display for ConstraintViolation {
|
466 464 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
467 465 | match self {
|
468 466 | ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
|
469 467 | ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
|
470 468 | }
|
471 469 | }
|
472 470 | }
|
473 471 | impl ::std::error::Error for ConstraintViolation {}
|
474 472 | impl ::std::convert::TryFrom<Builder> for crate::output::RequiredHeaderCollectionOperationOutput {
|
475 473 | type Error = ConstraintViolation;
|
476 474 |
|
477 475 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
478 476 | builder.build()
|
479 477 | }
|
480 478 | }
|
481 479 | /// A builder for [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
|
482 480 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
483 481 | pub struct Builder {
|
484 482 | pub(crate) required_header_list:
|
485 483 | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
486 484 | pub(crate) required_header_set:
|
487 485 | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|