11536 11690 | > + Clone
|
11537 11691 | + Send
|
11538 11692 | + 'static,
|
11539 11693 | S::Future: Send + 'static,
|
11540 11694 | {
|
11541 11695 | self.omits_serializing_empty_lists =
|
11542 11696 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11543 11697 | self
|
11544 11698 | }
|
11545 11699 |
|
11546 - | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
11700 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11547 11701 | ///
|
11548 11702 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11549 11703 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11550 11704 | ///
|
11551 11705 | /// # Example
|
11552 11706 | ///
|
11553 11707 | /// ```no_run
|
11554 11708 | /// use rest_json::{RestJson, RestJsonConfig};
|
11555 11709 | ///
|
11556 11710 | /// use rest_json::{input, output, error};
|
11557 11711 | ///
|
11558 - | /// async fn handler(input: input::PostPlayerActionInput) -> Result<output::PostPlayerActionOutput, error::PostPlayerActionError> {
|
11712 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11559 11713 | /// todo!()
|
11560 11714 | /// }
|
11561 11715 | ///
|
11562 11716 | /// let config = RestJsonConfig::builder().build();
|
11563 11717 | /// let app = RestJson::builder(config)
|
11564 - | /// .post_player_action(handler)
|
11718 + | /// .operation_with_defaults(handler)
|
11565 11719 | /// /* Set other handlers */
|
11566 11720 | /// .build()
|
11567 11721 | /// .unwrap();
|
11568 11722 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11569 11723 | /// ```
|
11570 11724 | ///
|
11571 - | pub fn post_player_action<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11725 + | pub fn operation_with_defaults<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11572 11726 | where
|
11573 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PostPlayerAction, HandlerExtractors>,
|
11727 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithDefaults, HandlerExtractors>,
|
11574 11728 |
|
11575 11729 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11576 11730 | RestJson<L>,
|
11577 - | crate::operation_shape::PostPlayerAction,
|
11578 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PostPlayerAction, HandlerType>
|
11731 + | crate::operation_shape::OperationWithDefaults,
|
11732 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithDefaults, HandlerType>
|
11579 11733 | >,
|
11580 11734 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11581 11735 | RestJson<L>,
|
11582 - | crate::operation_shape::PostPlayerAction,
|
11736 + | crate::operation_shape::OperationWithDefaults,
|
11583 11737 | ModelPl::Output
|
11584 11738 | >,
|
11585 11739 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11586 11740 | RestJson<L>,
|
11587 - | crate::operation_shape::PostPlayerAction,
|
11741 + | crate::operation_shape::OperationWithDefaults,
|
11588 11742 | <
|
11589 11743 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11590 11744 | as ::aws_smithy_http_server::plugin::Plugin<
|
11591 11745 | RestJson<L>,
|
11592 - | crate::operation_shape::PostPlayerAction,
|
11746 + | crate::operation_shape::OperationWithDefaults,
|
11593 11747 | ModelPl::Output
|
11594 11748 | >
|
11595 11749 | >::Output
|
11596 11750 | >,
|
11597 11751 |
|
11598 11752 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11599 11753 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11600 11754 |
|
11601 11755 | {
|
11602 11756 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11603 11757 | use ::aws_smithy_http_server::plugin::Plugin;
|
11604 - | let svc = crate::operation_shape::PostPlayerAction::from_handler(handler);
|
11758 + | let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
|
11605 11759 | let svc = self.model_plugin.apply(svc);
|
11606 11760 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11607 11761 | .apply(svc);
|
11608 11762 | let svc = self.http_plugin.apply(svc);
|
11609 - | self.post_player_action_custom(svc)
|
11763 + | self.operation_with_defaults_custom(svc)
|
11610 11764 | }
|
11611 11765 |
|
11612 - | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
11766 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11613 11767 | ///
|
11614 11768 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11615 11769 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11616 11770 | ///
|
11617 11771 | /// # Example
|
11618 11772 | ///
|
11619 11773 | /// ```no_run
|
11620 11774 | /// use rest_json::{RestJson, RestJsonConfig};
|
11621 11775 | ///
|
11622 11776 | /// use rest_json::{input, output, error};
|
11623 11777 | ///
|
11624 - | /// async fn handler(input: input::PostPlayerActionInput) -> Result<output::PostPlayerActionOutput, error::PostPlayerActionError> {
|
11778 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11625 11779 | /// todo!()
|
11626 11780 | /// }
|
11627 11781 | ///
|
11628 11782 | /// let config = RestJsonConfig::builder().build();
|
11629 11783 | /// let svc = ::tower::util::service_fn(handler);
|
11630 11784 | /// let app = RestJson::builder(config)
|
11631 - | /// .post_player_action_service(svc)
|
11785 + | /// .operation_with_defaults_service(svc)
|
11632 11786 | /// /* Set other handlers */
|
11633 11787 | /// .build()
|
11634 11788 | /// .unwrap();
|
11635 11789 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11636 11790 | /// ```
|
11637 11791 | ///
|
11638 - | pub fn post_player_action_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11792 + | pub fn operation_with_defaults_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11639 11793 | where
|
11640 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PostPlayerAction, ServiceExtractors>,
|
11794 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithDefaults, ServiceExtractors>,
|
11641 11795 |
|
11642 11796 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11643 11797 | RestJson<L>,
|
11644 - | crate::operation_shape::PostPlayerAction,
|
11645 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PostPlayerAction, S>
|
11798 + | crate::operation_shape::OperationWithDefaults,
|
11799 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithDefaults, S>
|
11646 11800 | >,
|
11647 11801 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11648 11802 | RestJson<L>,
|
11649 - | crate::operation_shape::PostPlayerAction,
|
11803 + | crate::operation_shape::OperationWithDefaults,
|
11650 11804 | ModelPl::Output
|
11651 11805 | >,
|
11652 11806 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11653 11807 | RestJson<L>,
|
11654 - | crate::operation_shape::PostPlayerAction,
|
11808 + | crate::operation_shape::OperationWithDefaults,
|
11655 11809 | <
|
11656 11810 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11657 11811 | as ::aws_smithy_http_server::plugin::Plugin<
|
11658 11812 | RestJson<L>,
|
11659 - | crate::operation_shape::PostPlayerAction,
|
11813 + | crate::operation_shape::OperationWithDefaults,
|
11660 11814 | ModelPl::Output
|
11661 11815 | >
|
11662 11816 | >::Output
|
11663 11817 | >,
|
11664 11818 |
|
11665 11819 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11666 11820 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11667 11821 |
|
11668 11822 | {
|
11669 11823 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11670 11824 | use ::aws_smithy_http_server::plugin::Plugin;
|
11671 - | let svc = crate::operation_shape::PostPlayerAction::from_service(service);
|
11825 + | let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
|
11672 11826 | let svc = self.model_plugin.apply(svc);
|
11673 11827 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11674 11828 | .apply(svc);
|
11675 11829 | let svc = self.http_plugin.apply(svc);
|
11676 - | self.post_player_action_custom(svc)
|
11830 + | self.operation_with_defaults_custom(svc)
|
11677 11831 | }
|
11678 11832 |
|
11679 - | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) to a custom [`Service`](tower::Service).
|
11833 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
|
11680 11834 | /// not constrained by the Smithy contract.
|
11681 - | fn post_player_action_custom<S>(mut self, svc: S) -> Self
|
11835 + | fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
|
11682 11836 | where
|
11683 11837 | S: ::tower::Service<
|
11684 11838 | ::http::Request<Body>,
|
11685 11839 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
11686 11840 | Error = ::std::convert::Infallible,
|
11687 11841 | > + Clone
|
11688 11842 | + Send
|
11689 11843 | + 'static,
|
11690 11844 | S::Future: Send + 'static,
|
11691 11845 | {
|
11692 - | self.post_player_action = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11846 + | self.operation_with_defaults = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11693 11847 | self
|
11694 11848 | }
|
11695 11849 |
|
11696 - | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) operation.
|
11850 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
11697 11851 | ///
|
11698 11852 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11699 11853 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11700 11854 | ///
|
11701 11855 | /// # Example
|
11702 11856 | ///
|
11703 11857 | /// ```no_run
|
11704 11858 | /// use rest_json::{RestJson, RestJsonConfig};
|
11705 11859 | ///
|
11706 11860 | /// use rest_json::{input, output, error};
|
11707 11861 | ///
|
11708 - | /// async fn handler(input: input::PostUnionWithJsonNameInput) -> Result<output::PostUnionWithJsonNameOutput, error::PostUnionWithJsonNameError> {
|
11862 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
11709 11863 | /// todo!()
|
11710 11864 | /// }
|
11711 11865 | ///
|
11712 11866 | /// let config = RestJsonConfig::builder().build();
|
11713 11867 | /// let app = RestJson::builder(config)
|
11714 - | /// .post_union_with_json_name(handler)
|
11868 + | /// .operation_with_nested_structure(handler)
|
11715 11869 | /// /* Set other handlers */
|
11716 11870 | /// .build()
|
11717 11871 | /// .unwrap();
|
11718 11872 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11719 11873 | /// ```
|
11720 11874 | ///
|
11721 - | pub fn post_union_with_json_name<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11875 + | pub fn operation_with_nested_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11722 11876 | where
|
11723 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PostUnionWithJsonName, HandlerExtractors>,
|
11877 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithNestedStructure, HandlerExtractors>,
|
11724 11878 |
|
11725 11879 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11726 11880 | RestJson<L>,
|
11727 - | crate::operation_shape::PostUnionWithJsonName,
|
11728 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PostUnionWithJsonName, HandlerType>
|
11881 + | crate::operation_shape::OperationWithNestedStructure,
|
11882 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithNestedStructure, HandlerType>
|
11729 11883 | >,
|
11730 11884 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11731 11885 | RestJson<L>,
|
11732 - | crate::operation_shape::PostUnionWithJsonName,
|
11886 + | crate::operation_shape::OperationWithNestedStructure,
|
11733 11887 | ModelPl::Output
|
11734 11888 | >,
|
11735 11889 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11736 11890 | RestJson<L>,
|
11737 - | crate::operation_shape::PostUnionWithJsonName,
|
11891 + | crate::operation_shape::OperationWithNestedStructure,
|
11738 11892 | <
|
11739 11893 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11740 11894 | as ::aws_smithy_http_server::plugin::Plugin<
|
11741 11895 | RestJson<L>,
|
11742 - | crate::operation_shape::PostUnionWithJsonName,
|
11896 + | crate::operation_shape::OperationWithNestedStructure,
|
11743 11897 | ModelPl::Output
|
11744 11898 | >
|
11745 11899 | >::Output
|
11746 11900 | >,
|
11747 11901 |
|
11748 11902 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11749 11903 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11750 11904 |
|
11751 11905 | {
|
11752 11906 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11753 11907 | use ::aws_smithy_http_server::plugin::Plugin;
|
11754 - | let svc = crate::operation_shape::PostUnionWithJsonName::from_handler(handler);
|
11908 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_handler(handler);
|
11755 11909 | let svc = self.model_plugin.apply(svc);
|
11756 11910 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11757 11911 | .apply(svc);
|
11758 11912 | let svc = self.http_plugin.apply(svc);
|
11759 - | self.post_union_with_json_name_custom(svc)
|
11913 + | self.operation_with_nested_structure_custom(svc)
|
11760 11914 | }
|
11761 11915 |
|
11762 - | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) operation.
|
11916 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
11763 11917 | ///
|
11764 11918 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11765 11919 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11766 11920 | ///
|
11767 11921 | /// # Example
|
11768 11922 | ///
|
11769 11923 | /// ```no_run
|
11770 11924 | /// use rest_json::{RestJson, RestJsonConfig};
|
11771 11925 | ///
|
11772 11926 | /// use rest_json::{input, output, error};
|
11773 11927 | ///
|
11774 - | /// async fn handler(input: input::PostUnionWithJsonNameInput) -> Result<output::PostUnionWithJsonNameOutput, error::PostUnionWithJsonNameError> {
|
11928 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
11775 11929 | /// todo!()
|
11776 11930 | /// }
|
11777 11931 | ///
|
11778 11932 | /// let config = RestJsonConfig::builder().build();
|
11779 11933 | /// let svc = ::tower::util::service_fn(handler);
|
11780 11934 | /// let app = RestJson::builder(config)
|
11781 - | /// .post_union_with_json_name_service(svc)
|
11935 + | /// .operation_with_nested_structure_service(svc)
|
11782 11936 | /// /* Set other handlers */
|
11783 11937 | /// .build()
|
11784 11938 | /// .unwrap();
|
11785 11939 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11786 11940 | /// ```
|
11787 11941 | ///
|
11788 - | pub fn post_union_with_json_name_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11942 + | pub fn operation_with_nested_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11789 11943 | where
|
11790 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PostUnionWithJsonName, ServiceExtractors>,
|
11944 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithNestedStructure, ServiceExtractors>,
|
11791 11945 |
|
11792 11946 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11793 11947 | RestJson<L>,
|
11794 - | crate::operation_shape::PostUnionWithJsonName,
|
11795 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PostUnionWithJsonName, S>
|
11948 + | crate::operation_shape::OperationWithNestedStructure,
|
11949 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithNestedStructure, S>
|
11796 11950 | >,
|
11797 11951 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11798 11952 | RestJson<L>,
|
11799 - | crate::operation_shape::PostUnionWithJsonName,
|
11953 + | crate::operation_shape::OperationWithNestedStructure,
|
11800 11954 | ModelPl::Output
|
11801 11955 | >,
|
11802 11956 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11803 11957 | RestJson<L>,
|
11804 - | crate::operation_shape::PostUnionWithJsonName,
|
11958 + | crate::operation_shape::OperationWithNestedStructure,
|
11805 11959 | <
|
11806 11960 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11807 11961 | as ::aws_smithy_http_server::plugin::Plugin<
|
11808 11962 | RestJson<L>,
|
11809 - | crate::operation_shape::PostUnionWithJsonName,
|
11963 + | crate::operation_shape::OperationWithNestedStructure,
|
11810 11964 | ModelPl::Output
|
11811 11965 | >
|
11812 11966 | >::Output
|
11813 11967 | >,
|
11814 11968 |
|
11815 11969 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11816 11970 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11817 11971 |
|
11818 11972 | {
|
11819 11973 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11820 11974 | use ::aws_smithy_http_server::plugin::Plugin;
|
11821 - | let svc = crate::operation_shape::PostUnionWithJsonName::from_service(service);
|
11975 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_service(service);
|
11822 11976 | let svc = self.model_plugin.apply(svc);
|
11823 11977 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11824 11978 | .apply(svc);
|
11825 11979 | let svc = self.http_plugin.apply(svc);
|
11826 - | self.post_union_with_json_name_custom(svc)
|
11980 + | self.operation_with_nested_structure_custom(svc)
|
11827 11981 | }
|
11828 11982 |
|
11829 - | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) to a custom [`Service`](tower::Service).
|
11983 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) to a custom [`Service`](tower::Service).
|
11830 11984 | /// not constrained by the Smithy contract.
|
11831 - | fn post_union_with_json_name_custom<S>(mut self, svc: S) -> Self
|
11985 + | fn operation_with_nested_structure_custom<S>(mut self, svc: S) -> Self
|
11832 11986 | where
|
11833 11987 | S: ::tower::Service<
|
11834 11988 | ::http::Request<Body>,
|
11835 11989 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
11836 11990 | Error = ::std::convert::Infallible,
|
11837 11991 | > + Clone
|
11838 11992 | + Send
|
11839 11993 | + 'static,
|
11840 11994 | S::Future: Send + 'static,
|
11841 11995 | {
|
11842 - | self.post_union_with_json_name = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11996 + | self.operation_with_nested_structure =
|
11997 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11843 11998 | self
|
11844 11999 | }
|
11845 12000 |
|
11846 - | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) operation.
|
12001 + | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
11847 12002 | ///
|
11848 12003 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11849 12004 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11850 12005 | ///
|
11851 12006 | /// # Example
|
11852 12007 | ///
|
11853 12008 | /// ```no_run
|
11854 12009 | /// use rest_json::{RestJson, RestJsonConfig};
|
11855 12010 | ///
|
11856 12011 | /// use rest_json::{input, output, error};
|
11857 12012 | ///
|
11858 - | /// async fn handler(input: input::PutWithContentEncodingInput) -> Result<output::PutWithContentEncodingOutput, error::PutWithContentEncodingError> {
|
12013 + | /// async fn handler(input: input::PostPlayerActionInput) -> Result<output::PostPlayerActionOutput, error::PostPlayerActionError> {
|
11859 12014 | /// todo!()
|
11860 12015 | /// }
|
11861 12016 | ///
|
11862 12017 | /// let config = RestJsonConfig::builder().build();
|
11863 12018 | /// let app = RestJson::builder(config)
|
11864 - | /// .put_with_content_encoding(handler)
|
12019 + | /// .post_player_action(handler)
|
11865 12020 | /// /* Set other handlers */
|
11866 12021 | /// .build()
|
11867 12022 | /// .unwrap();
|
11868 12023 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11869 12024 | /// ```
|
11870 12025 | ///
|
11871 - | pub fn put_with_content_encoding<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12026 + | pub fn post_player_action<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11872 12027 | where
|
11873 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PutWithContentEncoding, HandlerExtractors>,
|
12028 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PostPlayerAction, HandlerExtractors>,
|
11874 12029 |
|
11875 12030 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11876 12031 | RestJson<L>,
|
11877 - | crate::operation_shape::PutWithContentEncoding,
|
11878 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PutWithContentEncoding, HandlerType>
|
12032 + | crate::operation_shape::PostPlayerAction,
|
12033 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PostPlayerAction, HandlerType>
|
11879 12034 | >,
|
11880 12035 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11881 12036 | RestJson<L>,
|
11882 - | crate::operation_shape::PutWithContentEncoding,
|
12037 + | crate::operation_shape::PostPlayerAction,
|
11883 12038 | ModelPl::Output
|
11884 12039 | >,
|
11885 12040 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11886 12041 | RestJson<L>,
|
11887 - | crate::operation_shape::PutWithContentEncoding,
|
12042 + | crate::operation_shape::PostPlayerAction,
|
11888 12043 | <
|
11889 12044 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11890 12045 | as ::aws_smithy_http_server::plugin::Plugin<
|
11891 12046 | RestJson<L>,
|
11892 - | crate::operation_shape::PutWithContentEncoding,
|
12047 + | crate::operation_shape::PostPlayerAction,
|
11893 12048 | ModelPl::Output
|
11894 12049 | >
|
11895 12050 | >::Output
|
11896 12051 | >,
|
11897 12052 |
|
11898 12053 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11899 12054 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11900 12055 |
|
11901 12056 | {
|
11902 12057 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11903 12058 | use ::aws_smithy_http_server::plugin::Plugin;
|
11904 - | let svc = crate::operation_shape::PutWithContentEncoding::from_handler(handler);
|
12059 + | let svc = crate::operation_shape::PostPlayerAction::from_handler(handler);
|
11905 12060 | let svc = self.model_plugin.apply(svc);
|
11906 12061 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11907 12062 | .apply(svc);
|
11908 12063 | let svc = self.http_plugin.apply(svc);
|
11909 - | self.put_with_content_encoding_custom(svc)
|
12064 + | self.post_player_action_custom(svc)
|
11910 12065 | }
|
11911 12066 |
|
11912 - | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) operation.
|
12067 + | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
11913 12068 | ///
|
11914 12069 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11915 12070 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11916 12071 | ///
|
11917 12072 | /// # Example
|
11918 12073 | ///
|
11919 12074 | /// ```no_run
|
11920 12075 | /// use rest_json::{RestJson, RestJsonConfig};
|
11921 12076 | ///
|
11922 12077 | /// use rest_json::{input, output, error};
|
11923 12078 | ///
|
11924 - | /// async fn handler(input: input::PutWithContentEncodingInput) -> Result<output::PutWithContentEncodingOutput, error::PutWithContentEncodingError> {
|
12079 + | /// async fn handler(input: input::PostPlayerActionInput) -> Result<output::PostPlayerActionOutput, error::PostPlayerActionError> {
|
11925 12080 | /// todo!()
|
11926 12081 | /// }
|
11927 12082 | ///
|
11928 12083 | /// let config = RestJsonConfig::builder().build();
|
11929 12084 | /// let svc = ::tower::util::service_fn(handler);
|
11930 12085 | /// let app = RestJson::builder(config)
|
11931 - | /// .put_with_content_encoding_service(svc)
|
12086 + | /// .post_player_action_service(svc)
|
11932 12087 | /// /* Set other handlers */
|
11933 12088 | /// .build()
|
11934 12089 | /// .unwrap();
|
11935 12090 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11936 12091 | /// ```
|
11937 12092 | ///
|
11938 - | pub fn put_with_content_encoding_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12093 + | pub fn post_player_action_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11939 12094 | where
|
11940 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PutWithContentEncoding, ServiceExtractors>,
|
12095 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PostPlayerAction, ServiceExtractors>,
|
11941 12096 |
|
11942 12097 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11943 12098 | RestJson<L>,
|
11944 - | crate::operation_shape::PutWithContentEncoding,
|
11945 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PutWithContentEncoding, S>
|
12099 + | crate::operation_shape::PostPlayerAction,
|
12100 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PostPlayerAction, S>
|
11946 12101 | >,
|
11947 12102 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11948 12103 | RestJson<L>,
|
11949 - | crate::operation_shape::PutWithContentEncoding,
|
12104 + | crate::operation_shape::PostPlayerAction,
|
11950 12105 | ModelPl::Output
|
11951 12106 | >,
|
11952 12107 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11953 12108 | RestJson<L>,
|
11954 - | crate::operation_shape::PutWithContentEncoding,
|
12109 + | crate::operation_shape::PostPlayerAction,
|
11955 12110 | <
|
11956 12111 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11957 12112 | as ::aws_smithy_http_server::plugin::Plugin<
|
11958 12113 | RestJson<L>,
|
11959 - | crate::operation_shape::PutWithContentEncoding,
|
12114 + | crate::operation_shape::PostPlayerAction,
|
11960 12115 | ModelPl::Output
|
11961 12116 | >
|
11962 12117 | >::Output
|
11963 12118 | >,
|
11964 12119 |
|
11965 12120 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11966 12121 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11967 12122 |
|
11968 12123 | {
|
11969 12124 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11970 12125 | use ::aws_smithy_http_server::plugin::Plugin;
|
11971 - | let svc = crate::operation_shape::PutWithContentEncoding::from_service(service);
|
12126 + | let svc = crate::operation_shape::PostPlayerAction::from_service(service);
|
11972 12127 | let svc = self.model_plugin.apply(svc);
|
11973 12128 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11974 12129 | .apply(svc);
|
11975 12130 | let svc = self.http_plugin.apply(svc);
|
11976 - | self.put_with_content_encoding_custom(svc)
|
12131 + | self.post_player_action_custom(svc)
|
11977 12132 | }
|
11978 12133 |
|
11979 - | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) to a custom [`Service`](tower::Service).
|
12134 + | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) to a custom [`Service`](tower::Service).
|
11980 12135 | /// not constrained by the Smithy contract.
|
11981 - | fn put_with_content_encoding_custom<S>(mut self, svc: S) -> Self
|
12136 + | fn post_player_action_custom<S>(mut self, svc: S) -> Self
|
11982 12137 | where
|
11983 12138 | S: ::tower::Service<
|
11984 12139 | ::http::Request<Body>,
|
11985 12140 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
11986 12141 | Error = ::std::convert::Infallible,
|
11987 12142 | > + Clone
|
11988 12143 | + Send
|
11989 12144 | + 'static,
|
11990 12145 | S::Future: Send + 'static,
|
11991 12146 | {
|
11992 - | self.put_with_content_encoding = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12147 + | self.post_player_action = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11993 12148 | self
|
11994 12149 | }
|
11995 12150 |
|
11996 - | /// Sets the [`QueryIdempotencyTokenAutoFill`](crate::operation_shape::QueryIdempotencyTokenAutoFill) operation.
|
12151 + | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) operation.
|
11997 12152 | ///
|
11998 12153 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11999 12154 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12000 12155 | ///
|
12001 12156 | /// # Example
|
12002 12157 | ///
|
12003 12158 | /// ```no_run
|
12004 12159 | /// use rest_json::{RestJson, RestJsonConfig};
|
12005 12160 | ///
|
12006 12161 | /// use rest_json::{input, output, error};
|
12007 12162 | ///
|
12008 - | /// async fn handler(input: input::QueryIdempotencyTokenAutoFillInput) -> Result<output::QueryIdempotencyTokenAutoFillOutput, error::QueryIdempotencyTokenAutoFillError> {
|
12163 + | /// async fn handler(input: input::PostUnionWithJsonNameInput) -> Result<output::PostUnionWithJsonNameOutput, error::PostUnionWithJsonNameError> {
|
12009 12164 | /// todo!()
|
12010 12165 | /// }
|
12011 12166 | ///
|
12012 12167 | /// let config = RestJsonConfig::builder().build();
|
12013 12168 | /// let app = RestJson::builder(config)
|
12014 - | /// .query_idempotency_token_auto_fill(handler)
|
12169 + | /// .post_union_with_json_name(handler)
|
12015 12170 | /// /* Set other handlers */
|
12016 12171 | /// .build()
|
12017 12172 | /// .unwrap();
|
12018 12173 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12019 12174 | /// ```
|
12020 12175 | ///
|
12021 - | pub fn query_idempotency_token_auto_fill<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12176 + | pub fn post_union_with_json_name<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12022 12177 | where
|
12023 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::QueryIdempotencyTokenAutoFill, HandlerExtractors>,
|
12178 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PostUnionWithJsonName, HandlerExtractors>,
|
12024 12179 |
|
12025 12180 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12026 12181 | RestJson<L>,
|
12027 - | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12028 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::QueryIdempotencyTokenAutoFill, HandlerType>
|
12182 + | crate::operation_shape::PostUnionWithJsonName,
|
12183 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PostUnionWithJsonName, HandlerType>
|
12029 12184 | >,
|
12030 12185 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12031 12186 | RestJson<L>,
|
12032 - | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12187 + | crate::operation_shape::PostUnionWithJsonName,
|
12033 12188 | ModelPl::Output
|
12034 12189 | >,
|
12035 12190 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12036 12191 | RestJson<L>,
|
12037 - | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12192 + | crate::operation_shape::PostUnionWithJsonName,
|
12038 12193 | <
|
12039 12194 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12040 12195 | as ::aws_smithy_http_server::plugin::Plugin<
|
12041 12196 | RestJson<L>,
|
12042 - | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12197 + | crate::operation_shape::PostUnionWithJsonName,
|
12043 12198 | ModelPl::Output
|
12044 12199 | >
|
12045 12200 | >::Output
|
12046 12201 | >,
|
12047 12202 |
|
12048 12203 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12049 12204 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12050 12205 |
|
12051 12206 | {
|
12052 12207 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12053 12208 | use ::aws_smithy_http_server::plugin::Plugin;
|
12054 - | let svc = crate::operation_shape::QueryIdempotencyTokenAutoFill::from_handler(handler);
|
12209 + | let svc = crate::operation_shape::PostUnionWithJsonName::from_handler(handler);
|
12055 12210 | let svc = self.model_plugin.apply(svc);
|
12056 12211 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12057 12212 | .apply(svc);
|
12058 12213 | let svc = self.http_plugin.apply(svc);
|
12059 - | self.query_idempotency_token_auto_fill_custom(svc)
|
12214 + | self.post_union_with_json_name_custom(svc)
|
12215 + | }
|
12216 + |
|
12217 + | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) operation.
|
12218 + | ///
|
12219 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12220 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12221 + | ///
|
12222 + | /// # Example
|
12223 + | ///
|
12224 + | /// ```no_run
|
12225 + | /// use rest_json::{RestJson, RestJsonConfig};
|
12226 + | ///
|
12227 + | /// use rest_json::{input, output, error};
|
12228 + | ///
|
12229 + | /// async fn handler(input: input::PostUnionWithJsonNameInput) -> Result<output::PostUnionWithJsonNameOutput, error::PostUnionWithJsonNameError> {
|
12230 + | /// todo!()
|
12231 + | /// }
|
12232 + | ///
|
12233 + | /// let config = RestJsonConfig::builder().build();
|
12234 + | /// let svc = ::tower::util::service_fn(handler);
|
12235 + | /// let app = RestJson::builder(config)
|
12236 + | /// .post_union_with_json_name_service(svc)
|
12237 + | /// /* Set other handlers */
|
12238 + | /// .build()
|
12239 + | /// .unwrap();
|
12240 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12241 + | /// ```
|
12242 + | ///
|
12243 + | pub fn post_union_with_json_name_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12244 + | where
|
12245 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PostUnionWithJsonName, ServiceExtractors>,
|
12246 + |
|
12247 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12248 + | RestJson<L>,
|
12249 + | crate::operation_shape::PostUnionWithJsonName,
|
12250 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PostUnionWithJsonName, S>
|
12251 + | >,
|
12252 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12253 + | RestJson<L>,
|
12254 + | crate::operation_shape::PostUnionWithJsonName,
|
12255 + | ModelPl::Output
|
12256 + | >,
|
12257 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12258 + | RestJson<L>,
|
12259 + | crate::operation_shape::PostUnionWithJsonName,
|
12260 + | <
|
12261 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12262 + | as ::aws_smithy_http_server::plugin::Plugin<
|
12263 + | RestJson<L>,
|
12264 + | crate::operation_shape::PostUnionWithJsonName,
|
12265 + | ModelPl::Output
|
12266 + | >
|
12267 + | >::Output
|
12268 + | >,
|
12269 + |
|
12270 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12271 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12272 + |
|
12273 + | {
|
12274 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12275 + | use ::aws_smithy_http_server::plugin::Plugin;
|
12276 + | let svc = crate::operation_shape::PostUnionWithJsonName::from_service(service);
|
12277 + | let svc = self.model_plugin.apply(svc);
|
12278 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12279 + | .apply(svc);
|
12280 + | let svc = self.http_plugin.apply(svc);
|
12281 + | self.post_union_with_json_name_custom(svc)
|
12282 + | }
|
12283 + |
|
12284 + | /// Sets the [`PostUnionWithJsonName`](crate::operation_shape::PostUnionWithJsonName) to a custom [`Service`](tower::Service).
|
12285 + | /// not constrained by the Smithy contract.
|
12286 + | fn post_union_with_json_name_custom<S>(mut self, svc: S) -> Self
|
12287 + | where
|
12288 + | S: ::tower::Service<
|
12289 + | ::http::Request<Body>,
|
12290 + | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
12291 + | Error = ::std::convert::Infallible,
|
12292 + | > + Clone
|
12293 + | + Send
|
12294 + | + 'static,
|
12295 + | S::Future: Send + 'static,
|
12296 + | {
|
12297 + | self.post_union_with_json_name = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12298 + | self
|
12299 + | }
|
12300 + |
|
12301 + | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) operation.
|
12302 + | ///
|
12303 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12304 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12305 + | ///
|
12306 + | /// # Example
|
12307 + | ///
|
12308 + | /// ```no_run
|
12309 + | /// use rest_json::{RestJson, RestJsonConfig};
|
12310 + | ///
|
12311 + | /// use rest_json::{input, output, error};
|
12312 + | ///
|
12313 + | /// async fn handler(input: input::PutWithContentEncodingInput) -> Result<output::PutWithContentEncodingOutput, error::PutWithContentEncodingError> {
|
12314 + | /// todo!()
|
12315 + | /// }
|
12316 + | ///
|
12317 + | /// let config = RestJsonConfig::builder().build();
|
12318 + | /// let app = RestJson::builder(config)
|
12319 + | /// .put_with_content_encoding(handler)
|
12320 + | /// /* Set other handlers */
|
12321 + | /// .build()
|
12322 + | /// .unwrap();
|
12323 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12324 + | /// ```
|
12325 + | ///
|
12326 + | pub fn put_with_content_encoding<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12327 + | where
|
12328 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::PutWithContentEncoding, HandlerExtractors>,
|
12329 + |
|
12330 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12331 + | RestJson<L>,
|
12332 + | crate::operation_shape::PutWithContentEncoding,
|
12333 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::PutWithContentEncoding, HandlerType>
|
12334 + | >,
|
12335 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12336 + | RestJson<L>,
|
12337 + | crate::operation_shape::PutWithContentEncoding,
|
12338 + | ModelPl::Output
|
12339 + | >,
|
12340 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12341 + | RestJson<L>,
|
12342 + | crate::operation_shape::PutWithContentEncoding,
|
12343 + | <
|
12344 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12345 + | as ::aws_smithy_http_server::plugin::Plugin<
|
12346 + | RestJson<L>,
|
12347 + | crate::operation_shape::PutWithContentEncoding,
|
12348 + | ModelPl::Output
|
12349 + | >
|
12350 + | >::Output
|
12351 + | >,
|
12352 + |
|
12353 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12354 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12355 + |
|
12356 + | {
|
12357 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12358 + | use ::aws_smithy_http_server::plugin::Plugin;
|
12359 + | let svc = crate::operation_shape::PutWithContentEncoding::from_handler(handler);
|
12360 + | let svc = self.model_plugin.apply(svc);
|
12361 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12362 + | .apply(svc);
|
12363 + | let svc = self.http_plugin.apply(svc);
|
12364 + | self.put_with_content_encoding_custom(svc)
|
12365 + | }
|
12366 + |
|
12367 + | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) operation.
|
12368 + | ///
|
12369 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12370 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12371 + | ///
|
12372 + | /// # Example
|
12373 + | ///
|
12374 + | /// ```no_run
|
12375 + | /// use rest_json::{RestJson, RestJsonConfig};
|
12376 + | ///
|
12377 + | /// use rest_json::{input, output, error};
|
12378 + | ///
|
12379 + | /// async fn handler(input: input::PutWithContentEncodingInput) -> Result<output::PutWithContentEncodingOutput, error::PutWithContentEncodingError> {
|
12380 + | /// todo!()
|
12381 + | /// }
|
12382 + | ///
|
12383 + | /// let config = RestJsonConfig::builder().build();
|
12384 + | /// let svc = ::tower::util::service_fn(handler);
|
12385 + | /// let app = RestJson::builder(config)
|
12386 + | /// .put_with_content_encoding_service(svc)
|
12387 + | /// /* Set other handlers */
|
12388 + | /// .build()
|
12389 + | /// .unwrap();
|
12390 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12391 + | /// ```
|
12392 + | ///
|
12393 + | pub fn put_with_content_encoding_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12394 + | where
|
12395 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::PutWithContentEncoding, ServiceExtractors>,
|
12396 + |
|
12397 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12398 + | RestJson<L>,
|
12399 + | crate::operation_shape::PutWithContentEncoding,
|
12400 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::PutWithContentEncoding, S>
|
12401 + | >,
|
12402 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12403 + | RestJson<L>,
|
12404 + | crate::operation_shape::PutWithContentEncoding,
|
12405 + | ModelPl::Output
|
12406 + | >,
|
12407 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12408 + | RestJson<L>,
|
12409 + | crate::operation_shape::PutWithContentEncoding,
|
12410 + | <
|
12411 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12412 + | as ::aws_smithy_http_server::plugin::Plugin<
|
12413 + | RestJson<L>,
|
12414 + | crate::operation_shape::PutWithContentEncoding,
|
12415 + | ModelPl::Output
|
12416 + | >
|
12417 + | >::Output
|
12418 + | >,
|
12419 + |
|
12420 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12421 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12422 + |
|
12423 + | {
|
12424 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12425 + | use ::aws_smithy_http_server::plugin::Plugin;
|
12426 + | let svc = crate::operation_shape::PutWithContentEncoding::from_service(service);
|
12427 + | let svc = self.model_plugin.apply(svc);
|
12428 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12429 + | .apply(svc);
|
12430 + | let svc = self.http_plugin.apply(svc);
|
12431 + | self.put_with_content_encoding_custom(svc)
|
12432 + | }
|
12433 + |
|
12434 + | /// Sets the [`PutWithContentEncoding`](crate::operation_shape::PutWithContentEncoding) to a custom [`Service`](tower::Service).
|
12435 + | /// not constrained by the Smithy contract.
|
12436 + | fn put_with_content_encoding_custom<S>(mut self, svc: S) -> Self
|
12437 + | where
|
12438 + | S: ::tower::Service<
|
12439 + | ::http::Request<Body>,
|
12440 + | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
12441 + | Error = ::std::convert::Infallible,
|
12442 + | > + Clone
|
12443 + | + Send
|
12444 + | + 'static,
|
12445 + | S::Future: Send + 'static,
|
12446 + | {
|
12447 + | self.put_with_content_encoding = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12448 + | self
|
12449 + | }
|
12450 + |
|
12451 + | /// Sets the [`QueryIdempotencyTokenAutoFill`](crate::operation_shape::QueryIdempotencyTokenAutoFill) operation.
|
12452 + | ///
|
12453 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12454 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12455 + | ///
|
12456 + | /// # Example
|
12457 + | ///
|
12458 + | /// ```no_run
|
12459 + | /// use rest_json::{RestJson, RestJsonConfig};
|
12460 + | ///
|
12461 + | /// use rest_json::{input, output, error};
|
12462 + | ///
|
12463 + | /// async fn handler(input: input::QueryIdempotencyTokenAutoFillInput) -> Result<output::QueryIdempotencyTokenAutoFillOutput, error::QueryIdempotencyTokenAutoFillError> {
|
12464 + | /// todo!()
|
12465 + | /// }
|
12466 + | ///
|
12467 + | /// let config = RestJsonConfig::builder().build();
|
12468 + | /// let app = RestJson::builder(config)
|
12469 + | /// .query_idempotency_token_auto_fill(handler)
|
12470 + | /// /* Set other handlers */
|
12471 + | /// .build()
|
12472 + | /// .unwrap();
|
12473 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12474 + | /// ```
|
12475 + | ///
|
12476 + | pub fn query_idempotency_token_auto_fill<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12477 + | where
|
12478 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::QueryIdempotencyTokenAutoFill, HandlerExtractors>,
|
12479 + |
|
12480 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12481 + | RestJson<L>,
|
12482 + | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12483 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::QueryIdempotencyTokenAutoFill, HandlerType>
|
12484 + | >,
|
12485 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12486 + | RestJson<L>,
|
12487 + | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12488 + | ModelPl::Output
|
12489 + | >,
|
12490 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12491 + | RestJson<L>,
|
12492 + | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12493 + | <
|
12494 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12495 + | as ::aws_smithy_http_server::plugin::Plugin<
|
12496 + | RestJson<L>,
|
12497 + | crate::operation_shape::QueryIdempotencyTokenAutoFill,
|
12498 + | ModelPl::Output
|
12499 + | >
|
12500 + | >::Output
|
12501 + | >,
|
12502 + |
|
12503 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12504 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12505 + |
|
12506 + | {
|
12507 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12508 + | use ::aws_smithy_http_server::plugin::Plugin;
|
12509 + | let svc = crate::operation_shape::QueryIdempotencyTokenAutoFill::from_handler(handler);
|
12510 + | let svc = self.model_plugin.apply(svc);
|
12511 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12512 + | .apply(svc);
|
12513 + | let svc = self.http_plugin.apply(svc);
|
12514 + | self.query_idempotency_token_auto_fill_custom(svc)
|
12060 12515 | }
|
12061 12516 |
|
12062 12517 | /// Sets the [`QueryIdempotencyTokenAutoFill`](crate::operation_shape::QueryIdempotencyTokenAutoFill) operation.
|
12063 12518 | ///
|
12064 12519 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12065 12520 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12066 12521 | ///
|
12067 12522 | /// # Example
|
12068 12523 | ///
|
12069 12524 | /// ```no_run
|
13273 13728 | ///
|
13274 13729 | /// use rest_json::{input, output, error};
|
13275 13730 | ///
|
13276 13731 | /// async fn handler(input: input::StreamingTraitsRequireLengthInput) -> Result<output::StreamingTraitsRequireLengthOutput, error::StreamingTraitsRequireLengthError> {
|
13277 13732 | /// todo!()
|
13278 13733 | /// }
|
13279 13734 | ///
|
13280 13735 | /// let config = RestJsonConfig::builder().build();
|
13281 13736 | /// let svc = ::tower::util::service_fn(handler);
|
13282 13737 | /// let app = RestJson::builder(config)
|
13283 - | /// .streaming_traits_require_length_service(svc)
|
13738 + | /// .streaming_traits_require_length_service(svc)
|
13739 + | /// /* Set other handlers */
|
13740 + | /// .build()
|
13741 + | /// .unwrap();
|
13742 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13743 + | /// ```
|
13744 + | ///
|
13745 + | pub fn streaming_traits_require_length_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13746 + | where
|
13747 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::StreamingTraitsRequireLength, ServiceExtractors>,
|
13748 + |
|
13749 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13750 + | RestJson<L>,
|
13751 + | crate::operation_shape::StreamingTraitsRequireLength,
|
13752 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::StreamingTraitsRequireLength, S>
|
13753 + | >,
|
13754 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13755 + | RestJson<L>,
|
13756 + | crate::operation_shape::StreamingTraitsRequireLength,
|
13757 + | ModelPl::Output
|
13758 + | >,
|
13759 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13760 + | RestJson<L>,
|
13761 + | crate::operation_shape::StreamingTraitsRequireLength,
|
13762 + | <
|
13763 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13764 + | as ::aws_smithy_http_server::plugin::Plugin<
|
13765 + | RestJson<L>,
|
13766 + | crate::operation_shape::StreamingTraitsRequireLength,
|
13767 + | ModelPl::Output
|
13768 + | >
|
13769 + | >::Output
|
13770 + | >,
|
13771 + |
|
13772 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13773 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13774 + |
|
13775 + | {
|
13776 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13777 + | use ::aws_smithy_http_server::plugin::Plugin;
|
13778 + | let svc = crate::operation_shape::StreamingTraitsRequireLength::from_service(service);
|
13779 + | let svc = self.model_plugin.apply(svc);
|
13780 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13781 + | .apply(svc);
|
13782 + | let svc = self.http_plugin.apply(svc);
|
13783 + | self.streaming_traits_require_length_custom(svc)
|
13784 + | }
|
13785 + |
|
13786 + | /// Sets the [`StreamingTraitsRequireLength`](crate::operation_shape::StreamingTraitsRequireLength) to a custom [`Service`](tower::Service).
|
13787 + | /// not constrained by the Smithy contract.
|
13788 + | fn streaming_traits_require_length_custom<S>(mut self, svc: S) -> Self
|
13789 + | where
|
13790 + | S: ::tower::Service<
|
13791 + | ::http::Request<Body>,
|
13792 + | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
13793 + | Error = ::std::convert::Infallible,
|
13794 + | > + Clone
|
13795 + | + Send
|
13796 + | + 'static,
|
13797 + | S::Future: Send + 'static,
|
13798 + | {
|
13799 + | self.streaming_traits_require_length =
|
13800 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13801 + | self
|
13802 + | }
|
13803 + |
|
13804 + | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) operation.
|
13805 + | ///
|
13806 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13807 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13808 + | ///
|
13809 + | /// # Example
|
13810 + | ///
|
13811 + | /// ```no_run
|
13812 + | /// use rest_json::{RestJson, RestJsonConfig};
|
13813 + | ///
|
13814 + | /// use rest_json::{input, output, error};
|
13815 + | ///
|
13816 + | /// async fn handler(input: input::StreamingTraitsWithMediaTypeInput) -> Result<output::StreamingTraitsWithMediaTypeOutput, error::StreamingTraitsWithMediaTypeError> {
|
13817 + | /// todo!()
|
13818 + | /// }
|
13819 + | ///
|
13820 + | /// let config = RestJsonConfig::builder().build();
|
13821 + | /// let app = RestJson::builder(config)
|
13822 + | /// .streaming_traits_with_media_type(handler)
|
13823 + | /// /* Set other handlers */
|
13824 + | /// .build()
|
13825 + | /// .unwrap();
|
13826 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13827 + | /// ```
|
13828 + | ///
|
13829 + | pub fn streaming_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13830 + | where
|
13831 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::StreamingTraitsWithMediaType, HandlerExtractors>,
|
13832 + |
|
13833 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13834 + | RestJson<L>,
|
13835 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13836 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::StreamingTraitsWithMediaType, HandlerType>
|
13837 + | >,
|
13838 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13839 + | RestJson<L>,
|
13840 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13841 + | ModelPl::Output
|
13842 + | >,
|
13843 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13844 + | RestJson<L>,
|
13845 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13846 + | <
|
13847 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13848 + | as ::aws_smithy_http_server::plugin::Plugin<
|
13849 + | RestJson<L>,
|
13850 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13851 + | ModelPl::Output
|
13852 + | >
|
13853 + | >::Output
|
13854 + | >,
|
13855 + |
|
13856 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13857 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13858 + |
|
13859 + | {
|
13860 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13861 + | use ::aws_smithy_http_server::plugin::Plugin;
|
13862 + | let svc = crate::operation_shape::StreamingTraitsWithMediaType::from_handler(handler);
|
13863 + | let svc = self.model_plugin.apply(svc);
|
13864 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13865 + | .apply(svc);
|
13866 + | let svc = self.http_plugin.apply(svc);
|
13867 + | self.streaming_traits_with_media_type_custom(svc)
|
13868 + | }
|
13869 + |
|
13870 + | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) operation.
|
13871 + | ///
|
13872 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13873 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13874 + | ///
|
13875 + | /// # Example
|
13876 + | ///
|
13877 + | /// ```no_run
|
13878 + | /// use rest_json::{RestJson, RestJsonConfig};
|
13879 + | ///
|
13880 + | /// use rest_json::{input, output, error};
|
13881 + | ///
|
13882 + | /// async fn handler(input: input::StreamingTraitsWithMediaTypeInput) -> Result<output::StreamingTraitsWithMediaTypeOutput, error::StreamingTraitsWithMediaTypeError> {
|
13883 + | /// todo!()
|
13884 + | /// }
|
13885 + | ///
|
13886 + | /// let config = RestJsonConfig::builder().build();
|
13887 + | /// let svc = ::tower::util::service_fn(handler);
|
13888 + | /// let app = RestJson::builder(config)
|
13889 + | /// .streaming_traits_with_media_type_service(svc)
|
13284 13890 | /// /* Set other handlers */
|
13285 13891 | /// .build()
|
13286 13892 | /// .unwrap();
|
13287 13893 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13288 13894 | /// ```
|
13289 13895 | ///
|
13290 - | pub fn streaming_traits_require_length_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13896 + | pub fn streaming_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13291 13897 | where
|
13292 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::StreamingTraitsRequireLength, ServiceExtractors>,
|
13898 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::StreamingTraitsWithMediaType, ServiceExtractors>,
|
13293 13899 |
|
13294 13900 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13295 13901 | RestJson<L>,
|
13296 - | crate::operation_shape::StreamingTraitsRequireLength,
|
13297 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::StreamingTraitsRequireLength, S>
|
13902 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13903 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::StreamingTraitsWithMediaType, S>
|
13298 13904 | >,
|
13299 13905 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13300 13906 | RestJson<L>,
|
13301 - | crate::operation_shape::StreamingTraitsRequireLength,
|
13907 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13302 13908 | ModelPl::Output
|
13303 13909 | >,
|
13304 13910 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13305 13911 | RestJson<L>,
|
13306 - | crate::operation_shape::StreamingTraitsRequireLength,
|
13912 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13307 13913 | <
|
13308 13914 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13309 13915 | as ::aws_smithy_http_server::plugin::Plugin<
|
13310 13916 | RestJson<L>,
|
13311 - | crate::operation_shape::StreamingTraitsRequireLength,
|
13917 + | crate::operation_shape::StreamingTraitsWithMediaType,
|
13312 13918 | ModelPl::Output
|
13313 13919 | >
|
13314 13920 | >::Output
|
13315 13921 | >,
|
13316 13922 |
|
13317 13923 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13318 13924 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13319 13925 |
|
13320 13926 | {
|
13321 13927 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13322 13928 | use ::aws_smithy_http_server::plugin::Plugin;
|
13323 - | let svc = crate::operation_shape::StreamingTraitsRequireLength::from_service(service);
|
13929 + | let svc = crate::operation_shape::StreamingTraitsWithMediaType::from_service(service);
|
13324 13930 | let svc = self.model_plugin.apply(svc);
|
13325 13931 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13326 13932 | .apply(svc);
|
13327 13933 | let svc = self.http_plugin.apply(svc);
|
13328 - | self.streaming_traits_require_length_custom(svc)
|
13934 + | self.streaming_traits_with_media_type_custom(svc)
|
13329 13935 | }
|
13330 13936 |
|
13331 - | /// Sets the [`StreamingTraitsRequireLength`](crate::operation_shape::StreamingTraitsRequireLength) to a custom [`Service`](tower::Service).
|
13937 + | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
13332 13938 | /// not constrained by the Smithy contract.
|
13333 - | fn streaming_traits_require_length_custom<S>(mut self, svc: S) -> Self
|
13939 + | fn streaming_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
13334 13940 | where
|
13335 13941 | S: ::tower::Service<
|
13336 13942 | ::http::Request<Body>,
|
13337 13943 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
13338 13944 | Error = ::std::convert::Infallible,
|
13339 13945 | > + Clone
|
13340 13946 | + Send
|
13341 13947 | + 'static,
|
13342 13948 | S::Future: Send + 'static,
|
13343 13949 | {
|
13344 - | self.streaming_traits_require_length =
|
13950 + | self.streaming_traits_with_media_type =
|
13345 13951 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13346 13952 | self
|
13347 13953 | }
|
13348 13954 |
|
13349 - | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) operation.
|
13955 + | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) operation.
|
13350 13956 | ///
|
13351 13957 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13352 13958 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13353 13959 | ///
|
13354 13960 | /// # Example
|
13355 13961 | ///
|
13356 13962 | /// ```no_run
|
13357 13963 | /// use rest_json::{RestJson, RestJsonConfig};
|
13358 13964 | ///
|
13359 13965 | /// use rest_json::{input, output, error};
|
13360 13966 | ///
|
13361 - | /// async fn handler(input: input::StreamingTraitsWithMediaTypeInput) -> Result<output::StreamingTraitsWithMediaTypeOutput, error::StreamingTraitsWithMediaTypeError> {
|
13967 + | /// async fn handler(input: input::TestBodyStructureInput) -> Result<output::TestBodyStructureOutput, error::TestBodyStructureError> {
|
13362 13968 | /// todo!()
|
13363 13969 | /// }
|
13364 13970 | ///
|
13365 13971 | /// let config = RestJsonConfig::builder().build();
|
13366 13972 | /// let app = RestJson::builder(config)
|
13367 - | /// .streaming_traits_with_media_type(handler)
|
13973 + | /// .test_body_structure(handler)
|
13368 13974 | /// /* Set other handlers */
|
13369 13975 | /// .build()
|
13370 13976 | /// .unwrap();
|
13371 13977 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13372 13978 | /// ```
|
13373 13979 | ///
|
13374 - | pub fn streaming_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13980 + | pub fn test_body_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13375 13981 | where
|
13376 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::StreamingTraitsWithMediaType, HandlerExtractors>,
|
13982 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::TestBodyStructure, HandlerExtractors>,
|
13377 13983 |
|
13378 13984 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13379 13985 | RestJson<L>,
|
13380 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
13381 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::StreamingTraitsWithMediaType, HandlerType>
|
13986 + | crate::operation_shape::TestBodyStructure,
|
13987 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::TestBodyStructure, HandlerType>
|
13382 13988 | >,
|
13383 13989 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13384 13990 | RestJson<L>,
|
13385 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
13991 + | crate::operation_shape::TestBodyStructure,
|
13386 13992 | ModelPl::Output
|
13387 13993 | >,
|
13388 13994 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13389 13995 | RestJson<L>,
|
13390 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
13996 + | crate::operation_shape::TestBodyStructure,
|
13391 13997 | <
|
13392 13998 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13393 13999 | as ::aws_smithy_http_server::plugin::Plugin<
|
13394 14000 | RestJson<L>,
|
13395 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
14001 + | crate::operation_shape::TestBodyStructure,
|
13396 14002 | ModelPl::Output
|
13397 14003 | >
|
13398 14004 | >::Output
|
13399 14005 | >,
|
13400 14006 |
|
13401 14007 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13402 14008 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13403 14009 |
|
13404 14010 | {
|
13405 14011 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13406 14012 | use ::aws_smithy_http_server::plugin::Plugin;
|
13407 - | let svc = crate::operation_shape::StreamingTraitsWithMediaType::from_handler(handler);
|
14013 + | let svc = crate::operation_shape::TestBodyStructure::from_handler(handler);
|
13408 14014 | let svc = self.model_plugin.apply(svc);
|
13409 14015 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13410 14016 | .apply(svc);
|
13411 14017 | let svc = self.http_plugin.apply(svc);
|
13412 - | self.streaming_traits_with_media_type_custom(svc)
|
14018 + | self.test_body_structure_custom(svc)
|
13413 14019 | }
|
13414 14020 |
|
13415 - | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) operation.
|
14021 + | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) operation.
|
13416 14022 | ///
|
13417 14023 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13418 14024 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13419 14025 | ///
|
13420 14026 | /// # Example
|
13421 14027 | ///
|
13422 14028 | /// ```no_run
|
13423 14029 | /// use rest_json::{RestJson, RestJsonConfig};
|
13424 14030 | ///
|
13425 14031 | /// use rest_json::{input, output, error};
|
13426 14032 | ///
|
13427 - | /// async fn handler(input: input::StreamingTraitsWithMediaTypeInput) -> Result<output::StreamingTraitsWithMediaTypeOutput, error::StreamingTraitsWithMediaTypeError> {
|
14033 + | /// async fn handler(input: input::TestBodyStructureInput) -> Result<output::TestBodyStructureOutput, error::TestBodyStructureError> {
|
13428 14034 | /// todo!()
|
13429 14035 | /// }
|
13430 14036 | ///
|
13431 14037 | /// let config = RestJsonConfig::builder().build();
|
13432 14038 | /// let svc = ::tower::util::service_fn(handler);
|
13433 14039 | /// let app = RestJson::builder(config)
|
13434 - | /// .streaming_traits_with_media_type_service(svc)
|
14040 + | /// .test_body_structure_service(svc)
|
13435 14041 | /// /* Set other handlers */
|
13436 14042 | /// .build()
|
13437 14043 | /// .unwrap();
|
13438 14044 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13439 14045 | /// ```
|
13440 14046 | ///
|
13441 - | pub fn streaming_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
14047 + | pub fn test_body_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13442 14048 | where
|
13443 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::StreamingTraitsWithMediaType, ServiceExtractors>,
|
14049 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::TestBodyStructure, ServiceExtractors>,
|
13444 14050 |
|
13445 14051 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13446 14052 | RestJson<L>,
|
13447 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
13448 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::StreamingTraitsWithMediaType, S>
|
14053 + | crate::operation_shape::TestBodyStructure,
|
14054 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::TestBodyStructure, S>
|
13449 14055 | >,
|
13450 14056 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13451 14057 | RestJson<L>,
|
13452 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
14058 + | crate::operation_shape::TestBodyStructure,
|
13453 14059 | ModelPl::Output
|
13454 14060 | >,
|
13455 14061 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13456 14062 | RestJson<L>,
|
13457 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
14063 + | crate::operation_shape::TestBodyStructure,
|
13458 14064 | <
|
13459 14065 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13460 14066 | as ::aws_smithy_http_server::plugin::Plugin<
|
13461 14067 | RestJson<L>,
|
13462 - | crate::operation_shape::StreamingTraitsWithMediaType,
|
14068 + | crate::operation_shape::TestBodyStructure,
|
13463 14069 | ModelPl::Output
|
13464 14070 | >
|
13465 14071 | >::Output
|
13466 14072 | >,
|
13467 14073 |
|
13468 14074 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13469 14075 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13470 14076 |
|
13471 14077 | {
|
13472 14078 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13473 14079 | use ::aws_smithy_http_server::plugin::Plugin;
|
13474 - | let svc = crate::operation_shape::StreamingTraitsWithMediaType::from_service(service);
|
14080 + | let svc = crate::operation_shape::TestBodyStructure::from_service(service);
|
13475 14081 | let svc = self.model_plugin.apply(svc);
|
13476 14082 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13477 14083 | .apply(svc);
|
13478 14084 | let svc = self.http_plugin.apply(svc);
|
13479 - | self.streaming_traits_with_media_type_custom(svc)
|
14085 + | self.test_body_structure_custom(svc)
|
13480 14086 | }
|
13481 14087 |
|
13482 - | /// Sets the [`StreamingTraitsWithMediaType`](crate::operation_shape::StreamingTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
14088 + | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) to a custom [`Service`](tower::Service).
|
13483 14089 | /// not constrained by the Smithy contract.
|
13484 - | fn streaming_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
14090 + | fn test_body_structure_custom<S>(mut self, svc: S) -> Self
|
13485 14091 | where
|
13486 14092 | S: ::tower::Service<
|
13487 14093 | ::http::Request<Body>,
|
13488 14094 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
13489 14095 | Error = ::std::convert::Infallible,
|
13490 14096 | > + Clone
|
13491 14097 | + Send
|
13492 14098 | + 'static,
|
13493 14099 | S::Future: Send + 'static,
|
13494 14100 | {
|
13495 - | self.streaming_traits_with_media_type =
|
13496 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
14101 + | self.test_body_structure = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13497 14102 | self
|
13498 14103 | }
|
13499 14104 |
|
13500 - | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) operation.
|
14105 + | /// Sets the [`TestNoInputNoPayload`](crate::operation_shape::TestNoInputNoPayload) operation.
|
13501 14106 | ///
|
13502 14107 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13503 14108 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13504 14109 | ///
|
13505 14110 | /// # Example
|
13506 14111 | ///
|
13507 14112 | /// ```no_run
|
13508 14113 | /// use rest_json::{RestJson, RestJsonConfig};
|
13509 14114 | ///
|
13510 14115 | /// use rest_json::{input, output, error};
|
13511 14116 | ///
|
13512 - | /// async fn handler(input: input::TestBodyStructureInput) -> Result<output::TestBodyStructureOutput, error::TestBodyStructureError> {
|
14117 + | /// async fn handler(input: input::TestNoInputNoPayloadInput) -> Result<output::TestNoInputNoPayloadOutput, error::TestNoInputNoPayloadError> {
|
13513 14118 | /// todo!()
|
13514 14119 | /// }
|
13515 14120 | ///
|
13516 14121 | /// let config = RestJsonConfig::builder().build();
|
13517 14122 | /// let app = RestJson::builder(config)
|
13518 - | /// .test_body_structure(handler)
|
14123 + | /// .test_no_input_no_payload(handler)
|
13519 14124 | /// /* Set other handlers */
|
13520 14125 | /// .build()
|
13521 14126 | /// .unwrap();
|
13522 14127 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13523 14128 | /// ```
|
13524 14129 | ///
|
13525 - | pub fn test_body_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
14130 + | pub fn test_no_input_no_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13526 14131 | where
|
13527 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::TestBodyStructure, HandlerExtractors>,
|
14132 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::TestNoInputNoPayload, HandlerExtractors>,
|
13528 14133 |
|
13529 14134 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13530 14135 | RestJson<L>,
|
13531 - | crate::operation_shape::TestBodyStructure,
|
13532 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::TestBodyStructure, HandlerType>
|
14136 + | crate::operation_shape::TestNoInputNoPayload,
|
14137 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::TestNoInputNoPayload, HandlerType>
|
13533 14138 | >,
|
13534 14139 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13535 14140 | RestJson<L>,
|
13536 - | crate::operation_shape::TestBodyStructure,
|
14141 + | crate::operation_shape::TestNoInputNoPayload,
|
13537 14142 | ModelPl::Output
|
13538 14143 | >,
|
13539 14144 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13540 14145 | RestJson<L>,
|
13541 - | crate::operation_shape::TestBodyStructure,
|
14146 + | crate::operation_shape::TestNoInputNoPayload,
|
13542 14147 | <
|
13543 14148 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13544 14149 | as ::aws_smithy_http_server::plugin::Plugin<
|
13545 14150 | RestJson<L>,
|
13546 - | crate::operation_shape::TestBodyStructure,
|
14151 + | crate::operation_shape::TestNoInputNoPayload,
|
13547 14152 | ModelPl::Output
|
13548 14153 | >
|
13549 14154 | >::Output
|
13550 14155 | >,
|
13551 14156 |
|
13552 14157 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13553 14158 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13554 14159 |
|
13555 14160 | {
|
13556 14161 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13557 14162 | use ::aws_smithy_http_server::plugin::Plugin;
|
13558 - | let svc = crate::operation_shape::TestBodyStructure::from_handler(handler);
|
14163 + | let svc = crate::operation_shape::TestNoInputNoPayload::from_handler(handler);
|
13559 14164 | let svc = self.model_plugin.apply(svc);
|
13560 14165 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13561 14166 | .apply(svc);
|
13562 14167 | let svc = self.http_plugin.apply(svc);
|
13563 - | self.test_body_structure_custom(svc)
|
14168 + | self.test_no_input_no_payload_custom(svc)
|
13564 14169 | }
|
13565 14170 |
|
13566 - | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) operation.
|
14171 + | /// Sets the [`TestNoInputNoPayload`](crate::operation_shape::TestNoInputNoPayload) operation.
|
13567 14172 | ///
|
13568 14173 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13569 14174 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13570 14175 | ///
|
13571 14176 | /// # Example
|
13572 14177 | ///
|
13573 14178 | /// ```no_run
|
13574 14179 | /// use rest_json::{RestJson, RestJsonConfig};
|
13575 14180 | ///
|
13576 14181 | /// use rest_json::{input, output, error};
|
13577 14182 | ///
|
13578 - | /// async fn handler(input: input::TestBodyStructureInput) -> Result<output::TestBodyStructureOutput, error::TestBodyStructureError> {
|
14183 + | /// async fn handler(input: input::TestNoInputNoPayloadInput) -> Result<output::TestNoInputNoPayloadOutput, error::TestNoInputNoPayloadError> {
|
13579 14184 | /// todo!()
|
13580 14185 | /// }
|
13581 14186 | ///
|
13582 14187 | /// let config = RestJsonConfig::builder().build();
|
13583 14188 | /// let svc = ::tower::util::service_fn(handler);
|
13584 14189 | /// let app = RestJson::builder(config)
|
13585 - | /// .test_body_structure_service(svc)
|
14190 + | /// .test_no_input_no_payload_service(svc)
|
13586 14191 | /// /* Set other handlers */
|
13587 14192 | /// .build()
|
13588 14193 | /// .unwrap();
|
13589 14194 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
13590 14195 | /// ```
|
13591 14196 | ///
|
13592 - | pub fn test_body_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
14197 + | pub fn test_no_input_no_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13593 14198 | where
|
13594 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::TestBodyStructure, ServiceExtractors>,
|
14199 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::TestNoInputNoPayload, ServiceExtractors>,
|
13595 14200 |
|
13596 14201 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
13597 14202 | RestJson<L>,
|
13598 - | crate::operation_shape::TestBodyStructure,
|
13599 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::TestBodyStructure, S>
|
14203 + | crate::operation_shape::TestNoInputNoPayload,
|
14204 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::TestNoInputNoPayload, S>
|
13600 14205 | >,
|
13601 14206 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
13602 14207 | RestJson<L>,
|
13603 - | crate::operation_shape::TestBodyStructure,
|
14208 + | crate::operation_shape::TestNoInputNoPayload,
|
13604 14209 | ModelPl::Output
|
13605 14210 | >,
|
13606 14211 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
13607 14212 | RestJson<L>,
|
13608 - | crate::operation_shape::TestBodyStructure,
|
14213 + | crate::operation_shape::TestNoInputNoPayload,
|
13609 14214 | <
|
13610 14215 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
13611 14216 | as ::aws_smithy_http_server::plugin::Plugin<
|
13612 14217 | RestJson<L>,
|
13613 - | crate::operation_shape::TestBodyStructure,
|
14218 + | crate::operation_shape::TestNoInputNoPayload,
|
13614 14219 | ModelPl::Output
|
13615 14220 | >
|
13616 14221 | >::Output
|
13617 14222 | >,
|
13618 14223 |
|
13619 14224 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
13620 14225 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
13621 14226 |
|
13622 14227 | {
|
13623 14228 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
13624 14229 | use ::aws_smithy_http_server::plugin::Plugin;
|
13625 - | let svc = crate::operation_shape::TestBodyStructure::from_service(service);
|
14230 + | let svc = crate::operation_shape::TestNoInputNoPayload::from_service(service);
|
13626 14231 | let svc = self.model_plugin.apply(svc);
|
13627 14232 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
13628 14233 | .apply(svc);
|
13629 14234 | let svc = self.http_plugin.apply(svc);
|
13630 - | self.test_body_structure_custom(svc)
|
14235 + | self.test_no_input_no_payload_custom(svc)
|
13631 14236 | }
|
13632 14237 |
|
13633 - | /// Sets the [`TestBodyStructure`](crate::operation_shape::TestBodyStructure) to a custom [`Service`](tower::Service).
|
14238 + | /// Sets the [`TestNoInputNoPayload`](crate::operation_shape::TestNoInputNoPayload) to a custom [`Service`](tower::Service).
|
13634 14239 | /// not constrained by the Smithy contract.
|
13635 - | fn test_body_structure_custom<S>(mut self, svc: S) -> Self
|
14240 + | fn test_no_input_no_payload_custom<S>(mut self, svc: S) -> Self
|
13636 14241 | where
|
13637 14242 | S: ::tower::Service<
|
13638 14243 | ::http::Request<Body>,
|
13639 14244 | Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
|
13640 14245 | Error = ::std::convert::Infallible,
|
13641 14246 | > + Clone
|
13642 14247 | + Send
|
13643 14248 | + 'static,
|
13644 14249 | S::Future: Send + 'static,
|
13645 14250 | {
|
13646 - | self.test_body_structure = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
14251 + | self.test_no_input_no_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13647 14252 | self
|
13648 14253 | }
|
13649 14254 |
|
13650 14255 | /// Sets the [`TestNoPayload`](crate::operation_shape::TestNoPayload) operation.
|
13651 14256 | ///
|
13652 14257 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
13653 14258 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
13654 14259 | ///
|
13655 14260 | /// # Example
|
13656 14261 | ///
|