1348 1360 | > + Clone
|
1349 1361 | + Send
|
1350 1362 | + 'static,
|
1351 1363 | S::Future: Send + 'static,
|
1352 1364 | {
|
1353 1365 | self.document_type_as_payload =
|
1354 1366 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1355 1367 | self
|
1356 1368 | }
|
1357 1369 |
|
1358 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1370 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) operation.
|
1359 1371 | ///
|
1360 1372 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1361 1373 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1362 1374 | ///
|
1363 1375 | /// # Example
|
1364 1376 | ///
|
1365 1377 | /// ```no_run
|
1366 1378 | /// use rest_json::{RestJson, RestJsonConfig};
|
1367 1379 | ///
|
1368 1380 | /// use rest_json::{input, output, error};
|
1369 1381 | ///
|
1370 - | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, error::EmptyInputAndEmptyOutputError> {
|
1382 + | /// async fn handler(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
|
1371 1383 | /// todo!()
|
1372 1384 | /// }
|
1373 1385 | ///
|
1374 1386 | /// let config = RestJsonConfig::builder().build();
|
1375 1387 | /// let app = RestJson::builder(config)
|
1376 - | /// .empty_input_and_empty_output(handler)
|
1388 + | /// .duplex_stream(handler)
|
1377 1389 | /// /* Set other handlers */
|
1378 1390 | /// .build()
|
1379 1391 | /// .unwrap();
|
1380 1392 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1381 1393 | /// ```
|
1382 1394 | ///
|
1383 - | pub fn empty_input_and_empty_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1395 + | pub fn duplex_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1384 1396 | where
|
1385 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerExtractors>,
|
1397 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::DuplexStream, HandlerExtractors>,
|
1386 1398 |
|
1387 1399 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1388 1400 | RestJson<L>,
|
1389 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1390 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerType>
|
1401 + | crate::operation_shape::DuplexStream,
|
1402 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::DuplexStream, HandlerType>
|
1391 1403 | >,
|
1392 1404 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1393 1405 | RestJson<L>,
|
1394 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1406 + | crate::operation_shape::DuplexStream,
|
1395 1407 | ModelPl::Output
|
1396 1408 | >,
|
1397 1409 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1398 1410 | RestJson<L>,
|
1399 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1411 + | crate::operation_shape::DuplexStream,
|
1400 1412 | <
|
1401 1413 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1402 1414 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1403 1415 | RestJson<L>,
|
1404 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1416 + | crate::operation_shape::DuplexStream,
|
1405 1417 | ModelPl::Output
|
1406 1418 | >
|
1407 1419 | >::Output
|
1408 1420 | >,
|
1409 1421 |
|
1410 1422 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1411 1423 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1412 1424 |
|
1413 1425 | {
|
1414 1426 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1415 1427 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1416 - | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_handler(handler);
|
1428 + | let svc = crate::operation_shape::DuplexStream::from_handler(handler);
|
1417 1429 | let svc = self.model_plugin.apply(svc);
|
1418 1430 | let svc =
|
1419 1431 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1420 1432 | .apply(svc);
|
1421 1433 | let svc = self.http_plugin.apply(svc);
|
1422 - | self.empty_input_and_empty_output_custom(svc)
|
1434 + | self.duplex_stream_custom(svc)
|
1423 1435 | }
|
1424 1436 |
|
1425 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1437 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) operation.
|
1426 1438 | ///
|
1427 1439 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1428 1440 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1429 1441 | ///
|
1430 1442 | /// # Example
|
1431 1443 | ///
|
1432 1444 | /// ```no_run
|
1433 1445 | /// use rest_json::{RestJson, RestJsonConfig};
|
1434 1446 | ///
|
1435 1447 | /// use rest_json::{input, output, error};
|
1436 1448 | ///
|
1437 - | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, error::EmptyInputAndEmptyOutputError> {
|
1449 + | /// async fn handler(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
|
1438 1450 | /// todo!()
|
1439 1451 | /// }
|
1440 1452 | ///
|
1441 1453 | /// let config = RestJsonConfig::builder().build();
|
1442 1454 | /// let svc = ::tower::util::service_fn(handler);
|
1443 1455 | /// let app = RestJson::builder(config)
|
1444 - | /// .empty_input_and_empty_output_service(svc)
|
1456 + | /// .duplex_stream_service(svc)
|
1445 1457 | /// /* Set other handlers */
|
1446 1458 | /// .build()
|
1447 1459 | /// .unwrap();
|
1448 1460 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1449 1461 | /// ```
|
1450 1462 | ///
|
1451 - | pub fn empty_input_and_empty_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1463 + | pub fn duplex_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1452 1464 | where
|
1453 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EmptyInputAndEmptyOutput, ServiceExtractors>,
|
1465 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::DuplexStream, ServiceExtractors>,
|
1454 1466 |
|
1455 1467 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1456 1468 | RestJson<L>,
|
1457 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1458 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EmptyInputAndEmptyOutput, S>
|
1469 + | crate::operation_shape::DuplexStream,
|
1470 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::DuplexStream, S>
|
1459 1471 | >,
|
1460 1472 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1461 1473 | RestJson<L>,
|
1462 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1474 + | crate::operation_shape::DuplexStream,
|
1463 1475 | ModelPl::Output
|
1464 1476 | >,
|
1465 1477 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1466 1478 | RestJson<L>,
|
1467 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1479 + | crate::operation_shape::DuplexStream,
|
1468 1480 | <
|
1469 1481 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1470 1482 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1471 1483 | RestJson<L>,
|
1472 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1484 + | crate::operation_shape::DuplexStream,
|
1473 1485 | ModelPl::Output
|
1474 1486 | >
|
1475 1487 | >::Output
|
1476 1488 | >,
|
1477 1489 |
|
1478 1490 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1479 1491 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1480 1492 |
|
1481 1493 | {
|
1482 1494 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1483 1495 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1484 - | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_service(service);
|
1496 + | let svc = crate::operation_shape::DuplexStream::from_service(service);
|
1485 1497 | let svc = self.model_plugin.apply(svc);
|
1486 1498 | let svc =
|
1487 1499 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1488 1500 | .apply(svc);
|
1489 1501 | let svc = self.http_plugin.apply(svc);
|
1490 - | self.empty_input_and_empty_output_custom(svc)
|
1502 + | self.duplex_stream_custom(svc)
|
1491 1503 | }
|
1492 1504 |
|
1493 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) to a custom [`Service`](tower::Service).
|
1505 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) to a custom [`Service`](tower::Service).
|
1494 1506 | /// not constrained by the Smithy contract.
|
1495 - | fn empty_input_and_empty_output_custom<S>(mut self, svc: S) -> Self
|
1507 + | fn duplex_stream_custom<S>(mut self, svc: S) -> Self
|
1496 1508 | where
|
1497 1509 | S: ::tower::Service<
|
1498 1510 | ::http::Request<Body>,
|
1499 1511 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
1500 1512 | Error = ::std::convert::Infallible,
|
1501 1513 | > + Clone
|
1502 1514 | + Send
|
1503 1515 | + 'static,
|
1504 1516 | S::Future: Send + 'static,
|
1505 1517 | {
|
1506 - | self.empty_input_and_empty_output =
|
1507 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1518 + | self.duplex_stream = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1508 1519 | self
|
1509 1520 | }
|
1510 1521 |
|
1511 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1522 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) operation.
|
1512 1523 | ///
|
1513 1524 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1514 1525 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1515 1526 | ///
|
1516 1527 | /// # Example
|
1517 1528 | ///
|
1518 1529 | /// ```no_run
|
1519 1530 | /// use rest_json::{RestJson, RestJsonConfig};
|
1520 1531 | ///
|
1521 1532 | /// use rest_json::{input, output, error};
|
1522 1533 | ///
|
1523 - | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, error::EndpointOperationError> {
|
1534 + | /// async fn handler(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
|
1524 1535 | /// todo!()
|
1525 1536 | /// }
|
1526 1537 | ///
|
1527 1538 | /// let config = RestJsonConfig::builder().build();
|
1528 1539 | /// let app = RestJson::builder(config)
|
1529 - | /// .endpoint_operation(handler)
|
1540 + | /// .duplex_stream_with_distinct_streams(handler)
|
1530 1541 | /// /* Set other handlers */
|
1531 1542 | /// .build()
|
1532 1543 | /// .unwrap();
|
1533 1544 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1534 1545 | /// ```
|
1535 1546 | ///
|
1536 - | pub fn endpoint_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1547 + | pub fn duplex_stream_with_distinct_streams<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1537 1548 | where
|
1538 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EndpointOperation, HandlerExtractors>,
|
1549 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::DuplexStreamWithDistinctStreams, HandlerExtractors>,
|
1539 1550 |
|
1540 1551 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1541 1552 | RestJson<L>,
|
1542 - | crate::operation_shape::EndpointOperation,
|
1543 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EndpointOperation, HandlerType>
|
1553 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1554 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::DuplexStreamWithDistinctStreams, HandlerType>
|
1544 1555 | >,
|
1545 1556 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1546 1557 | RestJson<L>,
|
1547 - | crate::operation_shape::EndpointOperation,
|
1558 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1548 1559 | ModelPl::Output
|
1549 1560 | >,
|
1550 1561 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1551 1562 | RestJson<L>,
|
1552 - | crate::operation_shape::EndpointOperation,
|
1563 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1553 1564 | <
|
1554 1565 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1555 1566 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1556 1567 | RestJson<L>,
|
1557 - | crate::operation_shape::EndpointOperation,
|
1568 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1558 1569 | ModelPl::Output
|
1559 1570 | >
|
1560 1571 | >::Output
|
1561 1572 | >,
|
1562 1573 |
|
1563 1574 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1564 1575 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1565 1576 |
|
1566 1577 | {
|
1567 1578 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1568 1579 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1569 - | let svc = crate::operation_shape::EndpointOperation::from_handler(handler);
|
1580 + | let svc = crate::operation_shape::DuplexStreamWithDistinctStreams::from_handler(handler);
|
1570 1581 | let svc = self.model_plugin.apply(svc);
|
1571 1582 | let svc =
|
1572 1583 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1573 1584 | .apply(svc);
|
1574 1585 | let svc = self.http_plugin.apply(svc);
|
1575 - | self.endpoint_operation_custom(svc)
|
1586 + | self.duplex_stream_with_distinct_streams_custom(svc)
|
1576 1587 | }
|
1577 1588 |
|
1578 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1589 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) operation.
|
1579 1590 | ///
|
1580 1591 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1581 1592 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1582 1593 | ///
|
1583 1594 | /// # Example
|
1584 1595 | ///
|
1585 1596 | /// ```no_run
|
1586 1597 | /// use rest_json::{RestJson, RestJsonConfig};
|
1587 1598 | ///
|
1588 1599 | /// use rest_json::{input, output, error};
|
1589 1600 | ///
|
1590 - | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, error::EndpointOperationError> {
|
1601 + | /// async fn handler(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
|
1591 1602 | /// todo!()
|
1592 1603 | /// }
|
1593 1604 | ///
|
1594 1605 | /// let config = RestJsonConfig::builder().build();
|
1595 1606 | /// let svc = ::tower::util::service_fn(handler);
|
1596 1607 | /// let app = RestJson::builder(config)
|
1597 - | /// .endpoint_operation_service(svc)
|
1608 + | /// .duplex_stream_with_distinct_streams_service(svc)
|
1598 1609 | /// /* Set other handlers */
|
1599 1610 | /// .build()
|
1600 1611 | /// .unwrap();
|
1601 1612 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1602 1613 | /// ```
|
1603 1614 | ///
|
1604 - | pub fn endpoint_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1615 + | pub fn duplex_stream_with_distinct_streams_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1605 1616 | where
|
1606 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EndpointOperation, ServiceExtractors>,
|
1617 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::DuplexStreamWithDistinctStreams, ServiceExtractors>,
|
1607 1618 |
|
1608 1619 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1609 1620 | RestJson<L>,
|
1610 - | crate::operation_shape::EndpointOperation,
|
1611 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EndpointOperation, S>
|
1621 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1622 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::DuplexStreamWithDistinctStreams, S>
|
1612 1623 | >,
|
1613 1624 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1614 1625 | RestJson<L>,
|
1615 - | crate::operation_shape::EndpointOperation,
|
1626 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1616 1627 | ModelPl::Output
|
1617 1628 | >,
|
1618 1629 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1619 1630 | RestJson<L>,
|
1620 - | crate::operation_shape::EndpointOperation,
|
1631 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1621 1632 | <
|
1622 1633 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1623 1634 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1624 1635 | RestJson<L>,
|
1625 - | crate::operation_shape::EndpointOperation,
|
1636 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1626 1637 | ModelPl::Output
|
1627 1638 | >
|
1628 1639 | >::Output
|
1629 1640 | >,
|
1630 1641 |
|
1631 1642 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1632 1643 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1633 1644 |
|
1634 1645 | {
|
1635 1646 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1636 1647 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1637 - | let svc = crate::operation_shape::EndpointOperation::from_service(service);
|
1648 + | let svc = crate::operation_shape::DuplexStreamWithDistinctStreams::from_service(service);
|
1638 1649 | let svc = self.model_plugin.apply(svc);
|
1639 1650 | let svc =
|
1640 1651 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1641 1652 | .apply(svc);
|
1642 1653 | let svc = self.http_plugin.apply(svc);
|
1643 - | self.endpoint_operation_custom(svc)
|
1654 + | self.duplex_stream_with_distinct_streams_custom(svc)
|
1644 1655 | }
|
1645 1656 |
|
1646 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) to a custom [`Service`](tower::Service).
|
1657 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) to a custom [`Service`](tower::Service).
|
1647 1658 | /// not constrained by the Smithy contract.
|
1648 - | fn endpoint_operation_custom<S>(mut self, svc: S) -> Self
|
1659 + | fn duplex_stream_with_distinct_streams_custom<S>(mut self, svc: S) -> Self
|
1649 1660 | where
|
1650 1661 | S: ::tower::Service<
|
1651 1662 | ::http::Request<Body>,
|
1652 1663 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
1653 1664 | Error = ::std::convert::Infallible,
|
1654 1665 | > + Clone
|
1655 1666 | + Send
|
1656 1667 | + 'static,
|
1657 1668 | S::Future: Send + 'static,
|
1658 1669 | {
|
1659 - | self.endpoint_operation = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1670 + | self.duplex_stream_with_distinct_streams =
|
1671 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1660 1672 | self
|
1661 1673 | }
|
1662 1674 |
|
1663 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
1675 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) operation.
|
1664 1676 | ///
|
1665 1677 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1666 1678 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1667 1679 | ///
|
1668 1680 | /// # Example
|
1669 1681 | ///
|
1670 1682 | /// ```no_run
|
1671 1683 | /// use rest_json::{RestJson, RestJsonConfig};
|
1672 1684 | ///
|
1673 1685 | /// use rest_json::{input, output, error};
|
1674 1686 | ///
|
1675 - | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
1687 + | /// async fn handler(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
|
1676 1688 | /// todo!()
|
1677 1689 | /// }
|
1678 1690 | ///
|
1679 1691 | /// let config = RestJsonConfig::builder().build();
|
1680 1692 | /// let app = RestJson::builder(config)
|
1681 - | /// .endpoint_with_host_label_operation(handler)
|
1693 + | /// .duplex_stream_with_initial_messages(handler)
|
1682 1694 | /// /* Set other handlers */
|
1683 1695 | /// .build()
|
1684 1696 | /// .unwrap();
|
1685 1697 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1686 1698 | /// ```
|
1687 1699 | ///
|
1688 - | pub fn endpoint_with_host_label_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1700 + | pub fn duplex_stream_with_initial_messages<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1689 1701 | where
|
1690 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EndpointWithHostLabelOperation, HandlerExtractors>,
|
1702 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::DuplexStreamWithInitialMessages, HandlerExtractors>,
|
1691 1703 |
|
1692 1704 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1693 1705 | RestJson<L>,
|
1694 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1695 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EndpointWithHostLabelOperation, HandlerType>
|
1706 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1707 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::DuplexStreamWithInitialMessages, HandlerType>
|
1696 1708 | >,
|
1697 1709 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1698 1710 | RestJson<L>,
|
1699 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1711 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1700 1712 | ModelPl::Output
|
1701 1713 | >,
|
1702 1714 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1703 1715 | RestJson<L>,
|
1704 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1716 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1705 1717 | <
|
1706 1718 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1707 1719 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1708 1720 | RestJson<L>,
|
1709 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1721 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1710 1722 | ModelPl::Output
|
1711 1723 | >
|
1712 1724 | >::Output
|
1713 1725 | >,
|
1714 1726 |
|
1715 1727 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1716 1728 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1717 1729 |
|
1718 1730 | {
|
1719 1731 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1720 1732 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1721 - | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_handler(handler);
|
1733 + | let svc = crate::operation_shape::DuplexStreamWithInitialMessages::from_handler(handler);
|
1722 1734 | let svc = self.model_plugin.apply(svc);
|
1723 1735 | let svc =
|
1724 1736 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1725 1737 | .apply(svc);
|
1726 1738 | let svc = self.http_plugin.apply(svc);
|
1727 - | self.endpoint_with_host_label_operation_custom(svc)
|
1739 + | self.duplex_stream_with_initial_messages_custom(svc)
|
1728 1740 | }
|
1729 1741 |
|
1730 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
1742 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) operation.
|
1731 1743 | ///
|
1732 1744 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1733 1745 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1734 1746 | ///
|
1735 1747 | /// # Example
|
1736 1748 | ///
|
1737 1749 | /// ```no_run
|
1738 1750 | /// use rest_json::{RestJson, RestJsonConfig};
|
1739 1751 | ///
|
1740 1752 | /// use rest_json::{input, output, error};
|
1741 1753 | ///
|
1742 - | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
1754 + | /// async fn handler(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
|
1743 1755 | /// todo!()
|
1744 1756 | /// }
|
1745 1757 | ///
|
1746 1758 | /// let config = RestJsonConfig::builder().build();
|
1747 1759 | /// let svc = ::tower::util::service_fn(handler);
|
1748 1760 | /// let app = RestJson::builder(config)
|
1749 - | /// .endpoint_with_host_label_operation_service(svc)
|
1761 + | /// .duplex_stream_with_initial_messages_service(svc)
|
1750 1762 | /// /* Set other handlers */
|
1751 1763 | /// .build()
|
1752 1764 | /// .unwrap();
|
1753 1765 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1754 1766 | /// ```
|
1755 1767 | ///
|
1756 - | pub fn endpoint_with_host_label_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1768 + | pub fn duplex_stream_with_initial_messages_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1757 1769 | where
|
1758 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EndpointWithHostLabelOperation, ServiceExtractors>,
|
1770 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::DuplexStreamWithInitialMessages, ServiceExtractors>,
|
1759 1771 |
|
1760 1772 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1761 1773 | RestJson<L>,
|
1762 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1763 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EndpointWithHostLabelOperation, S>
|
1774 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1775 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::DuplexStreamWithInitialMessages, S>
|
1764 1776 | >,
|
1765 1777 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1766 1778 | RestJson<L>,
|
1767 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1779 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1768 1780 | ModelPl::Output
|
1769 1781 | >,
|
1770 1782 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1771 1783 | RestJson<L>,
|
1772 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1784 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1773 1785 | <
|
1774 1786 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1775 1787 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1776 1788 | RestJson<L>,
|
1777 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1789 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1778 1790 | ModelPl::Output
|
1779 1791 | >
|
1780 1792 | >::Output
|
1781 1793 | >,
|
1782 1794 |
|
1783 1795 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1784 1796 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1785 1797 |
|
1786 1798 | {
|
1787 1799 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1788 1800 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1789 - | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_service(service);
|
1801 + | let svc = crate::operation_shape::DuplexStreamWithInitialMessages::from_service(service);
|
1790 1802 | let svc = self.model_plugin.apply(svc);
|
1791 1803 | let svc =
|
1792 1804 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1793 1805 | .apply(svc);
|
1794 1806 | let svc = self.http_plugin.apply(svc);
|
1795 - | self.endpoint_with_host_label_operation_custom(svc)
|
1807 + | self.duplex_stream_with_initial_messages_custom(svc)
|
1796 1808 | }
|
1797 1809 |
|
1798 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) to a custom [`Service`](tower::Service).
|
1810 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) to a custom [`Service`](tower::Service).
|
1799 1811 | /// not constrained by the Smithy contract.
|
1800 - | fn endpoint_with_host_label_operation_custom<S>(mut self, svc: S) -> Self
|
1812 + | fn duplex_stream_with_initial_messages_custom<S>(mut self, svc: S) -> Self
|
1801 1813 | where
|
1802 1814 | S: ::tower::Service<
|
1803 1815 | ::http::Request<Body>,
|
1804 1816 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
1805 1817 | Error = ::std::convert::Infallible,
|
1806 1818 | > + Clone
|
1807 1819 | + Send
|
1808 1820 | + 'static,
|
1809 1821 | S::Future: Send + 'static,
|
1810 1822 | {
|
1811 - | self.endpoint_with_host_label_operation =
|
1823 + | self.duplex_stream_with_initial_messages =
|
1812 1824 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1813 1825 | self
|
1814 1826 | }
|
1815 1827 |
|
1816 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
1828 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1817 1829 | ///
|
1818 1830 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1819 1831 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1820 1832 | ///
|
1821 1833 | /// # Example
|
1822 1834 | ///
|
1823 1835 | /// ```no_run
|
1824 1836 | /// use rest_json::{RestJson, RestJsonConfig};
|
1825 1837 | ///
|
1826 1838 | /// use rest_json::{input, output, error};
|
1827 1839 | ///
|
1828 - | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, error::FractionalSecondsError> {
|
1840 + | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, error::EmptyInputAndEmptyOutputError> {
|
1829 1841 | /// todo!()
|
1830 1842 | /// }
|
1831 1843 | ///
|
1832 1844 | /// let config = RestJsonConfig::builder().build();
|
1833 1845 | /// let app = RestJson::builder(config)
|
1834 - | /// .fractional_seconds(handler)
|
1846 + | /// .empty_input_and_empty_output(handler)
|
1835 1847 | /// /* Set other handlers */
|
1836 1848 | /// .build()
|
1837 1849 | /// .unwrap();
|
1838 1850 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1839 1851 | /// ```
|
1840 1852 | ///
|
1841 - | pub fn fractional_seconds<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1853 + | pub fn empty_input_and_empty_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1842 1854 | where
|
1843 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::FractionalSeconds, HandlerExtractors>,
|
1855 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerExtractors>,
|
1844 1856 |
|
1845 1857 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1846 1858 | RestJson<L>,
|
1847 - | crate::operation_shape::FractionalSeconds,
|
1848 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::FractionalSeconds, HandlerType>
|
1859 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1860 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerType>
|
1849 1861 | >,
|
1850 1862 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1851 1863 | RestJson<L>,
|
1852 - | crate::operation_shape::FractionalSeconds,
|
1864 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1853 1865 | ModelPl::Output
|
1854 1866 | >,
|
1855 1867 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1856 1868 | RestJson<L>,
|
1857 - | crate::operation_shape::FractionalSeconds,
|
1869 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1858 1870 | <
|
1859 1871 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1860 1872 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1861 1873 | RestJson<L>,
|
1862 - | crate::operation_shape::FractionalSeconds,
|
1874 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1863 1875 | ModelPl::Output
|
1864 1876 | >
|
1865 1877 | >::Output
|
1866 1878 | >,
|
1867 1879 |
|
1868 1880 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1869 1881 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1870 1882 |
|
1871 1883 | {
|
1872 1884 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1873 1885 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1874 - | let svc = crate::operation_shape::FractionalSeconds::from_handler(handler);
|
1886 + | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_handler(handler);
|
1875 1887 | let svc = self.model_plugin.apply(svc);
|
1876 1888 | let svc =
|
1877 1889 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1878 1890 | .apply(svc);
|
1879 1891 | let svc = self.http_plugin.apply(svc);
|
1880 - | self.fractional_seconds_custom(svc)
|
1892 + | self.empty_input_and_empty_output_custom(svc)
|
1881 1893 | }
|
1882 1894 |
|
1883 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
1895 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1884 1896 | ///
|
1885 1897 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1886 1898 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1887 1899 | ///
|
1888 1900 | /// # Example
|
1889 1901 | ///
|
1890 1902 | /// ```no_run
|
1891 1903 | /// use rest_json::{RestJson, RestJsonConfig};
|
1892 1904 | ///
|
1893 1905 | /// use rest_json::{input, output, error};
|
1894 1906 | ///
|
1895 - | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, error::FractionalSecondsError> {
|
1907 + | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, error::EmptyInputAndEmptyOutputError> {
|
1896 1908 | /// todo!()
|
1897 1909 | /// }
|
1898 1910 | ///
|
1899 1911 | /// let config = RestJsonConfig::builder().build();
|
1900 1912 | /// let svc = ::tower::util::service_fn(handler);
|
1901 1913 | /// let app = RestJson::builder(config)
|
1902 - | /// .fractional_seconds_service(svc)
|
1914 + | /// .empty_input_and_empty_output_service(svc)
|
1903 1915 | /// /* Set other handlers */
|
1904 1916 | /// .build()
|
1905 1917 | /// .unwrap();
|
1906 1918 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1907 1919 | /// ```
|
1908 1920 | ///
|
1909 - | pub fn fractional_seconds_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1921 + | pub fn empty_input_and_empty_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1910 1922 | where
|
1911 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::FractionalSeconds, ServiceExtractors>,
|
1923 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EmptyInputAndEmptyOutput, ServiceExtractors>,
|
1912 1924 |
|
1913 1925 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1914 1926 | RestJson<L>,
|
1915 - | crate::operation_shape::FractionalSeconds,
|
1916 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::FractionalSeconds, S>
|
1927 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1928 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EmptyInputAndEmptyOutput, S>
|
1917 1929 | >,
|
1918 1930 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1919 1931 | RestJson<L>,
|
1920 - | crate::operation_shape::FractionalSeconds,
|
1932 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1921 1933 | ModelPl::Output
|
1922 1934 | >,
|
1923 1935 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1924 1936 | RestJson<L>,
|
1925 - | crate::operation_shape::FractionalSeconds,
|
1937 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1926 1938 | <
|
1927 1939 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1928 1940 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1929 1941 | RestJson<L>,
|
1930 - | crate::operation_shape::FractionalSeconds,
|
1942 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1931 1943 | ModelPl::Output
|
1932 1944 | >
|
1933 1945 | >::Output
|
1934 1946 | >,
|
1935 1947 |
|
1936 1948 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1937 1949 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
1938 1950 |
|
1939 1951 | {
|
1940 1952 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
1941 1953 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
1942 - | let svc = crate::operation_shape::FractionalSeconds::from_service(service);
|
1954 + | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_service(service);
|
1943 1955 | let svc = self.model_plugin.apply(svc);
|
1944 1956 | let svc =
|
1945 1957 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1946 1958 | .apply(svc);
|
1947 1959 | let svc = self.http_plugin.apply(svc);
|
1948 - | self.fractional_seconds_custom(svc)
|
1960 + | self.empty_input_and_empty_output_custom(svc)
|
1949 1961 | }
|
1950 1962 |
|
1951 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) to a custom [`Service`](tower::Service).
|
1963 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) to a custom [`Service`](tower::Service).
|
1952 1964 | /// not constrained by the Smithy contract.
|
1953 - | fn fractional_seconds_custom<S>(mut self, svc: S) -> Self
|
1965 + | fn empty_input_and_empty_output_custom<S>(mut self, svc: S) -> Self
|
1954 1966 | where
|
1955 1967 | S: ::tower::Service<
|
1956 1968 | ::http::Request<Body>,
|
1957 1969 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
1958 1970 | Error = ::std::convert::Infallible,
|
1959 1971 | > + Clone
|
1960 1972 | + Send
|
1961 1973 | + 'static,
|
1962 1974 | S::Future: Send + 'static,
|
1963 1975 | {
|
1964 - | self.fractional_seconds = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1976 + | self.empty_input_and_empty_output =
|
1977 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
1965 1978 | self
|
1966 1979 | }
|
1967 1980 |
|
1968 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
1981 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1969 1982 | ///
|
1970 1983 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
1971 1984 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
1972 1985 | ///
|
1973 1986 | /// # Example
|
1974 1987 | ///
|
1975 1988 | /// ```no_run
|
1976 1989 | /// use rest_json::{RestJson, RestJsonConfig};
|
1977 1990 | ///
|
1978 1991 | /// use rest_json::{input, output, error};
|
1979 1992 | ///
|
1980 - | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
1993 + | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, error::EndpointOperationError> {
|
1981 1994 | /// todo!()
|
1982 1995 | /// }
|
1983 1996 | ///
|
1984 1997 | /// let config = RestJsonConfig::builder().build();
|
1985 1998 | /// let app = RestJson::builder(config)
|
1986 - | /// .greeting_with_errors(handler)
|
1999 + | /// .endpoint_operation(handler)
|
1987 2000 | /// /* Set other handlers */
|
1988 2001 | /// .build()
|
1989 2002 | /// .unwrap();
|
1990 2003 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1991 2004 | /// ```
|
1992 2005 | ///
|
1993 - | pub fn greeting_with_errors<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2006 + | pub fn endpoint_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1994 2007 | where
|
1995 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::GreetingWithErrors, HandlerExtractors>,
|
2008 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EndpointOperation, HandlerExtractors>,
|
1996 2009 |
|
1997 2010 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
1998 2011 | RestJson<L>,
|
1999 - | crate::operation_shape::GreetingWithErrors,
|
2000 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::GreetingWithErrors, HandlerType>
|
2012 + | crate::operation_shape::EndpointOperation,
|
2013 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EndpointOperation, HandlerType>
|
2001 2014 | >,
|
2002 2015 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2003 2016 | RestJson<L>,
|
2004 - | crate::operation_shape::GreetingWithErrors,
|
2017 + | crate::operation_shape::EndpointOperation,
|
2005 2018 | ModelPl::Output
|
2006 2019 | >,
|
2007 2020 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2008 2021 | RestJson<L>,
|
2009 - | crate::operation_shape::GreetingWithErrors,
|
2022 + | crate::operation_shape::EndpointOperation,
|
2010 2023 | <
|
2011 2024 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2012 2025 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2013 2026 | RestJson<L>,
|
2014 - | crate::operation_shape::GreetingWithErrors,
|
2027 + | crate::operation_shape::EndpointOperation,
|
2015 2028 | ModelPl::Output
|
2016 2029 | >
|
2017 2030 | >::Output
|
2018 2031 | >,
|
2019 2032 |
|
2020 2033 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2021 2034 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2022 2035 |
|
2023 2036 | {
|
2024 2037 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2025 2038 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2026 - | let svc = crate::operation_shape::GreetingWithErrors::from_handler(handler);
|
2039 + | let svc = crate::operation_shape::EndpointOperation::from_handler(handler);
|
2027 2040 | let svc = self.model_plugin.apply(svc);
|
2028 2041 | let svc =
|
2029 2042 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2030 2043 | .apply(svc);
|
2031 2044 | let svc = self.http_plugin.apply(svc);
|
2032 - | self.greeting_with_errors_custom(svc)
|
2045 + | self.endpoint_operation_custom(svc)
|
2033 2046 | }
|
2034 2047 |
|
2035 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
2048 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
2036 2049 | ///
|
2037 2050 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2038 2051 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2039 2052 | ///
|
2040 2053 | /// # Example
|
2041 2054 | ///
|
2042 2055 | /// ```no_run
|
2043 2056 | /// use rest_json::{RestJson, RestJsonConfig};
|
2044 2057 | ///
|
2045 2058 | /// use rest_json::{input, output, error};
|
2046 2059 | ///
|
2047 - | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2060 + | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, error::EndpointOperationError> {
|
2048 2061 | /// todo!()
|
2049 2062 | /// }
|
2050 2063 | ///
|
2051 2064 | /// let config = RestJsonConfig::builder().build();
|
2052 2065 | /// let svc = ::tower::util::service_fn(handler);
|
2053 2066 | /// let app = RestJson::builder(config)
|
2054 - | /// .greeting_with_errors_service(svc)
|
2067 + | /// .endpoint_operation_service(svc)
|
2055 2068 | /// /* Set other handlers */
|
2056 2069 | /// .build()
|
2057 2070 | /// .unwrap();
|
2058 2071 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2059 2072 | /// ```
|
2060 2073 | ///
|
2061 - | pub fn greeting_with_errors_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2074 + | pub fn endpoint_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2062 2075 | where
|
2063 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::GreetingWithErrors, ServiceExtractors>,
|
2076 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EndpointOperation, ServiceExtractors>,
|
2064 2077 |
|
2065 2078 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2066 2079 | RestJson<L>,
|
2067 - | crate::operation_shape::GreetingWithErrors,
|
2068 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::GreetingWithErrors, S>
|
2080 + | crate::operation_shape::EndpointOperation,
|
2081 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EndpointOperation, S>
|
2069 2082 | >,
|
2070 2083 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2071 2084 | RestJson<L>,
|
2072 - | crate::operation_shape::GreetingWithErrors,
|
2085 + | crate::operation_shape::EndpointOperation,
|
2073 2086 | ModelPl::Output
|
2074 2087 | >,
|
2075 2088 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2076 2089 | RestJson<L>,
|
2077 - | crate::operation_shape::GreetingWithErrors,
|
2090 + | crate::operation_shape::EndpointOperation,
|
2078 2091 | <
|
2079 2092 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2080 2093 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2081 2094 | RestJson<L>,
|
2082 - | crate::operation_shape::GreetingWithErrors,
|
2095 + | crate::operation_shape::EndpointOperation,
|
2083 2096 | ModelPl::Output
|
2084 2097 | >
|
2085 2098 | >::Output
|
2086 2099 | >,
|
2087 2100 |
|
2088 2101 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2089 2102 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2090 2103 |
|
2091 2104 | {
|
2092 2105 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2093 2106 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2094 - | let svc = crate::operation_shape::GreetingWithErrors::from_service(service);
|
2107 + | let svc = crate::operation_shape::EndpointOperation::from_service(service);
|
2095 2108 | let svc = self.model_plugin.apply(svc);
|
2096 2109 | let svc =
|
2097 2110 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2098 2111 | .apply(svc);
|
2099 2112 | let svc = self.http_plugin.apply(svc);
|
2100 - | self.greeting_with_errors_custom(svc)
|
2113 + | self.endpoint_operation_custom(svc)
|
2101 2114 | }
|
2102 2115 |
|
2103 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) to a custom [`Service`](tower::Service).
|
2116 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) to a custom [`Service`](tower::Service).
|
2104 2117 | /// not constrained by the Smithy contract.
|
2105 - | fn greeting_with_errors_custom<S>(mut self, svc: S) -> Self
|
2118 + | fn endpoint_operation_custom<S>(mut self, svc: S) -> Self
|
2106 2119 | where
|
2107 2120 | S: ::tower::Service<
|
2108 2121 | ::http::Request<Body>,
|
2109 2122 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2110 2123 | Error = ::std::convert::Infallible,
|
2111 2124 | > + Clone
|
2112 2125 | + Send
|
2113 2126 | + 'static,
|
2114 2127 | S::Future: Send + 'static,
|
2115 2128 | {
|
2116 - | self.greeting_with_errors = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2129 + | self.endpoint_operation = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2117 2130 | self
|
2118 2131 | }
|
2119 2132 |
|
2120 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2133 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
2121 2134 | ///
|
2122 2135 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2123 2136 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2124 2137 | ///
|
2125 2138 | /// # Example
|
2126 2139 | ///
|
2127 2140 | /// ```no_run
|
2128 2141 | /// use rest_json::{RestJson, RestJsonConfig};
|
2129 2142 | ///
|
2130 2143 | /// use rest_json::{input, output, error};
|
2131 2144 | ///
|
2132 - | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, error::HostWithPathOperationError> {
|
2145 + | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
2133 2146 | /// todo!()
|
2134 2147 | /// }
|
2135 2148 | ///
|
2136 2149 | /// let config = RestJsonConfig::builder().build();
|
2137 2150 | /// let app = RestJson::builder(config)
|
2138 - | /// .host_with_path_operation(handler)
|
2151 + | /// .endpoint_with_host_label_operation(handler)
|
2139 2152 | /// /* Set other handlers */
|
2140 2153 | /// .build()
|
2141 2154 | /// .unwrap();
|
2142 2155 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2143 2156 | /// ```
|
2144 2157 | ///
|
2145 - | pub fn host_with_path_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2158 + | pub fn endpoint_with_host_label_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2146 2159 | where
|
2147 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HostWithPathOperation, HandlerExtractors>,
|
2160 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::EndpointWithHostLabelOperation, HandlerExtractors>,
|
2148 2161 |
|
2149 2162 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2150 2163 | RestJson<L>,
|
2151 - | crate::operation_shape::HostWithPathOperation,
|
2152 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HostWithPathOperation, HandlerType>
|
2164 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2165 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::EndpointWithHostLabelOperation, HandlerType>
|
2153 2166 | >,
|
2154 2167 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2155 2168 | RestJson<L>,
|
2156 - | crate::operation_shape::HostWithPathOperation,
|
2169 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2157 2170 | ModelPl::Output
|
2158 2171 | >,
|
2159 2172 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2160 2173 | RestJson<L>,
|
2161 - | crate::operation_shape::HostWithPathOperation,
|
2174 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2162 2175 | <
|
2163 2176 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2164 2177 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2165 2178 | RestJson<L>,
|
2166 - | crate::operation_shape::HostWithPathOperation,
|
2179 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2167 2180 | ModelPl::Output
|
2168 2181 | >
|
2169 2182 | >::Output
|
2170 2183 | >,
|
2171 2184 |
|
2172 2185 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2173 2186 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2174 2187 |
|
2175 2188 | {
|
2176 2189 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2177 2190 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2178 - | let svc = crate::operation_shape::HostWithPathOperation::from_handler(handler);
|
2191 + | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_handler(handler);
|
2179 2192 | let svc = self.model_plugin.apply(svc);
|
2180 2193 | let svc =
|
2181 2194 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2182 2195 | .apply(svc);
|
2183 2196 | let svc = self.http_plugin.apply(svc);
|
2184 - | self.host_with_path_operation_custom(svc)
|
2197 + | self.endpoint_with_host_label_operation_custom(svc)
|
2185 2198 | }
|
2186 2199 |
|
2187 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2200 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
2188 2201 | ///
|
2189 2202 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2190 2203 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2191 2204 | ///
|
2192 2205 | /// # Example
|
2193 2206 | ///
|
2194 2207 | /// ```no_run
|
2195 2208 | /// use rest_json::{RestJson, RestJsonConfig};
|
2196 2209 | ///
|
2197 2210 | /// use rest_json::{input, output, error};
|
2198 2211 | ///
|
2199 - | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, error::HostWithPathOperationError> {
|
2212 + | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
2200 2213 | /// todo!()
|
2201 2214 | /// }
|
2202 2215 | ///
|
2203 2216 | /// let config = RestJsonConfig::builder().build();
|
2204 2217 | /// let svc = ::tower::util::service_fn(handler);
|
2205 2218 | /// let app = RestJson::builder(config)
|
2206 - | /// .host_with_path_operation_service(svc)
|
2219 + | /// .endpoint_with_host_label_operation_service(svc)
|
2207 2220 | /// /* Set other handlers */
|
2208 2221 | /// .build()
|
2209 2222 | /// .unwrap();
|
2210 2223 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2211 2224 | /// ```
|
2212 2225 | ///
|
2213 - | pub fn host_with_path_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2226 + | pub fn endpoint_with_host_label_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2214 2227 | where
|
2215 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HostWithPathOperation, ServiceExtractors>,
|
2228 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::EndpointWithHostLabelOperation, ServiceExtractors>,
|
2216 2229 |
|
2217 2230 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2218 2231 | RestJson<L>,
|
2219 - | crate::operation_shape::HostWithPathOperation,
|
2220 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HostWithPathOperation, S>
|
2232 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2233 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::EndpointWithHostLabelOperation, S>
|
2221 2234 | >,
|
2222 2235 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2223 2236 | RestJson<L>,
|
2224 - | crate::operation_shape::HostWithPathOperation,
|
2237 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2225 2238 | ModelPl::Output
|
2226 2239 | >,
|
2227 2240 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2228 2241 | RestJson<L>,
|
2229 - | crate::operation_shape::HostWithPathOperation,
|
2242 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2230 2243 | <
|
2231 2244 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2232 2245 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2233 2246 | RestJson<L>,
|
2234 - | crate::operation_shape::HostWithPathOperation,
|
2247 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2235 2248 | ModelPl::Output
|
2236 2249 | >
|
2237 2250 | >::Output
|
2238 2251 | >,
|
2239 2252 |
|
2240 2253 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2241 2254 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2242 2255 |
|
2243 2256 | {
|
2244 2257 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2245 2258 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2246 - | let svc = crate::operation_shape::HostWithPathOperation::from_service(service);
|
2259 + | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_service(service);
|
2247 2260 | let svc = self.model_plugin.apply(svc);
|
2248 2261 | let svc =
|
2249 2262 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2250 2263 | .apply(svc);
|
2251 2264 | let svc = self.http_plugin.apply(svc);
|
2252 - | self.host_with_path_operation_custom(svc)
|
2265 + | self.endpoint_with_host_label_operation_custom(svc)
|
2253 2266 | }
|
2254 2267 |
|
2255 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) to a custom [`Service`](tower::Service).
|
2268 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) to a custom [`Service`](tower::Service).
|
2256 2269 | /// not constrained by the Smithy contract.
|
2257 - | fn host_with_path_operation_custom<S>(mut self, svc: S) -> Self
|
2270 + | fn endpoint_with_host_label_operation_custom<S>(mut self, svc: S) -> Self
|
2258 2271 | where
|
2259 2272 | S: ::tower::Service<
|
2260 2273 | ::http::Request<Body>,
|
2261 2274 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2262 2275 | Error = ::std::convert::Infallible,
|
2263 2276 | > + Clone
|
2264 2277 | + Send
|
2265 2278 | + 'static,
|
2266 2279 | S::Future: Send + 'static,
|
2267 2280 | {
|
2268 - | self.host_with_path_operation =
|
2281 + | self.endpoint_with_host_label_operation =
|
2269 2282 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2270 2283 | self
|
2271 2284 | }
|
2272 2285 |
|
2273 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2286 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
2274 2287 | ///
|
2275 2288 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2276 2289 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2277 2290 | ///
|
2278 2291 | /// # Example
|
2279 2292 | ///
|
2280 2293 | /// ```no_run
|
2281 2294 | /// use rest_json::{RestJson, RestJsonConfig};
|
2282 2295 | ///
|
2283 2296 | /// use rest_json::{input, output, error};
|
2284 2297 | ///
|
2285 - | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, error::HttpChecksumRequiredError> {
|
2298 + | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, error::FractionalSecondsError> {
|
2286 2299 | /// todo!()
|
2287 2300 | /// }
|
2288 2301 | ///
|
2289 2302 | /// let config = RestJsonConfig::builder().build();
|
2290 2303 | /// let app = RestJson::builder(config)
|
2291 - | /// .http_checksum_required(handler)
|
2304 + | /// .fractional_seconds(handler)
|
2305 + | /// /* Set other handlers */
|
2306 + | /// .build()
|
2307 + | /// .unwrap();
|
2308 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2309 + | /// ```
|
2310 + | ///
|
2311 + | pub fn fractional_seconds<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2312 + | where
|
2313 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::FractionalSeconds, HandlerExtractors>,
|
2314 + |
|
2315 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2316 + | RestJson<L>,
|
2317 + | crate::operation_shape::FractionalSeconds,
|
2318 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::FractionalSeconds, HandlerType>
|
2319 + | >,
|
2320 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2321 + | RestJson<L>,
|
2322 + | crate::operation_shape::FractionalSeconds,
|
2323 + | ModelPl::Output
|
2324 + | >,
|
2325 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2326 + | RestJson<L>,
|
2327 + | crate::operation_shape::FractionalSeconds,
|
2328 + | <
|
2329 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2330 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2331 + | RestJson<L>,
|
2332 + | crate::operation_shape::FractionalSeconds,
|
2333 + | ModelPl::Output
|
2334 + | >
|
2335 + | >::Output
|
2336 + | >,
|
2337 + |
|
2338 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2339 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2340 + |
|
2341 + | {
|
2342 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2343 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2344 + | let svc = crate::operation_shape::FractionalSeconds::from_handler(handler);
|
2345 + | let svc = self.model_plugin.apply(svc);
|
2346 + | let svc =
|
2347 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2348 + | .apply(svc);
|
2349 + | let svc = self.http_plugin.apply(svc);
|
2350 + | self.fractional_seconds_custom(svc)
|
2351 + | }
|
2352 + |
|
2353 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
2354 + | ///
|
2355 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2356 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2357 + | ///
|
2358 + | /// # Example
|
2359 + | ///
|
2360 + | /// ```no_run
|
2361 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2362 + | ///
|
2363 + | /// use rest_json::{input, output, error};
|
2364 + | ///
|
2365 + | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, error::FractionalSecondsError> {
|
2366 + | /// todo!()
|
2367 + | /// }
|
2368 + | ///
|
2369 + | /// let config = RestJsonConfig::builder().build();
|
2370 + | /// let svc = ::tower::util::service_fn(handler);
|
2371 + | /// let app = RestJson::builder(config)
|
2372 + | /// .fractional_seconds_service(svc)
|
2373 + | /// /* Set other handlers */
|
2374 + | /// .build()
|
2375 + | /// .unwrap();
|
2376 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2377 + | /// ```
|
2378 + | ///
|
2379 + | pub fn fractional_seconds_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2380 + | where
|
2381 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::FractionalSeconds, ServiceExtractors>,
|
2382 + |
|
2383 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2384 + | RestJson<L>,
|
2385 + | crate::operation_shape::FractionalSeconds,
|
2386 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::FractionalSeconds, S>
|
2387 + | >,
|
2388 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2389 + | RestJson<L>,
|
2390 + | crate::operation_shape::FractionalSeconds,
|
2391 + | ModelPl::Output
|
2392 + | >,
|
2393 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2394 + | RestJson<L>,
|
2395 + | crate::operation_shape::FractionalSeconds,
|
2396 + | <
|
2397 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2398 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2399 + | RestJson<L>,
|
2400 + | crate::operation_shape::FractionalSeconds,
|
2401 + | ModelPl::Output
|
2402 + | >
|
2403 + | >::Output
|
2404 + | >,
|
2405 + |
|
2406 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2407 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2408 + |
|
2409 + | {
|
2410 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2411 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2412 + | let svc = crate::operation_shape::FractionalSeconds::from_service(service);
|
2413 + | let svc = self.model_plugin.apply(svc);
|
2414 + | let svc =
|
2415 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2416 + | .apply(svc);
|
2417 + | let svc = self.http_plugin.apply(svc);
|
2418 + | self.fractional_seconds_custom(svc)
|
2419 + | }
|
2420 + |
|
2421 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) to a custom [`Service`](tower::Service).
|
2422 + | /// not constrained by the Smithy contract.
|
2423 + | fn fractional_seconds_custom<S>(mut self, svc: S) -> Self
|
2424 + | where
|
2425 + | S: ::tower::Service<
|
2426 + | ::http::Request<Body>,
|
2427 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2428 + | Error = ::std::convert::Infallible,
|
2429 + | > + Clone
|
2430 + | + Send
|
2431 + | + 'static,
|
2432 + | S::Future: Send + 'static,
|
2433 + | {
|
2434 + | self.fractional_seconds = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2435 + | self
|
2436 + | }
|
2437 + |
|
2438 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
2439 + | ///
|
2440 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2441 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2442 + | ///
|
2443 + | /// # Example
|
2444 + | ///
|
2445 + | /// ```no_run
|
2446 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2447 + | ///
|
2448 + | /// use rest_json::{input, output, error};
|
2449 + | ///
|
2450 + | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2451 + | /// todo!()
|
2452 + | /// }
|
2453 + | ///
|
2454 + | /// let config = RestJsonConfig::builder().build();
|
2455 + | /// let app = RestJson::builder(config)
|
2456 + | /// .greeting_with_errors(handler)
|
2457 + | /// /* Set other handlers */
|
2458 + | /// .build()
|
2459 + | /// .unwrap();
|
2460 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2461 + | /// ```
|
2462 + | ///
|
2463 + | pub fn greeting_with_errors<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2464 + | where
|
2465 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::GreetingWithErrors, HandlerExtractors>,
|
2466 + |
|
2467 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2468 + | RestJson<L>,
|
2469 + | crate::operation_shape::GreetingWithErrors,
|
2470 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::GreetingWithErrors, HandlerType>
|
2471 + | >,
|
2472 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2473 + | RestJson<L>,
|
2474 + | crate::operation_shape::GreetingWithErrors,
|
2475 + | ModelPl::Output
|
2476 + | >,
|
2477 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2478 + | RestJson<L>,
|
2479 + | crate::operation_shape::GreetingWithErrors,
|
2480 + | <
|
2481 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2482 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2483 + | RestJson<L>,
|
2484 + | crate::operation_shape::GreetingWithErrors,
|
2485 + | ModelPl::Output
|
2486 + | >
|
2487 + | >::Output
|
2488 + | >,
|
2489 + |
|
2490 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2491 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2492 + |
|
2493 + | {
|
2494 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2495 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2496 + | let svc = crate::operation_shape::GreetingWithErrors::from_handler(handler);
|
2497 + | let svc = self.model_plugin.apply(svc);
|
2498 + | let svc =
|
2499 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2500 + | .apply(svc);
|
2501 + | let svc = self.http_plugin.apply(svc);
|
2502 + | self.greeting_with_errors_custom(svc)
|
2503 + | }
|
2504 + |
|
2505 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
2506 + | ///
|
2507 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2508 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2509 + | ///
|
2510 + | /// # Example
|
2511 + | ///
|
2512 + | /// ```no_run
|
2513 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2514 + | ///
|
2515 + | /// use rest_json::{input, output, error};
|
2516 + | ///
|
2517 + | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2518 + | /// todo!()
|
2519 + | /// }
|
2520 + | ///
|
2521 + | /// let config = RestJsonConfig::builder().build();
|
2522 + | /// let svc = ::tower::util::service_fn(handler);
|
2523 + | /// let app = RestJson::builder(config)
|
2524 + | /// .greeting_with_errors_service(svc)
|
2525 + | /// /* Set other handlers */
|
2526 + | /// .build()
|
2527 + | /// .unwrap();
|
2528 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2529 + | /// ```
|
2530 + | ///
|
2531 + | pub fn greeting_with_errors_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2532 + | where
|
2533 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::GreetingWithErrors, ServiceExtractors>,
|
2534 + |
|
2535 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2536 + | RestJson<L>,
|
2537 + | crate::operation_shape::GreetingWithErrors,
|
2538 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::GreetingWithErrors, S>
|
2539 + | >,
|
2540 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2541 + | RestJson<L>,
|
2542 + | crate::operation_shape::GreetingWithErrors,
|
2543 + | ModelPl::Output
|
2544 + | >,
|
2545 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2546 + | RestJson<L>,
|
2547 + | crate::operation_shape::GreetingWithErrors,
|
2548 + | <
|
2549 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2550 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2551 + | RestJson<L>,
|
2552 + | crate::operation_shape::GreetingWithErrors,
|
2553 + | ModelPl::Output
|
2554 + | >
|
2555 + | >::Output
|
2556 + | >,
|
2557 + |
|
2558 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2559 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2560 + |
|
2561 + | {
|
2562 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2563 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2564 + | let svc = crate::operation_shape::GreetingWithErrors::from_service(service);
|
2565 + | let svc = self.model_plugin.apply(svc);
|
2566 + | let svc =
|
2567 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2568 + | .apply(svc);
|
2569 + | let svc = self.http_plugin.apply(svc);
|
2570 + | self.greeting_with_errors_custom(svc)
|
2571 + | }
|
2572 + |
|
2573 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) to a custom [`Service`](tower::Service).
|
2574 + | /// not constrained by the Smithy contract.
|
2575 + | fn greeting_with_errors_custom<S>(mut self, svc: S) -> Self
|
2576 + | where
|
2577 + | S: ::tower::Service<
|
2578 + | ::http::Request<Body>,
|
2579 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2580 + | Error = ::std::convert::Infallible,
|
2581 + | > + Clone
|
2582 + | + Send
|
2583 + | + 'static,
|
2584 + | S::Future: Send + 'static,
|
2585 + | {
|
2586 + | self.greeting_with_errors = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2587 + | self
|
2588 + | }
|
2589 + |
|
2590 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2591 + | ///
|
2592 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2593 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2594 + | ///
|
2595 + | /// # Example
|
2596 + | ///
|
2597 + | /// ```no_run
|
2598 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2599 + | ///
|
2600 + | /// use rest_json::{input, output, error};
|
2601 + | ///
|
2602 + | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, error::HostWithPathOperationError> {
|
2603 + | /// todo!()
|
2604 + | /// }
|
2605 + | ///
|
2606 + | /// let config = RestJsonConfig::builder().build();
|
2607 + | /// let app = RestJson::builder(config)
|
2608 + | /// .host_with_path_operation(handler)
|
2609 + | /// /* Set other handlers */
|
2610 + | /// .build()
|
2611 + | /// .unwrap();
|
2612 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2613 + | /// ```
|
2614 + | ///
|
2615 + | pub fn host_with_path_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2616 + | where
|
2617 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HostWithPathOperation, HandlerExtractors>,
|
2618 + |
|
2619 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2620 + | RestJson<L>,
|
2621 + | crate::operation_shape::HostWithPathOperation,
|
2622 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HostWithPathOperation, HandlerType>
|
2623 + | >,
|
2624 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2625 + | RestJson<L>,
|
2626 + | crate::operation_shape::HostWithPathOperation,
|
2627 + | ModelPl::Output
|
2628 + | >,
|
2629 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2630 + | RestJson<L>,
|
2631 + | crate::operation_shape::HostWithPathOperation,
|
2632 + | <
|
2633 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2634 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2635 + | RestJson<L>,
|
2636 + | crate::operation_shape::HostWithPathOperation,
|
2637 + | ModelPl::Output
|
2638 + | >
|
2639 + | >::Output
|
2640 + | >,
|
2641 + |
|
2642 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2643 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2644 + |
|
2645 + | {
|
2646 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2647 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2648 + | let svc = crate::operation_shape::HostWithPathOperation::from_handler(handler);
|
2649 + | let svc = self.model_plugin.apply(svc);
|
2650 + | let svc =
|
2651 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2652 + | .apply(svc);
|
2653 + | let svc = self.http_plugin.apply(svc);
|
2654 + | self.host_with_path_operation_custom(svc)
|
2655 + | }
|
2656 + |
|
2657 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2658 + | ///
|
2659 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2660 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2661 + | ///
|
2662 + | /// # Example
|
2663 + | ///
|
2664 + | /// ```no_run
|
2665 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2666 + | ///
|
2667 + | /// use rest_json::{input, output, error};
|
2668 + | ///
|
2669 + | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, error::HostWithPathOperationError> {
|
2670 + | /// todo!()
|
2671 + | /// }
|
2672 + | ///
|
2673 + | /// let config = RestJsonConfig::builder().build();
|
2674 + | /// let svc = ::tower::util::service_fn(handler);
|
2675 + | /// let app = RestJson::builder(config)
|
2676 + | /// .host_with_path_operation_service(svc)
|
2677 + | /// /* Set other handlers */
|
2678 + | /// .build()
|
2679 + | /// .unwrap();
|
2680 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2681 + | /// ```
|
2682 + | ///
|
2683 + | pub fn host_with_path_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2684 + | where
|
2685 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HostWithPathOperation, ServiceExtractors>,
|
2686 + |
|
2687 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2688 + | RestJson<L>,
|
2689 + | crate::operation_shape::HostWithPathOperation,
|
2690 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HostWithPathOperation, S>
|
2691 + | >,
|
2692 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2693 + | RestJson<L>,
|
2694 + | crate::operation_shape::HostWithPathOperation,
|
2695 + | ModelPl::Output
|
2696 + | >,
|
2697 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2698 + | RestJson<L>,
|
2699 + | crate::operation_shape::HostWithPathOperation,
|
2700 + | <
|
2701 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2702 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2703 + | RestJson<L>,
|
2704 + | crate::operation_shape::HostWithPathOperation,
|
2705 + | ModelPl::Output
|
2706 + | >
|
2707 + | >::Output
|
2708 + | >,
|
2709 + |
|
2710 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2711 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2712 + |
|
2713 + | {
|
2714 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2715 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2716 + | let svc = crate::operation_shape::HostWithPathOperation::from_service(service);
|
2717 + | let svc = self.model_plugin.apply(svc);
|
2718 + | let svc =
|
2719 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2720 + | .apply(svc);
|
2721 + | let svc = self.http_plugin.apply(svc);
|
2722 + | self.host_with_path_operation_custom(svc)
|
2723 + | }
|
2724 + |
|
2725 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) to a custom [`Service`](tower::Service).
|
2726 + | /// not constrained by the Smithy contract.
|
2727 + | fn host_with_path_operation_custom<S>(mut self, svc: S) -> Self
|
2728 + | where
|
2729 + | S: ::tower::Service<
|
2730 + | ::http::Request<Body>,
|
2731 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2732 + | Error = ::std::convert::Infallible,
|
2733 + | > + Clone
|
2734 + | + Send
|
2735 + | + 'static,
|
2736 + | S::Future: Send + 'static,
|
2737 + | {
|
2738 + | self.host_with_path_operation =
|
2739 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2740 + | self
|
2741 + | }
|
2742 + |
|
2743 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2744 + | ///
|
2745 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2746 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2747 + | ///
|
2748 + | /// # Example
|
2749 + | ///
|
2750 + | /// ```no_run
|
2751 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2752 + | ///
|
2753 + | /// use rest_json::{input, output, error};
|
2754 + | ///
|
2755 + | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, error::HttpChecksumRequiredError> {
|
2756 + | /// todo!()
|
2757 + | /// }
|
2758 + | ///
|
2759 + | /// let config = RestJsonConfig::builder().build();
|
2760 + | /// let app = RestJson::builder(config)
|
2761 + | /// .http_checksum_required(handler)
|
2292 2762 | /// /* Set other handlers */
|
2293 2763 | /// .build()
|
2294 2764 | /// .unwrap();
|
2295 2765 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2296 2766 | /// ```
|
2297 2767 | ///
|
2298 2768 | pub fn http_checksum_required<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2299 2769 | where
|
2300 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpChecksumRequired, HandlerExtractors>,
|
2770 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpChecksumRequired, HandlerExtractors>,
|
2771 + |
|
2772 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2773 + | RestJson<L>,
|
2774 + | crate::operation_shape::HttpChecksumRequired,
|
2775 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpChecksumRequired, HandlerType>
|
2776 + | >,
|
2777 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2778 + | RestJson<L>,
|
2779 + | crate::operation_shape::HttpChecksumRequired,
|
2780 + | ModelPl::Output
|
2781 + | >,
|
2782 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2783 + | RestJson<L>,
|
2784 + | crate::operation_shape::HttpChecksumRequired,
|
2785 + | <
|
2786 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2787 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2788 + | RestJson<L>,
|
2789 + | crate::operation_shape::HttpChecksumRequired,
|
2790 + | ModelPl::Output
|
2791 + | >
|
2792 + | >::Output
|
2793 + | >,
|
2794 + |
|
2795 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2796 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2797 + |
|
2798 + | {
|
2799 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2800 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2801 + | let svc = crate::operation_shape::HttpChecksumRequired::from_handler(handler);
|
2802 + | let svc = self.model_plugin.apply(svc);
|
2803 + | let svc =
|
2804 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2805 + | .apply(svc);
|
2806 + | let svc = self.http_plugin.apply(svc);
|
2807 + | self.http_checksum_required_custom(svc)
|
2808 + | }
|
2809 + |
|
2810 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2811 + | ///
|
2812 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2813 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2814 + | ///
|
2815 + | /// # Example
|
2816 + | ///
|
2817 + | /// ```no_run
|
2818 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2819 + | ///
|
2820 + | /// use rest_json::{input, output, error};
|
2821 + | ///
|
2822 + | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, error::HttpChecksumRequiredError> {
|
2823 + | /// todo!()
|
2824 + | /// }
|
2825 + | ///
|
2826 + | /// let config = RestJsonConfig::builder().build();
|
2827 + | /// let svc = ::tower::util::service_fn(handler);
|
2828 + | /// let app = RestJson::builder(config)
|
2829 + | /// .http_checksum_required_service(svc)
|
2830 + | /// /* Set other handlers */
|
2831 + | /// .build()
|
2832 + | /// .unwrap();
|
2833 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2834 + | /// ```
|
2835 + | ///
|
2836 + | pub fn http_checksum_required_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2837 + | where
|
2838 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpChecksumRequired, ServiceExtractors>,
|
2839 + |
|
2840 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2841 + | RestJson<L>,
|
2842 + | crate::operation_shape::HttpChecksumRequired,
|
2843 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpChecksumRequired, S>
|
2844 + | >,
|
2845 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2846 + | RestJson<L>,
|
2847 + | crate::operation_shape::HttpChecksumRequired,
|
2848 + | ModelPl::Output
|
2849 + | >,
|
2850 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2851 + | RestJson<L>,
|
2852 + | crate::operation_shape::HttpChecksumRequired,
|
2853 + | <
|
2854 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2855 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2856 + | RestJson<L>,
|
2857 + | crate::operation_shape::HttpChecksumRequired,
|
2858 + | ModelPl::Output
|
2859 + | >
|
2860 + | >::Output
|
2861 + | >,
|
2862 + |
|
2863 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2864 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2865 + |
|
2866 + | {
|
2867 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2868 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2869 + | let svc = crate::operation_shape::HttpChecksumRequired::from_service(service);
|
2870 + | let svc = self.model_plugin.apply(svc);
|
2871 + | let svc =
|
2872 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2873 + | .apply(svc);
|
2874 + | let svc = self.http_plugin.apply(svc);
|
2875 + | self.http_checksum_required_custom(svc)
|
2876 + | }
|
2877 + |
|
2878 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) to a custom [`Service`](tower::Service).
|
2879 + | /// not constrained by the Smithy contract.
|
2880 + | fn http_checksum_required_custom<S>(mut self, svc: S) -> Self
|
2881 + | where
|
2882 + | S: ::tower::Service<
|
2883 + | ::http::Request<Body>,
|
2884 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2885 + | Error = ::std::convert::Infallible,
|
2886 + | > + Clone
|
2887 + | + Send
|
2888 + | + 'static,
|
2889 + | S::Future: Send + 'static,
|
2890 + | {
|
2891 + | self.http_checksum_required =
|
2892 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2893 + | self
|
2894 + | }
|
2895 + |
|
2896 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2897 + | ///
|
2898 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2899 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2900 + | ///
|
2901 + | /// # Example
|
2902 + | ///
|
2903 + | /// ```no_run
|
2904 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2905 + | ///
|
2906 + | /// use rest_json::{input, output, error};
|
2907 + | ///
|
2908 + | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, error::HttpEmptyPrefixHeadersError> {
|
2909 + | /// todo!()
|
2910 + | /// }
|
2911 + | ///
|
2912 + | /// let config = RestJsonConfig::builder().build();
|
2913 + | /// let app = RestJson::builder(config)
|
2914 + | /// .http_empty_prefix_headers(handler)
|
2915 + | /// /* Set other handlers */
|
2916 + | /// .build()
|
2917 + | /// .unwrap();
|
2918 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2919 + | /// ```
|
2920 + | ///
|
2921 + | pub fn http_empty_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2922 + | where
|
2923 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerExtractors>,
|
2924 + |
|
2925 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2926 + | RestJson<L>,
|
2927 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2928 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerType>
|
2929 + | >,
|
2930 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2931 + | RestJson<L>,
|
2932 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2933 + | ModelPl::Output
|
2934 + | >,
|
2935 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2936 + | RestJson<L>,
|
2937 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2938 + | <
|
2939 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2940 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2941 + | RestJson<L>,
|
2942 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2943 + | ModelPl::Output
|
2944 + | >
|
2945 + | >::Output
|
2946 + | >,
|
2947 + |
|
2948 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2949 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2950 + |
|
2951 + | {
|
2952 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2953 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2954 + | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_handler(handler);
|
2955 + | let svc = self.model_plugin.apply(svc);
|
2956 + | let svc =
|
2957 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2958 + | .apply(svc);
|
2959 + | let svc = self.http_plugin.apply(svc);
|
2960 + | self.http_empty_prefix_headers_custom(svc)
|
2961 + | }
|
2962 + |
|
2963 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2964 + | ///
|
2965 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2966 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2967 + | ///
|
2968 + | /// # Example
|
2969 + | ///
|
2970 + | /// ```no_run
|
2971 + | /// use rest_json::{RestJson, RestJsonConfig};
|
2972 + | ///
|
2973 + | /// use rest_json::{input, output, error};
|
2974 + | ///
|
2975 + | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, error::HttpEmptyPrefixHeadersError> {
|
2976 + | /// todo!()
|
2977 + | /// }
|
2978 + | ///
|
2979 + | /// let config = RestJsonConfig::builder().build();
|
2980 + | /// let svc = ::tower::util::service_fn(handler);
|
2981 + | /// let app = RestJson::builder(config)
|
2982 + | /// .http_empty_prefix_headers_service(svc)
|
2983 + | /// /* Set other handlers */
|
2984 + | /// .build()
|
2985 + | /// .unwrap();
|
2986 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2987 + | /// ```
|
2988 + | ///
|
2989 + | pub fn http_empty_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2990 + | where
|
2991 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpEmptyPrefixHeaders, ServiceExtractors>,
|
2992 + |
|
2993 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2994 + | RestJson<L>,
|
2995 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2996 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpEmptyPrefixHeaders, S>
|
2997 + | >,
|
2998 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2999 + | RestJson<L>,
|
3000 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3001 + | ModelPl::Output
|
3002 + | >,
|
3003 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3004 + | RestJson<L>,
|
3005 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3006 + | <
|
3007 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3008 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3009 + | RestJson<L>,
|
3010 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3011 + | ModelPl::Output
|
3012 + | >
|
3013 + | >::Output
|
3014 + | >,
|
3015 + |
|
3016 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3017 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3018 + |
|
3019 + | {
|
3020 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3021 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3022 + | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_service(service);
|
3023 + | let svc = self.model_plugin.apply(svc);
|
3024 + | let svc =
|
3025 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3026 + | .apply(svc);
|
3027 + | let svc = self.http_plugin.apply(svc);
|
3028 + | self.http_empty_prefix_headers_custom(svc)
|
3029 + | }
|
3030 + |
|
3031 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) to a custom [`Service`](tower::Service).
|
3032 + | /// not constrained by the Smithy contract.
|
3033 + | fn http_empty_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
3034 + | where
|
3035 + | S: ::tower::Service<
|
3036 + | ::http::Request<Body>,
|
3037 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3038 + | Error = ::std::convert::Infallible,
|
3039 + | > + Clone
|
3040 + | + Send
|
3041 + | + 'static,
|
3042 + | S::Future: Send + 'static,
|
3043 + | {
|
3044 + | self.http_empty_prefix_headers =
|
3045 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3046 + | self
|
3047 + | }
|
3048 + |
|
3049 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
3050 + | ///
|
3051 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3052 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3053 + | ///
|
3054 + | /// # Example
|
3055 + | ///
|
3056 + | /// ```no_run
|
3057 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3058 + | ///
|
3059 + | /// use rest_json::{input, output, error};
|
3060 + | ///
|
3061 + | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
3062 + | /// todo!()
|
3063 + | /// }
|
3064 + | ///
|
3065 + | /// let config = RestJsonConfig::builder().build();
|
3066 + | /// let app = RestJson::builder(config)
|
3067 + | /// .http_enum_payload(handler)
|
3068 + | /// /* Set other handlers */
|
3069 + | /// .build()
|
3070 + | /// .unwrap();
|
3071 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3072 + | /// ```
|
3073 + | ///
|
3074 + | pub fn http_enum_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3075 + | where
|
3076 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpEnumPayload, HandlerExtractors>,
|
3077 + |
|
3078 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3079 + | RestJson<L>,
|
3080 + | crate::operation_shape::HttpEnumPayload,
|
3081 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpEnumPayload, HandlerType>
|
3082 + | >,
|
3083 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3084 + | RestJson<L>,
|
3085 + | crate::operation_shape::HttpEnumPayload,
|
3086 + | ModelPl::Output
|
3087 + | >,
|
3088 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3089 + | RestJson<L>,
|
3090 + | crate::operation_shape::HttpEnumPayload,
|
3091 + | <
|
3092 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3093 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3094 + | RestJson<L>,
|
3095 + | crate::operation_shape::HttpEnumPayload,
|
3096 + | ModelPl::Output
|
3097 + | >
|
3098 + | >::Output
|
3099 + | >,
|
3100 + |
|
3101 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3102 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3103 + |
|
3104 + | {
|
3105 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3106 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3107 + | let svc = crate::operation_shape::HttpEnumPayload::from_handler(handler);
|
3108 + | let svc = self.model_plugin.apply(svc);
|
3109 + | let svc =
|
3110 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3111 + | .apply(svc);
|
3112 + | let svc = self.http_plugin.apply(svc);
|
3113 + | self.http_enum_payload_custom(svc)
|
3114 + | }
|
3115 + |
|
3116 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
3117 + | ///
|
3118 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3119 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3120 + | ///
|
3121 + | /// # Example
|
3122 + | ///
|
3123 + | /// ```no_run
|
3124 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3125 + | ///
|
3126 + | /// use rest_json::{input, output, error};
|
3127 + | ///
|
3128 + | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
3129 + | /// todo!()
|
3130 + | /// }
|
3131 + | ///
|
3132 + | /// let config = RestJsonConfig::builder().build();
|
3133 + | /// let svc = ::tower::util::service_fn(handler);
|
3134 + | /// let app = RestJson::builder(config)
|
3135 + | /// .http_enum_payload_service(svc)
|
3136 + | /// /* Set other handlers */
|
3137 + | /// .build()
|
3138 + | /// .unwrap();
|
3139 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3140 + | /// ```
|
3141 + | ///
|
3142 + | pub fn http_enum_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3143 + | where
|
3144 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpEnumPayload, ServiceExtractors>,
|
3145 + |
|
3146 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3147 + | RestJson<L>,
|
3148 + | crate::operation_shape::HttpEnumPayload,
|
3149 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpEnumPayload, S>
|
3150 + | >,
|
3151 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3152 + | RestJson<L>,
|
3153 + | crate::operation_shape::HttpEnumPayload,
|
3154 + | ModelPl::Output
|
3155 + | >,
|
3156 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3157 + | RestJson<L>,
|
3158 + | crate::operation_shape::HttpEnumPayload,
|
3159 + | <
|
3160 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3161 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3162 + | RestJson<L>,
|
3163 + | crate::operation_shape::HttpEnumPayload,
|
3164 + | ModelPl::Output
|
3165 + | >
|
3166 + | >::Output
|
3167 + | >,
|
3168 + |
|
3169 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3170 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3171 + |
|
3172 + | {
|
3173 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3174 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3175 + | let svc = crate::operation_shape::HttpEnumPayload::from_service(service);
|
3176 + | let svc = self.model_plugin.apply(svc);
|
3177 + | let svc =
|
3178 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3179 + | .apply(svc);
|
3180 + | let svc = self.http_plugin.apply(svc);
|
3181 + | self.http_enum_payload_custom(svc)
|
3182 + | }
|
3183 + |
|
3184 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) to a custom [`Service`](tower::Service).
|
3185 + | /// not constrained by the Smithy contract.
|
3186 + | fn http_enum_payload_custom<S>(mut self, svc: S) -> Self
|
3187 + | where
|
3188 + | S: ::tower::Service<
|
3189 + | ::http::Request<Body>,
|
3190 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3191 + | Error = ::std::convert::Infallible,
|
3192 + | > + Clone
|
3193 + | + Send
|
3194 + | + 'static,
|
3195 + | S::Future: Send + 'static,
|
3196 + | {
|
3197 + | self.http_enum_payload = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3198 + | self
|
3199 + | }
|
3200 + |
|
3201 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
3202 + | ///
|
3203 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3204 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3205 + | ///
|
3206 + | /// # Example
|
3207 + | ///
|
3208 + | /// ```no_run
|
3209 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3210 + | ///
|
3211 + | /// use rest_json::{input, output, error};
|
3212 + | ///
|
3213 + | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, error::HttpPayloadTraitsError> {
|
3214 + | /// todo!()
|
3215 + | /// }
|
3216 + | ///
|
3217 + | /// let config = RestJsonConfig::builder().build();
|
3218 + | /// let app = RestJson::builder(config)
|
3219 + | /// .http_payload_traits(handler)
|
3220 + | /// /* Set other handlers */
|
3221 + | /// .build()
|
3222 + | /// .unwrap();
|
3223 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3224 + | /// ```
|
3225 + | ///
|
3226 + | pub fn http_payload_traits<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3227 + | where
|
3228 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraits, HandlerExtractors>,
|
3229 + |
|
3230 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3231 + | RestJson<L>,
|
3232 + | crate::operation_shape::HttpPayloadTraits,
|
3233 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraits, HandlerType>
|
3234 + | >,
|
3235 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3236 + | RestJson<L>,
|
3237 + | crate::operation_shape::HttpPayloadTraits,
|
3238 + | ModelPl::Output
|
3239 + | >,
|
3240 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3241 + | RestJson<L>,
|
3242 + | crate::operation_shape::HttpPayloadTraits,
|
3243 + | <
|
3244 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3245 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3246 + | RestJson<L>,
|
3247 + | crate::operation_shape::HttpPayloadTraits,
|
3248 + | ModelPl::Output
|
3249 + | >
|
3250 + | >::Output
|
3251 + | >,
|
3252 + |
|
3253 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3254 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3255 + |
|
3256 + | {
|
3257 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3258 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3259 + | let svc = crate::operation_shape::HttpPayloadTraits::from_handler(handler);
|
3260 + | let svc = self.model_plugin.apply(svc);
|
3261 + | let svc =
|
3262 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3263 + | .apply(svc);
|
3264 + | let svc = self.http_plugin.apply(svc);
|
3265 + | self.http_payload_traits_custom(svc)
|
3266 + | }
|
3267 + |
|
3268 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
3269 + | ///
|
3270 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3271 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3272 + | ///
|
3273 + | /// # Example
|
3274 + | ///
|
3275 + | /// ```no_run
|
3276 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3277 + | ///
|
3278 + | /// use rest_json::{input, output, error};
|
3279 + | ///
|
3280 + | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, error::HttpPayloadTraitsError> {
|
3281 + | /// todo!()
|
3282 + | /// }
|
3283 + | ///
|
3284 + | /// let config = RestJsonConfig::builder().build();
|
3285 + | /// let svc = ::tower::util::service_fn(handler);
|
3286 + | /// let app = RestJson::builder(config)
|
3287 + | /// .http_payload_traits_service(svc)
|
3288 + | /// /* Set other handlers */
|
3289 + | /// .build()
|
3290 + | /// .unwrap();
|
3291 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3292 + | /// ```
|
3293 + | ///
|
3294 + | pub fn http_payload_traits_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3295 + | where
|
3296 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraits, ServiceExtractors>,
|
3297 + |
|
3298 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3299 + | RestJson<L>,
|
3300 + | crate::operation_shape::HttpPayloadTraits,
|
3301 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraits, S>
|
3302 + | >,
|
3303 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3304 + | RestJson<L>,
|
3305 + | crate::operation_shape::HttpPayloadTraits,
|
3306 + | ModelPl::Output
|
3307 + | >,
|
3308 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3309 + | RestJson<L>,
|
3310 + | crate::operation_shape::HttpPayloadTraits,
|
3311 + | <
|
3312 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3313 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3314 + | RestJson<L>,
|
3315 + | crate::operation_shape::HttpPayloadTraits,
|
3316 + | ModelPl::Output
|
3317 + | >
|
3318 + | >::Output
|
3319 + | >,
|
3320 + |
|
3321 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3322 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3323 + |
|
3324 + | {
|
3325 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3326 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3327 + | let svc = crate::operation_shape::HttpPayloadTraits::from_service(service);
|
3328 + | let svc = self.model_plugin.apply(svc);
|
3329 + | let svc =
|
3330 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3331 + | .apply(svc);
|
3332 + | let svc = self.http_plugin.apply(svc);
|
3333 + | self.http_payload_traits_custom(svc)
|
3334 + | }
|
3335 + |
|
3336 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) to a custom [`Service`](tower::Service).
|
3337 + | /// not constrained by the Smithy contract.
|
3338 + | fn http_payload_traits_custom<S>(mut self, svc: S) -> Self
|
3339 + | where
|
3340 + | S: ::tower::Service<
|
3341 + | ::http::Request<Body>,
|
3342 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3343 + | Error = ::std::convert::Infallible,
|
3344 + | > + Clone
|
3345 + | + Send
|
3346 + | + 'static,
|
3347 + | S::Future: Send + 'static,
|
3348 + | {
|
3349 + | self.http_payload_traits = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3350 + | self
|
3351 + | }
|
3352 + |
|
3353 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
3354 + | ///
|
3355 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3356 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3357 + | ///
|
3358 + | /// # Example
|
3359 + | ///
|
3360 + | /// ```no_run
|
3361 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3362 + | ///
|
3363 + | /// use rest_json::{input, output, error};
|
3364 + | ///
|
3365 + | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, error::HttpPayloadTraitsWithMediaTypeError> {
|
3366 + | /// todo!()
|
3367 + | /// }
|
3368 + | ///
|
3369 + | /// let config = RestJsonConfig::builder().build();
|
3370 + | /// let app = RestJson::builder(config)
|
3371 + | /// .http_payload_traits_with_media_type(handler)
|
3372 + | /// /* Set other handlers */
|
3373 + | /// .build()
|
3374 + | /// .unwrap();
|
3375 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3376 + | /// ```
|
3377 + | ///
|
3378 + | pub fn http_payload_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3379 + | where
|
3380 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerExtractors>,
|
3381 + |
|
3382 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3383 + | RestJson<L>,
|
3384 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3385 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerType>
|
3386 + | >,
|
3387 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3388 + | RestJson<L>,
|
3389 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3390 + | ModelPl::Output
|
3391 + | >,
|
3392 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3393 + | RestJson<L>,
|
3394 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3395 + | <
|
3396 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3397 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3398 + | RestJson<L>,
|
3399 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3400 + | ModelPl::Output
|
3401 + | >
|
3402 + | >::Output
|
3403 + | >,
|
3404 + |
|
3405 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3406 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3407 + |
|
3408 + | {
|
3409 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3410 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3411 + | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_handler(handler);
|
3412 + | let svc = self.model_plugin.apply(svc);
|
3413 + | let svc =
|
3414 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3415 + | .apply(svc);
|
3416 + | let svc = self.http_plugin.apply(svc);
|
3417 + | self.http_payload_traits_with_media_type_custom(svc)
|
3418 + | }
|
3419 + |
|
3420 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
3421 + | ///
|
3422 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3423 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3424 + | ///
|
3425 + | /// # Example
|
3426 + | ///
|
3427 + | /// ```no_run
|
3428 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3429 + | ///
|
3430 + | /// use rest_json::{input, output, error};
|
3431 + | ///
|
3432 + | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, error::HttpPayloadTraitsWithMediaTypeError> {
|
3433 + | /// todo!()
|
3434 + | /// }
|
3435 + | ///
|
3436 + | /// let config = RestJsonConfig::builder().build();
|
3437 + | /// let svc = ::tower::util::service_fn(handler);
|
3438 + | /// let app = RestJson::builder(config)
|
3439 + | /// .http_payload_traits_with_media_type_service(svc)
|
3440 + | /// /* Set other handlers */
|
3441 + | /// .build()
|
3442 + | /// .unwrap();
|
3443 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3444 + | /// ```
|
3445 + | ///
|
3446 + | pub fn http_payload_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3447 + | where
|
3448 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraitsWithMediaType, ServiceExtractors>,
|
3449 + |
|
3450 + | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3451 + | RestJson<L>,
|
3452 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3453 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraitsWithMediaType, S>
|
3454 + | >,
|
3455 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3456 + | RestJson<L>,
|
3457 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3458 + | ModelPl::Output
|
3459 + | >,
|
3460 + | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3461 + | RestJson<L>,
|
3462 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3463 + | <
|
3464 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3465 + | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3466 + | RestJson<L>,
|
3467 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3468 + | ModelPl::Output
|
3469 + | >
|
3470 + | >::Output
|
3471 + | >,
|
3472 + |
|
3473 + | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3474 + | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3475 + |
|
3476 + | {
|
3477 + | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3478 + | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3479 + | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_service(service);
|
3480 + | let svc = self.model_plugin.apply(svc);
|
3481 + | let svc =
|
3482 + | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3483 + | .apply(svc);
|
3484 + | let svc = self.http_plugin.apply(svc);
|
3485 + | self.http_payload_traits_with_media_type_custom(svc)
|
3486 + | }
|
3487 + |
|
3488 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
3489 + | /// not constrained by the Smithy contract.
|
3490 + | fn http_payload_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
3491 + | where
|
3492 + | S: ::tower::Service<
|
3493 + | ::http::Request<Body>,
|
3494 + | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3495 + | Error = ::std::convert::Infallible,
|
3496 + | > + Clone
|
3497 + | + Send
|
3498 + | + 'static,
|
3499 + | S::Future: Send + 'static,
|
3500 + | {
|
3501 + | self.http_payload_traits_with_media_type =
|
3502 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3503 + | self
|
3504 + | }
|
3505 + |
|
3506 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
3507 + | ///
|
3508 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3509 + | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3510 + | ///
|
3511 + | /// # Example
|
3512 + | ///
|
3513 + | /// ```no_run
|
3514 + | /// use rest_json::{RestJson, RestJsonConfig};
|
3515 + | ///
|
3516 + | /// use rest_json::{input, output, error};
|
3517 + | ///
|
3518 + | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, error::HttpPayloadWithStructureError> {
|
3519 + | /// todo!()
|
3520 + | /// }
|
3521 + | ///
|
3522 + | /// let config = RestJsonConfig::builder().build();
|
3523 + | /// let app = RestJson::builder(config)
|
3524 + | /// .http_payload_with_structure(handler)
|
3525 + | /// /* Set other handlers */
|
3526 + | /// .build()
|
3527 + | /// .unwrap();
|
3528 + | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3529 + | /// ```
|
3530 + | ///
|
3531 + | pub fn http_payload_with_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3532 + | where
|
3533 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithStructure, HandlerExtractors>,
|
2301 3534 |
|
2302 3535 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2303 3536 | RestJson<L>,
|
2304 - | crate::operation_shape::HttpChecksumRequired,
|
2305 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpChecksumRequired, HandlerType>
|
3537 + | crate::operation_shape::HttpPayloadWithStructure,
|
3538 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithStructure, HandlerType>
|
2306 3539 | >,
|
2307 3540 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2308 3541 | RestJson<L>,
|
2309 - | crate::operation_shape::HttpChecksumRequired,
|
3542 + | crate::operation_shape::HttpPayloadWithStructure,
|
2310 3543 | ModelPl::Output
|
2311 3544 | >,
|
2312 3545 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2313 3546 | RestJson<L>,
|
2314 - | crate::operation_shape::HttpChecksumRequired,
|
3547 + | crate::operation_shape::HttpPayloadWithStructure,
|
2315 3548 | <
|
2316 3549 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2317 3550 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2318 3551 | RestJson<L>,
|
2319 - | crate::operation_shape::HttpChecksumRequired,
|
3552 + | crate::operation_shape::HttpPayloadWithStructure,
|
2320 3553 | ModelPl::Output
|
2321 3554 | >
|
2322 3555 | >::Output
|
2323 3556 | >,
|
2324 3557 |
|
2325 3558 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2326 3559 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2327 3560 |
|
2328 3561 | {
|
2329 3562 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2330 3563 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2331 - | let svc = crate::operation_shape::HttpChecksumRequired::from_handler(handler);
|
3564 + | let svc = crate::operation_shape::HttpPayloadWithStructure::from_handler(handler);
|
2332 3565 | let svc = self.model_plugin.apply(svc);
|
2333 3566 | let svc =
|
2334 3567 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2335 3568 | .apply(svc);
|
2336 3569 | let svc = self.http_plugin.apply(svc);
|
2337 - | self.http_checksum_required_custom(svc)
|
3570 + | self.http_payload_with_structure_custom(svc)
|
2338 3571 | }
|
2339 3572 |
|
2340 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
3573 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
2341 3574 | ///
|
2342 3575 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2343 3576 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2344 3577 | ///
|
2345 3578 | /// # Example
|
2346 3579 | ///
|
2347 3580 | /// ```no_run
|
2348 3581 | /// use rest_json::{RestJson, RestJsonConfig};
|
2349 3582 | ///
|
2350 3583 | /// use rest_json::{input, output, error};
|
2351 3584 | ///
|
2352 - | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, error::HttpChecksumRequiredError> {
|
3585 + | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, error::HttpPayloadWithStructureError> {
|
2353 3586 | /// todo!()
|
2354 3587 | /// }
|
2355 3588 | ///
|
2356 3589 | /// let config = RestJsonConfig::builder().build();
|
2357 3590 | /// let svc = ::tower::util::service_fn(handler);
|
2358 3591 | /// let app = RestJson::builder(config)
|
2359 - | /// .http_checksum_required_service(svc)
|
3592 + | /// .http_payload_with_structure_service(svc)
|
2360 3593 | /// /* Set other handlers */
|
2361 3594 | /// .build()
|
2362 3595 | /// .unwrap();
|
2363 3596 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2364 3597 | /// ```
|
2365 3598 | ///
|
2366 - | pub fn http_checksum_required_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3599 + | pub fn http_payload_with_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2367 3600 | where
|
2368 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpChecksumRequired, ServiceExtractors>,
|
3601 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithStructure, ServiceExtractors>,
|
2369 3602 |
|
2370 3603 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2371 3604 | RestJson<L>,
|
2372 - | crate::operation_shape::HttpChecksumRequired,
|
2373 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpChecksumRequired, S>
|
3605 + | crate::operation_shape::HttpPayloadWithStructure,
|
3606 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithStructure, S>
|
2374 3607 | >,
|
2375 3608 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2376 3609 | RestJson<L>,
|
2377 - | crate::operation_shape::HttpChecksumRequired,
|
3610 + | crate::operation_shape::HttpPayloadWithStructure,
|
2378 3611 | ModelPl::Output
|
2379 3612 | >,
|
2380 3613 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2381 3614 | RestJson<L>,
|
2382 - | crate::operation_shape::HttpChecksumRequired,
|
3615 + | crate::operation_shape::HttpPayloadWithStructure,
|
2383 3616 | <
|
2384 3617 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2385 3618 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2386 3619 | RestJson<L>,
|
2387 - | crate::operation_shape::HttpChecksumRequired,
|
3620 + | crate::operation_shape::HttpPayloadWithStructure,
|
2388 3621 | ModelPl::Output
|
2389 3622 | >
|
2390 3623 | >::Output
|
2391 3624 | >,
|
2392 3625 |
|
2393 3626 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2394 3627 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2395 3628 |
|
2396 3629 | {
|
2397 3630 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2398 3631 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2399 - | let svc = crate::operation_shape::HttpChecksumRequired::from_service(service);
|
3632 + | let svc = crate::operation_shape::HttpPayloadWithStructure::from_service(service);
|
2400 3633 | let svc = self.model_plugin.apply(svc);
|
2401 3634 | let svc =
|
2402 3635 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2403 3636 | .apply(svc);
|
2404 3637 | let svc = self.http_plugin.apply(svc);
|
2405 - | self.http_checksum_required_custom(svc)
|
3638 + | self.http_payload_with_structure_custom(svc)
|
2406 3639 | }
|
2407 3640 |
|
2408 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) to a custom [`Service`](tower::Service).
|
3641 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) to a custom [`Service`](tower::Service).
|
2409 3642 | /// not constrained by the Smithy contract.
|
2410 - | fn http_checksum_required_custom<S>(mut self, svc: S) -> Self
|
3643 + | fn http_payload_with_structure_custom<S>(mut self, svc: S) -> Self
|
2411 3644 | where
|
2412 3645 | S: ::tower::Service<
|
2413 3646 | ::http::Request<Body>,
|
2414 3647 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2415 3648 | Error = ::std::convert::Infallible,
|
2416 3649 | > + Clone
|
2417 3650 | + Send
|
2418 3651 | + 'static,
|
2419 3652 | S::Future: Send + 'static,
|
2420 3653 | {
|
2421 - | self.http_checksum_required =
|
3654 + | self.http_payload_with_structure =
|
2422 3655 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2423 3656 | self
|
2424 3657 | }
|
2425 3658 |
|
2426 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
3659 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
2427 3660 | ///
|
2428 3661 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2429 3662 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2430 3663 | ///
|
2431 3664 | /// # Example
|
2432 3665 | ///
|
2433 3666 | /// ```no_run
|
2434 3667 | /// use rest_json::{RestJson, RestJsonConfig};
|
2435 3668 | ///
|
2436 3669 | /// use rest_json::{input, output, error};
|
2437 3670 | ///
|
2438 - | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, error::HttpEmptyPrefixHeadersError> {
|
3671 + | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, error::HttpPayloadWithUnionError> {
|
2439 3672 | /// todo!()
|
2440 3673 | /// }
|
2441 3674 | ///
|
2442 3675 | /// let config = RestJsonConfig::builder().build();
|
2443 3676 | /// let app = RestJson::builder(config)
|
2444 - | /// .http_empty_prefix_headers(handler)
|
3677 + | /// .http_payload_with_union(handler)
|
2445 3678 | /// /* Set other handlers */
|
2446 3679 | /// .build()
|
2447 3680 | /// .unwrap();
|
2448 3681 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2449 3682 | /// ```
|
2450 3683 | ///
|
2451 - | pub fn http_empty_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3684 + | pub fn http_payload_with_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2452 3685 | where
|
2453 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerExtractors>,
|
3686 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithUnion, HandlerExtractors>,
|
2454 3687 |
|
2455 3688 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2456 3689 | RestJson<L>,
|
2457 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2458 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerType>
|
3690 + | crate::operation_shape::HttpPayloadWithUnion,
|
3691 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithUnion, HandlerType>
|
2459 3692 | >,
|
2460 3693 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2461 3694 | RestJson<L>,
|
2462 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3695 + | crate::operation_shape::HttpPayloadWithUnion,
|
2463 3696 | ModelPl::Output
|
2464 3697 | >,
|
2465 3698 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2466 3699 | RestJson<L>,
|
2467 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3700 + | crate::operation_shape::HttpPayloadWithUnion,
|
2468 3701 | <
|
2469 3702 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2470 3703 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2471 3704 | RestJson<L>,
|
2472 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3705 + | crate::operation_shape::HttpPayloadWithUnion,
|
2473 3706 | ModelPl::Output
|
2474 3707 | >
|
2475 3708 | >::Output
|
2476 3709 | >,
|
2477 3710 |
|
2478 3711 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2479 3712 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2480 3713 |
|
2481 3714 | {
|
2482 3715 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2483 3716 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2484 - | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_handler(handler);
|
3717 + | let svc = crate::operation_shape::HttpPayloadWithUnion::from_handler(handler);
|
2485 3718 | let svc = self.model_plugin.apply(svc);
|
2486 3719 | let svc =
|
2487 3720 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2488 3721 | .apply(svc);
|
2489 3722 | let svc = self.http_plugin.apply(svc);
|
2490 - | self.http_empty_prefix_headers_custom(svc)
|
3723 + | self.http_payload_with_union_custom(svc)
|
2491 3724 | }
|
2492 3725 |
|
2493 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
3726 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
2494 3727 | ///
|
2495 3728 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2496 3729 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2497 3730 | ///
|
2498 3731 | /// # Example
|
2499 3732 | ///
|
2500 3733 | /// ```no_run
|
2501 3734 | /// use rest_json::{RestJson, RestJsonConfig};
|
2502 3735 | ///
|
2503 3736 | /// use rest_json::{input, output, error};
|
2504 3737 | ///
|
2505 - | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, error::HttpEmptyPrefixHeadersError> {
|
3738 + | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, error::HttpPayloadWithUnionError> {
|
2506 3739 | /// todo!()
|
2507 3740 | /// }
|
2508 3741 | ///
|
2509 3742 | /// let config = RestJsonConfig::builder().build();
|
2510 3743 | /// let svc = ::tower::util::service_fn(handler);
|
2511 3744 | /// let app = RestJson::builder(config)
|
2512 - | /// .http_empty_prefix_headers_service(svc)
|
3745 + | /// .http_payload_with_union_service(svc)
|
2513 3746 | /// /* Set other handlers */
|
2514 3747 | /// .build()
|
2515 3748 | /// .unwrap();
|
2516 3749 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2517 3750 | /// ```
|
2518 3751 | ///
|
2519 - | pub fn http_empty_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3752 + | pub fn http_payload_with_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2520 3753 | where
|
2521 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpEmptyPrefixHeaders, ServiceExtractors>,
|
3754 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithUnion, ServiceExtractors>,
|
2522 3755 |
|
2523 3756 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2524 3757 | RestJson<L>,
|
2525 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2526 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpEmptyPrefixHeaders, S>
|
3758 + | crate::operation_shape::HttpPayloadWithUnion,
|
3759 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithUnion, S>
|
2527 3760 | >,
|
2528 3761 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2529 3762 | RestJson<L>,
|
2530 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3763 + | crate::operation_shape::HttpPayloadWithUnion,
|
2531 3764 | ModelPl::Output
|
2532 3765 | >,
|
2533 3766 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2534 3767 | RestJson<L>,
|
2535 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3768 + | crate::operation_shape::HttpPayloadWithUnion,
|
2536 3769 | <
|
2537 3770 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2538 3771 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2539 3772 | RestJson<L>,
|
2540 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
3773 + | crate::operation_shape::HttpPayloadWithUnion,
|
2541 3774 | ModelPl::Output
|
2542 3775 | >
|
2543 3776 | >::Output
|
2544 3777 | >,
|
2545 3778 |
|
2546 3779 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2547 3780 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2548 3781 |
|
2549 3782 | {
|
2550 3783 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2551 3784 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2552 - | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_service(service);
|
3785 + | let svc = crate::operation_shape::HttpPayloadWithUnion::from_service(service);
|
2553 3786 | let svc = self.model_plugin.apply(svc);
|
2554 3787 | let svc =
|
2555 3788 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2556 3789 | .apply(svc);
|
2557 3790 | let svc = self.http_plugin.apply(svc);
|
2558 - | self.http_empty_prefix_headers_custom(svc)
|
3791 + | self.http_payload_with_union_custom(svc)
|
2559 3792 | }
|
2560 3793 |
|
2561 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) to a custom [`Service`](tower::Service).
|
3794 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) to a custom [`Service`](tower::Service).
|
2562 3795 | /// not constrained by the Smithy contract.
|
2563 - | fn http_empty_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
3796 + | fn http_payload_with_union_custom<S>(mut self, svc: S) -> Self
|
2564 3797 | where
|
2565 3798 | S: ::tower::Service<
|
2566 3799 | ::http::Request<Body>,
|
2567 3800 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2568 3801 | Error = ::std::convert::Infallible,
|
2569 3802 | > + Clone
|
2570 3803 | + Send
|
2571 3804 | + 'static,
|
2572 3805 | S::Future: Send + 'static,
|
2573 3806 | {
|
2574 - | self.http_empty_prefix_headers =
|
3807 + | self.http_payload_with_union =
|
2575 3808 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2576 3809 | self
|
2577 3810 | }
|
2578 3811 |
|
2579 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
3812 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
2580 3813 | ///
|
2581 3814 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2582 3815 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2583 3816 | ///
|
2584 3817 | /// # Example
|
2585 3818 | ///
|
2586 3819 | /// ```no_run
|
2587 3820 | /// use rest_json::{RestJson, RestJsonConfig};
|
2588 3821 | ///
|
2589 3822 | /// use rest_json::{input, output, error};
|
2590 3823 | ///
|
2591 - | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
3824 + | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, error::HttpPrefixHeadersError> {
|
2592 3825 | /// todo!()
|
2593 3826 | /// }
|
2594 3827 | ///
|
2595 3828 | /// let config = RestJsonConfig::builder().build();
|
2596 3829 | /// let app = RestJson::builder(config)
|
2597 - | /// .http_enum_payload(handler)
|
3830 + | /// .http_prefix_headers(handler)
|
2598 3831 | /// /* Set other handlers */
|
2599 3832 | /// .build()
|
2600 3833 | /// .unwrap();
|
2601 3834 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2602 3835 | /// ```
|
2603 3836 | ///
|
2604 - | pub fn http_enum_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3837 + | pub fn http_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2605 3838 | where
|
2606 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpEnumPayload, HandlerExtractors>,
|
3839 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeaders, HandlerExtractors>,
|
2607 3840 |
|
2608 3841 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2609 3842 | RestJson<L>,
|
2610 - | crate::operation_shape::HttpEnumPayload,
|
2611 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpEnumPayload, HandlerType>
|
3843 + | crate::operation_shape::HttpPrefixHeaders,
|
3844 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeaders, HandlerType>
|
2612 3845 | >,
|
2613 3846 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2614 3847 | RestJson<L>,
|
2615 - | crate::operation_shape::HttpEnumPayload,
|
3848 + | crate::operation_shape::HttpPrefixHeaders,
|
2616 3849 | ModelPl::Output
|
2617 3850 | >,
|
2618 3851 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2619 3852 | RestJson<L>,
|
2620 - | crate::operation_shape::HttpEnumPayload,
|
3853 + | crate::operation_shape::HttpPrefixHeaders,
|
2621 3854 | <
|
2622 3855 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2623 3856 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2624 3857 | RestJson<L>,
|
2625 - | crate::operation_shape::HttpEnumPayload,
|
3858 + | crate::operation_shape::HttpPrefixHeaders,
|
2626 3859 | ModelPl::Output
|
2627 3860 | >
|
2628 3861 | >::Output
|
2629 3862 | >,
|
2630 3863 |
|
2631 3864 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2632 3865 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2633 3866 |
|
2634 3867 | {
|
2635 3868 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2636 3869 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2637 - | let svc = crate::operation_shape::HttpEnumPayload::from_handler(handler);
|
3870 + | let svc = crate::operation_shape::HttpPrefixHeaders::from_handler(handler);
|
2638 3871 | let svc = self.model_plugin.apply(svc);
|
2639 3872 | let svc =
|
2640 3873 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2641 3874 | .apply(svc);
|
2642 3875 | let svc = self.http_plugin.apply(svc);
|
2643 - | self.http_enum_payload_custom(svc)
|
3876 + | self.http_prefix_headers_custom(svc)
|
2644 3877 | }
|
2645 3878 |
|
2646 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
3879 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
2647 3880 | ///
|
2648 3881 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2649 3882 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2650 3883 | ///
|
2651 3884 | /// # Example
|
2652 3885 | ///
|
2653 3886 | /// ```no_run
|
2654 3887 | /// use rest_json::{RestJson, RestJsonConfig};
|
2655 3888 | ///
|
2656 3889 | /// use rest_json::{input, output, error};
|
2657 3890 | ///
|
2658 - | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
3891 + | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, error::HttpPrefixHeadersError> {
|
2659 3892 | /// todo!()
|
2660 3893 | /// }
|
2661 3894 | ///
|
2662 3895 | /// let config = RestJsonConfig::builder().build();
|
2663 3896 | /// let svc = ::tower::util::service_fn(handler);
|
2664 3897 | /// let app = RestJson::builder(config)
|
2665 - | /// .http_enum_payload_service(svc)
|
3898 + | /// .http_prefix_headers_service(svc)
|
2666 3899 | /// /* Set other handlers */
|
2667 3900 | /// .build()
|
2668 3901 | /// .unwrap();
|
2669 3902 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2670 3903 | /// ```
|
2671 3904 | ///
|
2672 - | pub fn http_enum_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3905 + | pub fn http_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2673 3906 | where
|
2674 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpEnumPayload, ServiceExtractors>,
|
3907 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeaders, ServiceExtractors>,
|
2675 3908 |
|
2676 3909 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2677 3910 | RestJson<L>,
|
2678 - | crate::operation_shape::HttpEnumPayload,
|
2679 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpEnumPayload, S>
|
3911 + | crate::operation_shape::HttpPrefixHeaders,
|
3912 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeaders, S>
|
2680 3913 | >,
|
2681 3914 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2682 3915 | RestJson<L>,
|
2683 - | crate::operation_shape::HttpEnumPayload,
|
3916 + | crate::operation_shape::HttpPrefixHeaders,
|
2684 3917 | ModelPl::Output
|
2685 3918 | >,
|
2686 3919 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2687 3920 | RestJson<L>,
|
2688 - | crate::operation_shape::HttpEnumPayload,
|
3921 + | crate::operation_shape::HttpPrefixHeaders,
|
2689 3922 | <
|
2690 3923 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2691 3924 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2692 3925 | RestJson<L>,
|
2693 - | crate::operation_shape::HttpEnumPayload,
|
3926 + | crate::operation_shape::HttpPrefixHeaders,
|
2694 3927 | ModelPl::Output
|
2695 3928 | >
|
2696 3929 | >::Output
|
2697 3930 | >,
|
2698 3931 |
|
2699 3932 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2700 3933 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2701 3934 |
|
2702 3935 | {
|
2703 3936 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2704 3937 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2705 - | let svc = crate::operation_shape::HttpEnumPayload::from_service(service);
|
3938 + | let svc = crate::operation_shape::HttpPrefixHeaders::from_service(service);
|
2706 3939 | let svc = self.model_plugin.apply(svc);
|
2707 3940 | let svc =
|
2708 3941 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2709 3942 | .apply(svc);
|
2710 3943 | let svc = self.http_plugin.apply(svc);
|
2711 - | self.http_enum_payload_custom(svc)
|
3944 + | self.http_prefix_headers_custom(svc)
|
2712 3945 | }
|
2713 3946 |
|
2714 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) to a custom [`Service`](tower::Service).
|
3947 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) to a custom [`Service`](tower::Service).
|
2715 3948 | /// not constrained by the Smithy contract.
|
2716 - | fn http_enum_payload_custom<S>(mut self, svc: S) -> Self
|
3949 + | fn http_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
2717 3950 | where
|
2718 3951 | S: ::tower::Service<
|
2719 3952 | ::http::Request<Body>,
|
2720 3953 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2721 3954 | Error = ::std::convert::Infallible,
|
2722 3955 | > + Clone
|
2723 3956 | + Send
|
2724 3957 | + 'static,
|
2725 3958 | S::Future: Send + 'static,
|
2726 3959 | {
|
2727 - | self.http_enum_payload = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3960 + | self.http_prefix_headers = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2728 3961 | self
|
2729 3962 | }
|
2730 3963 |
|
2731 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
3964 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
2732 3965 | ///
|
2733 3966 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2734 3967 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2735 3968 | ///
|
2736 3969 | /// # Example
|
2737 3970 | ///
|
2738 3971 | /// ```no_run
|
2739 3972 | /// use rest_json::{RestJson, RestJsonConfig};
|
2740 3973 | ///
|
2741 3974 | /// use rest_json::{input, output, error};
|
2742 3975 | ///
|
2743 - | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, error::HttpPayloadTraitsError> {
|
3976 + | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, error::HttpPrefixHeadersInResponseError> {
|
2744 3977 | /// todo!()
|
2745 3978 | /// }
|
2746 3979 | ///
|
2747 3980 | /// let config = RestJsonConfig::builder().build();
|
2748 3981 | /// let app = RestJson::builder(config)
|
2749 - | /// .http_payload_traits(handler)
|
3982 + | /// .http_prefix_headers_in_response(handler)
|
2750 3983 | /// /* Set other handlers */
|
2751 3984 | /// .build()
|
2752 3985 | /// .unwrap();
|
2753 3986 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2754 3987 | /// ```
|
2755 3988 | ///
|
2756 - | pub fn http_payload_traits<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3989 + | pub fn http_prefix_headers_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2757 3990 | where
|
2758 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraits, HandlerExtractors>,
|
3991 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerExtractors>,
|
2759 3992 |
|
2760 3993 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2761 3994 | RestJson<L>,
|
2762 - | crate::operation_shape::HttpPayloadTraits,
|
2763 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraits, HandlerType>
|
3995 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3996 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerType>
|
2764 3997 | >,
|
2765 3998 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2766 3999 | RestJson<L>,
|
2767 - | crate::operation_shape::HttpPayloadTraits,
|
4000 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2768 4001 | ModelPl::Output
|
2769 4002 | >,
|
2770 4003 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2771 4004 | RestJson<L>,
|
2772 - | crate::operation_shape::HttpPayloadTraits,
|
4005 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2773 4006 | <
|
2774 4007 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2775 4008 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2776 4009 | RestJson<L>,
|
2777 - | crate::operation_shape::HttpPayloadTraits,
|
4010 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2778 4011 | ModelPl::Output
|
2779 4012 | >
|
2780 4013 | >::Output
|
2781 4014 | >,
|
2782 4015 |
|
2783 4016 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2784 4017 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2785 4018 |
|
2786 4019 | {
|
2787 4020 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2788 4021 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2789 - | let svc = crate::operation_shape::HttpPayloadTraits::from_handler(handler);
|
4022 + | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_handler(handler);
|
2790 4023 | let svc = self.model_plugin.apply(svc);
|
2791 4024 | let svc =
|
2792 4025 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2793 4026 | .apply(svc);
|
2794 4027 | let svc = self.http_plugin.apply(svc);
|
2795 - | self.http_payload_traits_custom(svc)
|
4028 + | self.http_prefix_headers_in_response_custom(svc)
|
2796 4029 | }
|
2797 4030 |
|
2798 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
4031 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
2799 4032 | ///
|
2800 4033 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2801 4034 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2802 4035 | ///
|
2803 4036 | /// # Example
|
2804 4037 | ///
|
2805 4038 | /// ```no_run
|
2806 4039 | /// use rest_json::{RestJson, RestJsonConfig};
|
2807 4040 | ///
|
2808 4041 | /// use rest_json::{input, output, error};
|
2809 4042 | ///
|
2810 - | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, error::HttpPayloadTraitsError> {
|
4043 + | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, error::HttpPrefixHeadersInResponseError> {
|
2811 4044 | /// todo!()
|
2812 4045 | /// }
|
2813 4046 | ///
|
2814 4047 | /// let config = RestJsonConfig::builder().build();
|
2815 4048 | /// let svc = ::tower::util::service_fn(handler);
|
2816 4049 | /// let app = RestJson::builder(config)
|
2817 - | /// .http_payload_traits_service(svc)
|
4050 + | /// .http_prefix_headers_in_response_service(svc)
|
2818 4051 | /// /* Set other handlers */
|
2819 4052 | /// .build()
|
2820 4053 | /// .unwrap();
|
2821 4054 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2822 4055 | /// ```
|
2823 4056 | ///
|
2824 - | pub fn http_payload_traits_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4057 + | pub fn http_prefix_headers_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2825 4058 | where
|
2826 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraits, ServiceExtractors>,
|
4059 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeadersInResponse, ServiceExtractors>,
|
2827 4060 |
|
2828 4061 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2829 4062 | RestJson<L>,
|
2830 - | crate::operation_shape::HttpPayloadTraits,
|
2831 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraits, S>
|
4063 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4064 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeadersInResponse, S>
|
2832 4065 | >,
|
2833 4066 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2834 4067 | RestJson<L>,
|
2835 - | crate::operation_shape::HttpPayloadTraits,
|
4068 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2836 4069 | ModelPl::Output
|
2837 4070 | >,
|
2838 4071 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2839 4072 | RestJson<L>,
|
2840 - | crate::operation_shape::HttpPayloadTraits,
|
4073 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2841 4074 | <
|
2842 4075 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2843 4076 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2844 4077 | RestJson<L>,
|
2845 - | crate::operation_shape::HttpPayloadTraits,
|
4078 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
2846 4079 | ModelPl::Output
|
2847 4080 | >
|
2848 4081 | >::Output
|
2849 4082 | >,
|
2850 4083 |
|
2851 4084 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2852 4085 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2853 4086 |
|
2854 4087 | {
|
2855 4088 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2856 4089 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2857 - | let svc = crate::operation_shape::HttpPayloadTraits::from_service(service);
|
4090 + | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_service(service);
|
2858 4091 | let svc = self.model_plugin.apply(svc);
|
2859 4092 | let svc =
|
2860 4093 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2861 4094 | .apply(svc);
|
2862 4095 | let svc = self.http_plugin.apply(svc);
|
2863 - | self.http_payload_traits_custom(svc)
|
4096 + | self.http_prefix_headers_in_response_custom(svc)
|
2864 4097 | }
|
2865 4098 |
|
2866 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) to a custom [`Service`](tower::Service).
|
4099 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) to a custom [`Service`](tower::Service).
|
2867 4100 | /// not constrained by the Smithy contract.
|
2868 - | fn http_payload_traits_custom<S>(mut self, svc: S) -> Self
|
4101 + | fn http_prefix_headers_in_response_custom<S>(mut self, svc: S) -> Self
|
2869 4102 | where
|
2870 4103 | S: ::tower::Service<
|
2871 4104 | ::http::Request<Body>,
|
2872 4105 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
2873 4106 | Error = ::std::convert::Infallible,
|
2874 4107 | > + Clone
|
2875 4108 | + Send
|
2876 4109 | + 'static,
|
2877 4110 | S::Future: Send + 'static,
|
2878 4111 | {
|
2879 - | self.http_payload_traits = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4112 + | self.http_prefix_headers_in_response =
|
4113 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
2880 4114 | self
|
2881 4115 | }
|
2882 4116 |
|
2883 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
4117 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
|
2884 4118 | ///
|
2885 4119 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2886 4120 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2887 4121 | ///
|
2888 4122 | /// # Example
|
2889 4123 | ///
|
2890 4124 | /// ```no_run
|
2891 4125 | /// use rest_json::{RestJson, RestJsonConfig};
|
2892 4126 | ///
|
2893 4127 | /// use rest_json::{input, output, error};
|
2894 4128 | ///
|
2895 - | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, error::HttpPayloadTraitsWithMediaTypeError> {
|
4129 + | /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, error::HttpQueryParamsOnlyOperationError> {
|
2896 4130 | /// todo!()
|
2897 4131 | /// }
|
2898 4132 | ///
|
2899 4133 | /// let config = RestJsonConfig::builder().build();
|
2900 4134 | /// let app = RestJson::builder(config)
|
2901 - | /// .http_payload_traits_with_media_type(handler)
|
4135 + | /// .http_query_params_only_operation(handler)
|
2902 4136 | /// /* Set other handlers */
|
2903 4137 | /// .build()
|
2904 4138 | /// .unwrap();
|
2905 4139 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2906 4140 | /// ```
|
2907 4141 | ///
|
2908 - | pub fn http_payload_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4142 + | pub fn http_query_params_only_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2909 4143 | where
|
2910 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerExtractors>,
|
4144 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerExtractors>,
|
2911 4145 |
|
2912 4146 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2913 4147 | RestJson<L>,
|
2914 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2915 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerType>
|
4148 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4149 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerType>
|
2916 4150 | >,
|
2917 4151 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2918 4152 | RestJson<L>,
|
2919 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4153 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2920 4154 | ModelPl::Output
|
2921 4155 | >,
|
2922 4156 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2923 4157 | RestJson<L>,
|
2924 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4158 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2925 4159 | <
|
2926 4160 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2927 4161 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2928 4162 | RestJson<L>,
|
2929 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4163 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2930 4164 | ModelPl::Output
|
2931 4165 | >
|
2932 4166 | >::Output
|
2933 4167 | >,
|
2934 4168 |
|
2935 4169 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2936 4170 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
2937 4171 |
|
2938 4172 | {
|
2939 4173 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
2940 4174 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
2941 - | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_handler(handler);
|
4175 + | let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_handler(handler);
|
2942 4176 | let svc = self.model_plugin.apply(svc);
|
2943 4177 | let svc =
|
2944 4178 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2945 4179 | .apply(svc);
|
2946 4180 | let svc = self.http_plugin.apply(svc);
|
2947 - | self.http_payload_traits_with_media_type_custom(svc)
|
4181 + | self.http_query_params_only_operation_custom(svc)
|
2948 4182 | }
|
2949 4183 |
|
2950 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
4184 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
|
2951 4185 | ///
|
2952 4186 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
2953 4187 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
2954 4188 | ///
|
2955 4189 | /// # Example
|
2956 4190 | ///
|
2957 4191 | /// ```no_run
|
2958 4192 | /// use rest_json::{RestJson, RestJsonConfig};
|
2959 4193 | ///
|
2960 4194 | /// use rest_json::{input, output, error};
|
2961 4195 | ///
|
2962 - | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, error::HttpPayloadTraitsWithMediaTypeError> {
|
4196 + | /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, error::HttpQueryParamsOnlyOperationError> {
|
2963 4197 | /// todo!()
|
2964 4198 | /// }
|
2965 4199 | ///
|
2966 4200 | /// let config = RestJsonConfig::builder().build();
|
2967 4201 | /// let svc = ::tower::util::service_fn(handler);
|
2968 4202 | /// let app = RestJson::builder(config)
|
2969 - | /// .http_payload_traits_with_media_type_service(svc)
|
4203 + | /// .http_query_params_only_operation_service(svc)
|
2970 4204 | /// /* Set other handlers */
|
2971 4205 | /// .build()
|
2972 4206 | /// .unwrap();
|
2973 4207 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2974 4208 | /// ```
|
2975 4209 | ///
|
2976 - | pub fn http_payload_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4210 + | pub fn http_query_params_only_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2977 4211 | where
|
2978 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraitsWithMediaType, ServiceExtractors>,
|
4212 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpQueryParamsOnlyOperation, ServiceExtractors>,
|
2979 4213 |
|
2980 4214 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2981 4215 | RestJson<L>,
|
2982 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2983 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraitsWithMediaType, S>
|
4216 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4217 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpQueryParamsOnlyOperation, S>
|
2984 4218 | >,
|
2985 4219 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2986 4220 | RestJson<L>,
|
2987 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4221 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2988 4222 | ModelPl::Output
|
2989 4223 | >,
|
2990 4224 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2991 4225 | RestJson<L>,
|
2992 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4226 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2993 4227 | <
|
2994 4228 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2995 4229 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
2996 4230 | RestJson<L>,
|
2997 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
4231 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
2998 4232 | ModelPl::Output
|
2999 4233 | >
|
3000 4234 | >::Output
|
3001 4235 | >,
|
3002 4236 |
|
3003 4237 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3004 4238 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3005 4239 |
|
3006 4240 | {
|
3007 4241 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3008 4242 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3009 - | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_service(service);
|
4243 + | let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_service(service);
|
3010 4244 | let svc = self.model_plugin.apply(svc);
|
3011 4245 | let svc =
|
3012 4246 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3013 4247 | .apply(svc);
|
3014 4248 | let svc = self.http_plugin.apply(svc);
|
3015 - | self.http_payload_traits_with_media_type_custom(svc)
|
4249 + | self.http_query_params_only_operation_custom(svc)
|
3016 4250 | }
|
3017 4251 |
|
3018 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
4252 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) to a custom [`Service`](tower::Service).
|
3019 4253 | /// not constrained by the Smithy contract.
|
3020 - | fn http_payload_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
4254 + | fn http_query_params_only_operation_custom<S>(mut self, svc: S) -> Self
|
3021 4255 | where
|
3022 4256 | S: ::tower::Service<
|
3023 4257 | ::http::Request<Body>,
|
3024 4258 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3025 4259 | Error = ::std::convert::Infallible,
|
3026 4260 | > + Clone
|
3027 4261 | + Send
|
3028 4262 | + 'static,
|
3029 4263 | S::Future: Send + 'static,
|
3030 4264 | {
|
3031 - | self.http_payload_traits_with_media_type =
|
4265 + | self.http_query_params_only_operation =
|
3032 4266 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3033 4267 | self
|
3034 4268 | }
|
3035 4269 |
|
3036 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
4270 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
3037 4271 | ///
|
3038 4272 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3039 4273 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3040 4274 | ///
|
3041 4275 | /// # Example
|
3042 4276 | ///
|
3043 4277 | /// ```no_run
|
3044 4278 | /// use rest_json::{RestJson, RestJsonConfig};
|
3045 4279 | ///
|
3046 4280 | /// use rest_json::{input, output, error};
|
3047 4281 | ///
|
3048 - | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, error::HttpPayloadWithStructureError> {
|
4282 + | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
3049 4283 | /// todo!()
|
3050 4284 | /// }
|
3051 4285 | ///
|
3052 4286 | /// let config = RestJsonConfig::builder().build();
|
3053 4287 | /// let app = RestJson::builder(config)
|
3054 - | /// .http_payload_with_structure(handler)
|
4288 + | /// .http_request_with_float_labels(handler)
|
3055 4289 | /// /* Set other handlers */
|
3056 4290 | /// .build()
|
3057 4291 | /// .unwrap();
|
3058 4292 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3059 4293 | /// ```
|
3060 4294 | ///
|
3061 - | pub fn http_payload_with_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4295 + | pub fn http_request_with_float_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3062 4296 | where
|
3063 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithStructure, HandlerExtractors>,
|
4297 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithFloatLabels, HandlerExtractors>,
|
3064 4298 |
|
3065 4299 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3066 4300 | RestJson<L>,
|
3067 - | crate::operation_shape::HttpPayloadWithStructure,
|
3068 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithStructure, HandlerType>
|
4301 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4302 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithFloatLabels, HandlerType>
|
3069 4303 | >,
|
3070 4304 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3071 4305 | RestJson<L>,
|
3072 - | crate::operation_shape::HttpPayloadWithStructure,
|
4306 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3073 4307 | ModelPl::Output
|
3074 4308 | >,
|
3075 4309 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3076 4310 | RestJson<L>,
|
3077 - | crate::operation_shape::HttpPayloadWithStructure,
|
4311 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3078 4312 | <
|
3079 4313 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3080 4314 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3081 4315 | RestJson<L>,
|
3082 - | crate::operation_shape::HttpPayloadWithStructure,
|
4316 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3083 4317 | ModelPl::Output
|
3084 4318 | >
|
3085 4319 | >::Output
|
3086 4320 | >,
|
3087 4321 |
|
3088 4322 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3089 4323 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3090 4324 |
|
3091 4325 | {
|
3092 4326 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3093 4327 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3094 - | let svc = crate::operation_shape::HttpPayloadWithStructure::from_handler(handler);
|
4328 + | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_handler(handler);
|
3095 4329 | let svc = self.model_plugin.apply(svc);
|
3096 4330 | let svc =
|
3097 4331 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3098 4332 | .apply(svc);
|
3099 4333 | let svc = self.http_plugin.apply(svc);
|
3100 - | self.http_payload_with_structure_custom(svc)
|
4334 + | self.http_request_with_float_labels_custom(svc)
|
3101 4335 | }
|
3102 4336 |
|
3103 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
4337 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
3104 4338 | ///
|
3105 4339 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3106 4340 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3107 4341 | ///
|
3108 4342 | /// # Example
|
3109 4343 | ///
|
3110 4344 | /// ```no_run
|
3111 4345 | /// use rest_json::{RestJson, RestJsonConfig};
|
3112 4346 | ///
|
3113 4347 | /// use rest_json::{input, output, error};
|
3114 4348 | ///
|
3115 - | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, error::HttpPayloadWithStructureError> {
|
4349 + | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
3116 4350 | /// todo!()
|
3117 4351 | /// }
|
3118 4352 | ///
|
3119 4353 | /// let config = RestJsonConfig::builder().build();
|
3120 4354 | /// let svc = ::tower::util::service_fn(handler);
|
3121 4355 | /// let app = RestJson::builder(config)
|
3122 - | /// .http_payload_with_structure_service(svc)
|
4356 + | /// .http_request_with_float_labels_service(svc)
|
3123 4357 | /// /* Set other handlers */
|
3124 4358 | /// .build()
|
3125 4359 | /// .unwrap();
|
3126 4360 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3127 4361 | /// ```
|
3128 4362 | ///
|
3129 - | pub fn http_payload_with_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4363 + | pub fn http_request_with_float_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3130 4364 | where
|
3131 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithStructure, ServiceExtractors>,
|
4365 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithFloatLabels, ServiceExtractors>,
|
3132 4366 |
|
3133 4367 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3134 4368 | RestJson<L>,
|
3135 - | crate::operation_shape::HttpPayloadWithStructure,
|
3136 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithStructure, S>
|
4369 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4370 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithFloatLabels, S>
|
3137 4371 | >,
|
3138 4372 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3139 4373 | RestJson<L>,
|
3140 - | crate::operation_shape::HttpPayloadWithStructure,
|
4374 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3141 4375 | ModelPl::Output
|
3142 4376 | >,
|
3143 4377 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3144 4378 | RestJson<L>,
|
3145 - | crate::operation_shape::HttpPayloadWithStructure,
|
4379 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3146 4380 | <
|
3147 4381 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3148 4382 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3149 4383 | RestJson<L>,
|
3150 - | crate::operation_shape::HttpPayloadWithStructure,
|
4384 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
3151 4385 | ModelPl::Output
|
3152 4386 | >
|
3153 4387 | >::Output
|
3154 4388 | >,
|
3155 4389 |
|
3156 4390 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3157 4391 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3158 4392 |
|
3159 4393 | {
|
3160 4394 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3161 4395 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3162 - | let svc = crate::operation_shape::HttpPayloadWithStructure::from_service(service);
|
4396 + | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_service(service);
|
3163 4397 | let svc = self.model_plugin.apply(svc);
|
3164 4398 | let svc =
|
3165 4399 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3166 4400 | .apply(svc);
|
3167 4401 | let svc = self.http_plugin.apply(svc);
|
3168 - | self.http_payload_with_structure_custom(svc)
|
4402 + | self.http_request_with_float_labels_custom(svc)
|
3169 4403 | }
|
3170 4404 |
|
3171 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) to a custom [`Service`](tower::Service).
|
4405 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) to a custom [`Service`](tower::Service).
|
3172 4406 | /// not constrained by the Smithy contract.
|
3173 - | fn http_payload_with_structure_custom<S>(mut self, svc: S) -> Self
|
4407 + | fn http_request_with_float_labels_custom<S>(mut self, svc: S) -> Self
|
3174 4408 | where
|
3175 4409 | S: ::tower::Service<
|
3176 4410 | ::http::Request<Body>,
|
3177 4411 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3178 4412 | Error = ::std::convert::Infallible,
|
3179 4413 | > + Clone
|
3180 4414 | + Send
|
3181 4415 | + 'static,
|
3182 4416 | S::Future: Send + 'static,
|
3183 4417 | {
|
3184 - | self.http_payload_with_structure =
|
4418 + | self.http_request_with_float_labels =
|
3185 4419 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3186 4420 | self
|
3187 4421 | }
|
3188 4422 |
|
3189 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
4423 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
3190 4424 | ///
|
3191 4425 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3192 4426 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3193 4427 | ///
|
3194 4428 | /// # Example
|
3195 4429 | ///
|
3196 4430 | /// ```no_run
|
3197 4431 | /// use rest_json::{RestJson, RestJsonConfig};
|
3198 4432 | ///
|
3199 4433 | /// use rest_json::{input, output, error};
|
3200 4434 | ///
|
3201 - | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, error::HttpPayloadWithUnionError> {
|
4435 + | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
3202 4436 | /// todo!()
|
3203 4437 | /// }
|
3204 4438 | ///
|
3205 4439 | /// let config = RestJsonConfig::builder().build();
|
3206 4440 | /// let app = RestJson::builder(config)
|
3207 - | /// .http_payload_with_union(handler)
|
4441 + | /// .http_request_with_greedy_label_in_path(handler)
|
3208 4442 | /// /* Set other handlers */
|
3209 4443 | /// .build()
|
3210 4444 | /// .unwrap();
|
3211 4445 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3212 4446 | /// ```
|
3213 4447 | ///
|
3214 - | pub fn http_payload_with_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4448 + | pub fn http_request_with_greedy_label_in_path<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3215 4449 | where
|
3216 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithUnion, HandlerExtractors>,
|
4450 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerExtractors>,
|
3217 4451 |
|
3218 4452 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3219 4453 | RestJson<L>,
|
3220 - | crate::operation_shape::HttpPayloadWithUnion,
|
3221 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithUnion, HandlerType>
|
4454 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4455 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerType>
|
3222 4456 | >,
|
3223 4457 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3224 4458 | RestJson<L>,
|
3225 - | crate::operation_shape::HttpPayloadWithUnion,
|
4459 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3226 4460 | ModelPl::Output
|
3227 4461 | >,
|
3228 4462 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3229 4463 | RestJson<L>,
|
3230 - | crate::operation_shape::HttpPayloadWithUnion,
|
4464 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3231 4465 | <
|
3232 4466 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3233 4467 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3234 4468 | RestJson<L>,
|
3235 - | crate::operation_shape::HttpPayloadWithUnion,
|
4469 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3236 4470 | ModelPl::Output
|
3237 4471 | >
|
3238 4472 | >::Output
|
3239 4473 | >,
|
3240 4474 |
|
3241 4475 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3242 4476 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3243 4477 |
|
3244 4478 | {
|
3245 4479 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3246 4480 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3247 - | let svc = crate::operation_shape::HttpPayloadWithUnion::from_handler(handler);
|
4481 + | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_handler(handler);
|
3248 4482 | let svc = self.model_plugin.apply(svc);
|
3249 4483 | let svc =
|
3250 4484 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3251 4485 | .apply(svc);
|
3252 4486 | let svc = self.http_plugin.apply(svc);
|
3253 - | self.http_payload_with_union_custom(svc)
|
4487 + | self.http_request_with_greedy_label_in_path_custom(svc)
|
3254 4488 | }
|
3255 4489 |
|
3256 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
4490 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
3257 4491 | ///
|
3258 4492 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3259 4493 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3260 4494 | ///
|
3261 4495 | /// # Example
|
3262 4496 | ///
|
3263 4497 | /// ```no_run
|
3264 4498 | /// use rest_json::{RestJson, RestJsonConfig};
|
3265 4499 | ///
|
3266 4500 | /// use rest_json::{input, output, error};
|
3267 4501 | ///
|
3268 - | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, error::HttpPayloadWithUnionError> {
|
4502 + | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
3269 4503 | /// todo!()
|
3270 4504 | /// }
|
3271 4505 | ///
|
3272 4506 | /// let config = RestJsonConfig::builder().build();
|
3273 4507 | /// let svc = ::tower::util::service_fn(handler);
|
3274 4508 | /// let app = RestJson::builder(config)
|
3275 - | /// .http_payload_with_union_service(svc)
|
4509 + | /// .http_request_with_greedy_label_in_path_service(svc)
|
3276 4510 | /// /* Set other handlers */
|
3277 4511 | /// .build()
|
3278 4512 | /// .unwrap();
|
3279 4513 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3280 4514 | /// ```
|
3281 4515 | ///
|
3282 - | pub fn http_payload_with_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4516 + | pub fn http_request_with_greedy_label_in_path_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3283 4517 | where
|
3284 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithUnion, ServiceExtractors>,
|
4518 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, ServiceExtractors>,
|
3285 4519 |
|
3286 4520 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3287 4521 | RestJson<L>,
|
3288 - | crate::operation_shape::HttpPayloadWithUnion,
|
3289 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithUnion, S>
|
4522 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4523 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithGreedyLabelInPath, S>
|
3290 4524 | >,
|
3291 4525 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3292 4526 | RestJson<L>,
|
3293 - | crate::operation_shape::HttpPayloadWithUnion,
|
4527 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3294 4528 | ModelPl::Output
|
3295 4529 | >,
|
3296 4530 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3297 4531 | RestJson<L>,
|
3298 - | crate::operation_shape::HttpPayloadWithUnion,
|
4532 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3299 4533 | <
|
3300 4534 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3301 4535 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3302 4536 | RestJson<L>,
|
3303 - | crate::operation_shape::HttpPayloadWithUnion,
|
4537 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3304 4538 | ModelPl::Output
|
3305 4539 | >
|
3306 4540 | >::Output
|
3307 4541 | >,
|
3308 4542 |
|
3309 4543 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3310 4544 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3311 4545 |
|
3312 4546 | {
|
3313 4547 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3314 4548 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3315 - | let svc = crate::operation_shape::HttpPayloadWithUnion::from_service(service);
|
4549 + | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_service(service);
|
3316 4550 | let svc = self.model_plugin.apply(svc);
|
3317 4551 | let svc =
|
3318 4552 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3319 4553 | .apply(svc);
|
3320 4554 | let svc = self.http_plugin.apply(svc);
|
3321 - | self.http_payload_with_union_custom(svc)
|
4555 + | self.http_request_with_greedy_label_in_path_custom(svc)
|
3322 4556 | }
|
3323 4557 |
|
3324 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) to a custom [`Service`](tower::Service).
|
4558 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) to a custom [`Service`](tower::Service).
|
3325 4559 | /// not constrained by the Smithy contract.
|
3326 - | fn http_payload_with_union_custom<S>(mut self, svc: S) -> Self
|
4560 + | fn http_request_with_greedy_label_in_path_custom<S>(mut self, svc: S) -> Self
|
3327 4561 | where
|
3328 4562 | S: ::tower::Service<
|
3329 4563 | ::http::Request<Body>,
|
3330 4564 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3331 4565 | Error = ::std::convert::Infallible,
|
3332 4566 | > + Clone
|
3333 4567 | + Send
|
3334 4568 | + 'static,
|
3335 4569 | S::Future: Send + 'static,
|
3336 4570 | {
|
3337 - | self.http_payload_with_union =
|
4571 + | self.http_request_with_greedy_label_in_path =
|
3338 4572 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3339 4573 | self
|
3340 4574 | }
|
3341 4575 |
|
3342 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
4576 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
3343 4577 | ///
|
3344 4578 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3345 4579 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3346 4580 | ///
|
3347 4581 | /// # Example
|
3348 4582 | ///
|
3349 4583 | /// ```no_run
|
3350 4584 | /// use rest_json::{RestJson, RestJsonConfig};
|
3351 4585 | ///
|
3352 4586 | /// use rest_json::{input, output, error};
|
3353 4587 | ///
|
3354 - | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, error::HttpPrefixHeadersError> {
|
4588 + | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
3355 4589 | /// todo!()
|
3356 4590 | /// }
|
3357 4591 | ///
|
3358 4592 | /// let config = RestJsonConfig::builder().build();
|
3359 4593 | /// let app = RestJson::builder(config)
|
3360 - | /// .http_prefix_headers(handler)
|
4594 + | /// .http_request_with_labels(handler)
|
3361 4595 | /// /* Set other handlers */
|
3362 4596 | /// .build()
|
3363 4597 | /// .unwrap();
|
3364 4598 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3365 4599 | /// ```
|
3366 4600 | ///
|
3367 - | pub fn http_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4601 + | pub fn http_request_with_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3368 4602 | where
|
3369 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeaders, HandlerExtractors>,
|
4603 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabels, HandlerExtractors>,
|
3370 4604 |
|
3371 4605 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3372 4606 | RestJson<L>,
|
3373 - | crate::operation_shape::HttpPrefixHeaders,
|
3374 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeaders, HandlerType>
|
4607 + | crate::operation_shape::HttpRequestWithLabels,
|
4608 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabels, HandlerType>
|
3375 4609 | >,
|
3376 4610 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3377 4611 | RestJson<L>,
|
3378 - | crate::operation_shape::HttpPrefixHeaders,
|
4612 + | crate::operation_shape::HttpRequestWithLabels,
|
3379 4613 | ModelPl::Output
|
3380 4614 | >,
|
3381 4615 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3382 4616 | RestJson<L>,
|
3383 - | crate::operation_shape::HttpPrefixHeaders,
|
4617 + | crate::operation_shape::HttpRequestWithLabels,
|
3384 4618 | <
|
3385 4619 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3386 4620 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3387 4621 | RestJson<L>,
|
3388 - | crate::operation_shape::HttpPrefixHeaders,
|
4622 + | crate::operation_shape::HttpRequestWithLabels,
|
3389 4623 | ModelPl::Output
|
3390 4624 | >
|
3391 4625 | >::Output
|
3392 4626 | >,
|
3393 4627 |
|
3394 4628 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3395 4629 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3396 4630 |
|
3397 4631 | {
|
3398 4632 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3399 4633 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3400 - | let svc = crate::operation_shape::HttpPrefixHeaders::from_handler(handler);
|
4634 + | let svc = crate::operation_shape::HttpRequestWithLabels::from_handler(handler);
|
3401 4635 | let svc = self.model_plugin.apply(svc);
|
3402 4636 | let svc =
|
3403 4637 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3404 4638 | .apply(svc);
|
3405 4639 | let svc = self.http_plugin.apply(svc);
|
3406 - | self.http_prefix_headers_custom(svc)
|
4640 + | self.http_request_with_labels_custom(svc)
|
3407 4641 | }
|
3408 4642 |
|
3409 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
4643 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
3410 4644 | ///
|
3411 4645 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3412 4646 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3413 4647 | ///
|
3414 4648 | /// # Example
|
3415 4649 | ///
|
3416 4650 | /// ```no_run
|
3417 4651 | /// use rest_json::{RestJson, RestJsonConfig};
|
3418 4652 | ///
|
3419 4653 | /// use rest_json::{input, output, error};
|
3420 4654 | ///
|
3421 - | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, error::HttpPrefixHeadersError> {
|
4655 + | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
3422 4656 | /// todo!()
|
3423 4657 | /// }
|
3424 4658 | ///
|
3425 4659 | /// let config = RestJsonConfig::builder().build();
|
3426 4660 | /// let svc = ::tower::util::service_fn(handler);
|
3427 4661 | /// let app = RestJson::builder(config)
|
3428 - | /// .http_prefix_headers_service(svc)
|
4662 + | /// .http_request_with_labels_service(svc)
|
3429 4663 | /// /* Set other handlers */
|
3430 4664 | /// .build()
|
3431 4665 | /// .unwrap();
|
3432 4666 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3433 4667 | /// ```
|
3434 4668 | ///
|
3435 - | pub fn http_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4669 + | pub fn http_request_with_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3436 4670 | where
|
3437 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeaders, ServiceExtractors>,
|
4671 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabels, ServiceExtractors>,
|
3438 4672 |
|
3439 4673 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3440 4674 | RestJson<L>,
|
3441 - | crate::operation_shape::HttpPrefixHeaders,
|
3442 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeaders, S>
|
4675 + | crate::operation_shape::HttpRequestWithLabels,
|
4676 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabels, S>
|
3443 4677 | >,
|
3444 4678 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3445 4679 | RestJson<L>,
|
3446 - | crate::operation_shape::HttpPrefixHeaders,
|
4680 + | crate::operation_shape::HttpRequestWithLabels,
|
3447 4681 | ModelPl::Output
|
3448 4682 | >,
|
3449 4683 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3450 4684 | RestJson<L>,
|
3451 - | crate::operation_shape::HttpPrefixHeaders,
|
4685 + | crate::operation_shape::HttpRequestWithLabels,
|
3452 4686 | <
|
3453 4687 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3454 4688 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3455 4689 | RestJson<L>,
|
3456 - | crate::operation_shape::HttpPrefixHeaders,
|
4690 + | crate::operation_shape::HttpRequestWithLabels,
|
3457 4691 | ModelPl::Output
|
3458 4692 | >
|
3459 4693 | >::Output
|
3460 4694 | >,
|
3461 4695 |
|
3462 4696 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3463 4697 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3464 4698 |
|
3465 4699 | {
|
3466 4700 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3467 4701 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3468 - | let svc = crate::operation_shape::HttpPrefixHeaders::from_service(service);
|
4702 + | let svc = crate::operation_shape::HttpRequestWithLabels::from_service(service);
|
3469 4703 | let svc = self.model_plugin.apply(svc);
|
3470 4704 | let svc =
|
3471 4705 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3472 4706 | .apply(svc);
|
3473 4707 | let svc = self.http_plugin.apply(svc);
|
3474 - | self.http_prefix_headers_custom(svc)
|
4708 + | self.http_request_with_labels_custom(svc)
|
3475 4709 | }
|
3476 4710 |
|
3477 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) to a custom [`Service`](tower::Service).
|
4711 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) to a custom [`Service`](tower::Service).
|
3478 4712 | /// not constrained by the Smithy contract.
|
3479 - | fn http_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
4713 + | fn http_request_with_labels_custom<S>(mut self, svc: S) -> Self
|
3480 4714 | where
|
3481 4715 | S: ::tower::Service<
|
3482 4716 | ::http::Request<Body>,
|
3483 4717 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3484 4718 | Error = ::std::convert::Infallible,
|
3485 4719 | > + Clone
|
3486 4720 | + Send
|
3487 4721 | + 'static,
|
3488 4722 | S::Future: Send + 'static,
|
3489 4723 | {
|
3490 - | self.http_prefix_headers = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4724 + | self.http_request_with_labels =
|
4725 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3491 4726 | self
|
3492 4727 | }
|
3493 4728 |
|
3494 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
4729 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
3495 4730 | ///
|
3496 4731 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3497 4732 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3498 4733 | ///
|
3499 4734 | /// # Example
|
3500 4735 | ///
|
3501 4736 | /// ```no_run
|
3502 4737 | /// use rest_json::{RestJson, RestJsonConfig};
|
3503 4738 | ///
|
3504 4739 | /// use rest_json::{input, output, error};
|
3505 4740 | ///
|
3506 - | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, error::HttpPrefixHeadersInResponseError> {
|
4741 + | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
3507 4742 | /// todo!()
|
3508 4743 | /// }
|
3509 4744 | ///
|
3510 4745 | /// let config = RestJsonConfig::builder().build();
|
3511 4746 | /// let app = RestJson::builder(config)
|
3512 - | /// .http_prefix_headers_in_response(handler)
|
4747 + | /// .http_request_with_labels_and_timestamp_format(handler)
|
3513 4748 | /// /* Set other handlers */
|
3514 4749 | /// .build()
|
3515 4750 | /// .unwrap();
|
3516 4751 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3517 4752 | /// ```
|
3518 4753 | ///
|
3519 - | pub fn http_prefix_headers_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4754 + | pub fn http_request_with_labels_and_timestamp_format<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3520 4755 | where
|
3521 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerExtractors>,
|
4756 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerExtractors>,
|
3522 4757 |
|
3523 4758 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3524 4759 | RestJson<L>,
|
3525 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3526 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerType>
|
4760 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4761 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerType>
|
3527 4762 | >,
|
3528 4763 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3529 4764 | RestJson<L>,
|
3530 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4765 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3531 4766 | ModelPl::Output
|
3532 4767 | >,
|
3533 4768 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3534 4769 | RestJson<L>,
|
3535 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4770 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3536 4771 | <
|
3537 4772 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3538 4773 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3539 4774 | RestJson<L>,
|
3540 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4775 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3541 4776 | ModelPl::Output
|
3542 4777 | >
|
3543 4778 | >::Output
|
3544 4779 | >,
|
3545 4780 |
|
3546 4781 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3547 4782 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3548 4783 |
|
3549 4784 | {
|
3550 4785 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3551 4786 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3552 - | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_handler(handler);
|
4787 + | let svc =
|
4788 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_handler(handler);
|
3553 4789 | let svc = self.model_plugin.apply(svc);
|
3554 4790 | let svc =
|
3555 4791 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3556 4792 | .apply(svc);
|
3557 4793 | let svc = self.http_plugin.apply(svc);
|
3558 - | self.http_prefix_headers_in_response_custom(svc)
|
4794 + | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
3559 4795 | }
|
3560 4796 |
|
3561 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
4797 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
3562 4798 | ///
|
3563 4799 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3564 4800 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3565 4801 | ///
|
3566 4802 | /// # Example
|
3567 4803 | ///
|
3568 4804 | /// ```no_run
|
3569 4805 | /// use rest_json::{RestJson, RestJsonConfig};
|
3570 4806 | ///
|
3571 4807 | /// use rest_json::{input, output, error};
|
3572 4808 | ///
|
3573 - | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, error::HttpPrefixHeadersInResponseError> {
|
4809 + | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
3574 4810 | /// todo!()
|
3575 4811 | /// }
|
3576 4812 | ///
|
3577 4813 | /// let config = RestJsonConfig::builder().build();
|
3578 4814 | /// let svc = ::tower::util::service_fn(handler);
|
3579 4815 | /// let app = RestJson::builder(config)
|
3580 - | /// .http_prefix_headers_in_response_service(svc)
|
4816 + | /// .http_request_with_labels_and_timestamp_format_service(svc)
|
3581 4817 | /// /* Set other handlers */
|
3582 4818 | /// .build()
|
3583 4819 | /// .unwrap();
|
3584 4820 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3585 4821 | /// ```
|
3586 4822 | ///
|
3587 - | pub fn http_prefix_headers_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4823 + | pub fn http_request_with_labels_and_timestamp_format_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3588 4824 | where
|
3589 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeadersInResponse, ServiceExtractors>,
|
4825 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, ServiceExtractors>,
|
3590 4826 |
|
3591 4827 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3592 4828 | RestJson<L>,
|
3593 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3594 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeadersInResponse, S>
|
4829 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4830 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, S>
|
3595 4831 | >,
|
3596 4832 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3597 4833 | RestJson<L>,
|
3598 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4834 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3599 4835 | ModelPl::Output
|
3600 4836 | >,
|
3601 4837 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3602 4838 | RestJson<L>,
|
3603 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4839 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3604 4840 | <
|
3605 4841 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3606 4842 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3607 4843 | RestJson<L>,
|
3608 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
4844 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
3609 4845 | ModelPl::Output
|
3610 4846 | >
|
3611 4847 | >::Output
|
3612 4848 | >,
|
3613 4849 |
|
3614 4850 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3615 4851 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3616 4852 |
|
3617 4853 | {
|
3618 4854 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3619 4855 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3620 - | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_service(service);
|
4856 + | let svc =
|
4857 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_service(service);
|
3621 4858 | let svc = self.model_plugin.apply(svc);
|
3622 4859 | let svc =
|
3623 4860 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3624 4861 | .apply(svc);
|
3625 4862 | let svc = self.http_plugin.apply(svc);
|
3626 - | self.http_prefix_headers_in_response_custom(svc)
|
4863 + | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
3627 4864 | }
|
3628 4865 |
|
3629 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) to a custom [`Service`](tower::Service).
|
4866 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) to a custom [`Service`](tower::Service).
|
3630 4867 | /// not constrained by the Smithy contract.
|
3631 - | fn http_prefix_headers_in_response_custom<S>(mut self, svc: S) -> Self
|
4868 + | fn http_request_with_labels_and_timestamp_format_custom<S>(mut self, svc: S) -> Self
|
3632 4869 | where
|
3633 4870 | S: ::tower::Service<
|
3634 4871 | ::http::Request<Body>,
|
3635 4872 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3636 4873 | Error = ::std::convert::Infallible,
|
3637 4874 | > + Clone
|
3638 4875 | + Send
|
3639 4876 | + 'static,
|
3640 4877 | S::Future: Send + 'static,
|
3641 4878 | {
|
3642 - | self.http_prefix_headers_in_response =
|
4879 + | self.http_request_with_labels_and_timestamp_format =
|
3643 4880 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3644 4881 | self
|
3645 4882 | }
|
3646 4883 |
|
3647 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
4884 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
3648 4885 | ///
|
3649 4886 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3650 4887 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3651 4888 | ///
|
3652 4889 | /// # Example
|
3653 4890 | ///
|
3654 4891 | /// ```no_run
|
3655 4892 | /// use rest_json::{RestJson, RestJsonConfig};
|
3656 4893 | ///
|
3657 4894 | /// use rest_json::{input, output, error};
|
3658 4895 | ///
|
3659 - | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
4896 + | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
3660 4897 | /// todo!()
|
3661 4898 | /// }
|
3662 4899 | ///
|
3663 4900 | /// let config = RestJsonConfig::builder().build();
|
3664 4901 | /// let app = RestJson::builder(config)
|
3665 - | /// .http_request_with_float_labels(handler)
|
4902 + | /// .http_request_with_regex_literal(handler)
|
3666 4903 | /// /* Set other handlers */
|
3667 4904 | /// .build()
|
3668 4905 | /// .unwrap();
|
3669 4906 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3670 4907 | /// ```
|
3671 4908 | ///
|
3672 - | pub fn http_request_with_float_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4909 + | pub fn http_request_with_regex_literal<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3673 4910 | where
|
3674 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithFloatLabels, HandlerExtractors>,
|
4911 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerExtractors>,
|
3675 4912 |
|
3676 4913 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3677 4914 | RestJson<L>,
|
3678 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3679 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithFloatLabels, HandlerType>
|
4915 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4916 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerType>
|
3680 4917 | >,
|
3681 4918 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3682 4919 | RestJson<L>,
|
3683 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4920 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3684 4921 | ModelPl::Output
|
3685 4922 | >,
|
3686 4923 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3687 4924 | RestJson<L>,
|
3688 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4925 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3689 4926 | <
|
3690 4927 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3691 4928 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3692 4929 | RestJson<L>,
|
3693 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4930 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3694 4931 | ModelPl::Output
|
3695 4932 | >
|
3696 4933 | >::Output
|
3697 4934 | >,
|
3698 4935 |
|
3699 4936 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3700 4937 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3701 4938 |
|
3702 4939 | {
|
3703 4940 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3704 4941 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3705 - | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_handler(handler);
|
4942 + | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_handler(handler);
|
3706 4943 | let svc = self.model_plugin.apply(svc);
|
3707 4944 | let svc =
|
3708 4945 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3709 4946 | .apply(svc);
|
3710 4947 | let svc = self.http_plugin.apply(svc);
|
3711 - | self.http_request_with_float_labels_custom(svc)
|
4948 + | self.http_request_with_regex_literal_custom(svc)
|
3712 4949 | }
|
3713 4950 |
|
3714 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
4951 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
3715 4952 | ///
|
3716 4953 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3717 4954 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3718 4955 | ///
|
3719 4956 | /// # Example
|
3720 4957 | ///
|
3721 4958 | /// ```no_run
|
3722 4959 | /// use rest_json::{RestJson, RestJsonConfig};
|
3723 4960 | ///
|
3724 4961 | /// use rest_json::{input, output, error};
|
3725 4962 | ///
|
3726 - | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
4963 + | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
3727 4964 | /// todo!()
|
3728 4965 | /// }
|
3729 4966 | ///
|
3730 4967 | /// let config = RestJsonConfig::builder().build();
|
3731 4968 | /// let svc = ::tower::util::service_fn(handler);
|
3732 4969 | /// let app = RestJson::builder(config)
|
3733 - | /// .http_request_with_float_labels_service(svc)
|
4970 + | /// .http_request_with_regex_literal_service(svc)
|
3734 4971 | /// /* Set other handlers */
|
3735 4972 | /// .build()
|
3736 4973 | /// .unwrap();
|
3737 4974 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3738 4975 | /// ```
|
3739 4976 | ///
|
3740 - | pub fn http_request_with_float_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4977 + | pub fn http_request_with_regex_literal_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3741 4978 | where
|
3742 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithFloatLabels, ServiceExtractors>,
|
4979 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithRegexLiteral, ServiceExtractors>,
|
3743 4980 |
|
3744 4981 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3745 4982 | RestJson<L>,
|
3746 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3747 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithFloatLabels, S>
|
4983 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4984 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithRegexLiteral, S>
|
3748 4985 | >,
|
3749 4986 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3750 4987 | RestJson<L>,
|
3751 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4988 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3752 4989 | ModelPl::Output
|
3753 4990 | >,
|
3754 4991 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3755 4992 | RestJson<L>,
|
3756 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4993 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3757 4994 | <
|
3758 4995 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3759 4996 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3760 4997 | RestJson<L>,
|
3761 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
4998 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
3762 4999 | ModelPl::Output
|
3763 5000 | >
|
3764 5001 | >::Output
|
3765 5002 | >,
|
3766 5003 |
|
3767 5004 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3768 5005 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3769 5006 |
|
3770 5007 | {
|
3771 5008 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3772 5009 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3773 - | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_service(service);
|
5010 + | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_service(service);
|
3774 5011 | let svc = self.model_plugin.apply(svc);
|
3775 5012 | let svc =
|
3776 5013 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3777 5014 | .apply(svc);
|
3778 5015 | let svc = self.http_plugin.apply(svc);
|
3779 - | self.http_request_with_float_labels_custom(svc)
|
5016 + | self.http_request_with_regex_literal_custom(svc)
|
3780 5017 | }
|
3781 5018 |
|
3782 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) to a custom [`Service`](tower::Service).
|
5019 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) to a custom [`Service`](tower::Service).
|
3783 5020 | /// not constrained by the Smithy contract.
|
3784 - | fn http_request_with_float_labels_custom<S>(mut self, svc: S) -> Self
|
5021 + | fn http_request_with_regex_literal_custom<S>(mut self, svc: S) -> Self
|
3785 5022 | where
|
3786 5023 | S: ::tower::Service<
|
3787 5024 | ::http::Request<Body>,
|
3788 5025 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3789 5026 | Error = ::std::convert::Infallible,
|
3790 5027 | > + Clone
|
3791 5028 | + Send
|
3792 5029 | + 'static,
|
3793 5030 | S::Future: Send + 'static,
|
3794 5031 | {
|
3795 - | self.http_request_with_float_labels =
|
5032 + | self.http_request_with_regex_literal =
|
3796 5033 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3797 5034 | self
|
3798 5035 | }
|
3799 5036 |
|
3800 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
5037 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
3801 5038 | ///
|
3802 5039 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3803 5040 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3804 5041 | ///
|
3805 5042 | /// # Example
|
3806 5043 | ///
|
3807 5044 | /// ```no_run
|
3808 5045 | /// use rest_json::{RestJson, RestJsonConfig};
|
3809 5046 | ///
|
3810 5047 | /// use rest_json::{input, output, error};
|
3811 5048 | ///
|
3812 - | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
5049 + | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, error::HttpResponseCodeError> {
|
3813 5050 | /// todo!()
|
3814 5051 | /// }
|
3815 5052 | ///
|
3816 5053 | /// let config = RestJsonConfig::builder().build();
|
3817 5054 | /// let app = RestJson::builder(config)
|
3818 - | /// .http_request_with_greedy_label_in_path(handler)
|
5055 + | /// .http_response_code(handler)
|
3819 5056 | /// /* Set other handlers */
|
3820 5057 | /// .build()
|
3821 5058 | /// .unwrap();
|
3822 5059 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3823 5060 | /// ```
|
3824 5061 | ///
|
3825 - | pub fn http_request_with_greedy_label_in_path<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5062 + | pub fn http_response_code<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3826 5063 | where
|
3827 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerExtractors>,
|
5064 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpResponseCode, HandlerExtractors>,
|
3828 5065 |
|
3829 5066 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3830 5067 | RestJson<L>,
|
3831 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3832 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerType>
|
5068 + | crate::operation_shape::HttpResponseCode,
|
5069 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpResponseCode, HandlerType>
|
3833 5070 | >,
|
3834 5071 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3835 5072 | RestJson<L>,
|
3836 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5073 + | crate::operation_shape::HttpResponseCode,
|
3837 5074 | ModelPl::Output
|
3838 5075 | >,
|
3839 5076 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3840 5077 | RestJson<L>,
|
3841 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5078 + | crate::operation_shape::HttpResponseCode,
|
3842 5079 | <
|
3843 5080 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3844 5081 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3845 5082 | RestJson<L>,
|
3846 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5083 + | crate::operation_shape::HttpResponseCode,
|
3847 5084 | ModelPl::Output
|
3848 5085 | >
|
3849 5086 | >::Output
|
3850 5087 | >,
|
3851 5088 |
|
3852 5089 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3853 5090 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3854 5091 |
|
3855 5092 | {
|
3856 5093 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3857 5094 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3858 - | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_handler(handler);
|
5095 + | let svc = crate::operation_shape::HttpResponseCode::from_handler(handler);
|
3859 5096 | let svc = self.model_plugin.apply(svc);
|
3860 5097 | let svc =
|
3861 5098 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3862 5099 | .apply(svc);
|
3863 5100 | let svc = self.http_plugin.apply(svc);
|
3864 - | self.http_request_with_greedy_label_in_path_custom(svc)
|
5101 + | self.http_response_code_custom(svc)
|
3865 5102 | }
|
3866 5103 |
|
3867 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
5104 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
3868 5105 | ///
|
3869 5106 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3870 5107 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3871 5108 | ///
|
3872 5109 | /// # Example
|
3873 5110 | ///
|
3874 5111 | /// ```no_run
|
3875 5112 | /// use rest_json::{RestJson, RestJsonConfig};
|
3876 5113 | ///
|
3877 5114 | /// use rest_json::{input, output, error};
|
3878 5115 | ///
|
3879 - | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
5116 + | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, error::HttpResponseCodeError> {
|
3880 5117 | /// todo!()
|
3881 5118 | /// }
|
3882 5119 | ///
|
3883 5120 | /// let config = RestJsonConfig::builder().build();
|
3884 5121 | /// let svc = ::tower::util::service_fn(handler);
|
3885 5122 | /// let app = RestJson::builder(config)
|
3886 - | /// .http_request_with_greedy_label_in_path_service(svc)
|
5123 + | /// .http_response_code_service(svc)
|
3887 5124 | /// /* Set other handlers */
|
3888 5125 | /// .build()
|
3889 5126 | /// .unwrap();
|
3890 5127 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3891 5128 | /// ```
|
3892 5129 | ///
|
3893 - | pub fn http_request_with_greedy_label_in_path_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5130 + | pub fn http_response_code_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3894 5131 | where
|
3895 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, ServiceExtractors>,
|
5132 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpResponseCode, ServiceExtractors>,
|
3896 5133 |
|
3897 5134 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3898 5135 | RestJson<L>,
|
3899 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3900 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithGreedyLabelInPath, S>
|
5136 + | crate::operation_shape::HttpResponseCode,
|
5137 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpResponseCode, S>
|
3901 5138 | >,
|
3902 5139 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3903 5140 | RestJson<L>,
|
3904 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5141 + | crate::operation_shape::HttpResponseCode,
|
3905 5142 | ModelPl::Output
|
3906 5143 | >,
|
3907 5144 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3908 5145 | RestJson<L>,
|
3909 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5146 + | crate::operation_shape::HttpResponseCode,
|
3910 5147 | <
|
3911 5148 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3912 5149 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3913 5150 | RestJson<L>,
|
3914 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
5151 + | crate::operation_shape::HttpResponseCode,
|
3915 5152 | ModelPl::Output
|
3916 5153 | >
|
3917 5154 | >::Output
|
3918 5155 | >,
|
3919 5156 |
|
3920 5157 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3921 5158 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
3922 5159 |
|
3923 5160 | {
|
3924 5161 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
3925 5162 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
3926 - | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_service(service);
|
5163 + | let svc = crate::operation_shape::HttpResponseCode::from_service(service);
|
3927 5164 | let svc = self.model_plugin.apply(svc);
|
3928 5165 | let svc =
|
3929 5166 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3930 5167 | .apply(svc);
|
3931 5168 | let svc = self.http_plugin.apply(svc);
|
3932 - | self.http_request_with_greedy_label_in_path_custom(svc)
|
5169 + | self.http_response_code_custom(svc)
|
3933 5170 | }
|
3934 5171 |
|
3935 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) to a custom [`Service`](tower::Service).
|
5172 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) to a custom [`Service`](tower::Service).
|
3936 5173 | /// not constrained by the Smithy contract.
|
3937 - | fn http_request_with_greedy_label_in_path_custom<S>(mut self, svc: S) -> Self
|
5174 + | fn http_response_code_custom<S>(mut self, svc: S) -> Self
|
3938 5175 | where
|
3939 5176 | S: ::tower::Service<
|
3940 5177 | ::http::Request<Body>,
|
3941 5178 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
3942 5179 | Error = ::std::convert::Infallible,
|
3943 5180 | > + Clone
|
3944 5181 | + Send
|
3945 5182 | + 'static,
|
3946 5183 | S::Future: Send + 'static,
|
3947 5184 | {
|
3948 - | self.http_request_with_greedy_label_in_path =
|
3949 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5185 + | self.http_response_code = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
3950 5186 | self
|
3951 5187 | }
|
3952 5188 |
|
3953 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
5189 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
3954 5190 | ///
|
3955 5191 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
3956 5192 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
3957 5193 | ///
|
3958 5194 | /// # Example
|
3959 5195 | ///
|
3960 5196 | /// ```no_run
|
3961 5197 | /// use rest_json::{RestJson, RestJsonConfig};
|
3962 5198 | ///
|
3963 5199 | /// use rest_json::{input, output, error};
|
3964 5200 | ///
|
3965 - | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
5201 + | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, error::HttpStringPayloadError> {
|
3966 5202 | /// todo!()
|
3967 5203 | /// }
|
3968 5204 | ///
|
3969 5205 | /// let config = RestJsonConfig::builder().build();
|
3970 5206 | /// let app = RestJson::builder(config)
|
3971 - | /// .http_request_with_labels(handler)
|
5207 + | /// .http_string_payload(handler)
|
3972 5208 | /// /* Set other handlers */
|
3973 5209 | /// .build()
|
3974 5210 | /// .unwrap();
|
3975 5211 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3976 5212 | /// ```
|
3977 5213 | ///
|
3978 - | pub fn http_request_with_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5214 + | pub fn http_string_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3979 5215 | where
|
3980 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabels, HandlerExtractors>,
|
5216 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpStringPayload, HandlerExtractors>,
|
3981 5217 |
|
3982 5218 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3983 5219 | RestJson<L>,
|
3984 - | crate::operation_shape::HttpRequestWithLabels,
|
3985 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabels, HandlerType>
|
5220 + | crate::operation_shape::HttpStringPayload,
|
5221 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpStringPayload, HandlerType>
|
3986 5222 | >,
|
3987 5223 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3988 5224 | RestJson<L>,
|
3989 - | crate::operation_shape::HttpRequestWithLabels,
|
5225 + | crate::operation_shape::HttpStringPayload,
|
3990 5226 | ModelPl::Output
|
3991 5227 | >,
|
3992 5228 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3993 5229 | RestJson<L>,
|
3994 - | crate::operation_shape::HttpRequestWithLabels,
|
5230 + | crate::operation_shape::HttpStringPayload,
|
3995 5231 | <
|
3996 5232 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3997 5233 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
3998 5234 | RestJson<L>,
|
3999 - | crate::operation_shape::HttpRequestWithLabels,
|
5235 + | crate::operation_shape::HttpStringPayload,
|
4000 5236 | ModelPl::Output
|
4001 5237 | >
|
4002 5238 | >::Output
|
4003 5239 | >,
|
4004 5240 |
|
4005 5241 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4006 5242 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4007 5243 |
|
4008 5244 | {
|
4009 5245 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4010 5246 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4011 - | let svc = crate::operation_shape::HttpRequestWithLabels::from_handler(handler);
|
5247 + | let svc = crate::operation_shape::HttpStringPayload::from_handler(handler);
|
4012 5248 | let svc = self.model_plugin.apply(svc);
|
4013 5249 | let svc =
|
4014 5250 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4015 5251 | .apply(svc);
|
4016 5252 | let svc = self.http_plugin.apply(svc);
|
4017 - | self.http_request_with_labels_custom(svc)
|
5253 + | self.http_string_payload_custom(svc)
|
4018 5254 | }
|
4019 5255 |
|
4020 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
5256 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
4021 5257 | ///
|
4022 5258 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4023 5259 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4024 5260 | ///
|
4025 5261 | /// # Example
|
4026 5262 | ///
|
4027 5263 | /// ```no_run
|
4028 5264 | /// use rest_json::{RestJson, RestJsonConfig};
|
4029 5265 | ///
|
4030 5266 | /// use rest_json::{input, output, error};
|
4031 5267 | ///
|
4032 - | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
5268 + | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, error::HttpStringPayloadError> {
|
4033 5269 | /// todo!()
|
4034 5270 | /// }
|
4035 5271 | ///
|
4036 5272 | /// let config = RestJsonConfig::builder().build();
|
4037 5273 | /// let svc = ::tower::util::service_fn(handler);
|
4038 5274 | /// let app = RestJson::builder(config)
|
4039 - | /// .http_request_with_labels_service(svc)
|
5275 + | /// .http_string_payload_service(svc)
|
4040 5276 | /// /* Set other handlers */
|
4041 5277 | /// .build()
|
4042 5278 | /// .unwrap();
|
4043 5279 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4044 5280 | /// ```
|
4045 5281 | ///
|
4046 - | pub fn http_request_with_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5282 + | pub fn http_string_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4047 5283 | where
|
4048 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabels, ServiceExtractors>,
|
5284 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpStringPayload, ServiceExtractors>,
|
4049 5285 |
|
4050 5286 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4051 5287 | RestJson<L>,
|
4052 - | crate::operation_shape::HttpRequestWithLabels,
|
4053 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabels, S>
|
5288 + | crate::operation_shape::HttpStringPayload,
|
5289 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpStringPayload, S>
|
4054 5290 | >,
|
4055 5291 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4056 5292 | RestJson<L>,
|
4057 - | crate::operation_shape::HttpRequestWithLabels,
|
5293 + | crate::operation_shape::HttpStringPayload,
|
4058 5294 | ModelPl::Output
|
4059 5295 | >,
|
4060 5296 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4061 5297 | RestJson<L>,
|
4062 - | crate::operation_shape::HttpRequestWithLabels,
|
5298 + | crate::operation_shape::HttpStringPayload,
|
4063 5299 | <
|
4064 5300 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4065 5301 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4066 5302 | RestJson<L>,
|
4067 - | crate::operation_shape::HttpRequestWithLabels,
|
5303 + | crate::operation_shape::HttpStringPayload,
|
4068 5304 | ModelPl::Output
|
4069 5305 | >
|
4070 5306 | >::Output
|
4071 5307 | >,
|
4072 5308 |
|
4073 5309 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4074 5310 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4075 5311 |
|
4076 5312 | {
|
4077 5313 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4078 5314 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4079 - | let svc = crate::operation_shape::HttpRequestWithLabels::from_service(service);
|
5315 + | let svc = crate::operation_shape::HttpStringPayload::from_service(service);
|
4080 5316 | let svc = self.model_plugin.apply(svc);
|
4081 5317 | let svc =
|
4082 5318 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4083 5319 | .apply(svc);
|
4084 5320 | let svc = self.http_plugin.apply(svc);
|
4085 - | self.http_request_with_labels_custom(svc)
|
5321 + | self.http_string_payload_custom(svc)
|
4086 5322 | }
|
4087 5323 |
|
4088 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) to a custom [`Service`](tower::Service).
|
5324 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) to a custom [`Service`](tower::Service).
|
4089 5325 | /// not constrained by the Smithy contract.
|
4090 - | fn http_request_with_labels_custom<S>(mut self, svc: S) -> Self
|
5326 + | fn http_string_payload_custom<S>(mut self, svc: S) -> Self
|
4091 5327 | where
|
4092 5328 | S: ::tower::Service<
|
4093 5329 | ::http::Request<Body>,
|
4094 5330 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4095 5331 | Error = ::std::convert::Infallible,
|
4096 5332 | > + Clone
|
4097 5333 | + Send
|
4098 5334 | + 'static,
|
4099 5335 | S::Future: Send + 'static,
|
4100 5336 | {
|
4101 - | self.http_request_with_labels =
|
4102 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5337 + | self.http_string_payload = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4103 5338 | self
|
4104 5339 | }
|
4105 5340 |
|
4106 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
5341 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
4107 5342 | ///
|
4108 5343 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4109 5344 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4110 5345 | ///
|
4111 5346 | /// # Example
|
4112 5347 | ///
|
4113 5348 | /// ```no_run
|
4114 5349 | /// use rest_json::{RestJson, RestJsonConfig};
|
4115 5350 | ///
|
4116 5351 | /// use rest_json::{input, output, error};
|
4117 5352 | ///
|
4118 - | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
5353 + | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, error::IgnoreQueryParamsInResponseError> {
|
4119 5354 | /// todo!()
|
4120 5355 | /// }
|
4121 5356 | ///
|
4122 5357 | /// let config = RestJsonConfig::builder().build();
|
4123 5358 | /// let app = RestJson::builder(config)
|
4124 - | /// .http_request_with_labels_and_timestamp_format(handler)
|
5359 + | /// .ignore_query_params_in_response(handler)
|
4125 5360 | /// /* Set other handlers */
|
4126 5361 | /// .build()
|
4127 5362 | /// .unwrap();
|
4128 5363 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4129 5364 | /// ```
|
4130 5365 | ///
|
4131 - | pub fn http_request_with_labels_and_timestamp_format<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5366 + | pub fn ignore_query_params_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4132 5367 | where
|
4133 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerExtractors>,
|
5368 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerExtractors>,
|
4134 5369 |
|
4135 5370 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4136 5371 | RestJson<L>,
|
4137 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4138 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerType>
|
5372 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5373 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerType>
|
4139 5374 | >,
|
4140 5375 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4141 5376 | RestJson<L>,
|
4142 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5377 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4143 5378 | ModelPl::Output
|
4144 5379 | >,
|
4145 5380 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4146 5381 | RestJson<L>,
|
4147 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5382 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4148 5383 | <
|
4149 5384 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4150 5385 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4151 5386 | RestJson<L>,
|
4152 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5387 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4153 5388 | ModelPl::Output
|
4154 5389 | >
|
4155 5390 | >::Output
|
4156 5391 | >,
|
4157 5392 |
|
4158 5393 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4159 5394 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4160 5395 |
|
4161 5396 | {
|
4162 5397 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4163 5398 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4164 - | let svc =
|
4165 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_handler(handler);
|
5399 + | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_handler(handler);
|
4166 5400 | let svc = self.model_plugin.apply(svc);
|
4167 5401 | let svc =
|
4168 5402 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4169 5403 | .apply(svc);
|
4170 5404 | let svc = self.http_plugin.apply(svc);
|
4171 - | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
5405 + | self.ignore_query_params_in_response_custom(svc)
|
4172 5406 | }
|
4173 5407 |
|
4174 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
5408 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
4175 5409 | ///
|
4176 5410 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4177 5411 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4178 5412 | ///
|
4179 5413 | /// # Example
|
4180 5414 | ///
|
4181 5415 | /// ```no_run
|
4182 5416 | /// use rest_json::{RestJson, RestJsonConfig};
|
4183 5417 | ///
|
4184 5418 | /// use rest_json::{input, output, error};
|
4185 5419 | ///
|
4186 - | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
5420 + | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, error::IgnoreQueryParamsInResponseError> {
|
4187 5421 | /// todo!()
|
4188 5422 | /// }
|
4189 5423 | ///
|
4190 5424 | /// let config = RestJsonConfig::builder().build();
|
4191 5425 | /// let svc = ::tower::util::service_fn(handler);
|
4192 5426 | /// let app = RestJson::builder(config)
|
4193 - | /// .http_request_with_labels_and_timestamp_format_service(svc)
|
5427 + | /// .ignore_query_params_in_response_service(svc)
|
4194 5428 | /// /* Set other handlers */
|
4195 5429 | /// .build()
|
4196 5430 | /// .unwrap();
|
4197 5431 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4198 5432 | /// ```
|
4199 5433 | ///
|
4200 - | pub fn http_request_with_labels_and_timestamp_format_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5434 + | pub fn ignore_query_params_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4201 5435 | where
|
4202 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, ServiceExtractors>,
|
5436 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::IgnoreQueryParamsInResponse, ServiceExtractors>,
|
4203 5437 |
|
4204 5438 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4205 5439 | RestJson<L>,
|
4206 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4207 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, S>
|
5440 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5441 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::IgnoreQueryParamsInResponse, S>
|
4208 5442 | >,
|
4209 5443 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4210 5444 | RestJson<L>,
|
4211 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5445 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4212 5446 | ModelPl::Output
|
4213 5447 | >,
|
4214 5448 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4215 5449 | RestJson<L>,
|
4216 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5450 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4217 5451 | <
|
4218 5452 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4219 5453 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4220 5454 | RestJson<L>,
|
4221 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
5455 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4222 5456 | ModelPl::Output
|
4223 5457 | >
|
4224 5458 | >::Output
|
4225 5459 | >,
|
4226 5460 |
|
4227 5461 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4228 5462 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4229 5463 |
|
4230 5464 | {
|
4231 5465 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4232 5466 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4233 - | let svc =
|
4234 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_service(service);
|
5467 + | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_service(service);
|
4235 5468 | let svc = self.model_plugin.apply(svc);
|
4236 5469 | let svc =
|
4237 5470 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4238 5471 | .apply(svc);
|
4239 5472 | let svc = self.http_plugin.apply(svc);
|
4240 - | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
5473 + | self.ignore_query_params_in_response_custom(svc)
|
4241 5474 | }
|
4242 5475 |
|
4243 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) to a custom [`Service`](tower::Service).
|
5476 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) to a custom [`Service`](tower::Service).
|
4244 5477 | /// not constrained by the Smithy contract.
|
4245 - | fn http_request_with_labels_and_timestamp_format_custom<S>(mut self, svc: S) -> Self
|
5478 + | fn ignore_query_params_in_response_custom<S>(mut self, svc: S) -> Self
|
4246 5479 | where
|
4247 5480 | S: ::tower::Service<
|
4248 5481 | ::http::Request<Body>,
|
4249 5482 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4250 5483 | Error = ::std::convert::Infallible,
|
4251 5484 | > + Clone
|
4252 5485 | + Send
|
4253 5486 | + 'static,
|
4254 5487 | S::Future: Send + 'static,
|
4255 5488 | {
|
4256 - | self.http_request_with_labels_and_timestamp_format =
|
5489 + | self.ignore_query_params_in_response =
|
4257 5490 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4258 5491 | self
|
4259 5492 | }
|
4260 5493 |
|
4261 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
5494 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
4262 5495 | ///
|
4263 5496 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4264 5497 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4265 5498 | ///
|
4266 5499 | /// # Example
|
4267 5500 | ///
|
4268 5501 | /// ```no_run
|
4269 5502 | /// use rest_json::{RestJson, RestJsonConfig};
|
4270 5503 | ///
|
4271 5504 | /// use rest_json::{input, output, error};
|
4272 5505 | ///
|
4273 - | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
5506 + | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
4274 5507 | /// todo!()
|
4275 5508 | /// }
|
4276 5509 | ///
|
4277 5510 | /// let config = RestJsonConfig::builder().build();
|
4278 5511 | /// let app = RestJson::builder(config)
|
4279 - | /// .http_request_with_regex_literal(handler)
|
5512 + | /// .input_and_output_with_headers(handler)
|
4280 5513 | /// /* Set other handlers */
|
4281 5514 | /// .build()
|
4282 5515 | /// .unwrap();
|
4283 5516 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4284 5517 | /// ```
|
4285 5518 | ///
|
4286 - | pub fn http_request_with_regex_literal<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5519 + | pub fn input_and_output_with_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4287 5520 | where
|
4288 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerExtractors>,
|
5521 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::InputAndOutputWithHeaders, HandlerExtractors>,
|
4289 5522 |
|
4290 5523 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4291 5524 | RestJson<L>,
|
4292 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4293 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerType>
|
5525 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5526 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::InputAndOutputWithHeaders, HandlerType>
|
4294 5527 | >,
|
4295 5528 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4296 5529 | RestJson<L>,
|
4297 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5530 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4298 5531 | ModelPl::Output
|
4299 5532 | >,
|
4300 5533 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4301 5534 | RestJson<L>,
|
4302 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5535 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4303 5536 | <
|
4304 5537 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4305 5538 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4306 5539 | RestJson<L>,
|
4307 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5540 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4308 5541 | ModelPl::Output
|
4309 5542 | >
|
4310 5543 | >::Output
|
4311 5544 | >,
|
4312 5545 |
|
4313 5546 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4314 5547 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4315 5548 |
|
4316 5549 | {
|
4317 5550 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4318 5551 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4319 - | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_handler(handler);
|
5552 + | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_handler(handler);
|
4320 5553 | let svc = self.model_plugin.apply(svc);
|
4321 5554 | let svc =
|
4322 5555 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4323 5556 | .apply(svc);
|
4324 5557 | let svc = self.http_plugin.apply(svc);
|
4325 - | self.http_request_with_regex_literal_custom(svc)
|
5558 + | self.input_and_output_with_headers_custom(svc)
|
4326 5559 | }
|
4327 5560 |
|
4328 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
5561 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
4329 5562 | ///
|
4330 5563 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4331 5564 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4332 5565 | ///
|
4333 5566 | /// # Example
|
4334 5567 | ///
|
4335 5568 | /// ```no_run
|
4336 5569 | /// use rest_json::{RestJson, RestJsonConfig};
|
4337 5570 | ///
|
4338 5571 | /// use rest_json::{input, output, error};
|
4339 5572 | ///
|
4340 - | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
5573 + | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
4341 5574 | /// todo!()
|
4342 5575 | /// }
|
4343 5576 | ///
|
4344 5577 | /// let config = RestJsonConfig::builder().build();
|
4345 5578 | /// let svc = ::tower::util::service_fn(handler);
|
4346 5579 | /// let app = RestJson::builder(config)
|
4347 - | /// .http_request_with_regex_literal_service(svc)
|
5580 + | /// .input_and_output_with_headers_service(svc)
|
4348 5581 | /// /* Set other handlers */
|
4349 5582 | /// .build()
|
4350 5583 | /// .unwrap();
|
4351 5584 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4352 5585 | /// ```
|
4353 5586 | ///
|
4354 - | pub fn http_request_with_regex_literal_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5587 + | pub fn input_and_output_with_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4355 5588 | where
|
4356 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithRegexLiteral, ServiceExtractors>,
|
5589 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::InputAndOutputWithHeaders, ServiceExtractors>,
|
4357 5590 |
|
4358 5591 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4359 5592 | RestJson<L>,
|
4360 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4361 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithRegexLiteral, S>
|
5593 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5594 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::InputAndOutputWithHeaders, S>
|
4362 5595 | >,
|
4363 5596 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4364 5597 | RestJson<L>,
|
4365 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5598 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4366 5599 | ModelPl::Output
|
4367 5600 | >,
|
4368 5601 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4369 5602 | RestJson<L>,
|
4370 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5603 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4371 5604 | <
|
4372 5605 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4373 5606 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4374 5607 | RestJson<L>,
|
4375 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
5608 + | crate::operation_shape::InputAndOutputWithHeaders,
|
4376 5609 | ModelPl::Output
|
4377 5610 | >
|
4378 5611 | >::Output
|
4379 5612 | >,
|
4380 5613 |
|
4381 5614 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4382 5615 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4383 5616 |
|
4384 5617 | {
|
4385 5618 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4386 5619 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4387 - | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_service(service);
|
5620 + | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_service(service);
|
4388 5621 | let svc = self.model_plugin.apply(svc);
|
4389 5622 | let svc =
|
4390 5623 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4391 5624 | .apply(svc);
|
4392 5625 | let svc = self.http_plugin.apply(svc);
|
4393 - | self.http_request_with_regex_literal_custom(svc)
|
5626 + | self.input_and_output_with_headers_custom(svc)
|
4394 5627 | }
|
4395 5628 |
|
4396 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) to a custom [`Service`](tower::Service).
|
5629 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) to a custom [`Service`](tower::Service).
|
4397 5630 | /// not constrained by the Smithy contract.
|
4398 - | fn http_request_with_regex_literal_custom<S>(mut self, svc: S) -> Self
|
5631 + | fn input_and_output_with_headers_custom<S>(mut self, svc: S) -> Self
|
4399 5632 | where
|
4400 5633 | S: ::tower::Service<
|
4401 5634 | ::http::Request<Body>,
|
4402 5635 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4403 5636 | Error = ::std::convert::Infallible,
|
4404 5637 | > + Clone
|
4405 5638 | + Send
|
4406 5639 | + 'static,
|
4407 5640 | S::Future: Send + 'static,
|
4408 5641 | {
|
4409 - | self.http_request_with_regex_literal =
|
5642 + | self.input_and_output_with_headers =
|
4410 5643 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4411 5644 | self
|
4412 5645 | }
|
4413 5646 |
|
4414 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
5647 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) operation.
|
4415 5648 | ///
|
4416 5649 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4417 5650 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4418 5651 | ///
|
4419 5652 | /// # Example
|
4420 5653 | ///
|
4421 5654 | /// ```no_run
|
4422 5655 | /// use rest_json::{RestJson, RestJsonConfig};
|
4423 5656 | ///
|
4424 5657 | /// use rest_json::{input, output, error};
|
4425 5658 | ///
|
4426 - | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, error::HttpResponseCodeError> {
|
5659 + | /// async fn handler(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
|
4427 5660 | /// todo!()
|
4428 5661 | /// }
|
4429 5662 | ///
|
4430 5663 | /// let config = RestJsonConfig::builder().build();
|
4431 5664 | /// let app = RestJson::builder(config)
|
4432 - | /// .http_response_code(handler)
|
5665 + | /// .input_stream(handler)
|
4433 5666 | /// /* Set other handlers */
|
4434 5667 | /// .build()
|
4435 5668 | /// .unwrap();
|
4436 5669 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4437 5670 | /// ```
|
4438 5671 | ///
|
4439 - | pub fn http_response_code<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5672 + | pub fn input_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4440 5673 | where
|
4441 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpResponseCode, HandlerExtractors>,
|
5674 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::InputStream, HandlerExtractors>,
|
4442 5675 |
|
4443 5676 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4444 5677 | RestJson<L>,
|
4445 - | crate::operation_shape::HttpResponseCode,
|
4446 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpResponseCode, HandlerType>
|
5678 + | crate::operation_shape::InputStream,
|
5679 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::InputStream, HandlerType>
|
4447 5680 | >,
|
4448 5681 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4449 5682 | RestJson<L>,
|
4450 - | crate::operation_shape::HttpResponseCode,
|
5683 + | crate::operation_shape::InputStream,
|
4451 5684 | ModelPl::Output
|
4452 5685 | >,
|
4453 5686 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4454 5687 | RestJson<L>,
|
4455 - | crate::operation_shape::HttpResponseCode,
|
5688 + | crate::operation_shape::InputStream,
|
4456 5689 | <
|
4457 5690 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4458 5691 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4459 5692 | RestJson<L>,
|
4460 - | crate::operation_shape::HttpResponseCode,
|
5693 + | crate::operation_shape::InputStream,
|
4461 5694 | ModelPl::Output
|
4462 5695 | >
|
4463 5696 | >::Output
|
4464 5697 | >,
|
4465 5698 |
|
4466 5699 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4467 5700 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4468 5701 |
|
4469 5702 | {
|
4470 5703 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4471 5704 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4472 - | let svc = crate::operation_shape::HttpResponseCode::from_handler(handler);
|
5705 + | let svc = crate::operation_shape::InputStream::from_handler(handler);
|
4473 5706 | let svc = self.model_plugin.apply(svc);
|
4474 5707 | let svc =
|
4475 5708 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4476 5709 | .apply(svc);
|
4477 5710 | let svc = self.http_plugin.apply(svc);
|
4478 - | self.http_response_code_custom(svc)
|
5711 + | self.input_stream_custom(svc)
|
4479 5712 | }
|
4480 5713 |
|
4481 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
5714 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) operation.
|
4482 5715 | ///
|
4483 5716 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4484 5717 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4485 5718 | ///
|
4486 5719 | /// # Example
|
4487 5720 | ///
|
4488 5721 | /// ```no_run
|
4489 5722 | /// use rest_json::{RestJson, RestJsonConfig};
|
4490 5723 | ///
|
4491 5724 | /// use rest_json::{input, output, error};
|
4492 5725 | ///
|
4493 - | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, error::HttpResponseCodeError> {
|
5726 + | /// async fn handler(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
|
4494 5727 | /// todo!()
|
4495 5728 | /// }
|
4496 5729 | ///
|
4497 5730 | /// let config = RestJsonConfig::builder().build();
|
4498 5731 | /// let svc = ::tower::util::service_fn(handler);
|
4499 5732 | /// let app = RestJson::builder(config)
|
4500 - | /// .http_response_code_service(svc)
|
5733 + | /// .input_stream_service(svc)
|
4501 5734 | /// /* Set other handlers */
|
4502 5735 | /// .build()
|
4503 5736 | /// .unwrap();
|
4504 5737 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4505 5738 | /// ```
|
4506 5739 | ///
|
4507 - | pub fn http_response_code_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5740 + | pub fn input_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4508 5741 | where
|
4509 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpResponseCode, ServiceExtractors>,
|
5742 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::InputStream, ServiceExtractors>,
|
4510 5743 |
|
4511 5744 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4512 5745 | RestJson<L>,
|
4513 - | crate::operation_shape::HttpResponseCode,
|
4514 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpResponseCode, S>
|
5746 + | crate::operation_shape::InputStream,
|
5747 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::InputStream, S>
|
4515 5748 | >,
|
4516 5749 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4517 5750 | RestJson<L>,
|
4518 - | crate::operation_shape::HttpResponseCode,
|
5751 + | crate::operation_shape::InputStream,
|
4519 5752 | ModelPl::Output
|
4520 5753 | >,
|
4521 5754 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4522 5755 | RestJson<L>,
|
4523 - | crate::operation_shape::HttpResponseCode,
|
5756 + | crate::operation_shape::InputStream,
|
4524 5757 | <
|
4525 5758 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4526 5759 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4527 5760 | RestJson<L>,
|
4528 - | crate::operation_shape::HttpResponseCode,
|
5761 + | crate::operation_shape::InputStream,
|
4529 5762 | ModelPl::Output
|
4530 5763 | >
|
4531 5764 | >::Output
|
4532 5765 | >,
|
4533 5766 |
|
4534 5767 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4535 5768 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4536 5769 |
|
4537 5770 | {
|
4538 5771 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4539 5772 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4540 - | let svc = crate::operation_shape::HttpResponseCode::from_service(service);
|
5773 + | let svc = crate::operation_shape::InputStream::from_service(service);
|
4541 5774 | let svc = self.model_plugin.apply(svc);
|
4542 5775 | let svc =
|
4543 5776 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4544 5777 | .apply(svc);
|
4545 5778 | let svc = self.http_plugin.apply(svc);
|
4546 - | self.http_response_code_custom(svc)
|
5779 + | self.input_stream_custom(svc)
|
4547 5780 | }
|
4548 5781 |
|
4549 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) to a custom [`Service`](tower::Service).
|
5782 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) to a custom [`Service`](tower::Service).
|
4550 5783 | /// not constrained by the Smithy contract.
|
4551 - | fn http_response_code_custom<S>(mut self, svc: S) -> Self
|
5784 + | fn input_stream_custom<S>(mut self, svc: S) -> Self
|
4552 5785 | where
|
4553 5786 | S: ::tower::Service<
|
4554 5787 | ::http::Request<Body>,
|
4555 5788 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4556 5789 | Error = ::std::convert::Infallible,
|
4557 5790 | > + Clone
|
4558 5791 | + Send
|
4559 5792 | + 'static,
|
4560 5793 | S::Future: Send + 'static,
|
4561 5794 | {
|
4562 - | self.http_response_code = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5795 + | self.input_stream = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4563 5796 | self
|
4564 5797 | }
|
4565 5798 |
|
4566 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
5799 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) operation.
|
4567 5800 | ///
|
4568 5801 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4569 5802 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4570 5803 | ///
|
4571 5804 | /// # Example
|
4572 5805 | ///
|
4573 5806 | /// ```no_run
|
4574 5807 | /// use rest_json::{RestJson, RestJsonConfig};
|
4575 5808 | ///
|
4576 5809 | /// use rest_json::{input, output, error};
|
4577 5810 | ///
|
4578 - | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, error::HttpStringPayloadError> {
|
5811 + | /// async fn handler(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
|
4579 5812 | /// todo!()
|
4580 5813 | /// }
|
4581 5814 | ///
|
4582 5815 | /// let config = RestJsonConfig::builder().build();
|
4583 5816 | /// let app = RestJson::builder(config)
|
4584 - | /// .http_string_payload(handler)
|
5817 + | /// .input_stream_with_initial_request(handler)
|
4585 5818 | /// /* Set other handlers */
|
4586 5819 | /// .build()
|
4587 5820 | /// .unwrap();
|
4588 5821 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4589 5822 | /// ```
|
4590 5823 | ///
|
4591 - | pub fn http_string_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5824 + | pub fn input_stream_with_initial_request<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4592 5825 | where
|
4593 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::HttpStringPayload, HandlerExtractors>,
|
5826 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::InputStreamWithInitialRequest, HandlerExtractors>,
|
4594 5827 |
|
4595 5828 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4596 5829 | RestJson<L>,
|
4597 - | crate::operation_shape::HttpStringPayload,
|
4598 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::HttpStringPayload, HandlerType>
|
5830 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5831 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::InputStreamWithInitialRequest, HandlerType>
|
4599 5832 | >,
|
4600 5833 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4601 5834 | RestJson<L>,
|
4602 - | crate::operation_shape::HttpStringPayload,
|
5835 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4603 5836 | ModelPl::Output
|
4604 5837 | >,
|
4605 5838 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4606 5839 | RestJson<L>,
|
4607 - | crate::operation_shape::HttpStringPayload,
|
5840 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4608 5841 | <
|
4609 5842 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4610 5843 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4611 5844 | RestJson<L>,
|
4612 - | crate::operation_shape::HttpStringPayload,
|
5845 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4613 5846 | ModelPl::Output
|
4614 5847 | >
|
4615 5848 | >::Output
|
4616 5849 | >,
|
4617 5850 |
|
4618 5851 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4619 5852 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4620 5853 |
|
4621 5854 | {
|
4622 5855 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4623 5856 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4624 - | let svc = crate::operation_shape::HttpStringPayload::from_handler(handler);
|
5857 + | let svc = crate::operation_shape::InputStreamWithInitialRequest::from_handler(handler);
|
4625 5858 | let svc = self.model_plugin.apply(svc);
|
4626 5859 | let svc =
|
4627 5860 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4628 5861 | .apply(svc);
|
4629 5862 | let svc = self.http_plugin.apply(svc);
|
4630 - | self.http_string_payload_custom(svc)
|
5863 + | self.input_stream_with_initial_request_custom(svc)
|
4631 5864 | }
|
4632 5865 |
|
4633 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
5866 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) operation.
|
4634 5867 | ///
|
4635 5868 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4636 5869 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4637 5870 | ///
|
4638 5871 | /// # Example
|
4639 5872 | ///
|
4640 5873 | /// ```no_run
|
4641 5874 | /// use rest_json::{RestJson, RestJsonConfig};
|
4642 5875 | ///
|
4643 5876 | /// use rest_json::{input, output, error};
|
4644 5877 | ///
|
4645 - | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, error::HttpStringPayloadError> {
|
5878 + | /// async fn handler(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
|
4646 5879 | /// todo!()
|
4647 5880 | /// }
|
4648 5881 | ///
|
4649 5882 | /// let config = RestJsonConfig::builder().build();
|
4650 5883 | /// let svc = ::tower::util::service_fn(handler);
|
4651 5884 | /// let app = RestJson::builder(config)
|
4652 - | /// .http_string_payload_service(svc)
|
5885 + | /// .input_stream_with_initial_request_service(svc)
|
4653 5886 | /// /* Set other handlers */
|
4654 5887 | /// .build()
|
4655 5888 | /// .unwrap();
|
4656 5889 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4657 5890 | /// ```
|
4658 5891 | ///
|
4659 - | pub fn http_string_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5892 + | pub fn input_stream_with_initial_request_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4660 5893 | where
|
4661 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::HttpStringPayload, ServiceExtractors>,
|
5894 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::InputStreamWithInitialRequest, ServiceExtractors>,
|
4662 5895 |
|
4663 5896 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4664 5897 | RestJson<L>,
|
4665 - | crate::operation_shape::HttpStringPayload,
|
4666 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::HttpStringPayload, S>
|
5898 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5899 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::InputStreamWithInitialRequest, S>
|
4667 5900 | >,
|
4668 5901 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4669 5902 | RestJson<L>,
|
4670 - | crate::operation_shape::HttpStringPayload,
|
5903 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4671 5904 | ModelPl::Output
|
4672 5905 | >,
|
4673 5906 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4674 5907 | RestJson<L>,
|
4675 - | crate::operation_shape::HttpStringPayload,
|
5908 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4676 5909 | <
|
4677 5910 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4678 5911 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4679 5912 | RestJson<L>,
|
4680 - | crate::operation_shape::HttpStringPayload,
|
5913 + | crate::operation_shape::InputStreamWithInitialRequest,
|
4681 5914 | ModelPl::Output
|
4682 5915 | >
|
4683 5916 | >::Output
|
4684 5917 | >,
|
4685 5918 |
|
4686 5919 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4687 5920 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4688 5921 |
|
4689 5922 | {
|
4690 5923 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4691 5924 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4692 - | let svc = crate::operation_shape::HttpStringPayload::from_service(service);
|
5925 + | let svc = crate::operation_shape::InputStreamWithInitialRequest::from_service(service);
|
4693 5926 | let svc = self.model_plugin.apply(svc);
|
4694 5927 | let svc =
|
4695 5928 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4696 5929 | .apply(svc);
|
4697 5930 | let svc = self.http_plugin.apply(svc);
|
4698 - | self.http_string_payload_custom(svc)
|
5931 + | self.input_stream_with_initial_request_custom(svc)
|
4699 5932 | }
|
4700 5933 |
|
4701 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) to a custom [`Service`](tower::Service).
|
5934 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) to a custom [`Service`](tower::Service).
|
4702 5935 | /// not constrained by the Smithy contract.
|
4703 - | fn http_string_payload_custom<S>(mut self, svc: S) -> Self
|
5936 + | fn input_stream_with_initial_request_custom<S>(mut self, svc: S) -> Self
|
4704 5937 | where
|
4705 5938 | S: ::tower::Service<
|
4706 5939 | ::http::Request<Body>,
|
4707 5940 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4708 5941 | Error = ::std::convert::Infallible,
|
4709 5942 | > + Clone
|
4710 5943 | + Send
|
4711 5944 | + 'static,
|
4712 5945 | S::Future: Send + 'static,
|
4713 5946 | {
|
4714 - | self.http_string_payload = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5947 + | self.input_stream_with_initial_request =
|
5948 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4715 5949 | self
|
4716 5950 | }
|
4717 5951 |
|
4718 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
5952 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
4719 5953 | ///
|
4720 5954 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4721 5955 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4722 5956 | ///
|
4723 5957 | /// # Example
|
4724 5958 | ///
|
4725 5959 | /// ```no_run
|
4726 5960 | /// use rest_json::{RestJson, RestJsonConfig};
|
4727 5961 | ///
|
4728 5962 | /// use rest_json::{input, output, error};
|
4729 5963 | ///
|
4730 - | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, error::IgnoreQueryParamsInResponseError> {
|
5964 + | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, error::JsonBlobsError> {
|
4731 5965 | /// todo!()
|
4732 5966 | /// }
|
4733 5967 | ///
|
4734 5968 | /// let config = RestJsonConfig::builder().build();
|
4735 5969 | /// let app = RestJson::builder(config)
|
4736 - | /// .ignore_query_params_in_response(handler)
|
5970 + | /// .json_blobs(handler)
|
4737 5971 | /// /* Set other handlers */
|
4738 5972 | /// .build()
|
4739 5973 | /// .unwrap();
|
4740 5974 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4741 5975 | /// ```
|
4742 5976 | ///
|
4743 - | pub fn ignore_query_params_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5977 + | pub fn json_blobs<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4744 5978 | where
|
4745 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerExtractors>,
|
5979 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonBlobs, HandlerExtractors>,
|
4746 5980 |
|
4747 5981 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4748 5982 | RestJson<L>,
|
4749 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4750 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerType>
|
5983 + | crate::operation_shape::JsonBlobs,
|
5984 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonBlobs, HandlerType>
|
4751 5985 | >,
|
4752 5986 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4753 5987 | RestJson<L>,
|
4754 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5988 + | crate::operation_shape::JsonBlobs,
|
4755 5989 | ModelPl::Output
|
4756 5990 | >,
|
4757 5991 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4758 5992 | RestJson<L>,
|
4759 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5993 + | crate::operation_shape::JsonBlobs,
|
4760 5994 | <
|
4761 5995 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4762 5996 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4763 5997 | RestJson<L>,
|
4764 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5998 + | crate::operation_shape::JsonBlobs,
|
4765 5999 | ModelPl::Output
|
4766 6000 | >
|
4767 6001 | >::Output
|
4768 6002 | >,
|
4769 6003 |
|
4770 6004 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4771 6005 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4772 6006 |
|
4773 6007 | {
|
4774 6008 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4775 6009 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4776 - | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_handler(handler);
|
6010 + | let svc = crate::operation_shape::JsonBlobs::from_handler(handler);
|
4777 6011 | let svc = self.model_plugin.apply(svc);
|
4778 6012 | let svc =
|
4779 6013 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4780 6014 | .apply(svc);
|
4781 6015 | let svc = self.http_plugin.apply(svc);
|
4782 - | self.ignore_query_params_in_response_custom(svc)
|
6016 + | self.json_blobs_custom(svc)
|
4783 6017 | }
|
4784 6018 |
|
4785 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
6019 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
4786 6020 | ///
|
4787 6021 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4788 6022 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4789 6023 | ///
|
4790 6024 | /// # Example
|
4791 6025 | ///
|
4792 6026 | /// ```no_run
|
4793 6027 | /// use rest_json::{RestJson, RestJsonConfig};
|
4794 6028 | ///
|
4795 6029 | /// use rest_json::{input, output, error};
|
4796 6030 | ///
|
4797 - | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, error::IgnoreQueryParamsInResponseError> {
|
6031 + | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, error::JsonBlobsError> {
|
4798 6032 | /// todo!()
|
4799 6033 | /// }
|
4800 6034 | ///
|
4801 6035 | /// let config = RestJsonConfig::builder().build();
|
4802 6036 | /// let svc = ::tower::util::service_fn(handler);
|
4803 6037 | /// let app = RestJson::builder(config)
|
4804 - | /// .ignore_query_params_in_response_service(svc)
|
6038 + | /// .json_blobs_service(svc)
|
4805 6039 | /// /* Set other handlers */
|
4806 6040 | /// .build()
|
4807 6041 | /// .unwrap();
|
4808 6042 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4809 6043 | /// ```
|
4810 6044 | ///
|
4811 - | pub fn ignore_query_params_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6045 + | pub fn json_blobs_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4812 6046 | where
|
4813 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::IgnoreQueryParamsInResponse, ServiceExtractors>,
|
6047 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonBlobs, ServiceExtractors>,
|
4814 6048 |
|
4815 6049 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4816 6050 | RestJson<L>,
|
4817 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4818 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::IgnoreQueryParamsInResponse, S>
|
6051 + | crate::operation_shape::JsonBlobs,
|
6052 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonBlobs, S>
|
4819 6053 | >,
|
4820 6054 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4821 6055 | RestJson<L>,
|
4822 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
6056 + | crate::operation_shape::JsonBlobs,
|
4823 6057 | ModelPl::Output
|
4824 6058 | >,
|
4825 6059 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4826 6060 | RestJson<L>,
|
4827 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
6061 + | crate::operation_shape::JsonBlobs,
|
4828 6062 | <
|
4829 6063 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4830 6064 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4831 6065 | RestJson<L>,
|
4832 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
6066 + | crate::operation_shape::JsonBlobs,
|
4833 6067 | ModelPl::Output
|
4834 6068 | >
|
4835 6069 | >::Output
|
4836 6070 | >,
|
4837 6071 |
|
4838 6072 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4839 6073 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4840 6074 |
|
4841 6075 | {
|
4842 6076 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4843 6077 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4844 - | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_service(service);
|
6078 + | let svc = crate::operation_shape::JsonBlobs::from_service(service);
|
4845 6079 | let svc = self.model_plugin.apply(svc);
|
4846 6080 | let svc =
|
4847 6081 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4848 6082 | .apply(svc);
|
4849 6083 | let svc = self.http_plugin.apply(svc);
|
4850 - | self.ignore_query_params_in_response_custom(svc)
|
6084 + | self.json_blobs_custom(svc)
|
4851 6085 | }
|
4852 6086 |
|
4853 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) to a custom [`Service`](tower::Service).
|
6087 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) to a custom [`Service`](tower::Service).
|
4854 6088 | /// not constrained by the Smithy contract.
|
4855 - | fn ignore_query_params_in_response_custom<S>(mut self, svc: S) -> Self
|
6089 + | fn json_blobs_custom<S>(mut self, svc: S) -> Self
|
4856 6090 | where
|
4857 6091 | S: ::tower::Service<
|
4858 6092 | ::http::Request<Body>,
|
4859 6093 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
4860 6094 | Error = ::std::convert::Infallible,
|
4861 6095 | > + Clone
|
4862 6096 | + Send
|
4863 6097 | + 'static,
|
4864 6098 | S::Future: Send + 'static,
|
4865 6099 | {
|
4866 - | self.ignore_query_params_in_response =
|
4867 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6100 + | self.json_blobs = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
4868 6101 | self
|
4869 6102 | }
|
4870 6103 |
|
4871 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
6104 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
4872 6105 | ///
|
4873 6106 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4874 6107 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4875 6108 | ///
|
4876 6109 | /// # Example
|
4877 6110 | ///
|
4878 6111 | /// ```no_run
|
4879 6112 | /// use rest_json::{RestJson, RestJsonConfig};
|
4880 6113 | ///
|
4881 6114 | /// use rest_json::{input, output, error};
|
4882 6115 | ///
|
4883 - | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
6116 + | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
4884 6117 | /// todo!()
|
4885 6118 | /// }
|
4886 6119 | ///
|
4887 6120 | /// let config = RestJsonConfig::builder().build();
|
4888 6121 | /// let app = RestJson::builder(config)
|
4889 - | /// .input_and_output_with_headers(handler)
|
6122 + | /// .json_enums(handler)
|
4890 6123 | /// /* Set other handlers */
|
4891 6124 | /// .build()
|
4892 6125 | /// .unwrap();
|
4893 6126 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4894 6127 | /// ```
|
4895 6128 | ///
|
4896 - | pub fn input_and_output_with_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6129 + | pub fn json_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4897 6130 | where
|
4898 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::InputAndOutputWithHeaders, HandlerExtractors>,
|
6131 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonEnums, HandlerExtractors>,
|
4899 6132 |
|
4900 6133 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4901 6134 | RestJson<L>,
|
4902 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4903 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::InputAndOutputWithHeaders, HandlerType>
|
6135 + | crate::operation_shape::JsonEnums,
|
6136 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonEnums, HandlerType>
|
4904 6137 | >,
|
4905 6138 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4906 6139 | RestJson<L>,
|
4907 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6140 + | crate::operation_shape::JsonEnums,
|
4908 6141 | ModelPl::Output
|
4909 6142 | >,
|
4910 6143 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4911 6144 | RestJson<L>,
|
4912 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6145 + | crate::operation_shape::JsonEnums,
|
4913 6146 | <
|
4914 6147 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4915 6148 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4916 6149 | RestJson<L>,
|
4917 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6150 + | crate::operation_shape::JsonEnums,
|
4918 6151 | ModelPl::Output
|
4919 6152 | >
|
4920 6153 | >::Output
|
4921 6154 | >,
|
4922 6155 |
|
4923 6156 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4924 6157 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4925 6158 |
|
4926 6159 | {
|
4927 6160 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4928 6161 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4929 - | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_handler(handler);
|
6162 + | let svc = crate::operation_shape::JsonEnums::from_handler(handler);
|
4930 6163 | let svc = self.model_plugin.apply(svc);
|
4931 6164 | let svc =
|
4932 6165 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4933 6166 | .apply(svc);
|
4934 6167 | let svc = self.http_plugin.apply(svc);
|
4935 - | self.input_and_output_with_headers_custom(svc)
|
6168 + | self.json_enums_custom(svc)
|
4936 6169 | }
|
4937 6170 |
|
4938 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
6171 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
4939 6172 | ///
|
4940 6173 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
4941 6174 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
4942 6175 | ///
|
4943 6176 | /// # Example
|
4944 6177 | ///
|
4945 6178 | /// ```no_run
|
4946 6179 | /// use rest_json::{RestJson, RestJsonConfig};
|
4947 6180 | ///
|
4948 6181 | /// use rest_json::{input, output, error};
|
4949 6182 | ///
|
4950 - | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
6183 + | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
4951 6184 | /// todo!()
|
4952 6185 | /// }
|
4953 6186 | ///
|
4954 6187 | /// let config = RestJsonConfig::builder().build();
|
4955 6188 | /// let svc = ::tower::util::service_fn(handler);
|
4956 6189 | /// let app = RestJson::builder(config)
|
4957 - | /// .input_and_output_with_headers_service(svc)
|
6190 + | /// .json_enums_service(svc)
|
4958 6191 | /// /* Set other handlers */
|
4959 6192 | /// .build()
|
4960 6193 | /// .unwrap();
|
4961 6194 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4962 6195 | /// ```
|
4963 6196 | ///
|
4964 - | pub fn input_and_output_with_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6197 + | pub fn json_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4965 6198 | where
|
4966 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::InputAndOutputWithHeaders, ServiceExtractors>,
|
6199 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonEnums, ServiceExtractors>,
|
4967 6200 |
|
4968 6201 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4969 6202 | RestJson<L>,
|
4970 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4971 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::InputAndOutputWithHeaders, S>
|
6203 + | crate::operation_shape::JsonEnums,
|
6204 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonEnums, S>
|
4972 6205 | >,
|
4973 6206 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4974 6207 | RestJson<L>,
|
4975 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6208 + | crate::operation_shape::JsonEnums,
|
4976 6209 | ModelPl::Output
|
4977 6210 | >,
|
4978 6211 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4979 6212 | RestJson<L>,
|
4980 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6213 + | crate::operation_shape::JsonEnums,
|
4981 6214 | <
|
4982 6215 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4983 6216 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
4984 6217 | RestJson<L>,
|
4985 - | crate::operation_shape::InputAndOutputWithHeaders,
|
6218 + | crate::operation_shape::JsonEnums,
|
4986 6219 | ModelPl::Output
|
4987 6220 | >
|
4988 6221 | >::Output
|
4989 6222 | >,
|
4990 6223 |
|
4991 6224 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4992 6225 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
4993 6226 |
|
4994 6227 | {
|
4995 6228 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
4996 6229 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
4997 - | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_service(service);
|
6230 + | let svc = crate::operation_shape::JsonEnums::from_service(service);
|
4998 6231 | let svc = self.model_plugin.apply(svc);
|
4999 6232 | let svc =
|
5000 6233 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5001 6234 | .apply(svc);
|
5002 6235 | let svc = self.http_plugin.apply(svc);
|
5003 - | self.input_and_output_with_headers_custom(svc)
|
6236 + | self.json_enums_custom(svc)
|
5004 6237 | }
|
5005 6238 |
|
5006 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) to a custom [`Service`](tower::Service).
|
6239 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) to a custom [`Service`](tower::Service).
|
5007 6240 | /// not constrained by the Smithy contract.
|
5008 - | fn input_and_output_with_headers_custom<S>(mut self, svc: S) -> Self
|
6241 + | fn json_enums_custom<S>(mut self, svc: S) -> Self
|
5009 6242 | where
|
5010 6243 | S: ::tower::Service<
|
5011 6244 | ::http::Request<Body>,
|
5012 6245 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5013 6246 | Error = ::std::convert::Infallible,
|
5014 6247 | > + Clone
|
5015 6248 | + Send
|
5016 6249 | + 'static,
|
5017 6250 | S::Future: Send + 'static,
|
5018 6251 | {
|
5019 - | self.input_and_output_with_headers =
|
5020 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6252 + | self.json_enums = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5021 6253 | self
|
5022 6254 | }
|
5023 6255 |
|
5024 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
6256 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
5025 6257 | ///
|
5026 6258 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5027 6259 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5028 6260 | ///
|
5029 6261 | /// # Example
|
5030 6262 | ///
|
5031 6263 | /// ```no_run
|
5032 6264 | /// use rest_json::{RestJson, RestJsonConfig};
|
5033 6265 | ///
|
5034 6266 | /// use rest_json::{input, output, error};
|
5035 6267 | ///
|
5036 - | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, error::JsonBlobsError> {
|
6268 + | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
5037 6269 | /// todo!()
|
5038 6270 | /// }
|
5039 6271 | ///
|
5040 6272 | /// let config = RestJsonConfig::builder().build();
|
5041 6273 | /// let app = RestJson::builder(config)
|
5042 - | /// .json_blobs(handler)
|
6274 + | /// .json_int_enums(handler)
|
5043 6275 | /// /* Set other handlers */
|
5044 6276 | /// .build()
|
5045 6277 | /// .unwrap();
|
5046 6278 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5047 6279 | /// ```
|
5048 6280 | ///
|
5049 - | pub fn json_blobs<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6281 + | pub fn json_int_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5050 6282 | where
|
5051 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonBlobs, HandlerExtractors>,
|
6283 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonIntEnums, HandlerExtractors>,
|
5052 6284 |
|
5053 6285 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5054 6286 | RestJson<L>,
|
5055 - | crate::operation_shape::JsonBlobs,
|
5056 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonBlobs, HandlerType>
|
6287 + | crate::operation_shape::JsonIntEnums,
|
6288 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonIntEnums, HandlerType>
|
5057 6289 | >,
|
5058 6290 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5059 6291 | RestJson<L>,
|
5060 - | crate::operation_shape::JsonBlobs,
|
6292 + | crate::operation_shape::JsonIntEnums,
|
5061 6293 | ModelPl::Output
|
5062 6294 | >,
|
5063 6295 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5064 6296 | RestJson<L>,
|
5065 - | crate::operation_shape::JsonBlobs,
|
6297 + | crate::operation_shape::JsonIntEnums,
|
5066 6298 | <
|
5067 6299 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5068 6300 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5069 6301 | RestJson<L>,
|
5070 - | crate::operation_shape::JsonBlobs,
|
6302 + | crate::operation_shape::JsonIntEnums,
|
5071 6303 | ModelPl::Output
|
5072 6304 | >
|
5073 6305 | >::Output
|
5074 6306 | >,
|
5075 6307 |
|
5076 6308 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5077 6309 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5078 6310 |
|
5079 6311 | {
|
5080 6312 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5081 6313 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5082 - | let svc = crate::operation_shape::JsonBlobs::from_handler(handler);
|
6314 + | let svc = crate::operation_shape::JsonIntEnums::from_handler(handler);
|
5083 6315 | let svc = self.model_plugin.apply(svc);
|
5084 6316 | let svc =
|
5085 6317 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5086 6318 | .apply(svc);
|
5087 6319 | let svc = self.http_plugin.apply(svc);
|
5088 - | self.json_blobs_custom(svc)
|
6320 + | self.json_int_enums_custom(svc)
|
5089 6321 | }
|
5090 6322 |
|
5091 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
6323 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
5092 6324 | ///
|
5093 6325 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5094 6326 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5095 6327 | ///
|
5096 6328 | /// # Example
|
5097 6329 | ///
|
5098 6330 | /// ```no_run
|
5099 6331 | /// use rest_json::{RestJson, RestJsonConfig};
|
5100 6332 | ///
|
5101 6333 | /// use rest_json::{input, output, error};
|
5102 6334 | ///
|
5103 - | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, error::JsonBlobsError> {
|
6335 + | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
5104 6336 | /// todo!()
|
5105 6337 | /// }
|
5106 6338 | ///
|
5107 6339 | /// let config = RestJsonConfig::builder().build();
|
5108 6340 | /// let svc = ::tower::util::service_fn(handler);
|
5109 6341 | /// let app = RestJson::builder(config)
|
5110 - | /// .json_blobs_service(svc)
|
6342 + | /// .json_int_enums_service(svc)
|
5111 6343 | /// /* Set other handlers */
|
5112 6344 | /// .build()
|
5113 6345 | /// .unwrap();
|
5114 6346 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5115 6347 | /// ```
|
5116 6348 | ///
|
5117 - | pub fn json_blobs_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6349 + | pub fn json_int_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5118 6350 | where
|
5119 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonBlobs, ServiceExtractors>,
|
6351 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonIntEnums, ServiceExtractors>,
|
5120 6352 |
|
5121 6353 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5122 6354 | RestJson<L>,
|
5123 - | crate::operation_shape::JsonBlobs,
|
5124 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonBlobs, S>
|
6355 + | crate::operation_shape::JsonIntEnums,
|
6356 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonIntEnums, S>
|
5125 6357 | >,
|
5126 6358 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5127 6359 | RestJson<L>,
|
5128 - | crate::operation_shape::JsonBlobs,
|
6360 + | crate::operation_shape::JsonIntEnums,
|
5129 6361 | ModelPl::Output
|
5130 6362 | >,
|
5131 6363 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5132 6364 | RestJson<L>,
|
5133 - | crate::operation_shape::JsonBlobs,
|
6365 + | crate::operation_shape::JsonIntEnums,
|
5134 6366 | <
|
5135 6367 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5136 6368 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5137 6369 | RestJson<L>,
|
5138 - | crate::operation_shape::JsonBlobs,
|
6370 + | crate::operation_shape::JsonIntEnums,
|
5139 6371 | ModelPl::Output
|
5140 6372 | >
|
5141 6373 | >::Output
|
5142 6374 | >,
|
5143 6375 |
|
5144 6376 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5145 6377 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5146 6378 |
|
5147 6379 | {
|
5148 6380 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5149 6381 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5150 - | let svc = crate::operation_shape::JsonBlobs::from_service(service);
|
6382 + | let svc = crate::operation_shape::JsonIntEnums::from_service(service);
|
5151 6383 | let svc = self.model_plugin.apply(svc);
|
5152 6384 | let svc =
|
5153 6385 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5154 6386 | .apply(svc);
|
5155 6387 | let svc = self.http_plugin.apply(svc);
|
5156 - | self.json_blobs_custom(svc)
|
6388 + | self.json_int_enums_custom(svc)
|
5157 6389 | }
|
5158 6390 |
|
5159 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) to a custom [`Service`](tower::Service).
|
6391 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) to a custom [`Service`](tower::Service).
|
5160 6392 | /// not constrained by the Smithy contract.
|
5161 - | fn json_blobs_custom<S>(mut self, svc: S) -> Self
|
6393 + | fn json_int_enums_custom<S>(mut self, svc: S) -> Self
|
5162 6394 | where
|
5163 6395 | S: ::tower::Service<
|
5164 6396 | ::http::Request<Body>,
|
5165 6397 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5166 6398 | Error = ::std::convert::Infallible,
|
5167 6399 | > + Clone
|
5168 6400 | + Send
|
5169 6401 | + 'static,
|
5170 6402 | S::Future: Send + 'static,
|
5171 6403 | {
|
5172 - | self.json_blobs = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6404 + | self.json_int_enums = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5173 6405 | self
|
5174 6406 | }
|
5175 6407 |
|
5176 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
6408 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
5177 6409 | ///
|
5178 6410 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5179 6411 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5180 6412 | ///
|
5181 6413 | /// # Example
|
5182 6414 | ///
|
5183 6415 | /// ```no_run
|
5184 6416 | /// use rest_json::{RestJson, RestJsonConfig};
|
5185 6417 | ///
|
5186 6418 | /// use rest_json::{input, output, error};
|
5187 6419 | ///
|
5188 - | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
6420 + | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
5189 6421 | /// todo!()
|
5190 6422 | /// }
|
5191 6423 | ///
|
5192 6424 | /// let config = RestJsonConfig::builder().build();
|
5193 6425 | /// let app = RestJson::builder(config)
|
5194 - | /// .json_enums(handler)
|
6426 + | /// .json_lists(handler)
|
5195 6427 | /// /* Set other handlers */
|
5196 6428 | /// .build()
|
5197 6429 | /// .unwrap();
|
5198 6430 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5199 6431 | /// ```
|
5200 6432 | ///
|
5201 - | pub fn json_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6433 + | pub fn json_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5202 6434 | where
|
5203 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonEnums, HandlerExtractors>,
|
6435 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonLists, HandlerExtractors>,
|
5204 6436 |
|
5205 6437 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5206 6438 | RestJson<L>,
|
5207 - | crate::operation_shape::JsonEnums,
|
5208 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonEnums, HandlerType>
|
6439 + | crate::operation_shape::JsonLists,
|
6440 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonLists, HandlerType>
|
5209 6441 | >,
|
5210 6442 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5211 6443 | RestJson<L>,
|
5212 - | crate::operation_shape::JsonEnums,
|
6444 + | crate::operation_shape::JsonLists,
|
5213 6445 | ModelPl::Output
|
5214 6446 | >,
|
5215 6447 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5216 6448 | RestJson<L>,
|
5217 - | crate::operation_shape::JsonEnums,
|
6449 + | crate::operation_shape::JsonLists,
|
5218 6450 | <
|
5219 6451 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5220 6452 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5221 6453 | RestJson<L>,
|
5222 - | crate::operation_shape::JsonEnums,
|
6454 + | crate::operation_shape::JsonLists,
|
5223 6455 | ModelPl::Output
|
5224 6456 | >
|
5225 6457 | >::Output
|
5226 6458 | >,
|
5227 6459 |
|
5228 6460 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5229 6461 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5230 6462 |
|
5231 6463 | {
|
5232 6464 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5233 6465 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5234 - | let svc = crate::operation_shape::JsonEnums::from_handler(handler);
|
6466 + | let svc = crate::operation_shape::JsonLists::from_handler(handler);
|
5235 6467 | let svc = self.model_plugin.apply(svc);
|
5236 6468 | let svc =
|
5237 6469 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5238 6470 | .apply(svc);
|
5239 6471 | let svc = self.http_plugin.apply(svc);
|
5240 - | self.json_enums_custom(svc)
|
6472 + | self.json_lists_custom(svc)
|
5241 6473 | }
|
5242 6474 |
|
5243 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
6475 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
5244 6476 | ///
|
5245 6477 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5246 6478 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5247 6479 | ///
|
5248 6480 | /// # Example
|
5249 6481 | ///
|
5250 6482 | /// ```no_run
|
5251 6483 | /// use rest_json::{RestJson, RestJsonConfig};
|
5252 6484 | ///
|
5253 6485 | /// use rest_json::{input, output, error};
|
5254 6486 | ///
|
5255 - | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
6487 + | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
5256 6488 | /// todo!()
|
5257 6489 | /// }
|
5258 6490 | ///
|
5259 6491 | /// let config = RestJsonConfig::builder().build();
|
5260 6492 | /// let svc = ::tower::util::service_fn(handler);
|
5261 6493 | /// let app = RestJson::builder(config)
|
5262 - | /// .json_enums_service(svc)
|
6494 + | /// .json_lists_service(svc)
|
5263 6495 | /// /* Set other handlers */
|
5264 6496 | /// .build()
|
5265 6497 | /// .unwrap();
|
5266 6498 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5267 6499 | /// ```
|
5268 6500 | ///
|
5269 - | pub fn json_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6501 + | pub fn json_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5270 6502 | where
|
5271 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonEnums, ServiceExtractors>,
|
6503 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonLists, ServiceExtractors>,
|
5272 6504 |
|
5273 6505 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5274 6506 | RestJson<L>,
|
5275 - | crate::operation_shape::JsonEnums,
|
5276 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonEnums, S>
|
6507 + | crate::operation_shape::JsonLists,
|
6508 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonLists, S>
|
5277 6509 | >,
|
5278 6510 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5279 6511 | RestJson<L>,
|
5280 - | crate::operation_shape::JsonEnums,
|
6512 + | crate::operation_shape::JsonLists,
|
5281 6513 | ModelPl::Output
|
5282 6514 | >,
|
5283 6515 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5284 6516 | RestJson<L>,
|
5285 - | crate::operation_shape::JsonEnums,
|
6517 + | crate::operation_shape::JsonLists,
|
5286 6518 | <
|
5287 6519 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5288 6520 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5289 6521 | RestJson<L>,
|
5290 - | crate::operation_shape::JsonEnums,
|
6522 + | crate::operation_shape::JsonLists,
|
5291 6523 | ModelPl::Output
|
5292 6524 | >
|
5293 6525 | >::Output
|
5294 6526 | >,
|
5295 6527 |
|
5296 6528 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5297 6529 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5298 6530 |
|
5299 6531 | {
|
5300 6532 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5301 6533 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5302 - | let svc = crate::operation_shape::JsonEnums::from_service(service);
|
6534 + | let svc = crate::operation_shape::JsonLists::from_service(service);
|
5303 6535 | let svc = self.model_plugin.apply(svc);
|
5304 6536 | let svc =
|
5305 6537 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5306 6538 | .apply(svc);
|
5307 6539 | let svc = self.http_plugin.apply(svc);
|
5308 - | self.json_enums_custom(svc)
|
6540 + | self.json_lists_custom(svc)
|
5309 6541 | }
|
5310 6542 |
|
5311 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) to a custom [`Service`](tower::Service).
|
6543 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) to a custom [`Service`](tower::Service).
|
5312 6544 | /// not constrained by the Smithy contract.
|
5313 - | fn json_enums_custom<S>(mut self, svc: S) -> Self
|
6545 + | fn json_lists_custom<S>(mut self, svc: S) -> Self
|
5314 6546 | where
|
5315 6547 | S: ::tower::Service<
|
5316 6548 | ::http::Request<Body>,
|
5317 6549 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5318 6550 | Error = ::std::convert::Infallible,
|
5319 6551 | > + Clone
|
5320 6552 | + Send
|
5321 6553 | + 'static,
|
5322 6554 | S::Future: Send + 'static,
|
5323 6555 | {
|
5324 - | self.json_enums = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6556 + | self.json_lists = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5325 6557 | self
|
5326 6558 | }
|
5327 6559 |
|
5328 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
6560 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
5329 6561 | ///
|
5330 6562 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5331 6563 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5332 6564 | ///
|
5333 6565 | /// # Example
|
5334 6566 | ///
|
5335 6567 | /// ```no_run
|
5336 6568 | /// use rest_json::{RestJson, RestJsonConfig};
|
5337 6569 | ///
|
5338 6570 | /// use rest_json::{input, output, error};
|
5339 6571 | ///
|
5340 - | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
6572 + | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
5341 6573 | /// todo!()
|
5342 6574 | /// }
|
5343 6575 | ///
|
5344 6576 | /// let config = RestJsonConfig::builder().build();
|
5345 6577 | /// let app = RestJson::builder(config)
|
5346 - | /// .json_int_enums(handler)
|
6578 + | /// .json_maps(handler)
|
5347 6579 | /// /* Set other handlers */
|
5348 6580 | /// .build()
|
5349 6581 | /// .unwrap();
|
5350 6582 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5351 6583 | /// ```
|
5352 6584 | ///
|
5353 - | pub fn json_int_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6585 + | pub fn json_maps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5354 6586 | where
|
5355 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonIntEnums, HandlerExtractors>,
|
6587 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonMaps, HandlerExtractors>,
|
5356 6588 |
|
5357 6589 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5358 6590 | RestJson<L>,
|
5359 - | crate::operation_shape::JsonIntEnums,
|
5360 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonIntEnums, HandlerType>
|
6591 + | crate::operation_shape::JsonMaps,
|
6592 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonMaps, HandlerType>
|
5361 6593 | >,
|
5362 6594 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5363 6595 | RestJson<L>,
|
5364 - | crate::operation_shape::JsonIntEnums,
|
6596 + | crate::operation_shape::JsonMaps,
|
5365 6597 | ModelPl::Output
|
5366 6598 | >,
|
5367 6599 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5368 6600 | RestJson<L>,
|
5369 - | crate::operation_shape::JsonIntEnums,
|
6601 + | crate::operation_shape::JsonMaps,
|
5370 6602 | <
|
5371 6603 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5372 6604 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5373 6605 | RestJson<L>,
|
5374 - | crate::operation_shape::JsonIntEnums,
|
6606 + | crate::operation_shape::JsonMaps,
|
5375 6607 | ModelPl::Output
|
5376 6608 | >
|
5377 6609 | >::Output
|
5378 6610 | >,
|
5379 6611 |
|
5380 6612 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5381 6613 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5382 6614 |
|
5383 6615 | {
|
5384 6616 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5385 6617 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5386 - | let svc = crate::operation_shape::JsonIntEnums::from_handler(handler);
|
6618 + | let svc = crate::operation_shape::JsonMaps::from_handler(handler);
|
5387 6619 | let svc = self.model_plugin.apply(svc);
|
5388 6620 | let svc =
|
5389 6621 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5390 6622 | .apply(svc);
|
5391 6623 | let svc = self.http_plugin.apply(svc);
|
5392 - | self.json_int_enums_custom(svc)
|
6624 + | self.json_maps_custom(svc)
|
5393 6625 | }
|
5394 6626 |
|
5395 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
6627 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
5396 6628 | ///
|
5397 6629 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5398 6630 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5399 6631 | ///
|
5400 6632 | /// # Example
|
5401 6633 | ///
|
5402 6634 | /// ```no_run
|
5403 6635 | /// use rest_json::{RestJson, RestJsonConfig};
|
5404 6636 | ///
|
5405 6637 | /// use rest_json::{input, output, error};
|
5406 6638 | ///
|
5407 - | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
6639 + | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
5408 6640 | /// todo!()
|
5409 6641 | /// }
|
5410 6642 | ///
|
5411 6643 | /// let config = RestJsonConfig::builder().build();
|
5412 6644 | /// let svc = ::tower::util::service_fn(handler);
|
5413 6645 | /// let app = RestJson::builder(config)
|
5414 - | /// .json_int_enums_service(svc)
|
6646 + | /// .json_maps_service(svc)
|
5415 6647 | /// /* Set other handlers */
|
5416 6648 | /// .build()
|
5417 6649 | /// .unwrap();
|
5418 6650 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5419 6651 | /// ```
|
5420 6652 | ///
|
5421 - | pub fn json_int_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6653 + | pub fn json_maps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5422 6654 | where
|
5423 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonIntEnums, ServiceExtractors>,
|
6655 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonMaps, ServiceExtractors>,
|
5424 6656 |
|
5425 6657 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5426 6658 | RestJson<L>,
|
5427 - | crate::operation_shape::JsonIntEnums,
|
5428 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonIntEnums, S>
|
6659 + | crate::operation_shape::JsonMaps,
|
6660 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonMaps, S>
|
5429 6661 | >,
|
5430 6662 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5431 6663 | RestJson<L>,
|
5432 - | crate::operation_shape::JsonIntEnums,
|
6664 + | crate::operation_shape::JsonMaps,
|
5433 6665 | ModelPl::Output
|
5434 6666 | >,
|
5435 6667 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5436 6668 | RestJson<L>,
|
5437 - | crate::operation_shape::JsonIntEnums,
|
6669 + | crate::operation_shape::JsonMaps,
|
5438 6670 | <
|
5439 6671 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5440 6672 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5441 6673 | RestJson<L>,
|
5442 - | crate::operation_shape::JsonIntEnums,
|
6674 + | crate::operation_shape::JsonMaps,
|
5443 6675 | ModelPl::Output
|
5444 6676 | >
|
5445 6677 | >::Output
|
5446 6678 | >,
|
5447 6679 |
|
5448 6680 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5449 6681 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5450 6682 |
|
5451 6683 | {
|
5452 6684 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5453 6685 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5454 - | let svc = crate::operation_shape::JsonIntEnums::from_service(service);
|
6686 + | let svc = crate::operation_shape::JsonMaps::from_service(service);
|
5455 6687 | let svc = self.model_plugin.apply(svc);
|
5456 6688 | let svc =
|
5457 6689 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5458 6690 | .apply(svc);
|
5459 6691 | let svc = self.http_plugin.apply(svc);
|
5460 - | self.json_int_enums_custom(svc)
|
6692 + | self.json_maps_custom(svc)
|
5461 6693 | }
|
5462 6694 |
|
5463 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) to a custom [`Service`](tower::Service).
|
6695 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) to a custom [`Service`](tower::Service).
|
5464 6696 | /// not constrained by the Smithy contract.
|
5465 - | fn json_int_enums_custom<S>(mut self, svc: S) -> Self
|
6697 + | fn json_maps_custom<S>(mut self, svc: S) -> Self
|
5466 6698 | where
|
5467 6699 | S: ::tower::Service<
|
5468 6700 | ::http::Request<Body>,
|
5469 6701 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5470 6702 | Error = ::std::convert::Infallible,
|
5471 6703 | > + Clone
|
5472 6704 | + Send
|
5473 6705 | + 'static,
|
5474 6706 | S::Future: Send + 'static,
|
5475 6707 | {
|
5476 - | self.json_int_enums = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6708 + | self.json_maps = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5477 6709 | self
|
5478 6710 | }
|
5479 6711 |
|
5480 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
6712 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
5481 6713 | ///
|
5482 6714 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5483 6715 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5484 6716 | ///
|
5485 6717 | /// # Example
|
5486 6718 | ///
|
5487 6719 | /// ```no_run
|
5488 6720 | /// use rest_json::{RestJson, RestJsonConfig};
|
5489 6721 | ///
|
5490 6722 | /// use rest_json::{input, output, error};
|
5491 6723 | ///
|
5492 - | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
6724 + | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, error::JsonTimestampsError> {
|
5493 6725 | /// todo!()
|
5494 6726 | /// }
|
5495 6727 | ///
|
5496 6728 | /// let config = RestJsonConfig::builder().build();
|
5497 6729 | /// let app = RestJson::builder(config)
|
5498 - | /// .json_lists(handler)
|
6730 + | /// .json_timestamps(handler)
|
5499 6731 | /// /* Set other handlers */
|
5500 6732 | /// .build()
|
5501 6733 | /// .unwrap();
|
5502 6734 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5503 6735 | /// ```
|
5504 6736 | ///
|
5505 - | pub fn json_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6737 + | pub fn json_timestamps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5506 6738 | where
|
5507 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonLists, HandlerExtractors>,
|
6739 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonTimestamps, HandlerExtractors>,
|
5508 6740 |
|
5509 6741 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5510 6742 | RestJson<L>,
|
5511 - | crate::operation_shape::JsonLists,
|
5512 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonLists, HandlerType>
|
6743 + | crate::operation_shape::JsonTimestamps,
|
6744 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonTimestamps, HandlerType>
|
5513 6745 | >,
|
5514 6746 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5515 6747 | RestJson<L>,
|
5516 - | crate::operation_shape::JsonLists,
|
6748 + | crate::operation_shape::JsonTimestamps,
|
5517 6749 | ModelPl::Output
|
5518 6750 | >,
|
5519 6751 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5520 6752 | RestJson<L>,
|
5521 - | crate::operation_shape::JsonLists,
|
6753 + | crate::operation_shape::JsonTimestamps,
|
5522 6754 | <
|
5523 6755 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5524 6756 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5525 6757 | RestJson<L>,
|
5526 - | crate::operation_shape::JsonLists,
|
6758 + | crate::operation_shape::JsonTimestamps,
|
5527 6759 | ModelPl::Output
|
5528 6760 | >
|
5529 6761 | >::Output
|
5530 6762 | >,
|
5531 6763 |
|
5532 6764 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5533 6765 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5534 6766 |
|
5535 6767 | {
|
5536 6768 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5537 6769 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5538 - | let svc = crate::operation_shape::JsonLists::from_handler(handler);
|
6770 + | let svc = crate::operation_shape::JsonTimestamps::from_handler(handler);
|
5539 6771 | let svc = self.model_plugin.apply(svc);
|
5540 6772 | let svc =
|
5541 6773 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5542 6774 | .apply(svc);
|
5543 6775 | let svc = self.http_plugin.apply(svc);
|
5544 - | self.json_lists_custom(svc)
|
6776 + | self.json_timestamps_custom(svc)
|
5545 6777 | }
|
5546 6778 |
|
5547 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
6779 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
5548 6780 | ///
|
5549 6781 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5550 6782 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5551 6783 | ///
|
5552 6784 | /// # Example
|
5553 6785 | ///
|
5554 6786 | /// ```no_run
|
5555 6787 | /// use rest_json::{RestJson, RestJsonConfig};
|
5556 6788 | ///
|
5557 6789 | /// use rest_json::{input, output, error};
|
5558 6790 | ///
|
5559 - | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
6791 + | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, error::JsonTimestampsError> {
|
5560 6792 | /// todo!()
|
5561 6793 | /// }
|
5562 6794 | ///
|
5563 6795 | /// let config = RestJsonConfig::builder().build();
|
5564 6796 | /// let svc = ::tower::util::service_fn(handler);
|
5565 6797 | /// let app = RestJson::builder(config)
|
5566 - | /// .json_lists_service(svc)
|
6798 + | /// .json_timestamps_service(svc)
|
5567 6799 | /// /* Set other handlers */
|
5568 6800 | /// .build()
|
5569 6801 | /// .unwrap();
|
5570 6802 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5571 6803 | /// ```
|
5572 6804 | ///
|
5573 - | pub fn json_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6805 + | pub fn json_timestamps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5574 6806 | where
|
5575 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonLists, ServiceExtractors>,
|
6807 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonTimestamps, ServiceExtractors>,
|
5576 6808 |
|
5577 6809 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5578 6810 | RestJson<L>,
|
5579 - | crate::operation_shape::JsonLists,
|
5580 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonLists, S>
|
6811 + | crate::operation_shape::JsonTimestamps,
|
6812 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonTimestamps, S>
|
5581 6813 | >,
|
5582 6814 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5583 6815 | RestJson<L>,
|
5584 - | crate::operation_shape::JsonLists,
|
6816 + | crate::operation_shape::JsonTimestamps,
|
5585 6817 | ModelPl::Output
|
5586 6818 | >,
|
5587 6819 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5588 6820 | RestJson<L>,
|
5589 - | crate::operation_shape::JsonLists,
|
6821 + | crate::operation_shape::JsonTimestamps,
|
5590 6822 | <
|
5591 6823 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5592 6824 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5593 6825 | RestJson<L>,
|
5594 - | crate::operation_shape::JsonLists,
|
6826 + | crate::operation_shape::JsonTimestamps,
|
5595 6827 | ModelPl::Output
|
5596 6828 | >
|
5597 6829 | >::Output
|
5598 6830 | >,
|
5599 6831 |
|
5600 6832 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5601 6833 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5602 6834 |
|
5603 6835 | {
|
5604 6836 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5605 6837 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5606 - | let svc = crate::operation_shape::JsonLists::from_service(service);
|
6838 + | let svc = crate::operation_shape::JsonTimestamps::from_service(service);
|
5607 6839 | let svc = self.model_plugin.apply(svc);
|
5608 6840 | let svc =
|
5609 6841 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5610 6842 | .apply(svc);
|
5611 6843 | let svc = self.http_plugin.apply(svc);
|
5612 - | self.json_lists_custom(svc)
|
6844 + | self.json_timestamps_custom(svc)
|
5613 6845 | }
|
5614 6846 |
|
5615 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) to a custom [`Service`](tower::Service).
|
6847 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) to a custom [`Service`](tower::Service).
|
5616 6848 | /// not constrained by the Smithy contract.
|
5617 - | fn json_lists_custom<S>(mut self, svc: S) -> Self
|
6849 + | fn json_timestamps_custom<S>(mut self, svc: S) -> Self
|
5618 6850 | where
|
5619 6851 | S: ::tower::Service<
|
5620 6852 | ::http::Request<Body>,
|
5621 6853 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5622 6854 | Error = ::std::convert::Infallible,
|
5623 6855 | > + Clone
|
5624 6856 | + Send
|
5625 6857 | + 'static,
|
5626 6858 | S::Future: Send + 'static,
|
5627 6859 | {
|
5628 - | self.json_lists = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6860 + | self.json_timestamps = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5629 6861 | self
|
5630 6862 | }
|
5631 6863 |
|
5632 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
6864 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
5633 6865 | ///
|
5634 6866 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5635 6867 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5636 6868 | ///
|
5637 6869 | /// # Example
|
5638 6870 | ///
|
5639 6871 | /// ```no_run
|
5640 6872 | /// use rest_json::{RestJson, RestJsonConfig};
|
5641 6873 | ///
|
5642 6874 | /// use rest_json::{input, output, error};
|
5643 6875 | ///
|
5644 - | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
6876 + | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
5645 6877 | /// todo!()
|
5646 6878 | /// }
|
5647 6879 | ///
|
5648 6880 | /// let config = RestJsonConfig::builder().build();
|
5649 6881 | /// let app = RestJson::builder(config)
|
5650 - | /// .json_maps(handler)
|
6882 + | /// .json_unions(handler)
|
5651 6883 | /// /* Set other handlers */
|
5652 6884 | /// .build()
|
5653 6885 | /// .unwrap();
|
5654 6886 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5655 6887 | /// ```
|
5656 6888 | ///
|
5657 - | pub fn json_maps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6889 + | pub fn json_unions<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5658 6890 | where
|
5659 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonMaps, HandlerExtractors>,
|
6891 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonUnions, HandlerExtractors>,
|
5660 6892 |
|
5661 6893 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5662 6894 | RestJson<L>,
|
5663 - | crate::operation_shape::JsonMaps,
|
5664 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonMaps, HandlerType>
|
6895 + | crate::operation_shape::JsonUnions,
|
6896 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonUnions, HandlerType>
|
5665 6897 | >,
|
5666 6898 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5667 6899 | RestJson<L>,
|
5668 - | crate::operation_shape::JsonMaps,
|
6900 + | crate::operation_shape::JsonUnions,
|
5669 6901 | ModelPl::Output
|
5670 6902 | >,
|
5671 6903 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5672 6904 | RestJson<L>,
|
5673 - | crate::operation_shape::JsonMaps,
|
6905 + | crate::operation_shape::JsonUnions,
|
5674 6906 | <
|
5675 6907 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5676 6908 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5677 6909 | RestJson<L>,
|
5678 - | crate::operation_shape::JsonMaps,
|
6910 + | crate::operation_shape::JsonUnions,
|
5679 6911 | ModelPl::Output
|
5680 6912 | >
|
5681 6913 | >::Output
|
5682 6914 | >,
|
5683 6915 |
|
5684 6916 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5685 6917 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5686 6918 |
|
5687 6919 | {
|
5688 6920 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5689 6921 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5690 - | let svc = crate::operation_shape::JsonMaps::from_handler(handler);
|
6922 + | let svc = crate::operation_shape::JsonUnions::from_handler(handler);
|
5691 6923 | let svc = self.model_plugin.apply(svc);
|
5692 6924 | let svc =
|
5693 6925 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5694 6926 | .apply(svc);
|
5695 6927 | let svc = self.http_plugin.apply(svc);
|
5696 - | self.json_maps_custom(svc)
|
6928 + | self.json_unions_custom(svc)
|
5697 6929 | }
|
5698 6930 |
|
5699 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
6931 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
5700 6932 | ///
|
5701 6933 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5702 6934 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5703 6935 | ///
|
5704 6936 | /// # Example
|
5705 6937 | ///
|
5706 6938 | /// ```no_run
|
5707 6939 | /// use rest_json::{RestJson, RestJsonConfig};
|
5708 6940 | ///
|
5709 6941 | /// use rest_json::{input, output, error};
|
5710 6942 | ///
|
5711 - | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
6943 + | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
5712 6944 | /// todo!()
|
5713 6945 | /// }
|
5714 6946 | ///
|
5715 6947 | /// let config = RestJsonConfig::builder().build();
|
5716 6948 | /// let svc = ::tower::util::service_fn(handler);
|
5717 6949 | /// let app = RestJson::builder(config)
|
5718 - | /// .json_maps_service(svc)
|
6950 + | /// .json_unions_service(svc)
|
5719 6951 | /// /* Set other handlers */
|
5720 6952 | /// .build()
|
5721 6953 | /// .unwrap();
|
5722 6954 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5723 6955 | /// ```
|
5724 6956 | ///
|
5725 - | pub fn json_maps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6957 + | pub fn json_unions_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5726 6958 | where
|
5727 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonMaps, ServiceExtractors>,
|
6959 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonUnions, ServiceExtractors>,
|
5728 6960 |
|
5729 6961 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5730 6962 | RestJson<L>,
|
5731 - | crate::operation_shape::JsonMaps,
|
5732 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonMaps, S>
|
6963 + | crate::operation_shape::JsonUnions,
|
6964 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonUnions, S>
|
5733 6965 | >,
|
5734 6966 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5735 6967 | RestJson<L>,
|
5736 - | crate::operation_shape::JsonMaps,
|
6968 + | crate::operation_shape::JsonUnions,
|
5737 6969 | ModelPl::Output
|
5738 6970 | >,
|
5739 6971 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5740 6972 | RestJson<L>,
|
5741 - | crate::operation_shape::JsonMaps,
|
6973 + | crate::operation_shape::JsonUnions,
|
5742 6974 | <
|
5743 6975 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5744 6976 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5745 6977 | RestJson<L>,
|
5746 - | crate::operation_shape::JsonMaps,
|
6978 + | crate::operation_shape::JsonUnions,
|
5747 6979 | ModelPl::Output
|
5748 6980 | >
|
5749 6981 | >::Output
|
5750 6982 | >,
|
5751 6983 |
|
5752 6984 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5753 6985 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5754 6986 |
|
5755 6987 | {
|
5756 6988 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5757 6989 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5758 - | let svc = crate::operation_shape::JsonMaps::from_service(service);
|
6990 + | let svc = crate::operation_shape::JsonUnions::from_service(service);
|
5759 6991 | let svc = self.model_plugin.apply(svc);
|
5760 6992 | let svc =
|
5761 6993 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5762 6994 | .apply(svc);
|
5763 6995 | let svc = self.http_plugin.apply(svc);
|
5764 - | self.json_maps_custom(svc)
|
6996 + | self.json_unions_custom(svc)
|
5765 6997 | }
|
5766 6998 |
|
5767 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) to a custom [`Service`](tower::Service).
|
6999 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) to a custom [`Service`](tower::Service).
|
5768 7000 | /// not constrained by the Smithy contract.
|
5769 - | fn json_maps_custom<S>(mut self, svc: S) -> Self
|
7001 + | fn json_unions_custom<S>(mut self, svc: S) -> Self
|
5770 7002 | where
|
5771 7003 | S: ::tower::Service<
|
5772 7004 | ::http::Request<Body>,
|
5773 7005 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5774 7006 | Error = ::std::convert::Infallible,
|
5775 7007 | > + Clone
|
5776 7008 | + Send
|
5777 7009 | + 'static,
|
5778 7010 | S::Future: Send + 'static,
|
5779 7011 | {
|
5780 - | self.json_maps = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7012 + | self.json_unions = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5781 7013 | self
|
5782 7014 | }
|
5783 7015 |
|
5784 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
7016 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
5785 7017 | ///
|
5786 7018 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5787 7019 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5788 7020 | ///
|
5789 7021 | /// # Example
|
5790 7022 | ///
|
5791 7023 | /// ```no_run
|
5792 7024 | /// use rest_json::{RestJson, RestJsonConfig};
|
5793 7025 | ///
|
5794 7026 | /// use rest_json::{input, output, error};
|
5795 7027 | ///
|
5796 - | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, error::JsonTimestampsError> {
|
7028 + | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, error::MalformedAcceptWithBodyError> {
|
5797 7029 | /// todo!()
|
5798 7030 | /// }
|
5799 7031 | ///
|
5800 7032 | /// let config = RestJsonConfig::builder().build();
|
5801 7033 | /// let app = RestJson::builder(config)
|
5802 - | /// .json_timestamps(handler)
|
7034 + | /// .malformed_accept_with_body(handler)
|
5803 7035 | /// /* Set other handlers */
|
5804 7036 | /// .build()
|
5805 7037 | /// .unwrap();
|
5806 7038 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5807 7039 | /// ```
|
5808 7040 | ///
|
5809 - | pub fn json_timestamps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7041 + | pub fn malformed_accept_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5810 7042 | where
|
5811 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonTimestamps, HandlerExtractors>,
|
7043 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithBody, HandlerExtractors>,
|
5812 7044 |
|
5813 7045 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5814 7046 | RestJson<L>,
|
5815 - | crate::operation_shape::JsonTimestamps,
|
5816 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonTimestamps, HandlerType>
|
7047 + | crate::operation_shape::MalformedAcceptWithBody,
|
7048 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithBody, HandlerType>
|
5817 7049 | >,
|
5818 7050 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5819 7051 | RestJson<L>,
|
5820 - | crate::operation_shape::JsonTimestamps,
|
7052 + | crate::operation_shape::MalformedAcceptWithBody,
|
5821 7053 | ModelPl::Output
|
5822 7054 | >,
|
5823 7055 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5824 7056 | RestJson<L>,
|
5825 - | crate::operation_shape::JsonTimestamps,
|
7057 + | crate::operation_shape::MalformedAcceptWithBody,
|
5826 7058 | <
|
5827 7059 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5828 7060 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5829 7061 | RestJson<L>,
|
5830 - | crate::operation_shape::JsonTimestamps,
|
7062 + | crate::operation_shape::MalformedAcceptWithBody,
|
5831 7063 | ModelPl::Output
|
5832 7064 | >
|
5833 7065 | >::Output
|
5834 7066 | >,
|
5835 7067 |
|
5836 7068 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5837 7069 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5838 7070 |
|
5839 7071 | {
|
5840 7072 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5841 7073 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5842 - | let svc = crate::operation_shape::JsonTimestamps::from_handler(handler);
|
7074 + | let svc = crate::operation_shape::MalformedAcceptWithBody::from_handler(handler);
|
5843 7075 | let svc = self.model_plugin.apply(svc);
|
5844 7076 | let svc =
|
5845 7077 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5846 7078 | .apply(svc);
|
5847 7079 | let svc = self.http_plugin.apply(svc);
|
5848 - | self.json_timestamps_custom(svc)
|
7080 + | self.malformed_accept_with_body_custom(svc)
|
5849 7081 | }
|
5850 7082 |
|
5851 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
7083 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
5852 7084 | ///
|
5853 7085 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5854 7086 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5855 7087 | ///
|
5856 7088 | /// # Example
|
5857 7089 | ///
|
5858 7090 | /// ```no_run
|
5859 7091 | /// use rest_json::{RestJson, RestJsonConfig};
|
5860 7092 | ///
|
5861 7093 | /// use rest_json::{input, output, error};
|
5862 7094 | ///
|
5863 - | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, error::JsonTimestampsError> {
|
7095 + | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, error::MalformedAcceptWithBodyError> {
|
5864 7096 | /// todo!()
|
5865 7097 | /// }
|
5866 7098 | ///
|
5867 7099 | /// let config = RestJsonConfig::builder().build();
|
5868 7100 | /// let svc = ::tower::util::service_fn(handler);
|
5869 7101 | /// let app = RestJson::builder(config)
|
5870 - | /// .json_timestamps_service(svc)
|
7102 + | /// .malformed_accept_with_body_service(svc)
|
5871 7103 | /// /* Set other handlers */
|
5872 7104 | /// .build()
|
5873 7105 | /// .unwrap();
|
5874 7106 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5875 7107 | /// ```
|
5876 7108 | ///
|
5877 - | pub fn json_timestamps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7109 + | pub fn malformed_accept_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5878 7110 | where
|
5879 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonTimestamps, ServiceExtractors>,
|
7111 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithBody, ServiceExtractors>,
|
5880 7112 |
|
5881 7113 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5882 7114 | RestJson<L>,
|
5883 - | crate::operation_shape::JsonTimestamps,
|
5884 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonTimestamps, S>
|
7115 + | crate::operation_shape::MalformedAcceptWithBody,
|
7116 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithBody, S>
|
5885 7117 | >,
|
5886 7118 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5887 7119 | RestJson<L>,
|
5888 - | crate::operation_shape::JsonTimestamps,
|
7120 + | crate::operation_shape::MalformedAcceptWithBody,
|
5889 7121 | ModelPl::Output
|
5890 7122 | >,
|
5891 7123 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5892 7124 | RestJson<L>,
|
5893 - | crate::operation_shape::JsonTimestamps,
|
7125 + | crate::operation_shape::MalformedAcceptWithBody,
|
5894 7126 | <
|
5895 7127 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5896 7128 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5897 7129 | RestJson<L>,
|
5898 - | crate::operation_shape::JsonTimestamps,
|
7130 + | crate::operation_shape::MalformedAcceptWithBody,
|
5899 7131 | ModelPl::Output
|
5900 7132 | >
|
5901 7133 | >::Output
|
5902 7134 | >,
|
5903 7135 |
|
5904 7136 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5905 7137 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5906 7138 |
|
5907 7139 | {
|
5908 7140 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5909 7141 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5910 - | let svc = crate::operation_shape::JsonTimestamps::from_service(service);
|
7142 + | let svc = crate::operation_shape::MalformedAcceptWithBody::from_service(service);
|
5911 7143 | let svc = self.model_plugin.apply(svc);
|
5912 7144 | let svc =
|
5913 7145 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5914 7146 | .apply(svc);
|
5915 7147 | let svc = self.http_plugin.apply(svc);
|
5916 - | self.json_timestamps_custom(svc)
|
7148 + | self.malformed_accept_with_body_custom(svc)
|
5917 7149 | }
|
5918 7150 |
|
5919 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) to a custom [`Service`](tower::Service).
|
7151 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) to a custom [`Service`](tower::Service).
|
5920 7152 | /// not constrained by the Smithy contract.
|
5921 - | fn json_timestamps_custom<S>(mut self, svc: S) -> Self
|
7153 + | fn malformed_accept_with_body_custom<S>(mut self, svc: S) -> Self
|
5922 7154 | where
|
5923 7155 | S: ::tower::Service<
|
5924 7156 | ::http::Request<Body>,
|
5925 7157 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
5926 7158 | Error = ::std::convert::Infallible,
|
5927 7159 | > + Clone
|
5928 7160 | + Send
|
5929 7161 | + 'static,
|
5930 7162 | S::Future: Send + 'static,
|
5931 7163 | {
|
5932 - | self.json_timestamps = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7164 + | self.malformed_accept_with_body =
|
7165 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
5933 7166 | self
|
5934 7167 | }
|
5935 7168 |
|
5936 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
7169 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
5937 7170 | ///
|
5938 7171 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
5939 7172 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
5940 7173 | ///
|
5941 7174 | /// # Example
|
5942 7175 | ///
|
5943 7176 | /// ```no_run
|
5944 7177 | /// use rest_json::{RestJson, RestJsonConfig};
|
5945 7178 | ///
|
5946 7179 | /// use rest_json::{input, output, error};
|
5947 7180 | ///
|
5948 - | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
7181 + | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, error::MalformedAcceptWithGenericStringError> {
|
5949 7182 | /// todo!()
|
5950 7183 | /// }
|
5951 7184 | ///
|
5952 7185 | /// let config = RestJsonConfig::builder().build();
|
5953 7186 | /// let app = RestJson::builder(config)
|
5954 - | /// .json_unions(handler)
|
7187 + | /// .malformed_accept_with_generic_string(handler)
|
5955 7188 | /// /* Set other handlers */
|
5956 7189 | /// .build()
|
5957 7190 | /// .unwrap();
|
5958 7191 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5959 7192 | /// ```
|
5960 7193 | ///
|
5961 - | pub fn json_unions<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7194 + | pub fn malformed_accept_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5962 7195 | where
|
5963 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::JsonUnions, HandlerExtractors>,
|
7196 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithGenericString, HandlerExtractors>,
|
5964 7197 |
|
5965 7198 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5966 7199 | RestJson<L>,
|
5967 - | crate::operation_shape::JsonUnions,
|
5968 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::JsonUnions, HandlerType>
|
7200 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7201 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithGenericString, HandlerType>
|
5969 7202 | >,
|
5970 7203 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5971 7204 | RestJson<L>,
|
5972 - | crate::operation_shape::JsonUnions,
|
7205 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
5973 7206 | ModelPl::Output
|
5974 7207 | >,
|
5975 7208 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5976 7209 | RestJson<L>,
|
5977 - | crate::operation_shape::JsonUnions,
|
7210 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
5978 7211 | <
|
5979 7212 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5980 7213 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
5981 7214 | RestJson<L>,
|
5982 - | crate::operation_shape::JsonUnions,
|
7215 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
5983 7216 | ModelPl::Output
|
5984 7217 | >
|
5985 7218 | >::Output
|
5986 7219 | >,
|
5987 7220 |
|
5988 7221 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5989 7222 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
5990 7223 |
|
5991 7224 | {
|
5992 7225 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
5993 7226 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
5994 - | let svc = crate::operation_shape::JsonUnions::from_handler(handler);
|
7227 + | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_handler(handler);
|
5995 7228 | let svc = self.model_plugin.apply(svc);
|
5996 7229 | let svc =
|
5997 7230 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5998 7231 | .apply(svc);
|
5999 7232 | let svc = self.http_plugin.apply(svc);
|
6000 - | self.json_unions_custom(svc)
|
7233 + | self.malformed_accept_with_generic_string_custom(svc)
|
6001 7234 | }
|
6002 7235 |
|
6003 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
7236 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
6004 7237 | ///
|
6005 7238 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6006 7239 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6007 7240 | ///
|
6008 7241 | /// # Example
|
6009 7242 | ///
|
6010 7243 | /// ```no_run
|
6011 7244 | /// use rest_json::{RestJson, RestJsonConfig};
|
6012 7245 | ///
|
6013 7246 | /// use rest_json::{input, output, error};
|
6014 7247 | ///
|
6015 - | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
7248 + | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, error::MalformedAcceptWithGenericStringError> {
|
6016 7249 | /// todo!()
|
6017 7250 | /// }
|
6018 7251 | ///
|
6019 7252 | /// let config = RestJsonConfig::builder().build();
|
6020 7253 | /// let svc = ::tower::util::service_fn(handler);
|
6021 7254 | /// let app = RestJson::builder(config)
|
6022 - | /// .json_unions_service(svc)
|
7255 + | /// .malformed_accept_with_generic_string_service(svc)
|
6023 7256 | /// /* Set other handlers */
|
6024 7257 | /// .build()
|
6025 7258 | /// .unwrap();
|
6026 7259 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6027 7260 | /// ```
|
6028 7261 | ///
|
6029 - | pub fn json_unions_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7262 + | pub fn malformed_accept_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6030 7263 | where
|
6031 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::JsonUnions, ServiceExtractors>,
|
7264 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithGenericString, ServiceExtractors>,
|
6032 7265 |
|
6033 7266 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6034 7267 | RestJson<L>,
|
6035 - | crate::operation_shape::JsonUnions,
|
6036 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::JsonUnions, S>
|
7268 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7269 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithGenericString, S>
|
6037 7270 | >,
|
6038 7271 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6039 7272 | RestJson<L>,
|
6040 - | crate::operation_shape::JsonUnions,
|
7273 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
6041 7274 | ModelPl::Output
|
6042 7275 | >,
|
6043 7276 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6044 7277 | RestJson<L>,
|
6045 - | crate::operation_shape::JsonUnions,
|
7278 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
6046 7279 | <
|
6047 7280 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6048 7281 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6049 7282 | RestJson<L>,
|
6050 - | crate::operation_shape::JsonUnions,
|
7283 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
6051 7284 | ModelPl::Output
|
6052 7285 | >
|
6053 7286 | >::Output
|
6054 7287 | >,
|
6055 7288 |
|
6056 7289 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6057 7290 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6058 7291 |
|
6059 7292 | {
|
6060 7293 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6061 7294 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6062 - | let svc = crate::operation_shape::JsonUnions::from_service(service);
|
7295 + | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_service(service);
|
6063 7296 | let svc = self.model_plugin.apply(svc);
|
6064 7297 | let svc =
|
6065 7298 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6066 7299 | .apply(svc);
|
6067 7300 | let svc = self.http_plugin.apply(svc);
|
6068 - | self.json_unions_custom(svc)
|
7301 + | self.malformed_accept_with_generic_string_custom(svc)
|
6069 7302 | }
|
6070 7303 |
|
6071 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) to a custom [`Service`](tower::Service).
|
7304 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) to a custom [`Service`](tower::Service).
|
6072 7305 | /// not constrained by the Smithy contract.
|
6073 - | fn json_unions_custom<S>(mut self, svc: S) -> Self
|
7306 + | fn malformed_accept_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
6074 7307 | where
|
6075 7308 | S: ::tower::Service<
|
6076 7309 | ::http::Request<Body>,
|
6077 7310 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6078 7311 | Error = ::std::convert::Infallible,
|
6079 7312 | > + Clone
|
6080 7313 | + Send
|
6081 7314 | + 'static,
|
6082 7315 | S::Future: Send + 'static,
|
6083 7316 | {
|
6084 - | self.json_unions = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7317 + | self.malformed_accept_with_generic_string =
|
7318 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6085 7319 | self
|
6086 7320 | }
|
6087 7321 |
|
6088 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
7322 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
6089 7323 | ///
|
6090 7324 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6091 7325 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6092 7326 | ///
|
6093 7327 | /// # Example
|
6094 7328 | ///
|
6095 7329 | /// ```no_run
|
6096 7330 | /// use rest_json::{RestJson, RestJsonConfig};
|
6097 7331 | ///
|
6098 7332 | /// use rest_json::{input, output, error};
|
6099 7333 | ///
|
6100 - | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, error::MalformedAcceptWithBodyError> {
|
7334 + | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, error::MalformedAcceptWithPayloadError> {
|
6101 7335 | /// todo!()
|
6102 7336 | /// }
|
6103 7337 | ///
|
6104 7338 | /// let config = RestJsonConfig::builder().build();
|
6105 7339 | /// let app = RestJson::builder(config)
|
6106 - | /// .malformed_accept_with_body(handler)
|
7340 + | /// .malformed_accept_with_payload(handler)
|
6107 7341 | /// /* Set other handlers */
|
6108 7342 | /// .build()
|
6109 7343 | /// .unwrap();
|
6110 7344 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6111 7345 | /// ```
|
6112 7346 | ///
|
6113 - | pub fn malformed_accept_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7347 + | pub fn malformed_accept_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6114 7348 | where
|
6115 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithBody, HandlerExtractors>,
|
7349 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithPayload, HandlerExtractors>,
|
6116 7350 |
|
6117 7351 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6118 7352 | RestJson<L>,
|
6119 - | crate::operation_shape::MalformedAcceptWithBody,
|
6120 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithBody, HandlerType>
|
7353 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7354 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithPayload, HandlerType>
|
6121 7355 | >,
|
6122 7356 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6123 7357 | RestJson<L>,
|
6124 - | crate::operation_shape::MalformedAcceptWithBody,
|
7358 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6125 7359 | ModelPl::Output
|
6126 7360 | >,
|
6127 7361 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6128 7362 | RestJson<L>,
|
6129 - | crate::operation_shape::MalformedAcceptWithBody,
|
7363 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6130 7364 | <
|
6131 7365 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6132 7366 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6133 7367 | RestJson<L>,
|
6134 - | crate::operation_shape::MalformedAcceptWithBody,
|
7368 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6135 7369 | ModelPl::Output
|
6136 7370 | >
|
6137 7371 | >::Output
|
6138 7372 | >,
|
6139 7373 |
|
6140 7374 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6141 7375 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6142 7376 |
|
6143 7377 | {
|
6144 7378 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6145 7379 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6146 - | let svc = crate::operation_shape::MalformedAcceptWithBody::from_handler(handler);
|
7380 + | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_handler(handler);
|
6147 7381 | let svc = self.model_plugin.apply(svc);
|
6148 7382 | let svc =
|
6149 7383 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6150 7384 | .apply(svc);
|
6151 7385 | let svc = self.http_plugin.apply(svc);
|
6152 - | self.malformed_accept_with_body_custom(svc)
|
7386 + | self.malformed_accept_with_payload_custom(svc)
|
6153 7387 | }
|
6154 7388 |
|
6155 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
7389 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
6156 7390 | ///
|
6157 7391 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6158 7392 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6159 7393 | ///
|
6160 7394 | /// # Example
|
6161 7395 | ///
|
6162 7396 | /// ```no_run
|
6163 7397 | /// use rest_json::{RestJson, RestJsonConfig};
|
6164 7398 | ///
|
6165 7399 | /// use rest_json::{input, output, error};
|
6166 7400 | ///
|
6167 - | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, error::MalformedAcceptWithBodyError> {
|
7401 + | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, error::MalformedAcceptWithPayloadError> {
|
6168 7402 | /// todo!()
|
6169 7403 | /// }
|
6170 7404 | ///
|
6171 7405 | /// let config = RestJsonConfig::builder().build();
|
6172 7406 | /// let svc = ::tower::util::service_fn(handler);
|
6173 7407 | /// let app = RestJson::builder(config)
|
6174 - | /// .malformed_accept_with_body_service(svc)
|
7408 + | /// .malformed_accept_with_payload_service(svc)
|
6175 7409 | /// /* Set other handlers */
|
6176 7410 | /// .build()
|
6177 7411 | /// .unwrap();
|
6178 7412 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6179 7413 | /// ```
|
6180 7414 | ///
|
6181 - | pub fn malformed_accept_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7415 + | pub fn malformed_accept_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6182 7416 | where
|
6183 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithBody, ServiceExtractors>,
|
7417 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithPayload, ServiceExtractors>,
|
6184 7418 |
|
6185 7419 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6186 7420 | RestJson<L>,
|
6187 - | crate::operation_shape::MalformedAcceptWithBody,
|
6188 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithBody, S>
|
7421 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7422 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithPayload, S>
|
6189 7423 | >,
|
6190 7424 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6191 7425 | RestJson<L>,
|
6192 - | crate::operation_shape::MalformedAcceptWithBody,
|
7426 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6193 7427 | ModelPl::Output
|
6194 7428 | >,
|
6195 7429 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6196 7430 | RestJson<L>,
|
6197 - | crate::operation_shape::MalformedAcceptWithBody,
|
7431 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6198 7432 | <
|
6199 7433 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6200 7434 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6201 7435 | RestJson<L>,
|
6202 - | crate::operation_shape::MalformedAcceptWithBody,
|
7436 + | crate::operation_shape::MalformedAcceptWithPayload,
|
6203 7437 | ModelPl::Output
|
6204 7438 | >
|
6205 7439 | >::Output
|
6206 7440 | >,
|
6207 7441 |
|
6208 7442 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6209 7443 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6210 7444 |
|
6211 7445 | {
|
6212 7446 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6213 7447 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6214 - | let svc = crate::operation_shape::MalformedAcceptWithBody::from_service(service);
|
7448 + | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_service(service);
|
6215 7449 | let svc = self.model_plugin.apply(svc);
|
6216 7450 | let svc =
|
6217 7451 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6218 7452 | .apply(svc);
|
6219 7453 | let svc = self.http_plugin.apply(svc);
|
6220 - | self.malformed_accept_with_body_custom(svc)
|
7454 + | self.malformed_accept_with_payload_custom(svc)
|
6221 7455 | }
|
6222 7456 |
|
6223 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) to a custom [`Service`](tower::Service).
|
7457 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) to a custom [`Service`](tower::Service).
|
6224 7458 | /// not constrained by the Smithy contract.
|
6225 - | fn malformed_accept_with_body_custom<S>(mut self, svc: S) -> Self
|
7459 + | fn malformed_accept_with_payload_custom<S>(mut self, svc: S) -> Self
|
6226 7460 | where
|
6227 7461 | S: ::tower::Service<
|
6228 7462 | ::http::Request<Body>,
|
6229 7463 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6230 7464 | Error = ::std::convert::Infallible,
|
6231 7465 | > + Clone
|
6232 7466 | + Send
|
6233 7467 | + 'static,
|
6234 7468 | S::Future: Send + 'static,
|
6235 7469 | {
|
6236 - | self.malformed_accept_with_body =
|
7470 + | self.malformed_accept_with_payload =
|
6237 7471 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6238 7472 | self
|
6239 7473 | }
|
6240 7474 |
|
6241 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
7475 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
6242 7476 | ///
|
6243 7477 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6244 7478 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6245 7479 | ///
|
6246 7480 | /// # Example
|
6247 7481 | ///
|
6248 7482 | /// ```no_run
|
6249 7483 | /// use rest_json::{RestJson, RestJsonConfig};
|
6250 7484 | ///
|
6251 7485 | /// use rest_json::{input, output, error};
|
6252 7486 | ///
|
6253 - | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, error::MalformedAcceptWithGenericStringError> {
|
7487 + | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, error::MalformedBlobError> {
|
6254 7488 | /// todo!()
|
6255 7489 | /// }
|
6256 7490 | ///
|
6257 7491 | /// let config = RestJsonConfig::builder().build();
|
6258 7492 | /// let app = RestJson::builder(config)
|
6259 - | /// .malformed_accept_with_generic_string(handler)
|
7493 + | /// .malformed_blob(handler)
|
6260 7494 | /// /* Set other handlers */
|
6261 7495 | /// .build()
|
6262 7496 | /// .unwrap();
|
6263 7497 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6264 7498 | /// ```
|
6265 7499 | ///
|
6266 - | pub fn malformed_accept_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7500 + | pub fn malformed_blob<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6267 7501 | where
|
6268 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithGenericString, HandlerExtractors>,
|
7502 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedBlob, HandlerExtractors>,
|
6269 7503 |
|
6270 7504 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6271 7505 | RestJson<L>,
|
6272 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6273 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithGenericString, HandlerType>
|
7506 + | crate::operation_shape::MalformedBlob,
|
7507 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedBlob, HandlerType>
|
6274 7508 | >,
|
6275 7509 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6276 7510 | RestJson<L>,
|
6277 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7511 + | crate::operation_shape::MalformedBlob,
|
6278 7512 | ModelPl::Output
|
6279 7513 | >,
|
6280 7514 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6281 7515 | RestJson<L>,
|
6282 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7516 + | crate::operation_shape::MalformedBlob,
|
6283 7517 | <
|
6284 7518 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6285 7519 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6286 7520 | RestJson<L>,
|
6287 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7521 + | crate::operation_shape::MalformedBlob,
|
6288 7522 | ModelPl::Output
|
6289 7523 | >
|
6290 7524 | >::Output
|
6291 7525 | >,
|
6292 7526 |
|
6293 7527 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6294 7528 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6295 7529 |
|
6296 7530 | {
|
6297 7531 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6298 7532 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6299 - | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_handler(handler);
|
7533 + | let svc = crate::operation_shape::MalformedBlob::from_handler(handler);
|
6300 7534 | let svc = self.model_plugin.apply(svc);
|
6301 7535 | let svc =
|
6302 7536 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6303 7537 | .apply(svc);
|
6304 7538 | let svc = self.http_plugin.apply(svc);
|
6305 - | self.malformed_accept_with_generic_string_custom(svc)
|
7539 + | self.malformed_blob_custom(svc)
|
6306 7540 | }
|
6307 7541 |
|
6308 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
7542 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
6309 7543 | ///
|
6310 7544 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6311 7545 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6312 7546 | ///
|
6313 7547 | /// # Example
|
6314 7548 | ///
|
6315 7549 | /// ```no_run
|
6316 7550 | /// use rest_json::{RestJson, RestJsonConfig};
|
6317 7551 | ///
|
6318 7552 | /// use rest_json::{input, output, error};
|
6319 7553 | ///
|
6320 - | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, error::MalformedAcceptWithGenericStringError> {
|
7554 + | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, error::MalformedBlobError> {
|
6321 7555 | /// todo!()
|
6322 7556 | /// }
|
6323 7557 | ///
|
6324 7558 | /// let config = RestJsonConfig::builder().build();
|
6325 7559 | /// let svc = ::tower::util::service_fn(handler);
|
6326 7560 | /// let app = RestJson::builder(config)
|
6327 - | /// .malformed_accept_with_generic_string_service(svc)
|
7561 + | /// .malformed_blob_service(svc)
|
6328 7562 | /// /* Set other handlers */
|
6329 7563 | /// .build()
|
6330 7564 | /// .unwrap();
|
6331 7565 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6332 7566 | /// ```
|
6333 7567 | ///
|
6334 - | pub fn malformed_accept_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7568 + | pub fn malformed_blob_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6335 7569 | where
|
6336 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithGenericString, ServiceExtractors>,
|
7570 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedBlob, ServiceExtractors>,
|
6337 7571 |
|
6338 7572 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6339 7573 | RestJson<L>,
|
6340 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6341 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithGenericString, S>
|
7574 + | crate::operation_shape::MalformedBlob,
|
7575 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedBlob, S>
|
6342 7576 | >,
|
6343 7577 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6344 7578 | RestJson<L>,
|
6345 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7579 + | crate::operation_shape::MalformedBlob,
|
6346 7580 | ModelPl::Output
|
6347 7581 | >,
|
6348 7582 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6349 7583 | RestJson<L>,
|
6350 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7584 + | crate::operation_shape::MalformedBlob,
|
6351 7585 | <
|
6352 7586 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6353 7587 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6354 7588 | RestJson<L>,
|
6355 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
7589 + | crate::operation_shape::MalformedBlob,
|
6356 7590 | ModelPl::Output
|
6357 7591 | >
|
6358 7592 | >::Output
|
6359 7593 | >,
|
6360 7594 |
|
6361 7595 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6362 7596 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6363 7597 |
|
6364 7598 | {
|
6365 7599 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6366 7600 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6367 - | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_service(service);
|
7601 + | let svc = crate::operation_shape::MalformedBlob::from_service(service);
|
6368 7602 | let svc = self.model_plugin.apply(svc);
|
6369 7603 | let svc =
|
6370 7604 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6371 7605 | .apply(svc);
|
6372 7606 | let svc = self.http_plugin.apply(svc);
|
6373 - | self.malformed_accept_with_generic_string_custom(svc)
|
7607 + | self.malformed_blob_custom(svc)
|
6374 7608 | }
|
6375 7609 |
|
6376 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) to a custom [`Service`](tower::Service).
|
7610 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) to a custom [`Service`](tower::Service).
|
6377 7611 | /// not constrained by the Smithy contract.
|
6378 - | fn malformed_accept_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
7612 + | fn malformed_blob_custom<S>(mut self, svc: S) -> Self
|
6379 7613 | where
|
6380 7614 | S: ::tower::Service<
|
6381 7615 | ::http::Request<Body>,
|
6382 7616 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6383 7617 | Error = ::std::convert::Infallible,
|
6384 7618 | > + Clone
|
6385 7619 | + Send
|
6386 7620 | + 'static,
|
6387 7621 | S::Future: Send + 'static,
|
6388 7622 | {
|
6389 - | self.malformed_accept_with_generic_string =
|
6390 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7623 + | self.malformed_blob = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6391 7624 | self
|
6392 7625 | }
|
6393 7626 |
|
6394 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
7627 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
6395 7628 | ///
|
6396 7629 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6397 7630 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6398 7631 | ///
|
6399 7632 | /// # Example
|
6400 7633 | ///
|
6401 7634 | /// ```no_run
|
6402 7635 | /// use rest_json::{RestJson, RestJsonConfig};
|
6403 7636 | ///
|
6404 7637 | /// use rest_json::{input, output, error};
|
6405 7638 | ///
|
6406 - | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, error::MalformedAcceptWithPayloadError> {
|
7639 + | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
6407 7640 | /// todo!()
|
6408 7641 | /// }
|
6409 7642 | ///
|
6410 7643 | /// let config = RestJsonConfig::builder().build();
|
6411 7644 | /// let app = RestJson::builder(config)
|
6412 - | /// .malformed_accept_with_payload(handler)
|
7645 + | /// .malformed_boolean(handler)
|
6413 7646 | /// /* Set other handlers */
|
6414 7647 | /// .build()
|
6415 7648 | /// .unwrap();
|
6416 7649 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6417 7650 | /// ```
|
6418 7651 | ///
|
6419 - | pub fn malformed_accept_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7652 + | pub fn malformed_boolean<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6420 7653 | where
|
6421 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithPayload, HandlerExtractors>,
|
7654 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedBoolean, HandlerExtractors>,
|
6422 7655 |
|
6423 7656 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6424 7657 | RestJson<L>,
|
6425 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6426 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithPayload, HandlerType>
|
7658 + | crate::operation_shape::MalformedBoolean,
|
7659 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedBoolean, HandlerType>
|
6427 7660 | >,
|
6428 7661 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6429 7662 | RestJson<L>,
|
6430 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7663 + | crate::operation_shape::MalformedBoolean,
|
6431 7664 | ModelPl::Output
|
6432 7665 | >,
|
6433 7666 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6434 7667 | RestJson<L>,
|
6435 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7668 + | crate::operation_shape::MalformedBoolean,
|
6436 7669 | <
|
6437 7670 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6438 7671 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6439 7672 | RestJson<L>,
|
6440 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7673 + | crate::operation_shape::MalformedBoolean,
|
6441 7674 | ModelPl::Output
|
6442 7675 | >
|
6443 7676 | >::Output
|
6444 7677 | >,
|
6445 7678 |
|
6446 7679 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6447 7680 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6448 7681 |
|
6449 7682 | {
|
6450 7683 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6451 7684 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6452 - | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_handler(handler);
|
7685 + | let svc = crate::operation_shape::MalformedBoolean::from_handler(handler);
|
6453 7686 | let svc = self.model_plugin.apply(svc);
|
6454 7687 | let svc =
|
6455 7688 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6456 7689 | .apply(svc);
|
6457 7690 | let svc = self.http_plugin.apply(svc);
|
6458 - | self.malformed_accept_with_payload_custom(svc)
|
7691 + | self.malformed_boolean_custom(svc)
|
6459 7692 | }
|
6460 7693 |
|
6461 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
7694 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
6462 7695 | ///
|
6463 7696 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6464 7697 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6465 7698 | ///
|
6466 7699 | /// # Example
|
6467 7700 | ///
|
6468 7701 | /// ```no_run
|
6469 7702 | /// use rest_json::{RestJson, RestJsonConfig};
|
6470 7703 | ///
|
6471 7704 | /// use rest_json::{input, output, error};
|
6472 7705 | ///
|
6473 - | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, error::MalformedAcceptWithPayloadError> {
|
7706 + | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
6474 7707 | /// todo!()
|
6475 7708 | /// }
|
6476 7709 | ///
|
6477 7710 | /// let config = RestJsonConfig::builder().build();
|
6478 7711 | /// let svc = ::tower::util::service_fn(handler);
|
6479 7712 | /// let app = RestJson::builder(config)
|
6480 - | /// .malformed_accept_with_payload_service(svc)
|
7713 + | /// .malformed_boolean_service(svc)
|
6481 7714 | /// /* Set other handlers */
|
6482 7715 | /// .build()
|
6483 7716 | /// .unwrap();
|
6484 7717 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6485 7718 | /// ```
|
6486 7719 | ///
|
6487 - | pub fn malformed_accept_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7720 + | pub fn malformed_boolean_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6488 7721 | where
|
6489 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithPayload, ServiceExtractors>,
|
7722 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedBoolean, ServiceExtractors>,
|
6490 7723 |
|
6491 7724 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6492 7725 | RestJson<L>,
|
6493 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6494 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithPayload, S>
|
7726 + | crate::operation_shape::MalformedBoolean,
|
7727 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedBoolean, S>
|
6495 7728 | >,
|
6496 7729 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6497 7730 | RestJson<L>,
|
6498 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7731 + | crate::operation_shape::MalformedBoolean,
|
6499 7732 | ModelPl::Output
|
6500 7733 | >,
|
6501 7734 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6502 7735 | RestJson<L>,
|
6503 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7736 + | crate::operation_shape::MalformedBoolean,
|
6504 7737 | <
|
6505 7738 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6506 7739 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6507 7740 | RestJson<L>,
|
6508 - | crate::operation_shape::MalformedAcceptWithPayload,
|
7741 + | crate::operation_shape::MalformedBoolean,
|
6509 7742 | ModelPl::Output
|
6510 7743 | >
|
6511 7744 | >::Output
|
6512 7745 | >,
|
6513 7746 |
|
6514 7747 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6515 7748 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6516 7749 |
|
6517 7750 | {
|
6518 7751 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6519 7752 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6520 - | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_service(service);
|
7753 + | let svc = crate::operation_shape::MalformedBoolean::from_service(service);
|
6521 7754 | let svc = self.model_plugin.apply(svc);
|
6522 7755 | let svc =
|
6523 7756 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6524 7757 | .apply(svc);
|
6525 7758 | let svc = self.http_plugin.apply(svc);
|
6526 - | self.malformed_accept_with_payload_custom(svc)
|
7759 + | self.malformed_boolean_custom(svc)
|
6527 7760 | }
|
6528 7761 |
|
6529 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) to a custom [`Service`](tower::Service).
|
7762 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) to a custom [`Service`](tower::Service).
|
6530 7763 | /// not constrained by the Smithy contract.
|
6531 - | fn malformed_accept_with_payload_custom<S>(mut self, svc: S) -> Self
|
7764 + | fn malformed_boolean_custom<S>(mut self, svc: S) -> Self
|
6532 7765 | where
|
6533 7766 | S: ::tower::Service<
|
6534 7767 | ::http::Request<Body>,
|
6535 7768 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6536 7769 | Error = ::std::convert::Infallible,
|
6537 7770 | > + Clone
|
6538 7771 | + Send
|
6539 7772 | + 'static,
|
6540 7773 | S::Future: Send + 'static,
|
6541 7774 | {
|
6542 - | self.malformed_accept_with_payload =
|
6543 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7775 + | self.malformed_boolean = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6544 7776 | self
|
6545 7777 | }
|
6546 7778 |
|
6547 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
7779 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
6548 7780 | ///
|
6549 7781 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6550 7782 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6551 7783 | ///
|
6552 7784 | /// # Example
|
6553 7785 | ///
|
6554 7786 | /// ```no_run
|
6555 7787 | /// use rest_json::{RestJson, RestJsonConfig};
|
6556 7788 | ///
|
6557 7789 | /// use rest_json::{input, output, error};
|
6558 7790 | ///
|
6559 - | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, error::MalformedBlobError> {
|
7791 + | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
6560 7792 | /// todo!()
|
6561 7793 | /// }
|
6562 7794 | ///
|
6563 7795 | /// let config = RestJsonConfig::builder().build();
|
6564 7796 | /// let app = RestJson::builder(config)
|
6565 - | /// .malformed_blob(handler)
|
7797 + | /// .malformed_byte(handler)
|
6566 7798 | /// /* Set other handlers */
|
6567 7799 | /// .build()
|
6568 7800 | /// .unwrap();
|
6569 7801 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6570 7802 | /// ```
|
6571 7803 | ///
|
6572 - | pub fn malformed_blob<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7804 + | pub fn malformed_byte<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6573 7805 | where
|
6574 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedBlob, HandlerExtractors>,
|
7806 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedByte, HandlerExtractors>,
|
6575 7807 |
|
6576 7808 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6577 7809 | RestJson<L>,
|
6578 - | crate::operation_shape::MalformedBlob,
|
6579 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedBlob, HandlerType>
|
7810 + | crate::operation_shape::MalformedByte,
|
7811 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedByte, HandlerType>
|
6580 7812 | >,
|
6581 7813 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6582 7814 | RestJson<L>,
|
6583 - | crate::operation_shape::MalformedBlob,
|
7815 + | crate::operation_shape::MalformedByte,
|
6584 7816 | ModelPl::Output
|
6585 7817 | >,
|
6586 7818 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6587 7819 | RestJson<L>,
|
6588 - | crate::operation_shape::MalformedBlob,
|
7820 + | crate::operation_shape::MalformedByte,
|
6589 7821 | <
|
6590 7822 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6591 7823 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6592 7824 | RestJson<L>,
|
6593 - | crate::operation_shape::MalformedBlob,
|
7825 + | crate::operation_shape::MalformedByte,
|
6594 7826 | ModelPl::Output
|
6595 7827 | >
|
6596 7828 | >::Output
|
6597 7829 | >,
|
6598 7830 |
|
6599 7831 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6600 7832 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6601 7833 |
|
6602 7834 | {
|
6603 7835 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6604 7836 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6605 - | let svc = crate::operation_shape::MalformedBlob::from_handler(handler);
|
7837 + | let svc = crate::operation_shape::MalformedByte::from_handler(handler);
|
6606 7838 | let svc = self.model_plugin.apply(svc);
|
6607 7839 | let svc =
|
6608 7840 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6609 7841 | .apply(svc);
|
6610 7842 | let svc = self.http_plugin.apply(svc);
|
6611 - | self.malformed_blob_custom(svc)
|
7843 + | self.malformed_byte_custom(svc)
|
6612 7844 | }
|
6613 7845 |
|
6614 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
7846 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
6615 7847 | ///
|
6616 7848 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6617 7849 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6618 7850 | ///
|
6619 7851 | /// # Example
|
6620 7852 | ///
|
6621 7853 | /// ```no_run
|
6622 7854 | /// use rest_json::{RestJson, RestJsonConfig};
|
6623 7855 | ///
|
6624 7856 | /// use rest_json::{input, output, error};
|
6625 7857 | ///
|
6626 - | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, error::MalformedBlobError> {
|
7858 + | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
6627 7859 | /// todo!()
|
6628 7860 | /// }
|
6629 7861 | ///
|
6630 7862 | /// let config = RestJsonConfig::builder().build();
|
6631 7863 | /// let svc = ::tower::util::service_fn(handler);
|
6632 7864 | /// let app = RestJson::builder(config)
|
6633 - | /// .malformed_blob_service(svc)
|
7865 + | /// .malformed_byte_service(svc)
|
6634 7866 | /// /* Set other handlers */
|
6635 7867 | /// .build()
|
6636 7868 | /// .unwrap();
|
6637 7869 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6638 7870 | /// ```
|
6639 7871 | ///
|
6640 - | pub fn malformed_blob_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7872 + | pub fn malformed_byte_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6641 7873 | where
|
6642 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedBlob, ServiceExtractors>,
|
7874 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedByte, ServiceExtractors>,
|
6643 7875 |
|
6644 7876 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6645 7877 | RestJson<L>,
|
6646 - | crate::operation_shape::MalformedBlob,
|
6647 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedBlob, S>
|
7878 + | crate::operation_shape::MalformedByte,
|
7879 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedByte, S>
|
6648 7880 | >,
|
6649 7881 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6650 7882 | RestJson<L>,
|
6651 - | crate::operation_shape::MalformedBlob,
|
7883 + | crate::operation_shape::MalformedByte,
|
6652 7884 | ModelPl::Output
|
6653 7885 | >,
|
6654 7886 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6655 7887 | RestJson<L>,
|
6656 - | crate::operation_shape::MalformedBlob,
|
7888 + | crate::operation_shape::MalformedByte,
|
6657 7889 | <
|
6658 7890 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6659 7891 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6660 7892 | RestJson<L>,
|
6661 - | crate::operation_shape::MalformedBlob,
|
7893 + | crate::operation_shape::MalformedByte,
|
6662 7894 | ModelPl::Output
|
6663 7895 | >
|
6664 7896 | >::Output
|
6665 7897 | >,
|
6666 7898 |
|
6667 7899 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6668 7900 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6669 7901 |
|
6670 7902 | {
|
6671 7903 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6672 7904 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6673 - | let svc = crate::operation_shape::MalformedBlob::from_service(service);
|
7905 + | let svc = crate::operation_shape::MalformedByte::from_service(service);
|
6674 7906 | let svc = self.model_plugin.apply(svc);
|
6675 7907 | let svc =
|
6676 7908 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6677 7909 | .apply(svc);
|
6678 7910 | let svc = self.http_plugin.apply(svc);
|
6679 - | self.malformed_blob_custom(svc)
|
7911 + | self.malformed_byte_custom(svc)
|
6680 7912 | }
|
6681 7913 |
|
6682 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) to a custom [`Service`](tower::Service).
|
7914 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) to a custom [`Service`](tower::Service).
|
6683 7915 | /// not constrained by the Smithy contract.
|
6684 - | fn malformed_blob_custom<S>(mut self, svc: S) -> Self
|
7916 + | fn malformed_byte_custom<S>(mut self, svc: S) -> Self
|
6685 7917 | where
|
6686 7918 | S: ::tower::Service<
|
6687 7919 | ::http::Request<Body>,
|
6688 7920 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6689 7921 | Error = ::std::convert::Infallible,
|
6690 7922 | > + Clone
|
6691 7923 | + Send
|
6692 7924 | + 'static,
|
6693 7925 | S::Future: Send + 'static,
|
6694 7926 | {
|
6695 - | self.malformed_blob = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7927 + | self.malformed_byte = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6696 7928 | self
|
6697 7929 | }
|
6698 7930 |
|
6699 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
7931 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
6700 7932 | ///
|
6701 7933 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6702 7934 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6703 7935 | ///
|
6704 7936 | /// # Example
|
6705 7937 | ///
|
6706 7938 | /// ```no_run
|
6707 7939 | /// use rest_json::{RestJson, RestJsonConfig};
|
6708 7940 | ///
|
6709 7941 | /// use rest_json::{input, output, error};
|
6710 7942 | ///
|
6711 - | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
7943 + | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, error::MalformedContentTypeWithBodyError> {
|
6712 7944 | /// todo!()
|
6713 7945 | /// }
|
6714 7946 | ///
|
6715 7947 | /// let config = RestJsonConfig::builder().build();
|
6716 7948 | /// let app = RestJson::builder(config)
|
6717 - | /// .malformed_boolean(handler)
|
7949 + | /// .malformed_content_type_with_body(handler)
|
6718 7950 | /// /* Set other handlers */
|
6719 7951 | /// .build()
|
6720 7952 | /// .unwrap();
|
6721 7953 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6722 7954 | /// ```
|
6723 7955 | ///
|
6724 - | pub fn malformed_boolean<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7956 + | pub fn malformed_content_type_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6725 7957 | where
|
6726 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedBoolean, HandlerExtractors>,
|
7958 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithBody, HandlerExtractors>,
|
6727 7959 |
|
6728 7960 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6729 7961 | RestJson<L>,
|
6730 - | crate::operation_shape::MalformedBoolean,
|
6731 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedBoolean, HandlerType>
|
7962 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7963 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithBody, HandlerType>
|
6732 7964 | >,
|
6733 7965 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6734 7966 | RestJson<L>,
|
6735 - | crate::operation_shape::MalformedBoolean,
|
7967 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6736 7968 | ModelPl::Output
|
6737 7969 | >,
|
6738 7970 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6739 7971 | RestJson<L>,
|
6740 - | crate::operation_shape::MalformedBoolean,
|
7972 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6741 7973 | <
|
6742 7974 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6743 7975 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6744 7976 | RestJson<L>,
|
6745 - | crate::operation_shape::MalformedBoolean,
|
7977 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6746 7978 | ModelPl::Output
|
6747 7979 | >
|
6748 7980 | >::Output
|
6749 7981 | >,
|
6750 7982 |
|
6751 7983 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6752 7984 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6753 7985 |
|
6754 7986 | {
|
6755 7987 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6756 7988 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6757 - | let svc = crate::operation_shape::MalformedBoolean::from_handler(handler);
|
7989 + | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_handler(handler);
|
6758 7990 | let svc = self.model_plugin.apply(svc);
|
6759 7991 | let svc =
|
6760 7992 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6761 7993 | .apply(svc);
|
6762 7994 | let svc = self.http_plugin.apply(svc);
|
6763 - | self.malformed_boolean_custom(svc)
|
7995 + | self.malformed_content_type_with_body_custom(svc)
|
6764 7996 | }
|
6765 7997 |
|
6766 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
7998 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
6767 7999 | ///
|
6768 8000 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6769 8001 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6770 8002 | ///
|
6771 8003 | /// # Example
|
6772 8004 | ///
|
6773 8005 | /// ```no_run
|
6774 8006 | /// use rest_json::{RestJson, RestJsonConfig};
|
6775 8007 | ///
|
6776 8008 | /// use rest_json::{input, output, error};
|
6777 8009 | ///
|
6778 - | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
8010 + | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, error::MalformedContentTypeWithBodyError> {
|
6779 8011 | /// todo!()
|
6780 8012 | /// }
|
6781 8013 | ///
|
6782 8014 | /// let config = RestJsonConfig::builder().build();
|
6783 8015 | /// let svc = ::tower::util::service_fn(handler);
|
6784 8016 | /// let app = RestJson::builder(config)
|
6785 - | /// .malformed_boolean_service(svc)
|
8017 + | /// .malformed_content_type_with_body_service(svc)
|
6786 8018 | /// /* Set other handlers */
|
6787 8019 | /// .build()
|
6788 8020 | /// .unwrap();
|
6789 8021 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6790 8022 | /// ```
|
6791 8023 | ///
|
6792 - | pub fn malformed_boolean_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8024 + | pub fn malformed_content_type_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6793 8025 | where
|
6794 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedBoolean, ServiceExtractors>,
|
8026 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithBody, ServiceExtractors>,
|
6795 8027 |
|
6796 8028 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6797 8029 | RestJson<L>,
|
6798 - | crate::operation_shape::MalformedBoolean,
|
6799 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedBoolean, S>
|
8030 + | crate::operation_shape::MalformedContentTypeWithBody,
|
8031 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithBody, S>
|
6800 8032 | >,
|
6801 8033 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6802 8034 | RestJson<L>,
|
6803 - | crate::operation_shape::MalformedBoolean,
|
8035 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6804 8036 | ModelPl::Output
|
6805 8037 | >,
|
6806 8038 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6807 8039 | RestJson<L>,
|
6808 - | crate::operation_shape::MalformedBoolean,
|
8040 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6809 8041 | <
|
6810 8042 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6811 8043 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6812 8044 | RestJson<L>,
|
6813 - | crate::operation_shape::MalformedBoolean,
|
8045 + | crate::operation_shape::MalformedContentTypeWithBody,
|
6814 8046 | ModelPl::Output
|
6815 8047 | >
|
6816 8048 | >::Output
|
6817 8049 | >,
|
6818 8050 |
|
6819 8051 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6820 8052 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6821 8053 |
|
6822 8054 | {
|
6823 8055 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6824 8056 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6825 - | let svc = crate::operation_shape::MalformedBoolean::from_service(service);
|
8057 + | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_service(service);
|
6826 8058 | let svc = self.model_plugin.apply(svc);
|
6827 8059 | let svc =
|
6828 8060 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6829 8061 | .apply(svc);
|
6830 8062 | let svc = self.http_plugin.apply(svc);
|
6831 - | self.malformed_boolean_custom(svc)
|
8063 + | self.malformed_content_type_with_body_custom(svc)
|
6832 8064 | }
|
6833 8065 |
|
6834 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) to a custom [`Service`](tower::Service).
|
8066 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) to a custom [`Service`](tower::Service).
|
6835 8067 | /// not constrained by the Smithy contract.
|
6836 - | fn malformed_boolean_custom<S>(mut self, svc: S) -> Self
|
8068 + | fn malformed_content_type_with_body_custom<S>(mut self, svc: S) -> Self
|
6837 8069 | where
|
6838 8070 | S: ::tower::Service<
|
6839 8071 | ::http::Request<Body>,
|
6840 8072 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6841 8073 | Error = ::std::convert::Infallible,
|
6842 8074 | > + Clone
|
6843 8075 | + Send
|
6844 8076 | + 'static,
|
6845 8077 | S::Future: Send + 'static,
|
6846 8078 | {
|
6847 - | self.malformed_boolean = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8079 + | self.malformed_content_type_with_body =
|
8080 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
6848 8081 | self
|
6849 8082 | }
|
6850 8083 |
|
6851 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
8084 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
6852 8085 | ///
|
6853 8086 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6854 8087 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6855 8088 | ///
|
6856 8089 | /// # Example
|
6857 8090 | ///
|
6858 8091 | /// ```no_run
|
6859 8092 | /// use rest_json::{RestJson, RestJsonConfig};
|
6860 8093 | ///
|
6861 8094 | /// use rest_json::{input, output, error};
|
6862 8095 | ///
|
6863 - | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
8096 + | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, error::MalformedContentTypeWithGenericStringError> {
|
6864 8097 | /// todo!()
|
6865 8098 | /// }
|
6866 8099 | ///
|
6867 8100 | /// let config = RestJsonConfig::builder().build();
|
6868 8101 | /// let app = RestJson::builder(config)
|
6869 - | /// .malformed_byte(handler)
|
8102 + | /// .malformed_content_type_with_generic_string(handler)
|
6870 8103 | /// /* Set other handlers */
|
6871 8104 | /// .build()
|
6872 8105 | /// .unwrap();
|
6873 8106 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6874 8107 | /// ```
|
6875 8108 | ///
|
6876 - | pub fn malformed_byte<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8109 + | pub fn malformed_content_type_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6877 8110 | where
|
6878 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedByte, HandlerExtractors>,
|
8111 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerExtractors>,
|
6879 8112 |
|
6880 8113 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6881 8114 | RestJson<L>,
|
6882 - | crate::operation_shape::MalformedByte,
|
6883 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedByte, HandlerType>
|
8115 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8116 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerType>
|
6884 8117 | >,
|
6885 8118 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6886 8119 | RestJson<L>,
|
6887 - | crate::operation_shape::MalformedByte,
|
8120 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6888 8121 | ModelPl::Output
|
6889 8122 | >,
|
6890 8123 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6891 8124 | RestJson<L>,
|
6892 - | crate::operation_shape::MalformedByte,
|
8125 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6893 8126 | <
|
6894 8127 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6895 8128 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6896 8129 | RestJson<L>,
|
6897 - | crate::operation_shape::MalformedByte,
|
8130 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6898 8131 | ModelPl::Output
|
6899 8132 | >
|
6900 8133 | >::Output
|
6901 8134 | >,
|
6902 8135 |
|
6903 8136 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6904 8137 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6905 8138 |
|
6906 8139 | {
|
6907 8140 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6908 8141 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6909 - | let svc = crate::operation_shape::MalformedByte::from_handler(handler);
|
8142 + | let svc =
|
8143 + | crate::operation_shape::MalformedContentTypeWithGenericString::from_handler(handler);
|
6910 8144 | let svc = self.model_plugin.apply(svc);
|
6911 8145 | let svc =
|
6912 8146 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6913 8147 | .apply(svc);
|
6914 8148 | let svc = self.http_plugin.apply(svc);
|
6915 - | self.malformed_byte_custom(svc)
|
8149 + | self.malformed_content_type_with_generic_string_custom(svc)
|
6916 8150 | }
|
6917 8151 |
|
6918 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
8152 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
6919 8153 | ///
|
6920 8154 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
6921 8155 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
6922 8156 | ///
|
6923 8157 | /// # Example
|
6924 8158 | ///
|
6925 8159 | /// ```no_run
|
6926 8160 | /// use rest_json::{RestJson, RestJsonConfig};
|
6927 8161 | ///
|
6928 8162 | /// use rest_json::{input, output, error};
|
6929 8163 | ///
|
6930 - | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
8164 + | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, error::MalformedContentTypeWithGenericStringError> {
|
6931 8165 | /// todo!()
|
6932 8166 | /// }
|
6933 8167 | ///
|
6934 8168 | /// let config = RestJsonConfig::builder().build();
|
6935 8169 | /// let svc = ::tower::util::service_fn(handler);
|
6936 8170 | /// let app = RestJson::builder(config)
|
6937 - | /// .malformed_byte_service(svc)
|
8171 + | /// .malformed_content_type_with_generic_string_service(svc)
|
6938 8172 | /// /* Set other handlers */
|
6939 8173 | /// .build()
|
6940 8174 | /// .unwrap();
|
6941 8175 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6942 8176 | /// ```
|
6943 8177 | ///
|
6944 - | pub fn malformed_byte_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8178 + | pub fn malformed_content_type_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6945 8179 | where
|
6946 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedByte, ServiceExtractors>,
|
8180 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithGenericString, ServiceExtractors>,
|
6947 8181 |
|
6948 8182 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6949 8183 | RestJson<L>,
|
6950 - | crate::operation_shape::MalformedByte,
|
6951 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedByte, S>
|
8184 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8185 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithGenericString, S>
|
6952 8186 | >,
|
6953 8187 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6954 8188 | RestJson<L>,
|
6955 - | crate::operation_shape::MalformedByte,
|
8189 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6956 8190 | ModelPl::Output
|
6957 8191 | >,
|
6958 8192 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6959 8193 | RestJson<L>,
|
6960 - | crate::operation_shape::MalformedByte,
|
8194 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6961 8195 | <
|
6962 8196 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6963 8197 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
6964 8198 | RestJson<L>,
|
6965 - | crate::operation_shape::MalformedByte,
|
8199 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6966 8200 | ModelPl::Output
|
6967 8201 | >
|
6968 8202 | >::Output
|
6969 8203 | >,
|
6970 8204 |
|
6971 8205 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6972 8206 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
6973 8207 |
|
6974 8208 | {
|
6975 8209 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
6976 8210 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
6977 - | let svc = crate::operation_shape::MalformedByte::from_service(service);
|
8211 + | let svc =
|
8212 + | crate::operation_shape::MalformedContentTypeWithGenericString::from_service(service);
|
6978 8213 | let svc = self.model_plugin.apply(svc);
|
6979 8214 | let svc =
|
6980 8215 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6981 8216 | .apply(svc);
|
6982 8217 | let svc = self.http_plugin.apply(svc);
|
6983 - | self.malformed_byte_custom(svc)
|
8218 + | self.malformed_content_type_with_generic_string_custom(svc)
|
6984 8219 | }
|
6985 8220 |
|
6986 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) to a custom [`Service`](tower::Service).
|
8221 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) to a custom [`Service`](tower::Service).
|
6987 8222 | /// not constrained by the Smithy contract.
|
6988 - | fn malformed_byte_custom<S>(mut self, svc: S) -> Self
|
8223 + | fn malformed_content_type_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
6989 8224 | where
|
6990 8225 | S: ::tower::Service<
|
6991 8226 | ::http::Request<Body>,
|
6992 8227 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
6993 8228 | Error = ::std::convert::Infallible,
|
6994 8229 | > + Clone
|
6995 8230 | + Send
|
6996 8231 | + 'static,
|
6997 8232 | S::Future: Send + 'static,
|
6998 8233 | {
|
6999 - | self.malformed_byte = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8234 + | self.malformed_content_type_with_generic_string =
|
8235 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7000 8236 | self
|
7001 8237 | }
|
7002 8238 |
|
7003 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
8239 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
7004 8240 | ///
|
7005 8241 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7006 8242 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7007 8243 | ///
|
7008 8244 | /// # Example
|
7009 8245 | ///
|
7010 8246 | /// ```no_run
|
7011 8247 | /// use rest_json::{RestJson, RestJsonConfig};
|
7012 8248 | ///
|
7013 8249 | /// use rest_json::{input, output, error};
|
7014 8250 | ///
|
7015 - | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, error::MalformedContentTypeWithBodyError> {
|
8251 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, error::MalformedContentTypeWithoutBodyError> {
|
7016 8252 | /// todo!()
|
7017 8253 | /// }
|
7018 8254 | ///
|
7019 8255 | /// let config = RestJsonConfig::builder().build();
|
7020 8256 | /// let app = RestJson::builder(config)
|
7021 - | /// .malformed_content_type_with_body(handler)
|
8257 + | /// .malformed_content_type_without_body(handler)
|
7022 8258 | /// /* Set other handlers */
|
7023 8259 | /// .build()
|
7024 8260 | /// .unwrap();
|
7025 8261 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7026 8262 | /// ```
|
7027 8263 | ///
|
7028 - | pub fn malformed_content_type_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8264 + | pub fn malformed_content_type_without_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7029 8265 | where
|
7030 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithBody, HandlerExtractors>,
|
8266 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerExtractors>,
|
7031 8267 |
|
7032 8268 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7033 8269 | RestJson<L>,
|
7034 - | crate::operation_shape::MalformedContentTypeWithBody,
|
7035 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithBody, HandlerType>
|
8270 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8271 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerType>
|
7036 8272 | >,
|
7037 8273 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7038 8274 | RestJson<L>,
|
7039 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8275 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7040 8276 | ModelPl::Output
|
7041 8277 | >,
|
7042 8278 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7043 8279 | RestJson<L>,
|
7044 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8280 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7045 8281 | <
|
7046 8282 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7047 8283 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7048 8284 | RestJson<L>,
|
7049 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8285 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7050 8286 | ModelPl::Output
|
7051 8287 | >
|
7052 8288 | >::Output
|
7053 8289 | >,
|
7054 8290 |
|
7055 8291 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7056 8292 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7057 8293 |
|
7058 8294 | {
|
7059 8295 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7060 8296 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7061 - | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_handler(handler);
|
8297 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_handler(handler);
|
7062 8298 | let svc = self.model_plugin.apply(svc);
|
7063 8299 | let svc =
|
7064 8300 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7065 8301 | .apply(svc);
|
7066 8302 | let svc = self.http_plugin.apply(svc);
|
7067 - | self.malformed_content_type_with_body_custom(svc)
|
8303 + | self.malformed_content_type_without_body_custom(svc)
|
7068 8304 | }
|
7069 8305 |
|
7070 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
8306 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
7071 8307 | ///
|
7072 8308 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7073 8309 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7074 8310 | ///
|
7075 8311 | /// # Example
|
7076 8312 | ///
|
7077 8313 | /// ```no_run
|
7078 8314 | /// use rest_json::{RestJson, RestJsonConfig};
|
7079 8315 | ///
|
7080 8316 | /// use rest_json::{input, output, error};
|
7081 8317 | ///
|
7082 - | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, error::MalformedContentTypeWithBodyError> {
|
8318 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, error::MalformedContentTypeWithoutBodyError> {
|
7083 8319 | /// todo!()
|
7084 8320 | /// }
|
7085 8321 | ///
|
7086 8322 | /// let config = RestJsonConfig::builder().build();
|
7087 8323 | /// let svc = ::tower::util::service_fn(handler);
|
7088 8324 | /// let app = RestJson::builder(config)
|
7089 - | /// .malformed_content_type_with_body_service(svc)
|
8325 + | /// .malformed_content_type_without_body_service(svc)
|
7090 8326 | /// /* Set other handlers */
|
7091 8327 | /// .build()
|
7092 8328 | /// .unwrap();
|
7093 8329 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7094 8330 | /// ```
|
7095 8331 | ///
|
7096 - | pub fn malformed_content_type_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8332 + | pub fn malformed_content_type_without_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7097 8333 | where
|
7098 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithBody, ServiceExtractors>,
|
8334 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBody, ServiceExtractors>,
|
7099 8335 |
|
7100 8336 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7101 8337 | RestJson<L>,
|
7102 - | crate::operation_shape::MalformedContentTypeWithBody,
|
7103 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithBody, S>
|
8338 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8339 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBody, S>
|
7104 8340 | >,
|
7105 8341 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7106 8342 | RestJson<L>,
|
7107 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8343 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7108 8344 | ModelPl::Output
|
7109 8345 | >,
|
7110 8346 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7111 8347 | RestJson<L>,
|
7112 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8348 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7113 8349 | <
|
7114 8350 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7115 8351 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7116 8352 | RestJson<L>,
|
7117 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8353 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7118 8354 | ModelPl::Output
|
7119 8355 | >
|
7120 8356 | >::Output
|
7121 8357 | >,
|
7122 8358 |
|
7123 8359 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7124 8360 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7125 8361 |
|
7126 8362 | {
|
7127 8363 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7128 8364 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7129 - | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_service(service);
|
8365 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_service(service);
|
7130 8366 | let svc = self.model_plugin.apply(svc);
|
7131 8367 | let svc =
|
7132 8368 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7133 8369 | .apply(svc);
|
7134 8370 | let svc = self.http_plugin.apply(svc);
|
7135 - | self.malformed_content_type_with_body_custom(svc)
|
8371 + | self.malformed_content_type_without_body_custom(svc)
|
7136 8372 | }
|
7137 8373 |
|
7138 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) to a custom [`Service`](tower::Service).
|
8374 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) to a custom [`Service`](tower::Service).
|
7139 8375 | /// not constrained by the Smithy contract.
|
7140 - | fn malformed_content_type_with_body_custom<S>(mut self, svc: S) -> Self
|
8376 + | fn malformed_content_type_without_body_custom<S>(mut self, svc: S) -> Self
|
7141 8377 | where
|
7142 8378 | S: ::tower::Service<
|
7143 8379 | ::http::Request<Body>,
|
7144 8380 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7145 8381 | Error = ::std::convert::Infallible,
|
7146 8382 | > + Clone
|
7147 8383 | + Send
|
7148 8384 | + 'static,
|
7149 8385 | S::Future: Send + 'static,
|
7150 8386 | {
|
7151 - | self.malformed_content_type_with_body =
|
8387 + | self.malformed_content_type_without_body =
|
7152 8388 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7153 8389 | self
|
7154 8390 | }
|
7155 8391 |
|
7156 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
8392 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
7157 8393 | ///
|
7158 8394 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7159 8395 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7160 8396 | ///
|
7161 8397 | /// # Example
|
7162 8398 | ///
|
7163 8399 | /// ```no_run
|
7164 8400 | /// use rest_json::{RestJson, RestJsonConfig};
|
7165 8401 | ///
|
7166 8402 | /// use rest_json::{input, output, error};
|
7167 8403 | ///
|
7168 - | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, error::MalformedContentTypeWithGenericStringError> {
|
8404 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, error::MalformedContentTypeWithoutBodyEmptyInputError> {
|
7169 8405 | /// todo!()
|
7170 8406 | /// }
|
7171 8407 | ///
|
7172 8408 | /// let config = RestJsonConfig::builder().build();
|
7173 8409 | /// let app = RestJson::builder(config)
|
7174 - | /// .malformed_content_type_with_generic_string(handler)
|
8410 + | /// .malformed_content_type_without_body_empty_input(handler)
|
7175 8411 | /// /* Set other handlers */
|
7176 8412 | /// .build()
|
7177 8413 | /// .unwrap();
|
7178 8414 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7179 8415 | /// ```
|
7180 8416 | ///
|
7181 - | pub fn malformed_content_type_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8417 + | pub fn malformed_content_type_without_body_empty_input<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7182 8418 | where
|
7183 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerExtractors>,
|
8419 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerExtractors>,
|
7184 8420 |
|
7185 8421 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7186 8422 | RestJson<L>,
|
7187 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
7188 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerType>
|
8423 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8424 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerType>
|
7189 8425 | >,
|
7190 8426 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7191 8427 | RestJson<L>,
|
7192 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8428 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7193 8429 | ModelPl::Output
|
7194 8430 | >,
|
7195 8431 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7196 8432 | RestJson<L>,
|
7197 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8433 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7198 8434 | <
|
7199 8435 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7200 8436 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7201 8437 | RestJson<L>,
|
7202 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8438 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7203 8439 | ModelPl::Output
|
7204 8440 | >
|
7205 8441 | >::Output
|
7206 8442 | >,
|
7207 8443 |
|
7208 8444 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7209 8445 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7210 8446 |
|
7211 8447 | {
|
7212 8448 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7213 8449 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7214 - | let svc =
|
7215 - | crate::operation_shape::MalformedContentTypeWithGenericString::from_handler(handler);
|
8450 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_handler(
|
8451 + | handler,
|
8452 + | );
|
7216 8453 | let svc = self.model_plugin.apply(svc);
|
7217 8454 | let svc =
|
7218 8455 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7219 8456 | .apply(svc);
|
7220 8457 | let svc = self.http_plugin.apply(svc);
|
7221 - | self.malformed_content_type_with_generic_string_custom(svc)
|
8458 + | self.malformed_content_type_without_body_empty_input_custom(svc)
|
7222 8459 | }
|
7223 8460 |
|
7224 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
8461 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
7225 8462 | ///
|
7226 8463 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7227 8464 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7228 8465 | ///
|
7229 8466 | /// # Example
|
7230 8467 | ///
|
7231 8468 | /// ```no_run
|
7232 8469 | /// use rest_json::{RestJson, RestJsonConfig};
|
7233 8470 | ///
|
7234 8471 | /// use rest_json::{input, output, error};
|
7235 8472 | ///
|
7236 - | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, error::MalformedContentTypeWithGenericStringError> {
|
8473 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, error::MalformedContentTypeWithoutBodyEmptyInputError> {
|
7237 8474 | /// todo!()
|
7238 8475 | /// }
|
7239 8476 | ///
|
7240 8477 | /// let config = RestJsonConfig::builder().build();
|
7241 8478 | /// let svc = ::tower::util::service_fn(handler);
|
7242 8479 | /// let app = RestJson::builder(config)
|
7243 - | /// .malformed_content_type_with_generic_string_service(svc)
|
8480 + | /// .malformed_content_type_without_body_empty_input_service(svc)
|
7244 8481 | /// /* Set other handlers */
|
7245 8482 | /// .build()
|
7246 8483 | /// .unwrap();
|
7247 8484 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7248 8485 | /// ```
|
7249 8486 | ///
|
7250 - | pub fn malformed_content_type_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8487 + | pub fn malformed_content_type_without_body_empty_input_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7251 8488 | where
|
7252 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithGenericString, ServiceExtractors>,
|
8489 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, ServiceExtractors>,
|
7253 8490 |
|
7254 8491 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7255 8492 | RestJson<L>,
|
7256 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
7257 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithGenericString, S>
|
8493 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8494 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, S>
|
7258 8495 | >,
|
7259 8496 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7260 8497 | RestJson<L>,
|
7261 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8498 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7262 8499 | ModelPl::Output
|
7263 8500 | >,
|
7264 8501 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7265 8502 | RestJson<L>,
|
7266 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8503 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7267 8504 | <
|
7268 8505 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7269 8506 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7270 8507 | RestJson<L>,
|
7271 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8508 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7272 8509 | ModelPl::Output
|
7273 8510 | >
|
7274 8511 | >::Output
|
7275 8512 | >,
|
7276 8513 |
|
7277 8514 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7278 8515 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7279 8516 |
|
7280 8517 | {
|
7281 8518 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7282 8519 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7283 - | let svc =
|
7284 - | crate::operation_shape::MalformedContentTypeWithGenericString::from_service(service);
|
8520 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_service(
|
8521 + | service,
|
8522 + | );
|
7285 8523 | let svc = self.model_plugin.apply(svc);
|
7286 8524 | let svc =
|
7287 8525 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7288 8526 | .apply(svc);
|
7289 8527 | let svc = self.http_plugin.apply(svc);
|
7290 - | self.malformed_content_type_with_generic_string_custom(svc)
|
8528 + | self.malformed_content_type_without_body_empty_input_custom(svc)
|
7291 8529 | }
|
7292 8530 |
|
7293 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) to a custom [`Service`](tower::Service).
|
8531 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) to a custom [`Service`](tower::Service).
|
7294 8532 | /// not constrained by the Smithy contract.
|
7295 - | fn malformed_content_type_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
8533 + | fn malformed_content_type_without_body_empty_input_custom<S>(mut self, svc: S) -> Self
|
7296 8534 | where
|
7297 8535 | S: ::tower::Service<
|
7298 8536 | ::http::Request<Body>,
|
7299 8537 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7300 8538 | Error = ::std::convert::Infallible,
|
7301 8539 | > + Clone
|
7302 8540 | + Send
|
7303 8541 | + 'static,
|
7304 8542 | S::Future: Send + 'static,
|
7305 8543 | {
|
7306 - | self.malformed_content_type_with_generic_string =
|
8544 + | self.malformed_content_type_without_body_empty_input =
|
7307 8545 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7308 8546 | self
|
7309 8547 | }
|
7310 8548 |
|
7311 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
8549 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
7312 8550 | ///
|
7313 8551 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7314 8552 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7315 8553 | ///
|
7316 8554 | /// # Example
|
7317 8555 | ///
|
7318 8556 | /// ```no_run
|
7319 8557 | /// use rest_json::{RestJson, RestJsonConfig};
|
7320 8558 | ///
|
7321 8559 | /// use rest_json::{input, output, error};
|
7322 8560 | ///
|
7323 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, error::MalformedContentTypeWithoutBodyError> {
|
8561 + | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, error::MalformedContentTypeWithPayloadError> {
|
7324 8562 | /// todo!()
|
7325 8563 | /// }
|
7326 8564 | ///
|
7327 8565 | /// let config = RestJsonConfig::builder().build();
|
7328 8566 | /// let app = RestJson::builder(config)
|
7329 - | /// .malformed_content_type_without_body(handler)
|
8567 + | /// .malformed_content_type_with_payload(handler)
|
7330 8568 | /// /* Set other handlers */
|
7331 8569 | /// .build()
|
7332 8570 | /// .unwrap();
|
7333 8571 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7334 8572 | /// ```
|
7335 8573 | ///
|
7336 - | pub fn malformed_content_type_without_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8574 + | pub fn malformed_content_type_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7337 8575 | where
|
7338 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerExtractors>,
|
8576 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithPayload, HandlerExtractors>,
|
7339 8577 |
|
7340 8578 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7341 8579 | RestJson<L>,
|
7342 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7343 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerType>
|
8580 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
8581 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithPayload, HandlerType>
|
7344 8582 | >,
|
7345 8583 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7346 8584 | RestJson<L>,
|
7347 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8585 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7348 8586 | ModelPl::Output
|
7349 8587 | >,
|
7350 8588 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7351 8589 | RestJson<L>,
|
7352 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8590 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7353 8591 | <
|
7354 8592 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7355 8593 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7356 8594 | RestJson<L>,
|
7357 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8595 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7358 8596 | ModelPl::Output
|
7359 8597 | >
|
7360 8598 | >::Output
|
7361 8599 | >,
|
7362 8600 |
|
7363 8601 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7364 8602 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7365 8603 |
|
7366 8604 | {
|
7367 8605 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7368 8606 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7369 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_handler(handler);
|
8607 + | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_handler(handler);
|
7370 8608 | let svc = self.model_plugin.apply(svc);
|
7371 8609 | let svc =
|
7372 8610 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7373 8611 | .apply(svc);
|
7374 8612 | let svc = self.http_plugin.apply(svc);
|
7375 - | self.malformed_content_type_without_body_custom(svc)
|
8613 + | self.malformed_content_type_with_payload_custom(svc)
|
7376 8614 | }
|
7377 8615 |
|
7378 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
8616 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
7379 8617 | ///
|
7380 8618 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7381 8619 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7382 8620 | ///
|
7383 8621 | /// # Example
|
7384 8622 | ///
|
7385 8623 | /// ```no_run
|
7386 8624 | /// use rest_json::{RestJson, RestJsonConfig};
|
7387 8625 | ///
|
7388 8626 | /// use rest_json::{input, output, error};
|
7389 8627 | ///
|
7390 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, error::MalformedContentTypeWithoutBodyError> {
|
8628 + | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, error::MalformedContentTypeWithPayloadError> {
|
7391 8629 | /// todo!()
|
7392 8630 | /// }
|
7393 8631 | ///
|
7394 8632 | /// let config = RestJsonConfig::builder().build();
|
7395 8633 | /// let svc = ::tower::util::service_fn(handler);
|
7396 8634 | /// let app = RestJson::builder(config)
|
7397 - | /// .malformed_content_type_without_body_service(svc)
|
8635 + | /// .malformed_content_type_with_payload_service(svc)
|
7398 8636 | /// /* Set other handlers */
|
7399 8637 | /// .build()
|
7400 8638 | /// .unwrap();
|
7401 8639 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7402 8640 | /// ```
|
7403 8641 | ///
|
7404 - | pub fn malformed_content_type_without_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8642 + | pub fn malformed_content_type_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7405 8643 | where
|
7406 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBody, ServiceExtractors>,
|
8644 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithPayload, ServiceExtractors>,
|
7407 8645 |
|
7408 8646 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7409 8647 | RestJson<L>,
|
7410 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7411 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBody, S>
|
8648 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
8649 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithPayload, S>
|
7412 8650 | >,
|
7413 8651 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7414 8652 | RestJson<L>,
|
7415 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8653 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7416 8654 | ModelPl::Output
|
7417 8655 | >,
|
7418 8656 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7419 8657 | RestJson<L>,
|
7420 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8658 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7421 8659 | <
|
7422 8660 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7423 8661 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7424 8662 | RestJson<L>,
|
7425 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8663 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7426 8664 | ModelPl::Output
|
7427 8665 | >
|
7428 8666 | >::Output
|
7429 8667 | >,
|
7430 8668 |
|
7431 8669 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7432 8670 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7433 8671 |
|
7434 8672 | {
|
7435 8673 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7436 8674 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7437 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_service(service);
|
8675 + | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_service(service);
|
7438 8676 | let svc = self.model_plugin.apply(svc);
|
7439 8677 | let svc =
|
7440 8678 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7441 8679 | .apply(svc);
|
7442 8680 | let svc = self.http_plugin.apply(svc);
|
7443 - | self.malformed_content_type_without_body_custom(svc)
|
8681 + | self.malformed_content_type_with_payload_custom(svc)
|
7444 8682 | }
|
7445 8683 |
|
7446 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) to a custom [`Service`](tower::Service).
|
8684 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) to a custom [`Service`](tower::Service).
|
7447 8685 | /// not constrained by the Smithy contract.
|
7448 - | fn malformed_content_type_without_body_custom<S>(mut self, svc: S) -> Self
|
8686 + | fn malformed_content_type_with_payload_custom<S>(mut self, svc: S) -> Self
|
7449 8687 | where
|
7450 8688 | S: ::tower::Service<
|
7451 8689 | ::http::Request<Body>,
|
7452 8690 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7453 8691 | Error = ::std::convert::Infallible,
|
7454 8692 | > + Clone
|
7455 8693 | + Send
|
7456 8694 | + 'static,
|
7457 8695 | S::Future: Send + 'static,
|
7458 8696 | {
|
7459 - | self.malformed_content_type_without_body =
|
8697 + | self.malformed_content_type_with_payload =
|
7460 8698 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7461 8699 | self
|
7462 8700 | }
|
7463 8701 |
|
7464 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
8702 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
7465 8703 | ///
|
7466 8704 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7467 8705 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7468 8706 | ///
|
7469 8707 | /// # Example
|
7470 8708 | ///
|
7471 8709 | /// ```no_run
|
7472 8710 | /// use rest_json::{RestJson, RestJsonConfig};
|
7473 8711 | ///
|
7474 8712 | /// use rest_json::{input, output, error};
|
7475 8713 | ///
|
7476 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, error::MalformedContentTypeWithoutBodyEmptyInputError> {
|
8714 + | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
7477 8715 | /// todo!()
|
7478 8716 | /// }
|
7479 8717 | ///
|
7480 8718 | /// let config = RestJsonConfig::builder().build();
|
7481 8719 | /// let app = RestJson::builder(config)
|
7482 - | /// .malformed_content_type_without_body_empty_input(handler)
|
8720 + | /// .malformed_double(handler)
|
7483 8721 | /// /* Set other handlers */
|
7484 8722 | /// .build()
|
7485 8723 | /// .unwrap();
|
7486 8724 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7487 8725 | /// ```
|
7488 8726 | ///
|
7489 - | pub fn malformed_content_type_without_body_empty_input<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8727 + | pub fn malformed_double<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7490 8728 | where
|
7491 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerExtractors>,
|
8729 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedDouble, HandlerExtractors>,
|
7492 8730 |
|
7493 8731 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7494 8732 | RestJson<L>,
|
7495 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7496 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerType>
|
8733 + | crate::operation_shape::MalformedDouble,
|
8734 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedDouble, HandlerType>
|
7497 8735 | >,
|
7498 8736 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7499 8737 | RestJson<L>,
|
7500 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8738 + | crate::operation_shape::MalformedDouble,
|
7501 8739 | ModelPl::Output
|
7502 8740 | >,
|
7503 8741 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7504 8742 | RestJson<L>,
|
7505 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8743 + | crate::operation_shape::MalformedDouble,
|
7506 8744 | <
|
7507 8745 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7508 8746 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7509 8747 | RestJson<L>,
|
7510 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8748 + | crate::operation_shape::MalformedDouble,
|
7511 8749 | ModelPl::Output
|
7512 8750 | >
|
7513 8751 | >::Output
|
7514 8752 | >,
|
7515 8753 |
|
7516 8754 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7517 8755 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7518 8756 |
|
7519 8757 | {
|
7520 8758 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7521 8759 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7522 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_handler(
|
7523 - | handler,
|
7524 - | );
|
8760 + | let svc = crate::operation_shape::MalformedDouble::from_handler(handler);
|
7525 8761 | let svc = self.model_plugin.apply(svc);
|
7526 8762 | let svc =
|
7527 8763 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7528 8764 | .apply(svc);
|
7529 8765 | let svc = self.http_plugin.apply(svc);
|
7530 - | self.malformed_content_type_without_body_empty_input_custom(svc)
|
8766 + | self.malformed_double_custom(svc)
|
7531 8767 | }
|
7532 8768 |
|
7533 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
8769 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
7534 8770 | ///
|
7535 8771 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7536 8772 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7537 8773 | ///
|
7538 8774 | /// # Example
|
7539 8775 | ///
|
7540 8776 | /// ```no_run
|
7541 8777 | /// use rest_json::{RestJson, RestJsonConfig};
|
7542 8778 | ///
|
7543 8779 | /// use rest_json::{input, output, error};
|
7544 8780 | ///
|
7545 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, error::MalformedContentTypeWithoutBodyEmptyInputError> {
|
8781 + | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
7546 8782 | /// todo!()
|
7547 8783 | /// }
|
7548 8784 | ///
|
7549 8785 | /// let config = RestJsonConfig::builder().build();
|
7550 8786 | /// let svc = ::tower::util::service_fn(handler);
|
7551 8787 | /// let app = RestJson::builder(config)
|
7552 - | /// .malformed_content_type_without_body_empty_input_service(svc)
|
8788 + | /// .malformed_double_service(svc)
|
7553 8789 | /// /* Set other handlers */
|
7554 8790 | /// .build()
|
7555 8791 | /// .unwrap();
|
7556 8792 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7557 8793 | /// ```
|
7558 8794 | ///
|
7559 - | pub fn malformed_content_type_without_body_empty_input_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8795 + | pub fn malformed_double_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7560 8796 | where
|
7561 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, ServiceExtractors>,
|
8797 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedDouble, ServiceExtractors>,
|
7562 8798 |
|
7563 8799 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7564 8800 | RestJson<L>,
|
7565 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7566 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, S>
|
8801 + | crate::operation_shape::MalformedDouble,
|
8802 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedDouble, S>
|
7567 8803 | >,
|
7568 8804 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7569 8805 | RestJson<L>,
|
7570 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8806 + | crate::operation_shape::MalformedDouble,
|
7571 8807 | ModelPl::Output
|
7572 8808 | >,
|
7573 8809 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7574 8810 | RestJson<L>,
|
7575 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8811 + | crate::operation_shape::MalformedDouble,
|
7576 8812 | <
|
7577 8813 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7578 8814 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7579 8815 | RestJson<L>,
|
7580 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8816 + | crate::operation_shape::MalformedDouble,
|
7581 8817 | ModelPl::Output
|
7582 8818 | >
|
7583 8819 | >::Output
|
7584 8820 | >,
|
7585 8821 |
|
7586 8822 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7587 8823 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7588 8824 |
|
7589 8825 | {
|
7590 8826 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7591 8827 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7592 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_service(
|
7593 - | service,
|
7594 - | );
|
8828 + | let svc = crate::operation_shape::MalformedDouble::from_service(service);
|
7595 8829 | let svc = self.model_plugin.apply(svc);
|
7596 8830 | let svc =
|
7597 8831 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7598 8832 | .apply(svc);
|
7599 8833 | let svc = self.http_plugin.apply(svc);
|
7600 - | self.malformed_content_type_without_body_empty_input_custom(svc)
|
8834 + | self.malformed_double_custom(svc)
|
7601 8835 | }
|
7602 8836 |
|
7603 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) to a custom [`Service`](tower::Service).
|
8837 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) to a custom [`Service`](tower::Service).
|
7604 8838 | /// not constrained by the Smithy contract.
|
7605 - | fn malformed_content_type_without_body_empty_input_custom<S>(mut self, svc: S) -> Self
|
8839 + | fn malformed_double_custom<S>(mut self, svc: S) -> Self
|
7606 8840 | where
|
7607 8841 | S: ::tower::Service<
|
7608 8842 | ::http::Request<Body>,
|
7609 8843 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7610 8844 | Error = ::std::convert::Infallible,
|
7611 8845 | > + Clone
|
7612 8846 | + Send
|
7613 8847 | + 'static,
|
7614 8848 | S::Future: Send + 'static,
|
7615 8849 | {
|
7616 - | self.malformed_content_type_without_body_empty_input =
|
7617 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8850 + | self.malformed_double = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7618 8851 | self
|
7619 8852 | }
|
7620 8853 |
|
7621 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
8854 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
7622 8855 | ///
|
7623 8856 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7624 8857 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7625 8858 | ///
|
7626 8859 | /// # Example
|
7627 8860 | ///
|
7628 8861 | /// ```no_run
|
7629 8862 | /// use rest_json::{RestJson, RestJsonConfig};
|
7630 8863 | ///
|
7631 8864 | /// use rest_json::{input, output, error};
|
7632 8865 | ///
|
7633 - | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, error::MalformedContentTypeWithPayloadError> {
|
8866 + | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
7634 8867 | /// todo!()
|
7635 8868 | /// }
|
7636 8869 | ///
|
7637 8870 | /// let config = RestJsonConfig::builder().build();
|
7638 8871 | /// let app = RestJson::builder(config)
|
7639 - | /// .malformed_content_type_with_payload(handler)
|
8872 + | /// .malformed_float(handler)
|
7640 8873 | /// /* Set other handlers */
|
7641 8874 | /// .build()
|
7642 8875 | /// .unwrap();
|
7643 8876 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7644 8877 | /// ```
|
7645 8878 | ///
|
7646 - | pub fn malformed_content_type_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8879 + | pub fn malformed_float<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7647 8880 | where
|
7648 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithPayload, HandlerExtractors>,
|
8881 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedFloat, HandlerExtractors>,
|
7649 8882 |
|
7650 8883 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7651 8884 | RestJson<L>,
|
7652 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
7653 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithPayload, HandlerType>
|
8885 + | crate::operation_shape::MalformedFloat,
|
8886 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedFloat, HandlerType>
|
7654 8887 | >,
|
7655 8888 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7656 8889 | RestJson<L>,
|
7657 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8890 + | crate::operation_shape::MalformedFloat,
|
7658 8891 | ModelPl::Output
|
7659 8892 | >,
|
7660 8893 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7661 8894 | RestJson<L>,
|
7662 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8895 + | crate::operation_shape::MalformedFloat,
|
7663 8896 | <
|
7664 8897 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7665 8898 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7666 8899 | RestJson<L>,
|
7667 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8900 + | crate::operation_shape::MalformedFloat,
|
7668 8901 | ModelPl::Output
|
7669 8902 | >
|
7670 8903 | >::Output
|
7671 8904 | >,
|
7672 8905 |
|
7673 8906 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7674 8907 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7675 8908 |
|
7676 8909 | {
|
7677 8910 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7678 8911 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7679 - | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_handler(handler);
|
8912 + | let svc = crate::operation_shape::MalformedFloat::from_handler(handler);
|
7680 8913 | let svc = self.model_plugin.apply(svc);
|
7681 8914 | let svc =
|
7682 8915 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7683 8916 | .apply(svc);
|
7684 8917 | let svc = self.http_plugin.apply(svc);
|
7685 - | self.malformed_content_type_with_payload_custom(svc)
|
8918 + | self.malformed_float_custom(svc)
|
7686 8919 | }
|
7687 8920 |
|
7688 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
8921 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
7689 8922 | ///
|
7690 8923 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7691 8924 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7692 8925 | ///
|
7693 8926 | /// # Example
|
7694 8927 | ///
|
7695 8928 | /// ```no_run
|
7696 8929 | /// use rest_json::{RestJson, RestJsonConfig};
|
7697 8930 | ///
|
7698 8931 | /// use rest_json::{input, output, error};
|
7699 8932 | ///
|
7700 - | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, error::MalformedContentTypeWithPayloadError> {
|
8933 + | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
7701 8934 | /// todo!()
|
7702 8935 | /// }
|
7703 8936 | ///
|
7704 8937 | /// let config = RestJsonConfig::builder().build();
|
7705 8938 | /// let svc = ::tower::util::service_fn(handler);
|
7706 8939 | /// let app = RestJson::builder(config)
|
7707 - | /// .malformed_content_type_with_payload_service(svc)
|
8940 + | /// .malformed_float_service(svc)
|
7708 8941 | /// /* Set other handlers */
|
7709 8942 | /// .build()
|
7710 8943 | /// .unwrap();
|
7711 8944 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7712 8945 | /// ```
|
7713 8946 | ///
|
7714 - | pub fn malformed_content_type_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8947 + | pub fn malformed_float_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7715 8948 | where
|
7716 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithPayload, ServiceExtractors>,
|
8949 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedFloat, ServiceExtractors>,
|
7717 8950 |
|
7718 8951 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7719 8952 | RestJson<L>,
|
7720 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
7721 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithPayload, S>
|
8953 + | crate::operation_shape::MalformedFloat,
|
8954 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedFloat, S>
|
7722 8955 | >,
|
7723 8956 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7724 8957 | RestJson<L>,
|
7725 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8958 + | crate::operation_shape::MalformedFloat,
|
7726 8959 | ModelPl::Output
|
7727 8960 | >,
|
7728 8961 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7729 8962 | RestJson<L>,
|
7730 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8963 + | crate::operation_shape::MalformedFloat,
|
7731 8964 | <
|
7732 8965 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7733 8966 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7734 8967 | RestJson<L>,
|
7735 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8968 + | crate::operation_shape::MalformedFloat,
|
7736 8969 | ModelPl::Output
|
7737 8970 | >
|
7738 8971 | >::Output
|
7739 8972 | >,
|
7740 8973 |
|
7741 8974 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7742 8975 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7743 8976 |
|
7744 8977 | {
|
7745 8978 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7746 8979 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7747 - | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_service(service);
|
8980 + | let svc = crate::operation_shape::MalformedFloat::from_service(service);
|
7748 8981 | let svc = self.model_plugin.apply(svc);
|
7749 8982 | let svc =
|
7750 8983 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7751 8984 | .apply(svc);
|
7752 8985 | let svc = self.http_plugin.apply(svc);
|
7753 - | self.malformed_content_type_with_payload_custom(svc)
|
8986 + | self.malformed_float_custom(svc)
|
7754 8987 | }
|
7755 8988 |
|
7756 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) to a custom [`Service`](tower::Service).
|
8989 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) to a custom [`Service`](tower::Service).
|
7757 8990 | /// not constrained by the Smithy contract.
|
7758 - | fn malformed_content_type_with_payload_custom<S>(mut self, svc: S) -> Self
|
8991 + | fn malformed_float_custom<S>(mut self, svc: S) -> Self
|
7759 8992 | where
|
7760 8993 | S: ::tower::Service<
|
7761 8994 | ::http::Request<Body>,
|
7762 8995 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7763 8996 | Error = ::std::convert::Infallible,
|
7764 8997 | > + Clone
|
7765 8998 | + Send
|
7766 8999 | + 'static,
|
7767 9000 | S::Future: Send + 'static,
|
7768 9001 | {
|
7769 - | self.malformed_content_type_with_payload =
|
7770 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9002 + | self.malformed_float = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7771 9003 | self
|
7772 9004 | }
|
7773 9005 |
|
7774 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
9006 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
7775 9007 | ///
|
7776 9008 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7777 9009 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7778 9010 | ///
|
7779 9011 | /// # Example
|
7780 9012 | ///
|
7781 9013 | /// ```no_run
|
7782 9014 | /// use rest_json::{RestJson, RestJsonConfig};
|
7783 9015 | ///
|
7784 9016 | /// use rest_json::{input, output, error};
|
7785 9017 | ///
|
7786 - | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
9018 + | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
7787 9019 | /// todo!()
|
7788 9020 | /// }
|
7789 9021 | ///
|
7790 9022 | /// let config = RestJsonConfig::builder().build();
|
7791 9023 | /// let app = RestJson::builder(config)
|
7792 - | /// .malformed_double(handler)
|
9024 + | /// .malformed_integer(handler)
|
7793 9025 | /// /* Set other handlers */
|
7794 9026 | /// .build()
|
7795 9027 | /// .unwrap();
|
7796 9028 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7797 9029 | /// ```
|
7798 9030 | ///
|
7799 - | pub fn malformed_double<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9031 + | pub fn malformed_integer<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7800 9032 | where
|
7801 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedDouble, HandlerExtractors>,
|
9033 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedInteger, HandlerExtractors>,
|
7802 9034 |
|
7803 9035 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7804 9036 | RestJson<L>,
|
7805 - | crate::operation_shape::MalformedDouble,
|
7806 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedDouble, HandlerType>
|
9037 + | crate::operation_shape::MalformedInteger,
|
9038 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedInteger, HandlerType>
|
7807 9039 | >,
|
7808 9040 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7809 9041 | RestJson<L>,
|
7810 - | crate::operation_shape::MalformedDouble,
|
9042 + | crate::operation_shape::MalformedInteger,
|
7811 9043 | ModelPl::Output
|
7812 9044 | >,
|
7813 9045 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7814 9046 | RestJson<L>,
|
7815 - | crate::operation_shape::MalformedDouble,
|
9047 + | crate::operation_shape::MalformedInteger,
|
7816 9048 | <
|
7817 9049 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7818 9050 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7819 9051 | RestJson<L>,
|
7820 - | crate::operation_shape::MalformedDouble,
|
9052 + | crate::operation_shape::MalformedInteger,
|
7821 9053 | ModelPl::Output
|
7822 9054 | >
|
7823 9055 | >::Output
|
7824 9056 | >,
|
7825 9057 |
|
7826 9058 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7827 9059 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7828 9060 |
|
7829 9061 | {
|
7830 9062 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7831 9063 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7832 - | let svc = crate::operation_shape::MalformedDouble::from_handler(handler);
|
9064 + | let svc = crate::operation_shape::MalformedInteger::from_handler(handler);
|
7833 9065 | let svc = self.model_plugin.apply(svc);
|
7834 9066 | let svc =
|
7835 9067 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7836 9068 | .apply(svc);
|
7837 9069 | let svc = self.http_plugin.apply(svc);
|
7838 - | self.malformed_double_custom(svc)
|
9070 + | self.malformed_integer_custom(svc)
|
7839 9071 | }
|
7840 9072 |
|
7841 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
9073 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
7842 9074 | ///
|
7843 9075 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7844 9076 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7845 9077 | ///
|
7846 9078 | /// # Example
|
7847 9079 | ///
|
7848 9080 | /// ```no_run
|
7849 9081 | /// use rest_json::{RestJson, RestJsonConfig};
|
7850 9082 | ///
|
7851 9083 | /// use rest_json::{input, output, error};
|
7852 9084 | ///
|
7853 - | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
9085 + | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
7854 9086 | /// todo!()
|
7855 9087 | /// }
|
7856 9088 | ///
|
7857 9089 | /// let config = RestJsonConfig::builder().build();
|
7858 9090 | /// let svc = ::tower::util::service_fn(handler);
|
7859 9091 | /// let app = RestJson::builder(config)
|
7860 - | /// .malformed_double_service(svc)
|
9092 + | /// .malformed_integer_service(svc)
|
7861 9093 | /// /* Set other handlers */
|
7862 9094 | /// .build()
|
7863 9095 | /// .unwrap();
|
7864 9096 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7865 9097 | /// ```
|
7866 9098 | ///
|
7867 - | pub fn malformed_double_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9099 + | pub fn malformed_integer_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7868 9100 | where
|
7869 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedDouble, ServiceExtractors>,
|
9101 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedInteger, ServiceExtractors>,
|
7870 9102 |
|
7871 9103 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7872 9104 | RestJson<L>,
|
7873 - | crate::operation_shape::MalformedDouble,
|
7874 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedDouble, S>
|
9105 + | crate::operation_shape::MalformedInteger,
|
9106 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedInteger, S>
|
7875 9107 | >,
|
7876 9108 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7877 9109 | RestJson<L>,
|
7878 - | crate::operation_shape::MalformedDouble,
|
9110 + | crate::operation_shape::MalformedInteger,
|
7879 9111 | ModelPl::Output
|
7880 9112 | >,
|
7881 9113 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7882 9114 | RestJson<L>,
|
7883 - | crate::operation_shape::MalformedDouble,
|
9115 + | crate::operation_shape::MalformedInteger,
|
7884 9116 | <
|
7885 9117 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7886 9118 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7887 9119 | RestJson<L>,
|
7888 - | crate::operation_shape::MalformedDouble,
|
9120 + | crate::operation_shape::MalformedInteger,
|
7889 9121 | ModelPl::Output
|
7890 9122 | >
|
7891 9123 | >::Output
|
7892 9124 | >,
|
7893 9125 |
|
7894 9126 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7895 9127 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7896 9128 |
|
7897 9129 | {
|
7898 9130 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7899 9131 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7900 - | let svc = crate::operation_shape::MalformedDouble::from_service(service);
|
9132 + | let svc = crate::operation_shape::MalformedInteger::from_service(service);
|
7901 9133 | let svc = self.model_plugin.apply(svc);
|
7902 9134 | let svc =
|
7903 9135 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7904 9136 | .apply(svc);
|
7905 9137 | let svc = self.http_plugin.apply(svc);
|
7906 - | self.malformed_double_custom(svc)
|
9138 + | self.malformed_integer_custom(svc)
|
7907 9139 | }
|
7908 9140 |
|
7909 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) to a custom [`Service`](tower::Service).
|
9141 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) to a custom [`Service`](tower::Service).
|
7910 9142 | /// not constrained by the Smithy contract.
|
7911 - | fn malformed_double_custom<S>(mut self, svc: S) -> Self
|
9143 + | fn malformed_integer_custom<S>(mut self, svc: S) -> Self
|
7912 9144 | where
|
7913 9145 | S: ::tower::Service<
|
7914 9146 | ::http::Request<Body>,
|
7915 9147 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
7916 9148 | Error = ::std::convert::Infallible,
|
7917 9149 | > + Clone
|
7918 9150 | + Send
|
7919 9151 | + 'static,
|
7920 9152 | S::Future: Send + 'static,
|
7921 9153 | {
|
7922 - | self.malformed_double = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9154 + | self.malformed_integer = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
7923 9155 | self
|
7924 9156 | }
|
7925 9157 |
|
7926 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
9158 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
7927 9159 | ///
|
7928 9160 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7929 9161 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7930 9162 | ///
|
7931 9163 | /// # Example
|
7932 9164 | ///
|
7933 9165 | /// ```no_run
|
7934 9166 | /// use rest_json::{RestJson, RestJsonConfig};
|
7935 9167 | ///
|
7936 9168 | /// use rest_json::{input, output, error};
|
7937 9169 | ///
|
7938 - | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
9170 + | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, error::MalformedListError> {
|
7939 9171 | /// todo!()
|
7940 9172 | /// }
|
7941 9173 | ///
|
7942 9174 | /// let config = RestJsonConfig::builder().build();
|
7943 9175 | /// let app = RestJson::builder(config)
|
7944 - | /// .malformed_float(handler)
|
9176 + | /// .malformed_list(handler)
|
7945 9177 | /// /* Set other handlers */
|
7946 9178 | /// .build()
|
7947 9179 | /// .unwrap();
|
7948 9180 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7949 9181 | /// ```
|
7950 9182 | ///
|
7951 - | pub fn malformed_float<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9183 + | pub fn malformed_list<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7952 9184 | where
|
7953 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedFloat, HandlerExtractors>,
|
9185 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedList, HandlerExtractors>,
|
7954 9186 |
|
7955 9187 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7956 9188 | RestJson<L>,
|
7957 - | crate::operation_shape::MalformedFloat,
|
7958 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedFloat, HandlerType>
|
9189 + | crate::operation_shape::MalformedList,
|
9190 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedList, HandlerType>
|
7959 9191 | >,
|
7960 9192 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7961 9193 | RestJson<L>,
|
7962 - | crate::operation_shape::MalformedFloat,
|
9194 + | crate::operation_shape::MalformedList,
|
7963 9195 | ModelPl::Output
|
7964 9196 | >,
|
7965 9197 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7966 9198 | RestJson<L>,
|
7967 - | crate::operation_shape::MalformedFloat,
|
9199 + | crate::operation_shape::MalformedList,
|
7968 9200 | <
|
7969 9201 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7970 9202 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
7971 9203 | RestJson<L>,
|
7972 - | crate::operation_shape::MalformedFloat,
|
9204 + | crate::operation_shape::MalformedList,
|
7973 9205 | ModelPl::Output
|
7974 9206 | >
|
7975 9207 | >::Output
|
7976 9208 | >,
|
7977 9209 |
|
7978 9210 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7979 9211 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
7980 9212 |
|
7981 9213 | {
|
7982 9214 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
7983 9215 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
7984 - | let svc = crate::operation_shape::MalformedFloat::from_handler(handler);
|
9216 + | let svc = crate::operation_shape::MalformedList::from_handler(handler);
|
7985 9217 | let svc = self.model_plugin.apply(svc);
|
7986 9218 | let svc =
|
7987 9219 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7988 9220 | .apply(svc);
|
7989 9221 | let svc = self.http_plugin.apply(svc);
|
7990 - | self.malformed_float_custom(svc)
|
9222 + | self.malformed_list_custom(svc)
|
7991 9223 | }
|
7992 9224 |
|
7993 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
9225 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
7994 9226 | ///
|
7995 9227 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
7996 9228 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
7997 9229 | ///
|
7998 9230 | /// # Example
|
7999 9231 | ///
|
8000 9232 | /// ```no_run
|
8001 9233 | /// use rest_json::{RestJson, RestJsonConfig};
|
8002 9234 | ///
|
8003 9235 | /// use rest_json::{input, output, error};
|
8004 9236 | ///
|
8005 - | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
9237 + | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, error::MalformedListError> {
|
8006 9238 | /// todo!()
|
8007 9239 | /// }
|
8008 9240 | ///
|
8009 9241 | /// let config = RestJsonConfig::builder().build();
|
8010 9242 | /// let svc = ::tower::util::service_fn(handler);
|
8011 9243 | /// let app = RestJson::builder(config)
|
8012 - | /// .malformed_float_service(svc)
|
9244 + | /// .malformed_list_service(svc)
|
8013 9245 | /// /* Set other handlers */
|
8014 9246 | /// .build()
|
8015 9247 | /// .unwrap();
|
8016 9248 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8017 9249 | /// ```
|
8018 9250 | ///
|
8019 - | pub fn malformed_float_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9251 + | pub fn malformed_list_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8020 9252 | where
|
8021 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedFloat, ServiceExtractors>,
|
9253 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedList, ServiceExtractors>,
|
8022 9254 |
|
8023 9255 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8024 9256 | RestJson<L>,
|
8025 - | crate::operation_shape::MalformedFloat,
|
8026 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedFloat, S>
|
9257 + | crate::operation_shape::MalformedList,
|
9258 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedList, S>
|
8027 9259 | >,
|
8028 9260 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8029 9261 | RestJson<L>,
|
8030 - | crate::operation_shape::MalformedFloat,
|
9262 + | crate::operation_shape::MalformedList,
|
8031 9263 | ModelPl::Output
|
8032 9264 | >,
|
8033 9265 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8034 9266 | RestJson<L>,
|
8035 - | crate::operation_shape::MalformedFloat,
|
9267 + | crate::operation_shape::MalformedList,
|
8036 9268 | <
|
8037 9269 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8038 9270 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8039 9271 | RestJson<L>,
|
8040 - | crate::operation_shape::MalformedFloat,
|
9272 + | crate::operation_shape::MalformedList,
|
8041 9273 | ModelPl::Output
|
8042 9274 | >
|
8043 9275 | >::Output
|
8044 9276 | >,
|
8045 9277 |
|
8046 9278 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8047 9279 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8048 9280 |
|
8049 9281 | {
|
8050 9282 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8051 9283 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8052 - | let svc = crate::operation_shape::MalformedFloat::from_service(service);
|
9284 + | let svc = crate::operation_shape::MalformedList::from_service(service);
|
8053 9285 | let svc = self.model_plugin.apply(svc);
|
8054 9286 | let svc =
|
8055 9287 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8056 9288 | .apply(svc);
|
8057 9289 | let svc = self.http_plugin.apply(svc);
|
8058 - | self.malformed_float_custom(svc)
|
9290 + | self.malformed_list_custom(svc)
|
8059 9291 | }
|
8060 9292 |
|
8061 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) to a custom [`Service`](tower::Service).
|
9293 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) to a custom [`Service`](tower::Service).
|
8062 9294 | /// not constrained by the Smithy contract.
|
8063 - | fn malformed_float_custom<S>(mut self, svc: S) -> Self
|
9295 + | fn malformed_list_custom<S>(mut self, svc: S) -> Self
|
8064 9296 | where
|
8065 9297 | S: ::tower::Service<
|
8066 9298 | ::http::Request<Body>,
|
8067 9299 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8068 9300 | Error = ::std::convert::Infallible,
|
8069 9301 | > + Clone
|
8070 9302 | + Send
|
8071 9303 | + 'static,
|
8072 9304 | S::Future: Send + 'static,
|
8073 9305 | {
|
8074 - | self.malformed_float = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9306 + | self.malformed_list = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8075 9307 | self
|
8076 9308 | }
|
8077 9309 |
|
8078 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
9310 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
8079 9311 | ///
|
8080 9312 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8081 9313 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8082 9314 | ///
|
8083 9315 | /// # Example
|
8084 9316 | ///
|
8085 9317 | /// ```no_run
|
8086 9318 | /// use rest_json::{RestJson, RestJsonConfig};
|
8087 9319 | ///
|
8088 9320 | /// use rest_json::{input, output, error};
|
8089 9321 | ///
|
8090 - | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
9322 + | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
8091 9323 | /// todo!()
|
8092 9324 | /// }
|
8093 9325 | ///
|
8094 9326 | /// let config = RestJsonConfig::builder().build();
|
8095 9327 | /// let app = RestJson::builder(config)
|
8096 - | /// .malformed_integer(handler)
|
9328 + | /// .malformed_long(handler)
|
8097 9329 | /// /* Set other handlers */
|
8098 9330 | /// .build()
|
8099 9331 | /// .unwrap();
|
8100 9332 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8101 9333 | /// ```
|
8102 9334 | ///
|
8103 - | pub fn malformed_integer<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9335 + | pub fn malformed_long<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8104 9336 | where
|
8105 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedInteger, HandlerExtractors>,
|
9337 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedLong, HandlerExtractors>,
|
8106 9338 |
|
8107 9339 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8108 9340 | RestJson<L>,
|
8109 - | crate::operation_shape::MalformedInteger,
|
8110 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedInteger, HandlerType>
|
9341 + | crate::operation_shape::MalformedLong,
|
9342 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedLong, HandlerType>
|
8111 9343 | >,
|
8112 9344 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8113 9345 | RestJson<L>,
|
8114 - | crate::operation_shape::MalformedInteger,
|
9346 + | crate::operation_shape::MalformedLong,
|
8115 9347 | ModelPl::Output
|
8116 9348 | >,
|
8117 9349 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8118 9350 | RestJson<L>,
|
8119 - | crate::operation_shape::MalformedInteger,
|
9351 + | crate::operation_shape::MalformedLong,
|
8120 9352 | <
|
8121 9353 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8122 9354 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8123 9355 | RestJson<L>,
|
8124 - | crate::operation_shape::MalformedInteger,
|
9356 + | crate::operation_shape::MalformedLong,
|
8125 9357 | ModelPl::Output
|
8126 9358 | >
|
8127 9359 | >::Output
|
8128 9360 | >,
|
8129 9361 |
|
8130 9362 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8131 9363 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8132 9364 |
|
8133 9365 | {
|
8134 9366 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8135 9367 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8136 - | let svc = crate::operation_shape::MalformedInteger::from_handler(handler);
|
9368 + | let svc = crate::operation_shape::MalformedLong::from_handler(handler);
|
8137 9369 | let svc = self.model_plugin.apply(svc);
|
8138 9370 | let svc =
|
8139 9371 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8140 9372 | .apply(svc);
|
8141 9373 | let svc = self.http_plugin.apply(svc);
|
8142 - | self.malformed_integer_custom(svc)
|
9374 + | self.malformed_long_custom(svc)
|
8143 9375 | }
|
8144 9376 |
|
8145 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
9377 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
8146 9378 | ///
|
8147 9379 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8148 9380 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8149 9381 | ///
|
8150 9382 | /// # Example
|
8151 9383 | ///
|
8152 9384 | /// ```no_run
|
8153 9385 | /// use rest_json::{RestJson, RestJsonConfig};
|
8154 9386 | ///
|
8155 9387 | /// use rest_json::{input, output, error};
|
8156 9388 | ///
|
8157 - | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
9389 + | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
8158 9390 | /// todo!()
|
8159 9391 | /// }
|
8160 9392 | ///
|
8161 9393 | /// let config = RestJsonConfig::builder().build();
|
8162 9394 | /// let svc = ::tower::util::service_fn(handler);
|
8163 9395 | /// let app = RestJson::builder(config)
|
8164 - | /// .malformed_integer_service(svc)
|
9396 + | /// .malformed_long_service(svc)
|
8165 9397 | /// /* Set other handlers */
|
8166 9398 | /// .build()
|
8167 9399 | /// .unwrap();
|
8168 9400 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8169 9401 | /// ```
|
8170 9402 | ///
|
8171 - | pub fn malformed_integer_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9403 + | pub fn malformed_long_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8172 9404 | where
|
8173 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedInteger, ServiceExtractors>,
|
9405 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedLong, ServiceExtractors>,
|
8174 9406 |
|
8175 9407 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8176 9408 | RestJson<L>,
|
8177 - | crate::operation_shape::MalformedInteger,
|
8178 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedInteger, S>
|
9409 + | crate::operation_shape::MalformedLong,
|
9410 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedLong, S>
|
8179 9411 | >,
|
8180 9412 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8181 9413 | RestJson<L>,
|
8182 - | crate::operation_shape::MalformedInteger,
|
9414 + | crate::operation_shape::MalformedLong,
|
8183 9415 | ModelPl::Output
|
8184 9416 | >,
|
8185 9417 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8186 9418 | RestJson<L>,
|
8187 - | crate::operation_shape::MalformedInteger,
|
9419 + | crate::operation_shape::MalformedLong,
|
8188 9420 | <
|
8189 9421 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8190 9422 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8191 9423 | RestJson<L>,
|
8192 - | crate::operation_shape::MalformedInteger,
|
9424 + | crate::operation_shape::MalformedLong,
|
8193 9425 | ModelPl::Output
|
8194 9426 | >
|
8195 9427 | >::Output
|
8196 9428 | >,
|
8197 9429 |
|
8198 9430 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8199 9431 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8200 9432 |
|
8201 9433 | {
|
8202 9434 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8203 9435 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8204 - | let svc = crate::operation_shape::MalformedInteger::from_service(service);
|
9436 + | let svc = crate::operation_shape::MalformedLong::from_service(service);
|
8205 9437 | let svc = self.model_plugin.apply(svc);
|
8206 9438 | let svc =
|
8207 9439 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8208 9440 | .apply(svc);
|
8209 9441 | let svc = self.http_plugin.apply(svc);
|
8210 - | self.malformed_integer_custom(svc)
|
9442 + | self.malformed_long_custom(svc)
|
8211 9443 | }
|
8212 9444 |
|
8213 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) to a custom [`Service`](tower::Service).
|
9445 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) to a custom [`Service`](tower::Service).
|
8214 9446 | /// not constrained by the Smithy contract.
|
8215 - | fn malformed_integer_custom<S>(mut self, svc: S) -> Self
|
9447 + | fn malformed_long_custom<S>(mut self, svc: S) -> Self
|
8216 9448 | where
|
8217 9449 | S: ::tower::Service<
|
8218 9450 | ::http::Request<Body>,
|
8219 9451 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8220 9452 | Error = ::std::convert::Infallible,
|
8221 9453 | > + Clone
|
8222 9454 | + Send
|
8223 9455 | + 'static,
|
8224 9456 | S::Future: Send + 'static,
|
8225 9457 | {
|
8226 - | self.malformed_integer = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9458 + | self.malformed_long = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8227 9459 | self
|
8228 9460 | }
|
8229 9461 |
|
8230 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
9462 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
8231 9463 | ///
|
8232 9464 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8233 9465 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8234 9466 | ///
|
8235 9467 | /// # Example
|
8236 9468 | ///
|
8237 9469 | /// ```no_run
|
8238 9470 | /// use rest_json::{RestJson, RestJsonConfig};
|
8239 9471 | ///
|
8240 9472 | /// use rest_json::{input, output, error};
|
8241 9473 | ///
|
8242 - | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, error::MalformedListError> {
|
9474 + | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, error::MalformedMapError> {
|
8243 9475 | /// todo!()
|
8244 9476 | /// }
|
8245 9477 | ///
|
8246 9478 | /// let config = RestJsonConfig::builder().build();
|
8247 9479 | /// let app = RestJson::builder(config)
|
8248 - | /// .malformed_list(handler)
|
9480 + | /// .malformed_map(handler)
|
8249 9481 | /// /* Set other handlers */
|
8250 9482 | /// .build()
|
8251 9483 | /// .unwrap();
|
8252 9484 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8253 9485 | /// ```
|
8254 9486 | ///
|
8255 - | pub fn malformed_list<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9487 + | pub fn malformed_map<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8256 9488 | where
|
8257 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedList, HandlerExtractors>,
|
9489 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedMap, HandlerExtractors>,
|
8258 9490 |
|
8259 9491 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8260 9492 | RestJson<L>,
|
8261 - | crate::operation_shape::MalformedList,
|
8262 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedList, HandlerType>
|
9493 + | crate::operation_shape::MalformedMap,
|
9494 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedMap, HandlerType>
|
8263 9495 | >,
|
8264 9496 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8265 9497 | RestJson<L>,
|
8266 - | crate::operation_shape::MalformedList,
|
9498 + | crate::operation_shape::MalformedMap,
|
8267 9499 | ModelPl::Output
|
8268 9500 | >,
|
8269 9501 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8270 9502 | RestJson<L>,
|
8271 - | crate::operation_shape::MalformedList,
|
9503 + | crate::operation_shape::MalformedMap,
|
8272 9504 | <
|
8273 9505 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8274 9506 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8275 9507 | RestJson<L>,
|
8276 - | crate::operation_shape::MalformedList,
|
9508 + | crate::operation_shape::MalformedMap,
|
8277 9509 | ModelPl::Output
|
8278 9510 | >
|
8279 9511 | >::Output
|
8280 9512 | >,
|
8281 9513 |
|
8282 9514 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8283 9515 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8284 9516 |
|
8285 9517 | {
|
8286 9518 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8287 9519 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8288 - | let svc = crate::operation_shape::MalformedList::from_handler(handler);
|
9520 + | let svc = crate::operation_shape::MalformedMap::from_handler(handler);
|
8289 9521 | let svc = self.model_plugin.apply(svc);
|
8290 9522 | let svc =
|
8291 9523 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8292 9524 | .apply(svc);
|
8293 9525 | let svc = self.http_plugin.apply(svc);
|
8294 - | self.malformed_list_custom(svc)
|
9526 + | self.malformed_map_custom(svc)
|
8295 9527 | }
|
8296 9528 |
|
8297 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
9529 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
8298 9530 | ///
|
8299 9531 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8300 9532 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8301 9533 | ///
|
8302 9534 | /// # Example
|
8303 9535 | ///
|
8304 9536 | /// ```no_run
|
8305 9537 | /// use rest_json::{RestJson, RestJsonConfig};
|
8306 9538 | ///
|
8307 9539 | /// use rest_json::{input, output, error};
|
8308 9540 | ///
|
8309 - | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, error::MalformedListError> {
|
9541 + | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, error::MalformedMapError> {
|
8310 9542 | /// todo!()
|
8311 9543 | /// }
|
8312 9544 | ///
|
8313 9545 | /// let config = RestJsonConfig::builder().build();
|
8314 9546 | /// let svc = ::tower::util::service_fn(handler);
|
8315 9547 | /// let app = RestJson::builder(config)
|
8316 - | /// .malformed_list_service(svc)
|
9548 + | /// .malformed_map_service(svc)
|
8317 9549 | /// /* Set other handlers */
|
8318 9550 | /// .build()
|
8319 9551 | /// .unwrap();
|
8320 9552 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8321 9553 | /// ```
|
8322 9554 | ///
|
8323 - | pub fn malformed_list_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9555 + | pub fn malformed_map_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8324 9556 | where
|
8325 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedList, ServiceExtractors>,
|
9557 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedMap, ServiceExtractors>,
|
8326 9558 |
|
8327 9559 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8328 9560 | RestJson<L>,
|
8329 - | crate::operation_shape::MalformedList,
|
8330 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedList, S>
|
9561 + | crate::operation_shape::MalformedMap,
|
9562 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedMap, S>
|
8331 9563 | >,
|
8332 9564 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8333 9565 | RestJson<L>,
|
8334 - | crate::operation_shape::MalformedList,
|
9566 + | crate::operation_shape::MalformedMap,
|
8335 9567 | ModelPl::Output
|
8336 9568 | >,
|
8337 9569 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8338 9570 | RestJson<L>,
|
8339 - | crate::operation_shape::MalformedList,
|
9571 + | crate::operation_shape::MalformedMap,
|
8340 9572 | <
|
8341 9573 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8342 9574 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8343 9575 | RestJson<L>,
|
8344 - | crate::operation_shape::MalformedList,
|
9576 + | crate::operation_shape::MalformedMap,
|
8345 9577 | ModelPl::Output
|
8346 9578 | >
|
8347 9579 | >::Output
|
8348 9580 | >,
|
8349 9581 |
|
8350 9582 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8351 9583 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8352 9584 |
|
8353 9585 | {
|
8354 9586 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8355 9587 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8356 - | let svc = crate::operation_shape::MalformedList::from_service(service);
|
9588 + | let svc = crate::operation_shape::MalformedMap::from_service(service);
|
8357 9589 | let svc = self.model_plugin.apply(svc);
|
8358 9590 | let svc =
|
8359 9591 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8360 9592 | .apply(svc);
|
8361 9593 | let svc = self.http_plugin.apply(svc);
|
8362 - | self.malformed_list_custom(svc)
|
9594 + | self.malformed_map_custom(svc)
|
8363 9595 | }
|
8364 9596 |
|
8365 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) to a custom [`Service`](tower::Service).
|
9597 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) to a custom [`Service`](tower::Service).
|
8366 9598 | /// not constrained by the Smithy contract.
|
8367 - | fn malformed_list_custom<S>(mut self, svc: S) -> Self
|
9599 + | fn malformed_map_custom<S>(mut self, svc: S) -> Self
|
8368 9600 | where
|
8369 9601 | S: ::tower::Service<
|
8370 9602 | ::http::Request<Body>,
|
8371 9603 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8372 9604 | Error = ::std::convert::Infallible,
|
8373 9605 | > + Clone
|
8374 9606 | + Send
|
8375 9607 | + 'static,
|
8376 9608 | S::Future: Send + 'static,
|
8377 9609 | {
|
8378 - | self.malformed_list = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9610 + | self.malformed_map = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8379 9611 | self
|
8380 9612 | }
|
8381 9613 |
|
8382 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
9614 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
8383 9615 | ///
|
8384 9616 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8385 9617 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8386 9618 | ///
|
8387 9619 | /// # Example
|
8388 9620 | ///
|
8389 9621 | /// ```no_run
|
8390 9622 | /// use rest_json::{RestJson, RestJsonConfig};
|
8391 9623 | ///
|
8392 9624 | /// use rest_json::{input, output, error};
|
8393 9625 | ///
|
8394 - | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
9626 + | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, error::MalformedRequestBodyError> {
|
8395 9627 | /// todo!()
|
8396 9628 | /// }
|
8397 9629 | ///
|
8398 9630 | /// let config = RestJsonConfig::builder().build();
|
8399 9631 | /// let app = RestJson::builder(config)
|
8400 - | /// .malformed_long(handler)
|
9632 + | /// .malformed_request_body(handler)
|
8401 9633 | /// /* Set other handlers */
|
8402 9634 | /// .build()
|
8403 9635 | /// .unwrap();
|
8404 9636 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8405 9637 | /// ```
|
8406 9638 | ///
|
8407 - | pub fn malformed_long<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9639 + | pub fn malformed_request_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8408 9640 | where
|
8409 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedLong, HandlerExtractors>,
|
9641 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedRequestBody, HandlerExtractors>,
|
8410 9642 |
|
8411 9643 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8412 9644 | RestJson<L>,
|
8413 - | crate::operation_shape::MalformedLong,
|
8414 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedLong, HandlerType>
|
9645 + | crate::operation_shape::MalformedRequestBody,
|
9646 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedRequestBody, HandlerType>
|
8415 9647 | >,
|
8416 9648 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8417 9649 | RestJson<L>,
|
8418 - | crate::operation_shape::MalformedLong,
|
9650 + | crate::operation_shape::MalformedRequestBody,
|
8419 9651 | ModelPl::Output
|
8420 9652 | >,
|
8421 9653 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8422 9654 | RestJson<L>,
|
8423 - | crate::operation_shape::MalformedLong,
|
9655 + | crate::operation_shape::MalformedRequestBody,
|
8424 9656 | <
|
8425 9657 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8426 9658 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8427 9659 | RestJson<L>,
|
8428 - | crate::operation_shape::MalformedLong,
|
9660 + | crate::operation_shape::MalformedRequestBody,
|
8429 9661 | ModelPl::Output
|
8430 9662 | >
|
8431 9663 | >::Output
|
8432 9664 | >,
|
8433 9665 |
|
8434 9666 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8435 9667 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8436 9668 |
|
8437 9669 | {
|
8438 9670 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8439 9671 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8440 - | let svc = crate::operation_shape::MalformedLong::from_handler(handler);
|
9672 + | let svc = crate::operation_shape::MalformedRequestBody::from_handler(handler);
|
8441 9673 | let svc = self.model_plugin.apply(svc);
|
8442 9674 | let svc =
|
8443 9675 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8444 9676 | .apply(svc);
|
8445 9677 | let svc = self.http_plugin.apply(svc);
|
8446 - | self.malformed_long_custom(svc)
|
9678 + | self.malformed_request_body_custom(svc)
|
8447 9679 | }
|
8448 9680 |
|
8449 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
9681 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
8450 9682 | ///
|
8451 9683 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8452 9684 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8453 9685 | ///
|
8454 9686 | /// # Example
|
8455 9687 | ///
|
8456 9688 | /// ```no_run
|
8457 9689 | /// use rest_json::{RestJson, RestJsonConfig};
|
8458 9690 | ///
|
8459 9691 | /// use rest_json::{input, output, error};
|
8460 9692 | ///
|
8461 - | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
9693 + | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, error::MalformedRequestBodyError> {
|
8462 9694 | /// todo!()
|
8463 9695 | /// }
|
8464 9696 | ///
|
8465 9697 | /// let config = RestJsonConfig::builder().build();
|
8466 9698 | /// let svc = ::tower::util::service_fn(handler);
|
8467 9699 | /// let app = RestJson::builder(config)
|
8468 - | /// .malformed_long_service(svc)
|
9700 + | /// .malformed_request_body_service(svc)
|
8469 9701 | /// /* Set other handlers */
|
8470 9702 | /// .build()
|
8471 9703 | /// .unwrap();
|
8472 9704 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8473 9705 | /// ```
|
8474 9706 | ///
|
8475 - | pub fn malformed_long_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9707 + | pub fn malformed_request_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8476 9708 | where
|
8477 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedLong, ServiceExtractors>,
|
9709 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedRequestBody, ServiceExtractors>,
|
8478 9710 |
|
8479 9711 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8480 9712 | RestJson<L>,
|
8481 - | crate::operation_shape::MalformedLong,
|
8482 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedLong, S>
|
9713 + | crate::operation_shape::MalformedRequestBody,
|
9714 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedRequestBody, S>
|
8483 9715 | >,
|
8484 9716 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8485 9717 | RestJson<L>,
|
8486 - | crate::operation_shape::MalformedLong,
|
9718 + | crate::operation_shape::MalformedRequestBody,
|
8487 9719 | ModelPl::Output
|
8488 9720 | >,
|
8489 9721 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8490 9722 | RestJson<L>,
|
8491 - | crate::operation_shape::MalformedLong,
|
9723 + | crate::operation_shape::MalformedRequestBody,
|
8492 9724 | <
|
8493 9725 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8494 9726 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8495 9727 | RestJson<L>,
|
8496 - | crate::operation_shape::MalformedLong,
|
9728 + | crate::operation_shape::MalformedRequestBody,
|
8497 9729 | ModelPl::Output
|
8498 9730 | >
|
8499 9731 | >::Output
|
8500 9732 | >,
|
8501 9733 |
|
8502 9734 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8503 9735 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8504 9736 |
|
8505 9737 | {
|
8506 9738 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8507 9739 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8508 - | let svc = crate::operation_shape::MalformedLong::from_service(service);
|
9740 + | let svc = crate::operation_shape::MalformedRequestBody::from_service(service);
|
8509 9741 | let svc = self.model_plugin.apply(svc);
|
8510 9742 | let svc =
|
8511 9743 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8512 9744 | .apply(svc);
|
8513 9745 | let svc = self.http_plugin.apply(svc);
|
8514 - | self.malformed_long_custom(svc)
|
9746 + | self.malformed_request_body_custom(svc)
|
8515 9747 | }
|
8516 9748 |
|
8517 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) to a custom [`Service`](tower::Service).
|
9749 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) to a custom [`Service`](tower::Service).
|
8518 9750 | /// not constrained by the Smithy contract.
|
8519 - | fn malformed_long_custom<S>(mut self, svc: S) -> Self
|
9751 + | fn malformed_request_body_custom<S>(mut self, svc: S) -> Self
|
8520 9752 | where
|
8521 9753 | S: ::tower::Service<
|
8522 9754 | ::http::Request<Body>,
|
8523 9755 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8524 9756 | Error = ::std::convert::Infallible,
|
8525 9757 | > + Clone
|
8526 9758 | + Send
|
8527 9759 | + 'static,
|
8528 9760 | S::Future: Send + 'static,
|
8529 9761 | {
|
8530 - | self.malformed_long = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9762 + | self.malformed_request_body =
|
9763 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8531 9764 | self
|
8532 9765 | }
|
8533 9766 |
|
8534 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
9767 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
8535 9768 | ///
|
8536 9769 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8537 9770 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8538 9771 | ///
|
8539 9772 | /// # Example
|
8540 9773 | ///
|
8541 9774 | /// ```no_run
|
8542 9775 | /// use rest_json::{RestJson, RestJsonConfig};
|
8543 9776 | ///
|
8544 9777 | /// use rest_json::{input, output, error};
|
8545 9778 | ///
|
8546 - | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, error::MalformedMapError> {
|
9779 + | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
8547 9780 | /// todo!()
|
8548 9781 | /// }
|
8549 9782 | ///
|
8550 9783 | /// let config = RestJsonConfig::builder().build();
|
8551 9784 | /// let app = RestJson::builder(config)
|
8552 - | /// .malformed_map(handler)
|
9785 + | /// .malformed_short(handler)
|
8553 9786 | /// /* Set other handlers */
|
8554 9787 | /// .build()
|
8555 9788 | /// .unwrap();
|
8556 9789 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8557 9790 | /// ```
|
8558 9791 | ///
|
8559 - | pub fn malformed_map<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9792 + | pub fn malformed_short<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8560 9793 | where
|
8561 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedMap, HandlerExtractors>,
|
9794 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedShort, HandlerExtractors>,
|
8562 9795 |
|
8563 9796 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8564 9797 | RestJson<L>,
|
8565 - | crate::operation_shape::MalformedMap,
|
8566 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedMap, HandlerType>
|
9798 + | crate::operation_shape::MalformedShort,
|
9799 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedShort, HandlerType>
|
8567 9800 | >,
|
8568 9801 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8569 9802 | RestJson<L>,
|
8570 - | crate::operation_shape::MalformedMap,
|
9803 + | crate::operation_shape::MalformedShort,
|
8571 9804 | ModelPl::Output
|
8572 9805 | >,
|
8573 9806 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8574 9807 | RestJson<L>,
|
8575 - | crate::operation_shape::MalformedMap,
|
9808 + | crate::operation_shape::MalformedShort,
|
8576 9809 | <
|
8577 9810 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8578 9811 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8579 9812 | RestJson<L>,
|
8580 - | crate::operation_shape::MalformedMap,
|
9813 + | crate::operation_shape::MalformedShort,
|
8581 9814 | ModelPl::Output
|
8582 9815 | >
|
8583 9816 | >::Output
|
8584 9817 | >,
|
8585 9818 |
|
8586 9819 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8587 9820 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8588 9821 |
|
8589 9822 | {
|
8590 9823 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8591 9824 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8592 - | let svc = crate::operation_shape::MalformedMap::from_handler(handler);
|
9825 + | let svc = crate::operation_shape::MalformedShort::from_handler(handler);
|
8593 9826 | let svc = self.model_plugin.apply(svc);
|
8594 9827 | let svc =
|
8595 9828 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8596 9829 | .apply(svc);
|
8597 9830 | let svc = self.http_plugin.apply(svc);
|
8598 - | self.malformed_map_custom(svc)
|
9831 + | self.malformed_short_custom(svc)
|
8599 9832 | }
|
8600 9833 |
|
8601 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
9834 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
8602 9835 | ///
|
8603 9836 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8604 9837 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8605 9838 | ///
|
8606 9839 | /// # Example
|
8607 9840 | ///
|
8608 9841 | /// ```no_run
|
8609 9842 | /// use rest_json::{RestJson, RestJsonConfig};
|
8610 9843 | ///
|
8611 9844 | /// use rest_json::{input, output, error};
|
8612 9845 | ///
|
8613 - | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, error::MalformedMapError> {
|
9846 + | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
8614 9847 | /// todo!()
|
8615 9848 | /// }
|
8616 9849 | ///
|
8617 9850 | /// let config = RestJsonConfig::builder().build();
|
8618 9851 | /// let svc = ::tower::util::service_fn(handler);
|
8619 9852 | /// let app = RestJson::builder(config)
|
8620 - | /// .malformed_map_service(svc)
|
9853 + | /// .malformed_short_service(svc)
|
8621 9854 | /// /* Set other handlers */
|
8622 9855 | /// .build()
|
8623 9856 | /// .unwrap();
|
8624 9857 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8625 9858 | /// ```
|
8626 9859 | ///
|
8627 - | pub fn malformed_map_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9860 + | pub fn malformed_short_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8628 9861 | where
|
8629 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedMap, ServiceExtractors>,
|
9862 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedShort, ServiceExtractors>,
|
8630 9863 |
|
8631 9864 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8632 9865 | RestJson<L>,
|
8633 - | crate::operation_shape::MalformedMap,
|
8634 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedMap, S>
|
9866 + | crate::operation_shape::MalformedShort,
|
9867 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedShort, S>
|
8635 9868 | >,
|
8636 9869 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8637 9870 | RestJson<L>,
|
8638 - | crate::operation_shape::MalformedMap,
|
9871 + | crate::operation_shape::MalformedShort,
|
8639 9872 | ModelPl::Output
|
8640 9873 | >,
|
8641 9874 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8642 9875 | RestJson<L>,
|
8643 - | crate::operation_shape::MalformedMap,
|
9876 + | crate::operation_shape::MalformedShort,
|
8644 9877 | <
|
8645 9878 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8646 9879 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8647 9880 | RestJson<L>,
|
8648 - | crate::operation_shape::MalformedMap,
|
9881 + | crate::operation_shape::MalformedShort,
|
8649 9882 | ModelPl::Output
|
8650 9883 | >
|
8651 9884 | >::Output
|
8652 9885 | >,
|
8653 9886 |
|
8654 9887 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8655 9888 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8656 9889 |
|
8657 9890 | {
|
8658 9891 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8659 9892 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8660 - | let svc = crate::operation_shape::MalformedMap::from_service(service);
|
9893 + | let svc = crate::operation_shape::MalformedShort::from_service(service);
|
8661 9894 | let svc = self.model_plugin.apply(svc);
|
8662 9895 | let svc =
|
8663 9896 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8664 9897 | .apply(svc);
|
8665 9898 | let svc = self.http_plugin.apply(svc);
|
8666 - | self.malformed_map_custom(svc)
|
9899 + | self.malformed_short_custom(svc)
|
8667 9900 | }
|
8668 9901 |
|
8669 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) to a custom [`Service`](tower::Service).
|
9902 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) to a custom [`Service`](tower::Service).
|
8670 9903 | /// not constrained by the Smithy contract.
|
8671 - | fn malformed_map_custom<S>(mut self, svc: S) -> Self
|
9904 + | fn malformed_short_custom<S>(mut self, svc: S) -> Self
|
8672 9905 | where
|
8673 9906 | S: ::tower::Service<
|
8674 9907 | ::http::Request<Body>,
|
8675 9908 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8676 9909 | Error = ::std::convert::Infallible,
|
8677 9910 | > + Clone
|
8678 9911 | + Send
|
8679 9912 | + 'static,
|
8680 9913 | S::Future: Send + 'static,
|
8681 9914 | {
|
8682 - | self.malformed_map = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9915 + | self.malformed_short = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8683 9916 | self
|
8684 9917 | }
|
8685 9918 |
|
8686 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
9919 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
8687 9920 | ///
|
8688 9921 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8689 9922 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8690 9923 | ///
|
8691 9924 | /// # Example
|
8692 9925 | ///
|
8693 9926 | /// ```no_run
|
8694 9927 | /// use rest_json::{RestJson, RestJsonConfig};
|
8695 9928 | ///
|
8696 9929 | /// use rest_json::{input, output, error};
|
8697 9930 | ///
|
8698 - | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, error::MalformedRequestBodyError> {
|
9931 + | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, error::MalformedStringError> {
|
8699 9932 | /// todo!()
|
8700 9933 | /// }
|
8701 9934 | ///
|
8702 9935 | /// let config = RestJsonConfig::builder().build();
|
8703 9936 | /// let app = RestJson::builder(config)
|
8704 - | /// .malformed_request_body(handler)
|
9937 + | /// .malformed_string(handler)
|
8705 9938 | /// /* Set other handlers */
|
8706 9939 | /// .build()
|
8707 9940 | /// .unwrap();
|
8708 9941 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8709 9942 | /// ```
|
8710 9943 | ///
|
8711 - | pub fn malformed_request_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9944 + | pub fn malformed_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8712 9945 | where
|
8713 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedRequestBody, HandlerExtractors>,
|
9946 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedString, HandlerExtractors>,
|
8714 9947 |
|
8715 9948 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8716 9949 | RestJson<L>,
|
8717 - | crate::operation_shape::MalformedRequestBody,
|
8718 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedRequestBody, HandlerType>
|
9950 + | crate::operation_shape::MalformedString,
|
9951 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedString, HandlerType>
|
8719 9952 | >,
|
8720 9953 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8721 9954 | RestJson<L>,
|
8722 - | crate::operation_shape::MalformedRequestBody,
|
9955 + | crate::operation_shape::MalformedString,
|
8723 9956 | ModelPl::Output
|
8724 9957 | >,
|
8725 9958 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8726 9959 | RestJson<L>,
|
8727 - | crate::operation_shape::MalformedRequestBody,
|
9960 + | crate::operation_shape::MalformedString,
|
8728 9961 | <
|
8729 9962 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8730 9963 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8731 9964 | RestJson<L>,
|
8732 - | crate::operation_shape::MalformedRequestBody,
|
9965 + | crate::operation_shape::MalformedString,
|
8733 9966 | ModelPl::Output
|
8734 9967 | >
|
8735 9968 | >::Output
|
8736 9969 | >,
|
8737 9970 |
|
8738 9971 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8739 9972 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8740 9973 |
|
8741 9974 | {
|
8742 9975 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8743 9976 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8744 - | let svc = crate::operation_shape::MalformedRequestBody::from_handler(handler);
|
9977 + | let svc = crate::operation_shape::MalformedString::from_handler(handler);
|
8745 9978 | let svc = self.model_plugin.apply(svc);
|
8746 9979 | let svc =
|
8747 9980 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8748 9981 | .apply(svc);
|
8749 9982 | let svc = self.http_plugin.apply(svc);
|
8750 - | self.malformed_request_body_custom(svc)
|
9983 + | self.malformed_string_custom(svc)
|
8751 9984 | }
|
8752 9985 |
|
8753 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
9986 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
8754 9987 | ///
|
8755 9988 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8756 9989 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8757 9990 | ///
|
8758 9991 | /// # Example
|
8759 9992 | ///
|
8760 9993 | /// ```no_run
|
8761 9994 | /// use rest_json::{RestJson, RestJsonConfig};
|
8762 9995 | ///
|
8763 9996 | /// use rest_json::{input, output, error};
|
8764 9997 | ///
|
8765 - | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, error::MalformedRequestBodyError> {
|
9998 + | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, error::MalformedStringError> {
|
8766 9999 | /// todo!()
|
8767 10000 | /// }
|
8768 10001 | ///
|
8769 10002 | /// let config = RestJsonConfig::builder().build();
|
8770 10003 | /// let svc = ::tower::util::service_fn(handler);
|
8771 10004 | /// let app = RestJson::builder(config)
|
8772 - | /// .malformed_request_body_service(svc)
|
10005 + | /// .malformed_string_service(svc)
|
8773 10006 | /// /* Set other handlers */
|
8774 10007 | /// .build()
|
8775 10008 | /// .unwrap();
|
8776 10009 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8777 10010 | /// ```
|
8778 10011 | ///
|
8779 - | pub fn malformed_request_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10012 + | pub fn malformed_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8780 10013 | where
|
8781 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedRequestBody, ServiceExtractors>,
|
10014 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedString, ServiceExtractors>,
|
8782 10015 |
|
8783 10016 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8784 10017 | RestJson<L>,
|
8785 - | crate::operation_shape::MalformedRequestBody,
|
8786 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedRequestBody, S>
|
10018 + | crate::operation_shape::MalformedString,
|
10019 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedString, S>
|
8787 10020 | >,
|
8788 10021 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8789 10022 | RestJson<L>,
|
8790 - | crate::operation_shape::MalformedRequestBody,
|
10023 + | crate::operation_shape::MalformedString,
|
8791 10024 | ModelPl::Output
|
8792 10025 | >,
|
8793 10026 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8794 10027 | RestJson<L>,
|
8795 - | crate::operation_shape::MalformedRequestBody,
|
10028 + | crate::operation_shape::MalformedString,
|
8796 10029 | <
|
8797 10030 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8798 10031 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8799 10032 | RestJson<L>,
|
8800 - | crate::operation_shape::MalformedRequestBody,
|
10033 + | crate::operation_shape::MalformedString,
|
8801 10034 | ModelPl::Output
|
8802 10035 | >
|
8803 10036 | >::Output
|
8804 10037 | >,
|
8805 10038 |
|
8806 10039 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8807 10040 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8808 10041 |
|
8809 10042 | {
|
8810 10043 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8811 10044 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8812 - | let svc = crate::operation_shape::MalformedRequestBody::from_service(service);
|
10045 + | let svc = crate::operation_shape::MalformedString::from_service(service);
|
8813 10046 | let svc = self.model_plugin.apply(svc);
|
8814 10047 | let svc =
|
8815 10048 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8816 10049 | .apply(svc);
|
8817 10050 | let svc = self.http_plugin.apply(svc);
|
8818 - | self.malformed_request_body_custom(svc)
|
10051 + | self.malformed_string_custom(svc)
|
8819 10052 | }
|
8820 10053 |
|
8821 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) to a custom [`Service`](tower::Service).
|
10054 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) to a custom [`Service`](tower::Service).
|
8822 10055 | /// not constrained by the Smithy contract.
|
8823 - | fn malformed_request_body_custom<S>(mut self, svc: S) -> Self
|
10056 + | fn malformed_string_custom<S>(mut self, svc: S) -> Self
|
8824 10057 | where
|
8825 10058 | S: ::tower::Service<
|
8826 10059 | ::http::Request<Body>,
|
8827 10060 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8828 10061 | Error = ::std::convert::Infallible,
|
8829 10062 | > + Clone
|
8830 10063 | + Send
|
8831 10064 | + 'static,
|
8832 10065 | S::Future: Send + 'static,
|
8833 10066 | {
|
8834 - | self.malformed_request_body =
|
8835 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10067 + | self.malformed_string = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8836 10068 | self
|
8837 10069 | }
|
8838 10070 |
|
8839 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
10071 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
8840 10072 | ///
|
8841 10073 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8842 10074 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8843 10075 | ///
|
8844 10076 | /// # Example
|
8845 10077 | ///
|
8846 10078 | /// ```no_run
|
8847 10079 | /// use rest_json::{RestJson, RestJsonConfig};
|
8848 10080 | ///
|
8849 10081 | /// use rest_json::{input, output, error};
|
8850 10082 | ///
|
8851 - | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
10083 + | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
8852 10084 | /// todo!()
|
8853 10085 | /// }
|
8854 10086 | ///
|
8855 10087 | /// let config = RestJsonConfig::builder().build();
|
8856 10088 | /// let app = RestJson::builder(config)
|
8857 - | /// .malformed_short(handler)
|
10089 + | /// .malformed_timestamp_body_date_time(handler)
|
8858 10090 | /// /* Set other handlers */
|
8859 10091 | /// .build()
|
8860 10092 | /// .unwrap();
|
8861 10093 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8862 10094 | /// ```
|
8863 10095 | ///
|
8864 - | pub fn malformed_short<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10096 + | pub fn malformed_timestamp_body_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8865 10097 | where
|
8866 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedShort, HandlerExtractors>,
|
10098 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerExtractors>,
|
8867 10099 |
|
8868 10100 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8869 10101 | RestJson<L>,
|
8870 - | crate::operation_shape::MalformedShort,
|
8871 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedShort, HandlerType>
|
10102 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10103 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerType>
|
8872 10104 | >,
|
8873 10105 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8874 10106 | RestJson<L>,
|
8875 - | crate::operation_shape::MalformedShort,
|
10107 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8876 10108 | ModelPl::Output
|
8877 10109 | >,
|
8878 10110 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8879 10111 | RestJson<L>,
|
8880 - | crate::operation_shape::MalformedShort,
|
10112 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8881 10113 | <
|
8882 10114 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8883 10115 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8884 10116 | RestJson<L>,
|
8885 - | crate::operation_shape::MalformedShort,
|
10117 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8886 10118 | ModelPl::Output
|
8887 10119 | >
|
8888 10120 | >::Output
|
8889 10121 | >,
|
8890 10122 |
|
8891 10123 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8892 10124 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8893 10125 |
|
8894 10126 | {
|
8895 10127 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8896 10128 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8897 - | let svc = crate::operation_shape::MalformedShort::from_handler(handler);
|
10129 + | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_handler(handler);
|
8898 10130 | let svc = self.model_plugin.apply(svc);
|
8899 10131 | let svc =
|
8900 10132 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8901 10133 | .apply(svc);
|
8902 10134 | let svc = self.http_plugin.apply(svc);
|
8903 - | self.malformed_short_custom(svc)
|
10135 + | self.malformed_timestamp_body_date_time_custom(svc)
|
8904 10136 | }
|
8905 10137 |
|
8906 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
10138 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
8907 10139 | ///
|
8908 10140 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8909 10141 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8910 10142 | ///
|
8911 10143 | /// # Example
|
8912 10144 | ///
|
8913 10145 | /// ```no_run
|
8914 10146 | /// use rest_json::{RestJson, RestJsonConfig};
|
8915 10147 | ///
|
8916 10148 | /// use rest_json::{input, output, error};
|
8917 10149 | ///
|
8918 - | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
10150 + | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
8919 10151 | /// todo!()
|
8920 10152 | /// }
|
8921 10153 | ///
|
8922 10154 | /// let config = RestJsonConfig::builder().build();
|
8923 10155 | /// let svc = ::tower::util::service_fn(handler);
|
8924 10156 | /// let app = RestJson::builder(config)
|
8925 - | /// .malformed_short_service(svc)
|
10157 + | /// .malformed_timestamp_body_date_time_service(svc)
|
8926 10158 | /// /* Set other handlers */
|
8927 10159 | /// .build()
|
8928 10160 | /// .unwrap();
|
8929 10161 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8930 10162 | /// ```
|
8931 10163 | ///
|
8932 - | pub fn malformed_short_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10164 + | pub fn malformed_timestamp_body_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8933 10165 | where
|
8934 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedShort, ServiceExtractors>,
|
10166 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDateTime, ServiceExtractors>,
|
8935 10167 |
|
8936 10168 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8937 10169 | RestJson<L>,
|
8938 - | crate::operation_shape::MalformedShort,
|
8939 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedShort, S>
|
10170 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10171 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDateTime, S>
|
8940 10172 | >,
|
8941 10173 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8942 10174 | RestJson<L>,
|
8943 - | crate::operation_shape::MalformedShort,
|
10175 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8944 10176 | ModelPl::Output
|
8945 10177 | >,
|
8946 10178 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8947 10179 | RestJson<L>,
|
8948 - | crate::operation_shape::MalformedShort,
|
10180 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8949 10181 | <
|
8950 10182 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8951 10183 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
8952 10184 | RestJson<L>,
|
8953 - | crate::operation_shape::MalformedShort,
|
10185 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8954 10186 | ModelPl::Output
|
8955 10187 | >
|
8956 10188 | >::Output
|
8957 10189 | >,
|
8958 10190 |
|
8959 10191 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8960 10192 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
8961 10193 |
|
8962 10194 | {
|
8963 10195 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
8964 10196 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
8965 - | let svc = crate::operation_shape::MalformedShort::from_service(service);
|
10197 + | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_service(service);
|
8966 10198 | let svc = self.model_plugin.apply(svc);
|
8967 10199 | let svc =
|
8968 10200 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8969 10201 | .apply(svc);
|
8970 10202 | let svc = self.http_plugin.apply(svc);
|
8971 - | self.malformed_short_custom(svc)
|
10203 + | self.malformed_timestamp_body_date_time_custom(svc)
|
8972 10204 | }
|
8973 10205 |
|
8974 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) to a custom [`Service`](tower::Service).
|
10206 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) to a custom [`Service`](tower::Service).
|
8975 10207 | /// not constrained by the Smithy contract.
|
8976 - | fn malformed_short_custom<S>(mut self, svc: S) -> Self
|
10208 + | fn malformed_timestamp_body_date_time_custom<S>(mut self, svc: S) -> Self
|
8977 10209 | where
|
8978 10210 | S: ::tower::Service<
|
8979 10211 | ::http::Request<Body>,
|
8980 10212 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
8981 10213 | Error = ::std::convert::Infallible,
|
8982 10214 | > + Clone
|
8983 10215 | + Send
|
8984 10216 | + 'static,
|
8985 10217 | S::Future: Send + 'static,
|
8986 10218 | {
|
8987 - | self.malformed_short = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10219 + | self.malformed_timestamp_body_date_time =
|
10220 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
8988 10221 | self
|
8989 10222 | }
|
8990 10223 |
|
8991 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
10224 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
8992 10225 | ///
|
8993 10226 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
8994 10227 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
8995 10228 | ///
|
8996 10229 | /// # Example
|
8997 10230 | ///
|
8998 10231 | /// ```no_run
|
8999 10232 | /// use rest_json::{RestJson, RestJsonConfig};
|
9000 10233 | ///
|
9001 10234 | /// use rest_json::{input, output, error};
|
9002 10235 | ///
|
9003 - | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, error::MalformedStringError> {
|
10236 + | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
9004 10237 | /// todo!()
|
9005 10238 | /// }
|
9006 10239 | ///
|
9007 10240 | /// let config = RestJsonConfig::builder().build();
|
9008 10241 | /// let app = RestJson::builder(config)
|
9009 - | /// .malformed_string(handler)
|
10242 + | /// .malformed_timestamp_body_default(handler)
|
9010 10243 | /// /* Set other handlers */
|
9011 10244 | /// .build()
|
9012 10245 | /// .unwrap();
|
9013 10246 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9014 10247 | /// ```
|
9015 10248 | ///
|
9016 - | pub fn malformed_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10249 + | pub fn malformed_timestamp_body_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9017 10250 | where
|
9018 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedString, HandlerExtractors>,
|
10251 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDefault, HandlerExtractors>,
|
9019 10252 |
|
9020 10253 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9021 10254 | RestJson<L>,
|
9022 - | crate::operation_shape::MalformedString,
|
9023 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedString, HandlerType>
|
10255 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
10256 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDefault, HandlerType>
|
9024 10257 | >,
|
9025 10258 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9026 10259 | RestJson<L>,
|
9027 - | crate::operation_shape::MalformedString,
|
10260 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9028 10261 | ModelPl::Output
|
9029 10262 | >,
|
9030 10263 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9031 10264 | RestJson<L>,
|
9032 - | crate::operation_shape::MalformedString,
|
10265 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9033 10266 | <
|
9034 10267 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9035 10268 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9036 10269 | RestJson<L>,
|
9037 - | crate::operation_shape::MalformedString,
|
10270 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9038 10271 | ModelPl::Output
|
9039 10272 | >
|
9040 10273 | >::Output
|
9041 10274 | >,
|
9042 10275 |
|
9043 10276 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9044 10277 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9045 10278 |
|
9046 10279 | {
|
9047 10280 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9048 10281 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9049 - | let svc = crate::operation_shape::MalformedString::from_handler(handler);
|
10282 + | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_handler(handler);
|
9050 10283 | let svc = self.model_plugin.apply(svc);
|
9051 10284 | let svc =
|
9052 10285 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9053 10286 | .apply(svc);
|
9054 10287 | let svc = self.http_plugin.apply(svc);
|
9055 - | self.malformed_string_custom(svc)
|
10288 + | self.malformed_timestamp_body_default_custom(svc)
|
9056 10289 | }
|
9057 10290 |
|
9058 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
10291 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
9059 10292 | ///
|
9060 10293 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9061 10294 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9062 10295 | ///
|
9063 10296 | /// # Example
|
9064 10297 | ///
|
9065 10298 | /// ```no_run
|
9066 10299 | /// use rest_json::{RestJson, RestJsonConfig};
|
9067 10300 | ///
|
9068 10301 | /// use rest_json::{input, output, error};
|
9069 10302 | ///
|
9070 - | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, error::MalformedStringError> {
|
10303 + | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
9071 10304 | /// todo!()
|
9072 10305 | /// }
|
9073 10306 | ///
|
9074 10307 | /// let config = RestJsonConfig::builder().build();
|
9075 10308 | /// let svc = ::tower::util::service_fn(handler);
|
9076 10309 | /// let app = RestJson::builder(config)
|
9077 - | /// .malformed_string_service(svc)
|
10310 + | /// .malformed_timestamp_body_default_service(svc)
|
9078 10311 | /// /* Set other handlers */
|
9079 10312 | /// .build()
|
9080 10313 | /// .unwrap();
|
9081 10314 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9082 10315 | /// ```
|
9083 10316 | ///
|
9084 - | pub fn malformed_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10317 + | pub fn malformed_timestamp_body_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9085 10318 | where
|
9086 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedString, ServiceExtractors>,
|
10319 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDefault, ServiceExtractors>,
|
9087 10320 |
|
9088 10321 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9089 10322 | RestJson<L>,
|
9090 - | crate::operation_shape::MalformedString,
|
9091 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedString, S>
|
10323 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
10324 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDefault, S>
|
9092 10325 | >,
|
9093 10326 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9094 10327 | RestJson<L>,
|
9095 - | crate::operation_shape::MalformedString,
|
10328 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9096 10329 | ModelPl::Output
|
9097 10330 | >,
|
9098 10331 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9099 10332 | RestJson<L>,
|
9100 - | crate::operation_shape::MalformedString,
|
10333 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9101 10334 | <
|
9102 10335 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9103 10336 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9104 10337 | RestJson<L>,
|
9105 - | crate::operation_shape::MalformedString,
|
10338 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
9106 10339 | ModelPl::Output
|
9107 10340 | >
|
9108 10341 | >::Output
|
9109 10342 | >,
|
9110 10343 |
|
9111 10344 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9112 10345 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9113 10346 |
|
9114 10347 | {
|
9115 10348 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9116 10349 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9117 - | let svc = crate::operation_shape::MalformedString::from_service(service);
|
10350 + | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_service(service);
|
9118 10351 | let svc = self.model_plugin.apply(svc);
|
9119 10352 | let svc =
|
9120 10353 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9121 10354 | .apply(svc);
|
9122 10355 | let svc = self.http_plugin.apply(svc);
|
9123 - | self.malformed_string_custom(svc)
|
10356 + | self.malformed_timestamp_body_default_custom(svc)
|
9124 10357 | }
|
9125 10358 |
|
9126 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) to a custom [`Service`](tower::Service).
|
10359 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) to a custom [`Service`](tower::Service).
|
9127 10360 | /// not constrained by the Smithy contract.
|
9128 - | fn malformed_string_custom<S>(mut self, svc: S) -> Self
|
10361 + | fn malformed_timestamp_body_default_custom<S>(mut self, svc: S) -> Self
|
9129 10362 | where
|
9130 10363 | S: ::tower::Service<
|
9131 10364 | ::http::Request<Body>,
|
9132 10365 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9133 10366 | Error = ::std::convert::Infallible,
|
9134 10367 | > + Clone
|
9135 10368 | + Send
|
9136 10369 | + 'static,
|
9137 10370 | S::Future: Send + 'static,
|
9138 10371 | {
|
9139 - | self.malformed_string = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10372 + | self.malformed_timestamp_body_default =
|
10373 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9140 10374 | self
|
9141 10375 | }
|
9142 10376 |
|
9143 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
10377 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
9144 10378 | ///
|
9145 10379 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9146 10380 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9147 10381 | ///
|
9148 10382 | /// # Example
|
9149 10383 | ///
|
9150 10384 | /// ```no_run
|
9151 10385 | /// use rest_json::{RestJson, RestJsonConfig};
|
9152 10386 | ///
|
9153 10387 | /// use rest_json::{input, output, error};
|
9154 10388 | ///
|
9155 - | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
10389 + | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
9156 10390 | /// todo!()
|
9157 10391 | /// }
|
9158 10392 | ///
|
9159 10393 | /// let config = RestJsonConfig::builder().build();
|
9160 10394 | /// let app = RestJson::builder(config)
|
9161 - | /// .malformed_timestamp_body_date_time(handler)
|
10395 + | /// .malformed_timestamp_body_http_date(handler)
|
9162 10396 | /// /* Set other handlers */
|
9163 10397 | /// .build()
|
9164 10398 | /// .unwrap();
|
9165 10399 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9166 10400 | /// ```
|
9167 10401 | ///
|
9168 - | pub fn malformed_timestamp_body_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10402 + | pub fn malformed_timestamp_body_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9169 10403 | where
|
9170 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerExtractors>,
|
10404 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerExtractors>,
|
9171 10405 |
|
9172 10406 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9173 10407 | RestJson<L>,
|
9174 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
9175 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerType>
|
10408 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10409 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerType>
|
9176 10410 | >,
|
9177 10411 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9178 10412 | RestJson<L>,
|
9179 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10413 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9180 10414 | ModelPl::Output
|
9181 10415 | >,
|
9182 10416 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9183 10417 | RestJson<L>,
|
9184 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10418 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9185 10419 | <
|
9186 10420 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9187 10421 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9188 10422 | RestJson<L>,
|
9189 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10423 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9190 10424 | ModelPl::Output
|
9191 10425 | >
|
9192 10426 | >::Output
|
9193 10427 | >,
|
9194 10428 |
|
9195 10429 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9196 10430 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9197 10431 |
|
9198 10432 | {
|
9199 10433 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9200 10434 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9201 - | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_handler(handler);
|
10435 + | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_handler(handler);
|
9202 10436 | let svc = self.model_plugin.apply(svc);
|
9203 10437 | let svc =
|
9204 10438 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9205 10439 | .apply(svc);
|
9206 10440 | let svc = self.http_plugin.apply(svc);
|
9207 - | self.malformed_timestamp_body_date_time_custom(svc)
|
10441 + | self.malformed_timestamp_body_http_date_custom(svc)
|
9208 10442 | }
|
9209 10443 |
|
9210 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
10444 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
9211 10445 | ///
|
9212 10446 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9213 10447 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9214 10448 | ///
|
9215 10449 | /// # Example
|
9216 10450 | ///
|
9217 10451 | /// ```no_run
|
9218 10452 | /// use rest_json::{RestJson, RestJsonConfig};
|
9219 10453 | ///
|
9220 10454 | /// use rest_json::{input, output, error};
|
9221 10455 | ///
|
9222 - | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
10456 + | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
9223 10457 | /// todo!()
|
9224 10458 | /// }
|
9225 10459 | ///
|
9226 10460 | /// let config = RestJsonConfig::builder().build();
|
9227 10461 | /// let svc = ::tower::util::service_fn(handler);
|
9228 10462 | /// let app = RestJson::builder(config)
|
9229 - | /// .malformed_timestamp_body_date_time_service(svc)
|
10463 + | /// .malformed_timestamp_body_http_date_service(svc)
|
9230 10464 | /// /* Set other handlers */
|
9231 10465 | /// .build()
|
9232 10466 | /// .unwrap();
|
9233 10467 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9234 10468 | /// ```
|
9235 10469 | ///
|
9236 - | pub fn malformed_timestamp_body_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10470 + | pub fn malformed_timestamp_body_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9237 10471 | where
|
9238 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDateTime, ServiceExtractors>,
|
10472 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyHttpDate, ServiceExtractors>,
|
9239 10473 |
|
9240 10474 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9241 10475 | RestJson<L>,
|
9242 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
9243 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDateTime, S>
|
10476 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10477 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyHttpDate, S>
|
9244 10478 | >,
|
9245 10479 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9246 10480 | RestJson<L>,
|
9247 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10481 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9248 10482 | ModelPl::Output
|
9249 10483 | >,
|
9250 10484 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9251 10485 | RestJson<L>,
|
9252 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10486 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9253 10487 | <
|
9254 10488 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9255 10489 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9256 10490 | RestJson<L>,
|
9257 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10491 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9258 10492 | ModelPl::Output
|
9259 10493 | >
|
9260 10494 | >::Output
|
9261 10495 | >,
|
9262 10496 |
|
9263 10497 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9264 10498 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9265 10499 |
|
9266 10500 | {
|
9267 10501 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9268 10502 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9269 - | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_service(service);
|
10503 + | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_service(service);
|
9270 10504 | let svc = self.model_plugin.apply(svc);
|
9271 10505 | let svc =
|
9272 10506 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9273 10507 | .apply(svc);
|
9274 10508 | let svc = self.http_plugin.apply(svc);
|
9275 - | self.malformed_timestamp_body_date_time_custom(svc)
|
10509 + | self.malformed_timestamp_body_http_date_custom(svc)
|
9276 10510 | }
|
9277 10511 |
|
9278 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) to a custom [`Service`](tower::Service).
|
10512 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) to a custom [`Service`](tower::Service).
|
9279 10513 | /// not constrained by the Smithy contract.
|
9280 - | fn malformed_timestamp_body_date_time_custom<S>(mut self, svc: S) -> Self
|
10514 + | fn malformed_timestamp_body_http_date_custom<S>(mut self, svc: S) -> Self
|
9281 10515 | where
|
9282 10516 | S: ::tower::Service<
|
9283 10517 | ::http::Request<Body>,
|
9284 10518 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9285 10519 | Error = ::std::convert::Infallible,
|
9286 10520 | > + Clone
|
9287 10521 | + Send
|
9288 10522 | + 'static,
|
9289 10523 | S::Future: Send + 'static,
|
9290 10524 | {
|
9291 - | self.malformed_timestamp_body_date_time =
|
10525 + | self.malformed_timestamp_body_http_date =
|
9292 10526 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9293 10527 | self
|
9294 10528 | }
|
9295 10529 |
|
9296 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
10530 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
9297 10531 | ///
|
9298 10532 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9299 10533 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9300 10534 | ///
|
9301 10535 | /// # Example
|
9302 10536 | ///
|
9303 10537 | /// ```no_run
|
9304 10538 | /// use rest_json::{RestJson, RestJsonConfig};
|
9305 10539 | ///
|
9306 10540 | /// use rest_json::{input, output, error};
|
9307 10541 | ///
|
9308 - | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
10542 + | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
9309 10543 | /// todo!()
|
9310 10544 | /// }
|
9311 10545 | ///
|
9312 10546 | /// let config = RestJsonConfig::builder().build();
|
9313 10547 | /// let app = RestJson::builder(config)
|
9314 - | /// .malformed_timestamp_body_default(handler)
|
10548 + | /// .malformed_timestamp_header_date_time(handler)
|
9315 10549 | /// /* Set other handlers */
|
9316 10550 | /// .build()
|
9317 10551 | /// .unwrap();
|
9318 10552 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9319 10553 | /// ```
|
9320 10554 | ///
|
9321 - | pub fn malformed_timestamp_body_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10555 + | pub fn malformed_timestamp_header_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9322 10556 | where
|
9323 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDefault, HandlerExtractors>,
|
10557 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerExtractors>,
|
9324 10558 |
|
9325 10559 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9326 10560 | RestJson<L>,
|
9327 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
9328 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDefault, HandlerType>
|
10561 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10562 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerType>
|
9329 10563 | >,
|
9330 10564 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9331 10565 | RestJson<L>,
|
9332 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10566 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9333 10567 | ModelPl::Output
|
9334 10568 | >,
|
9335 10569 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9336 10570 | RestJson<L>,
|
9337 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10571 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9338 10572 | <
|
9339 10573 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9340 10574 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9341 10575 | RestJson<L>,
|
9342 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10576 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9343 10577 | ModelPl::Output
|
9344 10578 | >
|
9345 10579 | >::Output
|
9346 10580 | >,
|
9347 10581 |
|
9348 10582 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9349 10583 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9350 10584 |
|
9351 10585 | {
|
9352 10586 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9353 10587 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9354 - | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_handler(handler);
|
10588 + | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_handler(handler);
|
9355 10589 | let svc = self.model_plugin.apply(svc);
|
9356 10590 | let svc =
|
9357 10591 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9358 10592 | .apply(svc);
|
9359 10593 | let svc = self.http_plugin.apply(svc);
|
9360 - | self.malformed_timestamp_body_default_custom(svc)
|
10594 + | self.malformed_timestamp_header_date_time_custom(svc)
|
9361 10595 | }
|
9362 10596 |
|
9363 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
10597 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
9364 10598 | ///
|
9365 10599 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9366 10600 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9367 10601 | ///
|
9368 10602 | /// # Example
|
9369 10603 | ///
|
9370 10604 | /// ```no_run
|
9371 10605 | /// use rest_json::{RestJson, RestJsonConfig};
|
9372 10606 | ///
|
9373 10607 | /// use rest_json::{input, output, error};
|
9374 10608 | ///
|
9375 - | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
10609 + | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
9376 10610 | /// todo!()
|
9377 10611 | /// }
|
9378 10612 | ///
|
9379 10613 | /// let config = RestJsonConfig::builder().build();
|
9380 10614 | /// let svc = ::tower::util::service_fn(handler);
|
9381 10615 | /// let app = RestJson::builder(config)
|
9382 - | /// .malformed_timestamp_body_default_service(svc)
|
10616 + | /// .malformed_timestamp_header_date_time_service(svc)
|
9383 10617 | /// /* Set other handlers */
|
9384 10618 | /// .build()
|
9385 10619 | /// .unwrap();
|
9386 10620 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9387 10621 | /// ```
|
9388 10622 | ///
|
9389 - | pub fn malformed_timestamp_body_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10623 + | pub fn malformed_timestamp_header_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9390 10624 | where
|
9391 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDefault, ServiceExtractors>,
|
10625 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDateTime, ServiceExtractors>,
|
9392 10626 |
|
9393 10627 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9394 10628 | RestJson<L>,
|
9395 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
9396 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDefault, S>
|
10629 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10630 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDateTime, S>
|
9397 10631 | >,
|
9398 10632 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9399 10633 | RestJson<L>,
|
9400 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10634 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9401 10635 | ModelPl::Output
|
9402 10636 | >,
|
9403 10637 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9404 10638 | RestJson<L>,
|
9405 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10639 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9406 10640 | <
|
9407 10641 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9408 10642 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9409 10643 | RestJson<L>,
|
9410 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10644 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9411 10645 | ModelPl::Output
|
9412 10646 | >
|
9413 10647 | >::Output
|
9414 10648 | >,
|
9415 10649 |
|
9416 10650 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9417 10651 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9418 10652 |
|
9419 10653 | {
|
9420 10654 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9421 10655 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9422 - | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_service(service);
|
10656 + | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_service(service);
|
9423 10657 | let svc = self.model_plugin.apply(svc);
|
9424 10658 | let svc =
|
9425 10659 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9426 10660 | .apply(svc);
|
9427 10661 | let svc = self.http_plugin.apply(svc);
|
9428 - | self.malformed_timestamp_body_default_custom(svc)
|
10662 + | self.malformed_timestamp_header_date_time_custom(svc)
|
9429 10663 | }
|
9430 10664 |
|
9431 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) to a custom [`Service`](tower::Service).
|
10665 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) to a custom [`Service`](tower::Service).
|
9432 10666 | /// not constrained by the Smithy contract.
|
9433 - | fn malformed_timestamp_body_default_custom<S>(mut self, svc: S) -> Self
|
10667 + | fn malformed_timestamp_header_date_time_custom<S>(mut self, svc: S) -> Self
|
9434 10668 | where
|
9435 10669 | S: ::tower::Service<
|
9436 10670 | ::http::Request<Body>,
|
9437 10671 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9438 10672 | Error = ::std::convert::Infallible,
|
9439 10673 | > + Clone
|
9440 10674 | + Send
|
9441 10675 | + 'static,
|
9442 10676 | S::Future: Send + 'static,
|
9443 10677 | {
|
9444 - | self.malformed_timestamp_body_default =
|
10678 + | self.malformed_timestamp_header_date_time =
|
9445 10679 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9446 10680 | self
|
9447 10681 | }
|
9448 10682 |
|
9449 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
10683 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
9450 10684 | ///
|
9451 10685 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9452 10686 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9453 10687 | ///
|
9454 10688 | /// # Example
|
9455 10689 | ///
|
9456 10690 | /// ```no_run
|
9457 10691 | /// use rest_json::{RestJson, RestJsonConfig};
|
9458 10692 | ///
|
9459 10693 | /// use rest_json::{input, output, error};
|
9460 10694 | ///
|
9461 - | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
10695 + | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
9462 10696 | /// todo!()
|
9463 10697 | /// }
|
9464 10698 | ///
|
9465 10699 | /// let config = RestJsonConfig::builder().build();
|
9466 10700 | /// let app = RestJson::builder(config)
|
9467 - | /// .malformed_timestamp_body_http_date(handler)
|
10701 + | /// .malformed_timestamp_header_default(handler)
|
9468 10702 | /// /* Set other handlers */
|
9469 10703 | /// .build()
|
9470 10704 | /// .unwrap();
|
9471 10705 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9472 10706 | /// ```
|
9473 10707 | ///
|
9474 - | pub fn malformed_timestamp_body_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10708 + | pub fn malformed_timestamp_header_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9475 10709 | where
|
9476 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerExtractors>,
|
10710 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerExtractors>,
|
9477 10711 |
|
9478 10712 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9479 10713 | RestJson<L>,
|
9480 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9481 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerType>
|
10714 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10715 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerType>
|
9482 10716 | >,
|
9483 10717 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9484 10718 | RestJson<L>,
|
9485 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10719 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9486 10720 | ModelPl::Output
|
9487 10721 | >,
|
9488 10722 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9489 10723 | RestJson<L>,
|
9490 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10724 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9491 10725 | <
|
9492 10726 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9493 10727 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9494 10728 | RestJson<L>,
|
9495 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10729 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9496 10730 | ModelPl::Output
|
9497 10731 | >
|
9498 10732 | >::Output
|
9499 10733 | >,
|
9500 10734 |
|
9501 10735 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9502 10736 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9503 10737 |
|
9504 10738 | {
|
9505 10739 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9506 10740 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9507 - | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_handler(handler);
|
10741 + | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_handler(handler);
|
9508 10742 | let svc = self.model_plugin.apply(svc);
|
9509 10743 | let svc =
|
9510 10744 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9511 10745 | .apply(svc);
|
9512 10746 | let svc = self.http_plugin.apply(svc);
|
9513 - | self.malformed_timestamp_body_http_date_custom(svc)
|
10747 + | self.malformed_timestamp_header_default_custom(svc)
|
9514 10748 | }
|
9515 10749 |
|
9516 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
10750 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
9517 10751 | ///
|
9518 10752 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9519 10753 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9520 10754 | ///
|
9521 10755 | /// # Example
|
9522 10756 | ///
|
9523 10757 | /// ```no_run
|
9524 10758 | /// use rest_json::{RestJson, RestJsonConfig};
|
9525 10759 | ///
|
9526 10760 | /// use rest_json::{input, output, error};
|
9527 10761 | ///
|
9528 - | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
10762 + | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
9529 10763 | /// todo!()
|
9530 10764 | /// }
|
9531 10765 | ///
|
9532 10766 | /// let config = RestJsonConfig::builder().build();
|
9533 10767 | /// let svc = ::tower::util::service_fn(handler);
|
9534 10768 | /// let app = RestJson::builder(config)
|
9535 - | /// .malformed_timestamp_body_http_date_service(svc)
|
10769 + | /// .malformed_timestamp_header_default_service(svc)
|
9536 10770 | /// /* Set other handlers */
|
9537 10771 | /// .build()
|
9538 10772 | /// .unwrap();
|
9539 10773 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9540 10774 | /// ```
|
9541 10775 | ///
|
9542 - | pub fn malformed_timestamp_body_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10776 + | pub fn malformed_timestamp_header_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9543 10777 | where
|
9544 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyHttpDate, ServiceExtractors>,
|
10778 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDefault, ServiceExtractors>,
|
9545 10779 |
|
9546 10780 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9547 10781 | RestJson<L>,
|
9548 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9549 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyHttpDate, S>
|
10782 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10783 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDefault, S>
|
9550 10784 | >,
|
9551 10785 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9552 10786 | RestJson<L>,
|
9553 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10787 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9554 10788 | ModelPl::Output
|
9555 10789 | >,
|
9556 10790 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9557 10791 | RestJson<L>,
|
9558 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10792 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9559 10793 | <
|
9560 10794 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9561 10795 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9562 10796 | RestJson<L>,
|
9563 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10797 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9564 10798 | ModelPl::Output
|
9565 10799 | >
|
9566 10800 | >::Output
|
9567 10801 | >,
|
9568 10802 |
|
9569 10803 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9570 10804 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9571 10805 |
|
9572 10806 | {
|
9573 10807 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9574 10808 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9575 - | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_service(service);
|
10809 + | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_service(service);
|
9576 10810 | let svc = self.model_plugin.apply(svc);
|
9577 10811 | let svc =
|
9578 10812 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9579 10813 | .apply(svc);
|
9580 10814 | let svc = self.http_plugin.apply(svc);
|
9581 - | self.malformed_timestamp_body_http_date_custom(svc)
|
10815 + | self.malformed_timestamp_header_default_custom(svc)
|
9582 10816 | }
|
9583 10817 |
|
9584 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) to a custom [`Service`](tower::Service).
|
10818 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) to a custom [`Service`](tower::Service).
|
9585 10819 | /// not constrained by the Smithy contract.
|
9586 - | fn malformed_timestamp_body_http_date_custom<S>(mut self, svc: S) -> Self
|
10820 + | fn malformed_timestamp_header_default_custom<S>(mut self, svc: S) -> Self
|
9587 10821 | where
|
9588 10822 | S: ::tower::Service<
|
9589 10823 | ::http::Request<Body>,
|
9590 10824 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9591 10825 | Error = ::std::convert::Infallible,
|
9592 10826 | > + Clone
|
9593 10827 | + Send
|
9594 10828 | + 'static,
|
9595 10829 | S::Future: Send + 'static,
|
9596 10830 | {
|
9597 - | self.malformed_timestamp_body_http_date =
|
10831 + | self.malformed_timestamp_header_default =
|
9598 10832 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9599 10833 | self
|
9600 10834 | }
|
9601 10835 |
|
9602 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
10836 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
9603 10837 | ///
|
9604 10838 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9605 10839 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9606 10840 | ///
|
9607 10841 | /// # Example
|
9608 10842 | ///
|
9609 10843 | /// ```no_run
|
9610 10844 | /// use rest_json::{RestJson, RestJsonConfig};
|
9611 10845 | ///
|
9612 10846 | /// use rest_json::{input, output, error};
|
9613 10847 | ///
|
9614 - | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
10848 + | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
9615 10849 | /// todo!()
|
9616 10850 | /// }
|
9617 10851 | ///
|
9618 10852 | /// let config = RestJsonConfig::builder().build();
|
9619 10853 | /// let app = RestJson::builder(config)
|
9620 - | /// .malformed_timestamp_header_date_time(handler)
|
10854 + | /// .malformed_timestamp_header_epoch(handler)
|
9621 10855 | /// /* Set other handlers */
|
9622 10856 | /// .build()
|
9623 10857 | /// .unwrap();
|
9624 10858 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9625 10859 | /// ```
|
9626 10860 | ///
|
9627 - | pub fn malformed_timestamp_header_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10861 + | pub fn malformed_timestamp_header_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9628 10862 | where
|
9629 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerExtractors>,
|
10863 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerExtractors>,
|
9630 10864 |
|
9631 10865 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9632 10866 | RestJson<L>,
|
9633 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9634 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerType>
|
10867 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
10868 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerType>
|
9635 10869 | >,
|
9636 10870 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9637 10871 | RestJson<L>,
|
9638 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10872 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9639 10873 | ModelPl::Output
|
9640 10874 | >,
|
9641 10875 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9642 10876 | RestJson<L>,
|
9643 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10877 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9644 10878 | <
|
9645 10879 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9646 10880 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9647 10881 | RestJson<L>,
|
9648 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10882 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9649 10883 | ModelPl::Output
|
9650 10884 | >
|
9651 10885 | >::Output
|
9652 10886 | >,
|
9653 10887 |
|
9654 10888 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9655 10889 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9656 10890 |
|
9657 10891 | {
|
9658 10892 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9659 10893 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9660 - | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_handler(handler);
|
10894 + | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_handler(handler);
|
9661 10895 | let svc = self.model_plugin.apply(svc);
|
9662 10896 | let svc =
|
9663 10897 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9664 10898 | .apply(svc);
|
9665 10899 | let svc = self.http_plugin.apply(svc);
|
9666 - | self.malformed_timestamp_header_date_time_custom(svc)
|
10900 + | self.malformed_timestamp_header_epoch_custom(svc)
|
9667 10901 | }
|
9668 10902 |
|
9669 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
10903 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
9670 10904 | ///
|
9671 10905 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9672 10906 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9673 10907 | ///
|
9674 10908 | /// # Example
|
9675 10909 | ///
|
9676 10910 | /// ```no_run
|
9677 10911 | /// use rest_json::{RestJson, RestJsonConfig};
|
9678 10912 | ///
|
9679 10913 | /// use rest_json::{input, output, error};
|
9680 10914 | ///
|
9681 - | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
10915 + | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
9682 10916 | /// todo!()
|
9683 10917 | /// }
|
9684 10918 | ///
|
9685 10919 | /// let config = RestJsonConfig::builder().build();
|
9686 10920 | /// let svc = ::tower::util::service_fn(handler);
|
9687 10921 | /// let app = RestJson::builder(config)
|
9688 - | /// .malformed_timestamp_header_date_time_service(svc)
|
10922 + | /// .malformed_timestamp_header_epoch_service(svc)
|
9689 10923 | /// /* Set other handlers */
|
9690 10924 | /// .build()
|
9691 10925 | /// .unwrap();
|
9692 10926 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9693 10927 | /// ```
|
9694 10928 | ///
|
9695 - | pub fn malformed_timestamp_header_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10929 + | pub fn malformed_timestamp_header_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9696 10930 | where
|
9697 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDateTime, ServiceExtractors>,
|
10931 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderEpoch, ServiceExtractors>,
|
9698 10932 |
|
9699 10933 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9700 10934 | RestJson<L>,
|
9701 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9702 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDateTime, S>
|
10935 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
10936 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderEpoch, S>
|
9703 10937 | >,
|
9704 10938 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9705 10939 | RestJson<L>,
|
9706 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10940 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9707 10941 | ModelPl::Output
|
9708 10942 | >,
|
9709 10943 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9710 10944 | RestJson<L>,
|
9711 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10945 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9712 10946 | <
|
9713 10947 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9714 10948 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9715 10949 | RestJson<L>,
|
9716 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10950 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9717 10951 | ModelPl::Output
|
9718 10952 | >
|
9719 10953 | >::Output
|
9720 10954 | >,
|
9721 10955 |
|
9722 10956 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9723 10957 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9724 10958 |
|
9725 10959 | {
|
9726 10960 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9727 10961 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9728 - | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_service(service);
|
10962 + | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_service(service);
|
9729 10963 | let svc = self.model_plugin.apply(svc);
|
9730 10964 | let svc =
|
9731 10965 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9732 10966 | .apply(svc);
|
9733 10967 | let svc = self.http_plugin.apply(svc);
|
9734 - | self.malformed_timestamp_header_date_time_custom(svc)
|
10968 + | self.malformed_timestamp_header_epoch_custom(svc)
|
9735 10969 | }
|
9736 10970 |
|
9737 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) to a custom [`Service`](tower::Service).
|
10971 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) to a custom [`Service`](tower::Service).
|
9738 10972 | /// not constrained by the Smithy contract.
|
9739 - | fn malformed_timestamp_header_date_time_custom<S>(mut self, svc: S) -> Self
|
10973 + | fn malformed_timestamp_header_epoch_custom<S>(mut self, svc: S) -> Self
|
9740 10974 | where
|
9741 10975 | S: ::tower::Service<
|
9742 10976 | ::http::Request<Body>,
|
9743 10977 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9744 10978 | Error = ::std::convert::Infallible,
|
9745 10979 | > + Clone
|
9746 10980 | + Send
|
9747 10981 | + 'static,
|
9748 10982 | S::Future: Send + 'static,
|
9749 10983 | {
|
9750 - | self.malformed_timestamp_header_date_time =
|
10984 + | self.malformed_timestamp_header_epoch =
|
9751 10985 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9752 10986 | self
|
9753 10987 | }
|
9754 10988 |
|
9755 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
10989 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
9756 10990 | ///
|
9757 10991 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9758 10992 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9759 10993 | ///
|
9760 10994 | /// # Example
|
9761 10995 | ///
|
9762 10996 | /// ```no_run
|
9763 10997 | /// use rest_json::{RestJson, RestJsonConfig};
|
9764 10998 | ///
|
9765 10999 | /// use rest_json::{input, output, error};
|
9766 11000 | ///
|
9767 - | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
11001 + | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
9768 11002 | /// todo!()
|
9769 11003 | /// }
|
9770 11004 | ///
|
9771 11005 | /// let config = RestJsonConfig::builder().build();
|
9772 11006 | /// let app = RestJson::builder(config)
|
9773 - | /// .malformed_timestamp_header_default(handler)
|
11007 + | /// .malformed_timestamp_path_default(handler)
|
9774 11008 | /// /* Set other handlers */
|
9775 11009 | /// .build()
|
9776 11010 | /// .unwrap();
|
9777 11011 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9778 11012 | /// ```
|
9779 11013 | ///
|
9780 - | pub fn malformed_timestamp_header_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11014 + | pub fn malformed_timestamp_path_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9781 11015 | where
|
9782 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerExtractors>,
|
11016 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathDefault, HandlerExtractors>,
|
9783 11017 |
|
9784 11018 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9785 11019 | RestJson<L>,
|
9786 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9787 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerType>
|
11020 + | crate::operation_shape::MalformedTimestampPathDefault,
|
11021 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathDefault, HandlerType>
|
9788 11022 | >,
|
9789 11023 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9790 11024 | RestJson<L>,
|
9791 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11025 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9792 11026 | ModelPl::Output
|
9793 11027 | >,
|
9794 11028 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9795 11029 | RestJson<L>,
|
9796 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11030 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9797 11031 | <
|
9798 11032 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9799 11033 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9800 11034 | RestJson<L>,
|
9801 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11035 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9802 11036 | ModelPl::Output
|
9803 11037 | >
|
9804 11038 | >::Output
|
9805 11039 | >,
|
9806 11040 |
|
9807 11041 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9808 11042 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9809 11043 |
|
9810 11044 | {
|
9811 11045 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9812 11046 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9813 - | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_handler(handler);
|
11047 + | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_handler(handler);
|
9814 11048 | let svc = self.model_plugin.apply(svc);
|
9815 11049 | let svc =
|
9816 11050 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9817 11051 | .apply(svc);
|
9818 11052 | let svc = self.http_plugin.apply(svc);
|
9819 - | self.malformed_timestamp_header_default_custom(svc)
|
11053 + | self.malformed_timestamp_path_default_custom(svc)
|
9820 11054 | }
|
9821 11055 |
|
9822 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
11056 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
9823 11057 | ///
|
9824 11058 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9825 11059 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9826 11060 | ///
|
9827 11061 | /// # Example
|
9828 11062 | ///
|
9829 11063 | /// ```no_run
|
9830 11064 | /// use rest_json::{RestJson, RestJsonConfig};
|
9831 11065 | ///
|
9832 11066 | /// use rest_json::{input, output, error};
|
9833 11067 | ///
|
9834 - | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
11068 + | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
9835 11069 | /// todo!()
|
9836 11070 | /// }
|
9837 11071 | ///
|
9838 11072 | /// let config = RestJsonConfig::builder().build();
|
9839 11073 | /// let svc = ::tower::util::service_fn(handler);
|
9840 11074 | /// let app = RestJson::builder(config)
|
9841 - | /// .malformed_timestamp_header_default_service(svc)
|
11075 + | /// .malformed_timestamp_path_default_service(svc)
|
9842 11076 | /// /* Set other handlers */
|
9843 11077 | /// .build()
|
9844 11078 | /// .unwrap();
|
9845 11079 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9846 11080 | /// ```
|
9847 11081 | ///
|
9848 - | pub fn malformed_timestamp_header_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11082 + | pub fn malformed_timestamp_path_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9849 11083 | where
|
9850 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDefault, ServiceExtractors>,
|
11084 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathDefault, ServiceExtractors>,
|
9851 11085 |
|
9852 11086 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9853 11087 | RestJson<L>,
|
9854 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9855 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDefault, S>
|
11088 + | crate::operation_shape::MalformedTimestampPathDefault,
|
11089 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathDefault, S>
|
9856 11090 | >,
|
9857 11091 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9858 11092 | RestJson<L>,
|
9859 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11093 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9860 11094 | ModelPl::Output
|
9861 11095 | >,
|
9862 11096 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9863 11097 | RestJson<L>,
|
9864 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11098 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9865 11099 | <
|
9866 11100 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9867 11101 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9868 11102 | RestJson<L>,
|
9869 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
11103 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9870 11104 | ModelPl::Output
|
9871 11105 | >
|
9872 11106 | >::Output
|
9873 11107 | >,
|
9874 11108 |
|
9875 11109 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9876 11110 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9877 11111 |
|
9878 11112 | {
|
9879 11113 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9880 11114 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9881 - | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_service(service);
|
11115 + | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_service(service);
|
9882 11116 | let svc = self.model_plugin.apply(svc);
|
9883 11117 | let svc =
|
9884 11118 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9885 11119 | .apply(svc);
|
9886 11120 | let svc = self.http_plugin.apply(svc);
|
9887 - | self.malformed_timestamp_header_default_custom(svc)
|
11121 + | self.malformed_timestamp_path_default_custom(svc)
|
9888 11122 | }
|
9889 11123 |
|
9890 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) to a custom [`Service`](tower::Service).
|
11124 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) to a custom [`Service`](tower::Service).
|
9891 11125 | /// not constrained by the Smithy contract.
|
9892 - | fn malformed_timestamp_header_default_custom<S>(mut self, svc: S) -> Self
|
11126 + | fn malformed_timestamp_path_default_custom<S>(mut self, svc: S) -> Self
|
9893 11127 | where
|
9894 11128 | S: ::tower::Service<
|
9895 11129 | ::http::Request<Body>,
|
9896 11130 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
9897 11131 | Error = ::std::convert::Infallible,
|
9898 11132 | > + Clone
|
9899 11133 | + Send
|
9900 11134 | + 'static,
|
9901 11135 | S::Future: Send + 'static,
|
9902 11136 | {
|
9903 - | self.malformed_timestamp_header_default =
|
11137 + | self.malformed_timestamp_path_default =
|
9904 11138 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
9905 11139 | self
|
9906 11140 | }
|
9907 11141 |
|
9908 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
11142 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
9909 11143 | ///
|
9910 11144 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9911 11145 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9912 11146 | ///
|
9913 11147 | /// # Example
|
9914 11148 | ///
|
9915 11149 | /// ```no_run
|
9916 11150 | /// use rest_json::{RestJson, RestJsonConfig};
|
9917 11151 | ///
|
9918 11152 | /// use rest_json::{input, output, error};
|
9919 11153 | ///
|
9920 - | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
11154 + | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
9921 11155 | /// todo!()
|
9922 11156 | /// }
|
9923 11157 | ///
|
9924 11158 | /// let config = RestJsonConfig::builder().build();
|
9925 11159 | /// let app = RestJson::builder(config)
|
9926 - | /// .malformed_timestamp_header_epoch(handler)
|
11160 + | /// .malformed_timestamp_path_epoch(handler)
|
9927 11161 | /// /* Set other handlers */
|
9928 11162 | /// .build()
|
9929 11163 | /// .unwrap();
|
9930 11164 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9931 11165 | /// ```
|
9932 11166 | ///
|
9933 - | pub fn malformed_timestamp_header_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11167 + | pub fn malformed_timestamp_path_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9934 11168 | where
|
9935 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerExtractors>,
|
11169 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathEpoch, HandlerExtractors>,
|
9936 11170 |
|
9937 11171 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9938 11172 | RestJson<L>,
|
9939 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9940 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerType>
|
11173 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
11174 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathEpoch, HandlerType>
|
9941 11175 | >,
|
9942 11176 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9943 11177 | RestJson<L>,
|
9944 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11178 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9945 11179 | ModelPl::Output
|
9946 11180 | >,
|
9947 11181 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9948 11182 | RestJson<L>,
|
9949 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11183 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9950 11184 | <
|
9951 11185 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9952 11186 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
9953 11187 | RestJson<L>,
|
9954 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11188 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9955 11189 | ModelPl::Output
|
9956 11190 | >
|
9957 11191 | >::Output
|
9958 11192 | >,
|
9959 11193 |
|
9960 11194 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9961 11195 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
9962 11196 |
|
9963 11197 | {
|
9964 11198 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
9965 11199 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
9966 - | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_handler(handler);
|
11200 + | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_handler(handler);
|
9967 11201 | let svc = self.model_plugin.apply(svc);
|
9968 11202 | let svc =
|
9969 11203 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9970 11204 | .apply(svc);
|
9971 11205 | let svc = self.http_plugin.apply(svc);
|
9972 - | self.malformed_timestamp_header_epoch_custom(svc)
|
11206 + | self.malformed_timestamp_path_epoch_custom(svc)
|
9973 11207 | }
|
9974 11208 |
|
9975 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
11209 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
9976 11210 | ///
|
9977 11211 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
9978 11212 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
9979 11213 | ///
|
9980 11214 | /// # Example
|
9981 11215 | ///
|
9982 11216 | /// ```no_run
|
9983 11217 | /// use rest_json::{RestJson, RestJsonConfig};
|
9984 11218 | ///
|
9985 11219 | /// use rest_json::{input, output, error};
|
9986 11220 | ///
|
9987 - | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
11221 + | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
9988 11222 | /// todo!()
|
9989 11223 | /// }
|
9990 11224 | ///
|
9991 11225 | /// let config = RestJsonConfig::builder().build();
|
9992 11226 | /// let svc = ::tower::util::service_fn(handler);
|
9993 11227 | /// let app = RestJson::builder(config)
|
9994 - | /// .malformed_timestamp_header_epoch_service(svc)
|
11228 + | /// .malformed_timestamp_path_epoch_service(svc)
|
9995 11229 | /// /* Set other handlers */
|
9996 11230 | /// .build()
|
9997 11231 | /// .unwrap();
|
9998 11232 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9999 11233 | /// ```
|
10000 11234 | ///
|
10001 - | pub fn malformed_timestamp_header_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11235 + | pub fn malformed_timestamp_path_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10002 11236 | where
|
10003 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderEpoch, ServiceExtractors>,
|
11237 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathEpoch, ServiceExtractors>,
|
10004 11238 |
|
10005 11239 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10006 11240 | RestJson<L>,
|
10007 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
10008 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderEpoch, S>
|
11241 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
11242 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathEpoch, S>
|
10009 11243 | >,
|
10010 11244 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10011 11245 | RestJson<L>,
|
10012 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11246 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
10013 11247 | ModelPl::Output
|
10014 11248 | >,
|
10015 11249 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10016 11250 | RestJson<L>,
|
10017 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11251 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
10018 11252 | <
|
10019 11253 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10020 11254 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10021 11255 | RestJson<L>,
|
10022 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11256 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
10023 11257 | ModelPl::Output
|
10024 11258 | >
|
10025 11259 | >::Output
|
10026 11260 | >,
|
10027 11261 |
|
10028 11262 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10029 11263 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10030 11264 |
|
10031 11265 | {
|
10032 11266 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10033 11267 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10034 - | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_service(service);
|
11268 + | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_service(service);
|
10035 11269 | let svc = self.model_plugin.apply(svc);
|
10036 11270 | let svc =
|
10037 11271 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10038 11272 | .apply(svc);
|
10039 11273 | let svc = self.http_plugin.apply(svc);
|
10040 - | self.malformed_timestamp_header_epoch_custom(svc)
|
11274 + | self.malformed_timestamp_path_epoch_custom(svc)
|
10041 11275 | }
|
10042 11276 |
|
10043 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) to a custom [`Service`](tower::Service).
|
11277 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) to a custom [`Service`](tower::Service).
|
10044 11278 | /// not constrained by the Smithy contract.
|
10045 - | fn malformed_timestamp_header_epoch_custom<S>(mut self, svc: S) -> Self
|
11279 + | fn malformed_timestamp_path_epoch_custom<S>(mut self, svc: S) -> Self
|
10046 11280 | where
|
10047 11281 | S: ::tower::Service<
|
10048 11282 | ::http::Request<Body>,
|
10049 11283 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10050 11284 | Error = ::std::convert::Infallible,
|
10051 11285 | > + Clone
|
10052 11286 | + Send
|
10053 11287 | + 'static,
|
10054 11288 | S::Future: Send + 'static,
|
10055 11289 | {
|
10056 - | self.malformed_timestamp_header_epoch =
|
11290 + | self.malformed_timestamp_path_epoch =
|
10057 11291 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10058 11292 | self
|
10059 11293 | }
|
10060 11294 |
|
10061 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
11295 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
10062 11296 | ///
|
10063 11297 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10064 11298 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10065 11299 | ///
|
10066 11300 | /// # Example
|
10067 11301 | ///
|
10068 11302 | /// ```no_run
|
10069 11303 | /// use rest_json::{RestJson, RestJsonConfig};
|
10070 11304 | ///
|
10071 11305 | /// use rest_json::{input, output, error};
|
10072 11306 | ///
|
10073 - | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
11307 + | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
10074 11308 | /// todo!()
|
10075 11309 | /// }
|
10076 11310 | ///
|
10077 11311 | /// let config = RestJsonConfig::builder().build();
|
10078 11312 | /// let app = RestJson::builder(config)
|
10079 - | /// .malformed_timestamp_path_default(handler)
|
11313 + | /// .malformed_timestamp_path_http_date(handler)
|
10080 11314 | /// /* Set other handlers */
|
10081 11315 | /// .build()
|
10082 11316 | /// .unwrap();
|
10083 11317 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10084 11318 | /// ```
|
10085 11319 | ///
|
10086 - | pub fn malformed_timestamp_path_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11320 + | pub fn malformed_timestamp_path_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10087 11321 | where
|
10088 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathDefault, HandlerExtractors>,
|
11322 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerExtractors>,
|
10089 11323 |
|
10090 11324 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10091 11325 | RestJson<L>,
|
10092 - | crate::operation_shape::MalformedTimestampPathDefault,
|
10093 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathDefault, HandlerType>
|
11326 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11327 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerType>
|
10094 11328 | >,
|
10095 11329 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10096 11330 | RestJson<L>,
|
10097 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11331 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10098 11332 | ModelPl::Output
|
10099 11333 | >,
|
10100 11334 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10101 11335 | RestJson<L>,
|
10102 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11336 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10103 11337 | <
|
10104 11338 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10105 11339 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10106 11340 | RestJson<L>,
|
10107 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11341 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10108 11342 | ModelPl::Output
|
10109 11343 | >
|
10110 11344 | >::Output
|
10111 11345 | >,
|
10112 11346 |
|
10113 11347 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10114 11348 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10115 11349 |
|
10116 11350 | {
|
10117 11351 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10118 11352 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10119 - | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_handler(handler);
|
11353 + | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_handler(handler);
|
10120 11354 | let svc = self.model_plugin.apply(svc);
|
10121 11355 | let svc =
|
10122 11356 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10123 11357 | .apply(svc);
|
10124 11358 | let svc = self.http_plugin.apply(svc);
|
10125 - | self.malformed_timestamp_path_default_custom(svc)
|
11359 + | self.malformed_timestamp_path_http_date_custom(svc)
|
10126 11360 | }
|
10127 11361 |
|
10128 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
11362 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
10129 11363 | ///
|
10130 11364 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10131 11365 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10132 11366 | ///
|
10133 11367 | /// # Example
|
10134 11368 | ///
|
10135 11369 | /// ```no_run
|
10136 11370 | /// use rest_json::{RestJson, RestJsonConfig};
|
10137 11371 | ///
|
10138 11372 | /// use rest_json::{input, output, error};
|
10139 11373 | ///
|
10140 - | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
11374 + | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
10141 11375 | /// todo!()
|
10142 11376 | /// }
|
10143 11377 | ///
|
10144 11378 | /// let config = RestJsonConfig::builder().build();
|
10145 11379 | /// let svc = ::tower::util::service_fn(handler);
|
10146 11380 | /// let app = RestJson::builder(config)
|
10147 - | /// .malformed_timestamp_path_default_service(svc)
|
11381 + | /// .malformed_timestamp_path_http_date_service(svc)
|
10148 11382 | /// /* Set other handlers */
|
10149 11383 | /// .build()
|
10150 11384 | /// .unwrap();
|
10151 11385 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10152 11386 | /// ```
|
10153 11387 | ///
|
10154 - | pub fn malformed_timestamp_path_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11388 + | pub fn malformed_timestamp_path_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10155 11389 | where
|
10156 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathDefault, ServiceExtractors>,
|
11390 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathHttpDate, ServiceExtractors>,
|
10157 11391 |
|
10158 11392 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10159 11393 | RestJson<L>,
|
10160 - | crate::operation_shape::MalformedTimestampPathDefault,
|
10161 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathDefault, S>
|
11394 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11395 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathHttpDate, S>
|
10162 11396 | >,
|
10163 11397 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10164 11398 | RestJson<L>,
|
10165 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11399 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10166 11400 | ModelPl::Output
|
10167 11401 | >,
|
10168 11402 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10169 11403 | RestJson<L>,
|
10170 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11404 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10171 11405 | <
|
10172 11406 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10173 11407 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10174 11408 | RestJson<L>,
|
10175 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11409 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10176 11410 | ModelPl::Output
|
10177 11411 | >
|
10178 11412 | >::Output
|
10179 11413 | >,
|
10180 11414 |
|
10181 11415 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10182 11416 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10183 11417 |
|
10184 11418 | {
|
10185 11419 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10186 11420 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10187 - | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_service(service);
|
11421 + | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_service(service);
|
10188 11422 | let svc = self.model_plugin.apply(svc);
|
10189 11423 | let svc =
|
10190 11424 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10191 11425 | .apply(svc);
|
10192 11426 | let svc = self.http_plugin.apply(svc);
|
10193 - | self.malformed_timestamp_path_default_custom(svc)
|
11427 + | self.malformed_timestamp_path_http_date_custom(svc)
|
10194 11428 | }
|
10195 11429 |
|
10196 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) to a custom [`Service`](tower::Service).
|
11430 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) to a custom [`Service`](tower::Service).
|
10197 11431 | /// not constrained by the Smithy contract.
|
10198 - | fn malformed_timestamp_path_default_custom<S>(mut self, svc: S) -> Self
|
11432 + | fn malformed_timestamp_path_http_date_custom<S>(mut self, svc: S) -> Self
|
10199 11433 | where
|
10200 11434 | S: ::tower::Service<
|
10201 11435 | ::http::Request<Body>,
|
10202 11436 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10203 11437 | Error = ::std::convert::Infallible,
|
10204 11438 | > + Clone
|
10205 11439 | + Send
|
10206 11440 | + 'static,
|
10207 11441 | S::Future: Send + 'static,
|
10208 11442 | {
|
10209 - | self.malformed_timestamp_path_default =
|
11443 + | self.malformed_timestamp_path_http_date =
|
10210 11444 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10211 11445 | self
|
10212 11446 | }
|
10213 11447 |
|
10214 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
11448 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
10215 11449 | ///
|
10216 11450 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10217 11451 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10218 11452 | ///
|
10219 11453 | /// # Example
|
10220 11454 | ///
|
10221 11455 | /// ```no_run
|
10222 11456 | /// use rest_json::{RestJson, RestJsonConfig};
|
10223 11457 | ///
|
10224 11458 | /// use rest_json::{input, output, error};
|
10225 11459 | ///
|
10226 - | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
11460 + | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
10227 11461 | /// todo!()
|
10228 11462 | /// }
|
10229 11463 | ///
|
10230 11464 | /// let config = RestJsonConfig::builder().build();
|
10231 11465 | /// let app = RestJson::builder(config)
|
10232 - | /// .malformed_timestamp_path_epoch(handler)
|
11466 + | /// .malformed_timestamp_query_default(handler)
|
10233 11467 | /// /* Set other handlers */
|
10234 11468 | /// .build()
|
10235 11469 | /// .unwrap();
|
10236 11470 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10237 11471 | /// ```
|
10238 11472 | ///
|
10239 - | pub fn malformed_timestamp_path_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11473 + | pub fn malformed_timestamp_query_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10240 11474 | where
|
10241 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathEpoch, HandlerExtractors>,
|
11475 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryDefault, HandlerExtractors>,
|
10242 11476 |
|
10243 11477 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10244 11478 | RestJson<L>,
|
10245 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
10246 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathEpoch, HandlerType>
|
11479 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
11480 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryDefault, HandlerType>
|
10247 11481 | >,
|
10248 11482 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10249 11483 | RestJson<L>,
|
10250 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11484 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10251 11485 | ModelPl::Output
|
10252 11486 | >,
|
10253 11487 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10254 11488 | RestJson<L>,
|
10255 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11489 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10256 11490 | <
|
10257 11491 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10258 11492 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10259 11493 | RestJson<L>,
|
10260 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11494 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10261 11495 | ModelPl::Output
|
10262 11496 | >
|
10263 11497 | >::Output
|
10264 11498 | >,
|
10265 11499 |
|
10266 11500 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10267 11501 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10268 11502 |
|
10269 11503 | {
|
10270 11504 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10271 11505 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10272 - | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_handler(handler);
|
11506 + | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_handler(handler);
|
10273 11507 | let svc = self.model_plugin.apply(svc);
|
10274 11508 | let svc =
|
10275 11509 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10276 11510 | .apply(svc);
|
10277 11511 | let svc = self.http_plugin.apply(svc);
|
10278 - | self.malformed_timestamp_path_epoch_custom(svc)
|
11512 + | self.malformed_timestamp_query_default_custom(svc)
|
10279 11513 | }
|
10280 11514 |
|
10281 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
11515 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
10282 11516 | ///
|
10283 11517 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10284 11518 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10285 11519 | ///
|
10286 11520 | /// # Example
|
10287 11521 | ///
|
10288 11522 | /// ```no_run
|
10289 11523 | /// use rest_json::{RestJson, RestJsonConfig};
|
10290 11524 | ///
|
10291 11525 | /// use rest_json::{input, output, error};
|
10292 11526 | ///
|
10293 - | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
11527 + | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
10294 11528 | /// todo!()
|
10295 11529 | /// }
|
10296 11530 | ///
|
10297 11531 | /// let config = RestJsonConfig::builder().build();
|
10298 11532 | /// let svc = ::tower::util::service_fn(handler);
|
10299 11533 | /// let app = RestJson::builder(config)
|
10300 - | /// .malformed_timestamp_path_epoch_service(svc)
|
11534 + | /// .malformed_timestamp_query_default_service(svc)
|
10301 11535 | /// /* Set other handlers */
|
10302 11536 | /// .build()
|
10303 11537 | /// .unwrap();
|
10304 11538 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10305 11539 | /// ```
|
10306 11540 | ///
|
10307 - | pub fn malformed_timestamp_path_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11541 + | pub fn malformed_timestamp_query_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10308 11542 | where
|
10309 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathEpoch, ServiceExtractors>,
|
11543 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryDefault, ServiceExtractors>,
|
10310 11544 |
|
10311 11545 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10312 11546 | RestJson<L>,
|
10313 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
10314 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathEpoch, S>
|
11547 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
11548 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryDefault, S>
|
10315 11549 | >,
|
10316 11550 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10317 11551 | RestJson<L>,
|
10318 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11552 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10319 11553 | ModelPl::Output
|
10320 11554 | >,
|
10321 11555 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10322 11556 | RestJson<L>,
|
10323 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11557 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10324 11558 | <
|
10325 11559 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10326 11560 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10327 11561 | RestJson<L>,
|
10328 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11562 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10329 11563 | ModelPl::Output
|
10330 11564 | >
|
10331 11565 | >::Output
|
10332 11566 | >,
|
10333 11567 |
|
10334 11568 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10335 11569 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10336 11570 |
|
10337 11571 | {
|
10338 11572 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10339 11573 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10340 - | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_service(service);
|
11574 + | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_service(service);
|
10341 11575 | let svc = self.model_plugin.apply(svc);
|
10342 11576 | let svc =
|
10343 11577 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10344 11578 | .apply(svc);
|
10345 11579 | let svc = self.http_plugin.apply(svc);
|
10346 - | self.malformed_timestamp_path_epoch_custom(svc)
|
11580 + | self.malformed_timestamp_query_default_custom(svc)
|
10347 11581 | }
|
10348 11582 |
|
10349 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) to a custom [`Service`](tower::Service).
|
11583 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) to a custom [`Service`](tower::Service).
|
10350 11584 | /// not constrained by the Smithy contract.
|
10351 - | fn malformed_timestamp_path_epoch_custom<S>(mut self, svc: S) -> Self
|
11585 + | fn malformed_timestamp_query_default_custom<S>(mut self, svc: S) -> Self
|
10352 11586 | where
|
10353 11587 | S: ::tower::Service<
|
10354 11588 | ::http::Request<Body>,
|
10355 11589 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10356 11590 | Error = ::std::convert::Infallible,
|
10357 11591 | > + Clone
|
10358 11592 | + Send
|
10359 11593 | + 'static,
|
10360 11594 | S::Future: Send + 'static,
|
10361 11595 | {
|
10362 - | self.malformed_timestamp_path_epoch =
|
11596 + | self.malformed_timestamp_query_default =
|
10363 11597 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10364 11598 | self
|
10365 11599 | }
|
10366 11600 |
|
10367 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
11601 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
10368 11602 | ///
|
10369 11603 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10370 11604 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10371 11605 | ///
|
10372 11606 | /// # Example
|
10373 11607 | ///
|
10374 11608 | /// ```no_run
|
10375 11609 | /// use rest_json::{RestJson, RestJsonConfig};
|
10376 11610 | ///
|
10377 11611 | /// use rest_json::{input, output, error};
|
10378 11612 | ///
|
10379 - | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
11613 + | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
10380 11614 | /// todo!()
|
10381 11615 | /// }
|
10382 11616 | ///
|
10383 11617 | /// let config = RestJsonConfig::builder().build();
|
10384 11618 | /// let app = RestJson::builder(config)
|
10385 - | /// .malformed_timestamp_path_http_date(handler)
|
11619 + | /// .malformed_timestamp_query_epoch(handler)
|
10386 11620 | /// /* Set other handlers */
|
10387 11621 | /// .build()
|
10388 11622 | /// .unwrap();
|
10389 11623 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10390 11624 | /// ```
|
10391 11625 | ///
|
10392 - | pub fn malformed_timestamp_path_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11626 + | pub fn malformed_timestamp_query_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10393 11627 | where
|
10394 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerExtractors>,
|
11628 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerExtractors>,
|
10395 11629 |
|
10396 11630 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10397 11631 | RestJson<L>,
|
10398 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10399 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerType>
|
11632 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11633 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerType>
|
10400 11634 | >,
|
10401 11635 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10402 11636 | RestJson<L>,
|
10403 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11637 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10404 11638 | ModelPl::Output
|
10405 11639 | >,
|
10406 11640 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10407 11641 | RestJson<L>,
|
10408 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11642 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10409 11643 | <
|
10410 11644 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10411 11645 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10412 11646 | RestJson<L>,
|
10413 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11647 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10414 11648 | ModelPl::Output
|
10415 11649 | >
|
10416 11650 | >::Output
|
10417 11651 | >,
|
10418 11652 |
|
10419 11653 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10420 11654 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10421 11655 |
|
10422 11656 | {
|
10423 11657 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10424 11658 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10425 - | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_handler(handler);
|
11659 + | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_handler(handler);
|
10426 11660 | let svc = self.model_plugin.apply(svc);
|
10427 11661 | let svc =
|
10428 11662 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10429 11663 | .apply(svc);
|
10430 11664 | let svc = self.http_plugin.apply(svc);
|
10431 - | self.malformed_timestamp_path_http_date_custom(svc)
|
11665 + | self.malformed_timestamp_query_epoch_custom(svc)
|
10432 11666 | }
|
10433 11667 |
|
10434 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
11668 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
10435 11669 | ///
|
10436 11670 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10437 11671 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10438 11672 | ///
|
10439 11673 | /// # Example
|
10440 11674 | ///
|
10441 11675 | /// ```no_run
|
10442 11676 | /// use rest_json::{RestJson, RestJsonConfig};
|
10443 11677 | ///
|
10444 11678 | /// use rest_json::{input, output, error};
|
10445 11679 | ///
|
10446 - | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
11680 + | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
10447 11681 | /// todo!()
|
10448 11682 | /// }
|
10449 11683 | ///
|
10450 11684 | /// let config = RestJsonConfig::builder().build();
|
10451 11685 | /// let svc = ::tower::util::service_fn(handler);
|
10452 11686 | /// let app = RestJson::builder(config)
|
10453 - | /// .malformed_timestamp_path_http_date_service(svc)
|
11687 + | /// .malformed_timestamp_query_epoch_service(svc)
|
10454 11688 | /// /* Set other handlers */
|
10455 11689 | /// .build()
|
10456 11690 | /// .unwrap();
|
10457 11691 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10458 11692 | /// ```
|
10459 11693 | ///
|
10460 - | pub fn malformed_timestamp_path_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11694 + | pub fn malformed_timestamp_query_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10461 11695 | where
|
10462 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathHttpDate, ServiceExtractors>,
|
11696 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryEpoch, ServiceExtractors>,
|
10463 11697 |
|
10464 11698 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10465 11699 | RestJson<L>,
|
10466 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10467 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathHttpDate, S>
|
11700 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11701 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryEpoch, S>
|
10468 11702 | >,
|
10469 11703 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10470 11704 | RestJson<L>,
|
10471 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11705 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10472 11706 | ModelPl::Output
|
10473 11707 | >,
|
10474 11708 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10475 11709 | RestJson<L>,
|
10476 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11710 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10477 11711 | <
|
10478 11712 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10479 11713 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10480 11714 | RestJson<L>,
|
10481 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11715 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10482 11716 | ModelPl::Output
|
10483 11717 | >
|
10484 11718 | >::Output
|
10485 11719 | >,
|
10486 11720 |
|
10487 11721 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10488 11722 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10489 11723 |
|
10490 11724 | {
|
10491 11725 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10492 11726 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10493 - | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_service(service);
|
11727 + | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_service(service);
|
10494 11728 | let svc = self.model_plugin.apply(svc);
|
10495 11729 | let svc =
|
10496 11730 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10497 11731 | .apply(svc);
|
10498 11732 | let svc = self.http_plugin.apply(svc);
|
10499 - | self.malformed_timestamp_path_http_date_custom(svc)
|
11733 + | self.malformed_timestamp_query_epoch_custom(svc)
|
10500 11734 | }
|
10501 11735 |
|
10502 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) to a custom [`Service`](tower::Service).
|
11736 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) to a custom [`Service`](tower::Service).
|
10503 11737 | /// not constrained by the Smithy contract.
|
10504 - | fn malformed_timestamp_path_http_date_custom<S>(mut self, svc: S) -> Self
|
11738 + | fn malformed_timestamp_query_epoch_custom<S>(mut self, svc: S) -> Self
|
10505 11739 | where
|
10506 11740 | S: ::tower::Service<
|
10507 11741 | ::http::Request<Body>,
|
10508 11742 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10509 11743 | Error = ::std::convert::Infallible,
|
10510 11744 | > + Clone
|
10511 11745 | + Send
|
10512 11746 | + 'static,
|
10513 11747 | S::Future: Send + 'static,
|
10514 11748 | {
|
10515 - | self.malformed_timestamp_path_http_date =
|
11749 + | self.malformed_timestamp_query_epoch =
|
10516 11750 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10517 11751 | self
|
10518 11752 | }
|
10519 11753 |
|
10520 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
11754 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
10521 11755 | ///
|
10522 11756 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10523 11757 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10524 11758 | ///
|
10525 11759 | /// # Example
|
10526 11760 | ///
|
10527 11761 | /// ```no_run
|
10528 11762 | /// use rest_json::{RestJson, RestJsonConfig};
|
10529 11763 | ///
|
10530 11764 | /// use rest_json::{input, output, error};
|
10531 11765 | ///
|
10532 - | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
11766 + | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
10533 11767 | /// todo!()
|
10534 11768 | /// }
|
10535 11769 | ///
|
10536 11770 | /// let config = RestJsonConfig::builder().build();
|
10537 11771 | /// let app = RestJson::builder(config)
|
10538 - | /// .malformed_timestamp_query_default(handler)
|
11772 + | /// .malformed_timestamp_query_http_date(handler)
|
10539 11773 | /// /* Set other handlers */
|
10540 11774 | /// .build()
|
10541 11775 | /// .unwrap();
|
10542 11776 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10543 11777 | /// ```
|
10544 11778 | ///
|
10545 - | pub fn malformed_timestamp_query_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11779 + | pub fn malformed_timestamp_query_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10546 11780 | where
|
10547 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryDefault, HandlerExtractors>,
|
11781 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerExtractors>,
|
10548 11782 |
|
10549 11783 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10550 11784 | RestJson<L>,
|
10551 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
10552 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryDefault, HandlerType>
|
11785 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11786 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerType>
|
10553 11787 | >,
|
10554 11788 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10555 11789 | RestJson<L>,
|
10556 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11790 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10557 11791 | ModelPl::Output
|
10558 11792 | >,
|
10559 11793 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10560 11794 | RestJson<L>,
|
10561 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11795 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10562 11796 | <
|
10563 11797 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10564 11798 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10565 11799 | RestJson<L>,
|
10566 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11800 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10567 11801 | ModelPl::Output
|
10568 11802 | >
|
10569 11803 | >::Output
|
10570 11804 | >,
|
10571 11805 |
|
10572 11806 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10573 11807 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10574 11808 |
|
10575 11809 | {
|
10576 11810 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10577 11811 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10578 - | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_handler(handler);
|
11812 + | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_handler(handler);
|
10579 11813 | let svc = self.model_plugin.apply(svc);
|
10580 11814 | let svc =
|
10581 11815 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10582 11816 | .apply(svc);
|
10583 11817 | let svc = self.http_plugin.apply(svc);
|
10584 - | self.malformed_timestamp_query_default_custom(svc)
|
11818 + | self.malformed_timestamp_query_http_date_custom(svc)
|
10585 11819 | }
|
10586 11820 |
|
10587 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
11821 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
10588 11822 | ///
|
10589 11823 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10590 11824 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10591 11825 | ///
|
10592 11826 | /// # Example
|
10593 11827 | ///
|
10594 11828 | /// ```no_run
|
10595 11829 | /// use rest_json::{RestJson, RestJsonConfig};
|
10596 11830 | ///
|
10597 11831 | /// use rest_json::{input, output, error};
|
10598 11832 | ///
|
10599 - | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
11833 + | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
10600 11834 | /// todo!()
|
10601 11835 | /// }
|
10602 11836 | ///
|
10603 11837 | /// let config = RestJsonConfig::builder().build();
|
10604 11838 | /// let svc = ::tower::util::service_fn(handler);
|
10605 11839 | /// let app = RestJson::builder(config)
|
10606 - | /// .malformed_timestamp_query_default_service(svc)
|
11840 + | /// .malformed_timestamp_query_http_date_service(svc)
|
10607 11841 | /// /* Set other handlers */
|
10608 11842 | /// .build()
|
10609 11843 | /// .unwrap();
|
10610 11844 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10611 11845 | /// ```
|
10612 11846 | ///
|
10613 - | pub fn malformed_timestamp_query_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11847 + | pub fn malformed_timestamp_query_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10614 11848 | where
|
10615 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryDefault, ServiceExtractors>,
|
11849 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryHttpDate, ServiceExtractors>,
|
10616 11850 |
|
10617 11851 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10618 11852 | RestJson<L>,
|
10619 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
10620 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryDefault, S>
|
11853 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11854 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryHttpDate, S>
|
10621 11855 | >,
|
10622 11856 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10623 11857 | RestJson<L>,
|
10624 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11858 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10625 11859 | ModelPl::Output
|
10626 11860 | >,
|
10627 11861 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10628 11862 | RestJson<L>,
|
10629 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11863 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10630 11864 | <
|
10631 11865 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10632 11866 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10633 11867 | RestJson<L>,
|
10634 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11868 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10635 11869 | ModelPl::Output
|
10636 11870 | >
|
10637 11871 | >::Output
|
10638 11872 | >,
|
10639 11873 |
|
10640 11874 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10641 11875 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10642 11876 |
|
10643 11877 | {
|
10644 11878 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10645 11879 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10646 - | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_service(service);
|
11880 + | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_service(service);
|
10647 11881 | let svc = self.model_plugin.apply(svc);
|
10648 11882 | let svc =
|
10649 11883 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10650 11884 | .apply(svc);
|
10651 11885 | let svc = self.http_plugin.apply(svc);
|
10652 - | self.malformed_timestamp_query_default_custom(svc)
|
11886 + | self.malformed_timestamp_query_http_date_custom(svc)
|
10653 11887 | }
|
10654 11888 |
|
10655 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) to a custom [`Service`](tower::Service).
|
11889 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) to a custom [`Service`](tower::Service).
|
10656 11890 | /// not constrained by the Smithy contract.
|
10657 - | fn malformed_timestamp_query_default_custom<S>(mut self, svc: S) -> Self
|
11891 + | fn malformed_timestamp_query_http_date_custom<S>(mut self, svc: S) -> Self
|
10658 11892 | where
|
10659 11893 | S: ::tower::Service<
|
10660 11894 | ::http::Request<Body>,
|
10661 11895 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10662 11896 | Error = ::std::convert::Infallible,
|
10663 11897 | > + Clone
|
10664 11898 | + Send
|
10665 11899 | + 'static,
|
10666 11900 | S::Future: Send + 'static,
|
10667 11901 | {
|
10668 - | self.malformed_timestamp_query_default =
|
11902 + | self.malformed_timestamp_query_http_date =
|
10669 11903 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10670 11904 | self
|
10671 11905 | }
|
10672 11906 |
|
10673 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
11907 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
10674 11908 | ///
|
10675 11909 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10676 11910 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10677 11911 | ///
|
10678 11912 | /// # Example
|
10679 11913 | ///
|
10680 11914 | /// ```no_run
|
10681 11915 | /// use rest_json::{RestJson, RestJsonConfig};
|
10682 11916 | ///
|
10683 11917 | /// use rest_json::{input, output, error};
|
10684 11918 | ///
|
10685 - | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
11919 + | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, error::MalformedUnionError> {
|
10686 11920 | /// todo!()
|
10687 11921 | /// }
|
10688 11922 | ///
|
10689 11923 | /// let config = RestJsonConfig::builder().build();
|
10690 11924 | /// let app = RestJson::builder(config)
|
10691 - | /// .malformed_timestamp_query_epoch(handler)
|
11925 + | /// .malformed_union(handler)
|
10692 11926 | /// /* Set other handlers */
|
10693 11927 | /// .build()
|
10694 11928 | /// .unwrap();
|
10695 11929 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10696 11930 | /// ```
|
10697 11931 | ///
|
10698 - | pub fn malformed_timestamp_query_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11932 + | pub fn malformed_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10699 11933 | where
|
10700 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerExtractors>,
|
11934 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedUnion, HandlerExtractors>,
|
10701 11935 |
|
10702 11936 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10703 11937 | RestJson<L>,
|
10704 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10705 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerType>
|
11938 + | crate::operation_shape::MalformedUnion,
|
11939 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedUnion, HandlerType>
|
10706 11940 | >,
|
10707 11941 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10708 11942 | RestJson<L>,
|
10709 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11943 + | crate::operation_shape::MalformedUnion,
|
10710 11944 | ModelPl::Output
|
10711 11945 | >,
|
10712 11946 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10713 11947 | RestJson<L>,
|
10714 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11948 + | crate::operation_shape::MalformedUnion,
|
10715 11949 | <
|
10716 11950 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10717 11951 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10718 11952 | RestJson<L>,
|
10719 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11953 + | crate::operation_shape::MalformedUnion,
|
10720 11954 | ModelPl::Output
|
10721 11955 | >
|
10722 11956 | >::Output
|
10723 11957 | >,
|
10724 11958 |
|
10725 11959 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10726 11960 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10727 11961 |
|
10728 11962 | {
|
10729 11963 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10730 11964 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10731 - | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_handler(handler);
|
11965 + | let svc = crate::operation_shape::MalformedUnion::from_handler(handler);
|
10732 11966 | let svc = self.model_plugin.apply(svc);
|
10733 11967 | let svc =
|
10734 11968 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10735 11969 | .apply(svc);
|
10736 11970 | let svc = self.http_plugin.apply(svc);
|
10737 - | self.malformed_timestamp_query_epoch_custom(svc)
|
11971 + | self.malformed_union_custom(svc)
|
10738 11972 | }
|
10739 11973 |
|
10740 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
11974 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
10741 11975 | ///
|
10742 11976 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10743 11977 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10744 11978 | ///
|
10745 11979 | /// # Example
|
10746 11980 | ///
|
10747 11981 | /// ```no_run
|
10748 11982 | /// use rest_json::{RestJson, RestJsonConfig};
|
10749 11983 | ///
|
10750 11984 | /// use rest_json::{input, output, error};
|
10751 11985 | ///
|
10752 - | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
11986 + | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, error::MalformedUnionError> {
|
10753 11987 | /// todo!()
|
10754 11988 | /// }
|
10755 11989 | ///
|
10756 11990 | /// let config = RestJsonConfig::builder().build();
|
10757 11991 | /// let svc = ::tower::util::service_fn(handler);
|
10758 11992 | /// let app = RestJson::builder(config)
|
10759 - | /// .malformed_timestamp_query_epoch_service(svc)
|
11993 + | /// .malformed_union_service(svc)
|
10760 11994 | /// /* Set other handlers */
|
10761 11995 | /// .build()
|
10762 11996 | /// .unwrap();
|
10763 11997 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10764 11998 | /// ```
|
10765 11999 | ///
|
10766 - | pub fn malformed_timestamp_query_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12000 + | pub fn malformed_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10767 12001 | where
|
10768 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryEpoch, ServiceExtractors>,
|
12002 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedUnion, ServiceExtractors>,
|
10769 12003 |
|
10770 12004 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10771 12005 | RestJson<L>,
|
10772 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10773 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryEpoch, S>
|
12006 + | crate::operation_shape::MalformedUnion,
|
12007 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedUnion, S>
|
10774 12008 | >,
|
10775 12009 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10776 12010 | RestJson<L>,
|
10777 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
12011 + | crate::operation_shape::MalformedUnion,
|
10778 12012 | ModelPl::Output
|
10779 12013 | >,
|
10780 12014 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10781 12015 | RestJson<L>,
|
10782 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
12016 + | crate::operation_shape::MalformedUnion,
|
10783 12017 | <
|
10784 12018 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10785 12019 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10786 12020 | RestJson<L>,
|
10787 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
12021 + | crate::operation_shape::MalformedUnion,
|
10788 12022 | ModelPl::Output
|
10789 12023 | >
|
10790 12024 | >::Output
|
10791 12025 | >,
|
10792 12026 |
|
10793 12027 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10794 12028 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10795 12029 |
|
10796 12030 | {
|
10797 12031 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10798 12032 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10799 - | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_service(service);
|
12033 + | let svc = crate::operation_shape::MalformedUnion::from_service(service);
|
10800 12034 | let svc = self.model_plugin.apply(svc);
|
10801 12035 | let svc =
|
10802 12036 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10803 12037 | .apply(svc);
|
10804 12038 | let svc = self.http_plugin.apply(svc);
|
10805 - | self.malformed_timestamp_query_epoch_custom(svc)
|
12039 + | self.malformed_union_custom(svc)
|
10806 12040 | }
|
10807 12041 |
|
10808 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) to a custom [`Service`](tower::Service).
|
12042 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) to a custom [`Service`](tower::Service).
|
10809 12043 | /// not constrained by the Smithy contract.
|
10810 - | fn malformed_timestamp_query_epoch_custom<S>(mut self, svc: S) -> Self
|
12044 + | fn malformed_union_custom<S>(mut self, svc: S) -> Self
|
10811 12045 | where
|
10812 12046 | S: ::tower::Service<
|
10813 12047 | ::http::Request<Body>,
|
10814 12048 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10815 12049 | Error = ::std::convert::Infallible,
|
10816 12050 | > + Clone
|
10817 12051 | + Send
|
10818 12052 | + 'static,
|
10819 12053 | S::Future: Send + 'static,
|
10820 12054 | {
|
10821 - | self.malformed_timestamp_query_epoch =
|
10822 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12055 + | self.malformed_union = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10823 12056 | self
|
10824 12057 | }
|
10825 12058 |
|
10826 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
12059 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
10827 12060 | ///
|
10828 12061 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10829 12062 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10830 12063 | ///
|
10831 12064 | /// # Example
|
10832 12065 | ///
|
10833 12066 | /// ```no_run
|
10834 12067 | /// use rest_json::{RestJson, RestJsonConfig};
|
10835 12068 | ///
|
10836 12069 | /// use rest_json::{input, output, error};
|
10837 12070 | ///
|
10838 - | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
12071 + | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, error::MediaTypeHeaderError> {
|
10839 12072 | /// todo!()
|
10840 12073 | /// }
|
10841 12074 | ///
|
10842 12075 | /// let config = RestJsonConfig::builder().build();
|
10843 12076 | /// let app = RestJson::builder(config)
|
10844 - | /// .malformed_timestamp_query_http_date(handler)
|
12077 + | /// .media_type_header(handler)
|
10845 12078 | /// /* Set other handlers */
|
10846 12079 | /// .build()
|
10847 12080 | /// .unwrap();
|
10848 12081 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10849 12082 | /// ```
|
10850 12083 | ///
|
10851 - | pub fn malformed_timestamp_query_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12084 + | pub fn media_type_header<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10852 12085 | where
|
10853 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerExtractors>,
|
12086 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MediaTypeHeader, HandlerExtractors>,
|
10854 12087 |
|
10855 12088 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10856 12089 | RestJson<L>,
|
10857 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10858 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerType>
|
12090 + | crate::operation_shape::MediaTypeHeader,
|
12091 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MediaTypeHeader, HandlerType>
|
10859 12092 | >,
|
10860 12093 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10861 12094 | RestJson<L>,
|
10862 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12095 + | crate::operation_shape::MediaTypeHeader,
|
10863 12096 | ModelPl::Output
|
10864 12097 | >,
|
10865 12098 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10866 12099 | RestJson<L>,
|
10867 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12100 + | crate::operation_shape::MediaTypeHeader,
|
10868 12101 | <
|
10869 12102 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10870 12103 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10871 12104 | RestJson<L>,
|
10872 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12105 + | crate::operation_shape::MediaTypeHeader,
|
10873 12106 | ModelPl::Output
|
10874 12107 | >
|
10875 12108 | >::Output
|
10876 12109 | >,
|
10877 12110 |
|
10878 12111 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10879 12112 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10880 12113 |
|
10881 12114 | {
|
10882 12115 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10883 12116 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10884 - | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_handler(handler);
|
12117 + | let svc = crate::operation_shape::MediaTypeHeader::from_handler(handler);
|
10885 12118 | let svc = self.model_plugin.apply(svc);
|
10886 12119 | let svc =
|
10887 12120 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10888 12121 | .apply(svc);
|
10889 12122 | let svc = self.http_plugin.apply(svc);
|
10890 - | self.malformed_timestamp_query_http_date_custom(svc)
|
12123 + | self.media_type_header_custom(svc)
|
10891 12124 | }
|
10892 12125 |
|
10893 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
12126 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
10894 12127 | ///
|
10895 12128 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10896 12129 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10897 12130 | ///
|
10898 12131 | /// # Example
|
10899 12132 | ///
|
10900 12133 | /// ```no_run
|
10901 12134 | /// use rest_json::{RestJson, RestJsonConfig};
|
10902 12135 | ///
|
10903 12136 | /// use rest_json::{input, output, error};
|
10904 12137 | ///
|
10905 - | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
12138 + | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, error::MediaTypeHeaderError> {
|
10906 12139 | /// todo!()
|
10907 12140 | /// }
|
10908 12141 | ///
|
10909 12142 | /// let config = RestJsonConfig::builder().build();
|
10910 12143 | /// let svc = ::tower::util::service_fn(handler);
|
10911 12144 | /// let app = RestJson::builder(config)
|
10912 - | /// .malformed_timestamp_query_http_date_service(svc)
|
12145 + | /// .media_type_header_service(svc)
|
10913 12146 | /// /* Set other handlers */
|
10914 12147 | /// .build()
|
10915 12148 | /// .unwrap();
|
10916 12149 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10917 12150 | /// ```
|
10918 12151 | ///
|
10919 - | pub fn malformed_timestamp_query_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12152 + | pub fn media_type_header_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10920 12153 | where
|
10921 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryHttpDate, ServiceExtractors>,
|
12154 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MediaTypeHeader, ServiceExtractors>,
|
10922 12155 |
|
10923 12156 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10924 12157 | RestJson<L>,
|
10925 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10926 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryHttpDate, S>
|
12158 + | crate::operation_shape::MediaTypeHeader,
|
12159 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MediaTypeHeader, S>
|
10927 12160 | >,
|
10928 12161 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10929 12162 | RestJson<L>,
|
10930 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12163 + | crate::operation_shape::MediaTypeHeader,
|
10931 12164 | ModelPl::Output
|
10932 12165 | >,
|
10933 12166 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10934 12167 | RestJson<L>,
|
10935 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12168 + | crate::operation_shape::MediaTypeHeader,
|
10936 12169 | <
|
10937 12170 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10938 12171 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
10939 12172 | RestJson<L>,
|
10940 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
12173 + | crate::operation_shape::MediaTypeHeader,
|
10941 12174 | ModelPl::Output
|
10942 12175 | >
|
10943 12176 | >::Output
|
10944 12177 | >,
|
10945 12178 |
|
10946 12179 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10947 12180 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
10948 12181 |
|
10949 12182 | {
|
10950 12183 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
10951 12184 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
10952 - | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_service(service);
|
12185 + | let svc = crate::operation_shape::MediaTypeHeader::from_service(service);
|
10953 12186 | let svc = self.model_plugin.apply(svc);
|
10954 12187 | let svc =
|
10955 12188 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10956 12189 | .apply(svc);
|
10957 12190 | let svc = self.http_plugin.apply(svc);
|
10958 - | self.malformed_timestamp_query_http_date_custom(svc)
|
12191 + | self.media_type_header_custom(svc)
|
10959 12192 | }
|
10960 12193 |
|
10961 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) to a custom [`Service`](tower::Service).
|
12194 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) to a custom [`Service`](tower::Service).
|
10962 12195 | /// not constrained by the Smithy contract.
|
10963 - | fn malformed_timestamp_query_http_date_custom<S>(mut self, svc: S) -> Self
|
12196 + | fn media_type_header_custom<S>(mut self, svc: S) -> Self
|
10964 12197 | where
|
10965 12198 | S: ::tower::Service<
|
10966 12199 | ::http::Request<Body>,
|
10967 12200 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
10968 12201 | Error = ::std::convert::Infallible,
|
10969 12202 | > + Clone
|
10970 12203 | + Send
|
10971 12204 | + 'static,
|
10972 12205 | S::Future: Send + 'static,
|
10973 12206 | {
|
10974 - | self.malformed_timestamp_query_http_date =
|
10975 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12207 + | self.media_type_header = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
10976 12208 | self
|
10977 12209 | }
|
10978 12210 |
|
10979 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
12211 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
10980 12212 | ///
|
10981 12213 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
10982 12214 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
10983 12215 | ///
|
10984 12216 | /// # Example
|
10985 12217 | ///
|
10986 12218 | /// ```no_run
|
10987 12219 | /// use rest_json::{RestJson, RestJsonConfig};
|
10988 12220 | ///
|
10989 12221 | /// use rest_json::{input, output, error};
|
10990 12222 | ///
|
10991 - | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, error::MalformedUnionError> {
|
12223 + | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, error::NoInputAndNoOutputError> {
|
10992 12224 | /// todo!()
|
10993 12225 | /// }
|
10994 12226 | ///
|
10995 12227 | /// let config = RestJsonConfig::builder().build();
|
10996 12228 | /// let app = RestJson::builder(config)
|
10997 - | /// .malformed_union(handler)
|
12229 + | /// .no_input_and_no_output(handler)
|
10998 12230 | /// /* Set other handlers */
|
10999 12231 | /// .build()
|
11000 12232 | /// .unwrap();
|
11001 12233 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11002 12234 | /// ```
|
11003 12235 | ///
|
11004 - | pub fn malformed_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12236 + | pub fn no_input_and_no_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11005 12237 | where
|
11006 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MalformedUnion, HandlerExtractors>,
|
12238 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NoInputAndNoOutput, HandlerExtractors>,
|
11007 12239 |
|
11008 12240 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11009 12241 | RestJson<L>,
|
11010 - | crate::operation_shape::MalformedUnion,
|
11011 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MalformedUnion, HandlerType>
|
12242 + | crate::operation_shape::NoInputAndNoOutput,
|
12243 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NoInputAndNoOutput, HandlerType>
|
11012 12244 | >,
|
11013 12245 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11014 12246 | RestJson<L>,
|
11015 - | crate::operation_shape::MalformedUnion,
|
12247 + | crate::operation_shape::NoInputAndNoOutput,
|
11016 12248 | ModelPl::Output
|
11017 12249 | >,
|
11018 12250 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11019 12251 | RestJson<L>,
|
11020 - | crate::operation_shape::MalformedUnion,
|
12252 + | crate::operation_shape::NoInputAndNoOutput,
|
11021 12253 | <
|
11022 12254 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11023 12255 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11024 12256 | RestJson<L>,
|
11025 - | crate::operation_shape::MalformedUnion,
|
12257 + | crate::operation_shape::NoInputAndNoOutput,
|
11026 12258 | ModelPl::Output
|
11027 12259 | >
|
11028 12260 | >::Output
|
11029 12261 | >,
|
11030 12262 |
|
11031 12263 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11032 12264 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11033 12265 |
|
11034 12266 | {
|
11035 12267 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11036 12268 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11037 - | let svc = crate::operation_shape::MalformedUnion::from_handler(handler);
|
12269 + | let svc = crate::operation_shape::NoInputAndNoOutput::from_handler(handler);
|
11038 12270 | let svc = self.model_plugin.apply(svc);
|
11039 12271 | let svc =
|
11040 12272 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11041 12273 | .apply(svc);
|
11042 12274 | let svc = self.http_plugin.apply(svc);
|
11043 - | self.malformed_union_custom(svc)
|
12275 + | self.no_input_and_no_output_custom(svc)
|
11044 12276 | }
|
11045 12277 |
|
11046 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
12278 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
11047 12279 | ///
|
11048 12280 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11049 12281 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11050 12282 | ///
|
11051 12283 | /// # Example
|
11052 12284 | ///
|
11053 12285 | /// ```no_run
|
11054 12286 | /// use rest_json::{RestJson, RestJsonConfig};
|
11055 12287 | ///
|
11056 12288 | /// use rest_json::{input, output, error};
|
11057 12289 | ///
|
11058 - | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, error::MalformedUnionError> {
|
12290 + | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, error::NoInputAndNoOutputError> {
|
11059 12291 | /// todo!()
|
11060 12292 | /// }
|
11061 12293 | ///
|
11062 12294 | /// let config = RestJsonConfig::builder().build();
|
11063 12295 | /// let svc = ::tower::util::service_fn(handler);
|
11064 12296 | /// let app = RestJson::builder(config)
|
11065 - | /// .malformed_union_service(svc)
|
12297 + | /// .no_input_and_no_output_service(svc)
|
11066 12298 | /// /* Set other handlers */
|
11067 12299 | /// .build()
|
11068 12300 | /// .unwrap();
|
11069 12301 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11070 12302 | /// ```
|
11071 12303 | ///
|
11072 - | pub fn malformed_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12304 + | pub fn no_input_and_no_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11073 12305 | where
|
11074 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MalformedUnion, ServiceExtractors>,
|
12306 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NoInputAndNoOutput, ServiceExtractors>,
|
11075 12307 |
|
11076 12308 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11077 12309 | RestJson<L>,
|
11078 - | crate::operation_shape::MalformedUnion,
|
11079 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MalformedUnion, S>
|
12310 + | crate::operation_shape::NoInputAndNoOutput,
|
12311 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NoInputAndNoOutput, S>
|
11080 12312 | >,
|
11081 12313 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11082 12314 | RestJson<L>,
|
11083 - | crate::operation_shape::MalformedUnion,
|
12315 + | crate::operation_shape::NoInputAndNoOutput,
|
11084 12316 | ModelPl::Output
|
11085 12317 | >,
|
11086 12318 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11087 12319 | RestJson<L>,
|
11088 - | crate::operation_shape::MalformedUnion,
|
12320 + | crate::operation_shape::NoInputAndNoOutput,
|
11089 12321 | <
|
11090 12322 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11091 12323 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11092 12324 | RestJson<L>,
|
11093 - | crate::operation_shape::MalformedUnion,
|
12325 + | crate::operation_shape::NoInputAndNoOutput,
|
11094 12326 | ModelPl::Output
|
11095 12327 | >
|
11096 12328 | >::Output
|
11097 12329 | >,
|
11098 12330 |
|
11099 12331 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11100 12332 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11101 12333 |
|
11102 12334 | {
|
11103 12335 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11104 12336 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11105 - | let svc = crate::operation_shape::MalformedUnion::from_service(service);
|
12337 + | let svc = crate::operation_shape::NoInputAndNoOutput::from_service(service);
|
11106 12338 | let svc = self.model_plugin.apply(svc);
|
11107 12339 | let svc =
|
11108 12340 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11109 12341 | .apply(svc);
|
11110 12342 | let svc = self.http_plugin.apply(svc);
|
11111 - | self.malformed_union_custom(svc)
|
12343 + | self.no_input_and_no_output_custom(svc)
|
11112 12344 | }
|
11113 12345 |
|
11114 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) to a custom [`Service`](tower::Service).
|
12346 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) to a custom [`Service`](tower::Service).
|
11115 12347 | /// not constrained by the Smithy contract.
|
11116 - | fn malformed_union_custom<S>(mut self, svc: S) -> Self
|
12348 + | fn no_input_and_no_output_custom<S>(mut self, svc: S) -> Self
|
11117 12349 | where
|
11118 12350 | S: ::tower::Service<
|
11119 12351 | ::http::Request<Body>,
|
11120 12352 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11121 12353 | Error = ::std::convert::Infallible,
|
11122 12354 | > + Clone
|
11123 12355 | + Send
|
11124 12356 | + 'static,
|
11125 12357 | S::Future: Send + 'static,
|
11126 12358 | {
|
11127 - | self.malformed_union = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12359 + | self.no_input_and_no_output =
|
12360 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11128 12361 | self
|
11129 12362 | }
|
11130 12363 |
|
11131 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
12364 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
11132 12365 | ///
|
11133 12366 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11134 12367 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11135 12368 | ///
|
11136 12369 | /// # Example
|
11137 12370 | ///
|
11138 12371 | /// ```no_run
|
11139 12372 | /// use rest_json::{RestJson, RestJsonConfig};
|
11140 12373 | ///
|
11141 12374 | /// use rest_json::{input, output, error};
|
11142 12375 | ///
|
11143 - | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, error::MediaTypeHeaderError> {
|
12376 + | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, error::NoInputAndOutputError> {
|
11144 12377 | /// todo!()
|
11145 12378 | /// }
|
11146 12379 | ///
|
11147 12380 | /// let config = RestJsonConfig::builder().build();
|
11148 12381 | /// let app = RestJson::builder(config)
|
11149 - | /// .media_type_header(handler)
|
12382 + | /// .no_input_and_output(handler)
|
11150 12383 | /// /* Set other handlers */
|
11151 12384 | /// .build()
|
11152 12385 | /// .unwrap();
|
11153 12386 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11154 12387 | /// ```
|
11155 12388 | ///
|
11156 - | pub fn media_type_header<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12389 + | pub fn no_input_and_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11157 12390 | where
|
11158 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::MediaTypeHeader, HandlerExtractors>,
|
12391 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NoInputAndOutput, HandlerExtractors>,
|
11159 12392 |
|
11160 12393 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11161 12394 | RestJson<L>,
|
11162 - | crate::operation_shape::MediaTypeHeader,
|
11163 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::MediaTypeHeader, HandlerType>
|
12395 + | crate::operation_shape::NoInputAndOutput,
|
12396 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NoInputAndOutput, HandlerType>
|
11164 12397 | >,
|
11165 12398 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11166 12399 | RestJson<L>,
|
11167 - | crate::operation_shape::MediaTypeHeader,
|
12400 + | crate::operation_shape::NoInputAndOutput,
|
11168 12401 | ModelPl::Output
|
11169 12402 | >,
|
11170 12403 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11171 12404 | RestJson<L>,
|
11172 - | crate::operation_shape::MediaTypeHeader,
|
12405 + | crate::operation_shape::NoInputAndOutput,
|
11173 12406 | <
|
11174 12407 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11175 12408 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11176 12409 | RestJson<L>,
|
11177 - | crate::operation_shape::MediaTypeHeader,
|
12410 + | crate::operation_shape::NoInputAndOutput,
|
11178 12411 | ModelPl::Output
|
11179 12412 | >
|
11180 12413 | >::Output
|
11181 12414 | >,
|
11182 12415 |
|
11183 12416 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11184 12417 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11185 12418 |
|
11186 12419 | {
|
11187 12420 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11188 12421 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11189 - | let svc = crate::operation_shape::MediaTypeHeader::from_handler(handler);
|
12422 + | let svc = crate::operation_shape::NoInputAndOutput::from_handler(handler);
|
11190 12423 | let svc = self.model_plugin.apply(svc);
|
11191 12424 | let svc =
|
11192 12425 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11193 12426 | .apply(svc);
|
11194 12427 | let svc = self.http_plugin.apply(svc);
|
11195 - | self.media_type_header_custom(svc)
|
12428 + | self.no_input_and_output_custom(svc)
|
11196 12429 | }
|
11197 12430 |
|
11198 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
12431 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
11199 12432 | ///
|
11200 12433 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11201 12434 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11202 12435 | ///
|
11203 12436 | /// # Example
|
11204 12437 | ///
|
11205 12438 | /// ```no_run
|
11206 12439 | /// use rest_json::{RestJson, RestJsonConfig};
|
11207 12440 | ///
|
11208 12441 | /// use rest_json::{input, output, error};
|
11209 12442 | ///
|
11210 - | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, error::MediaTypeHeaderError> {
|
12443 + | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, error::NoInputAndOutputError> {
|
11211 12444 | /// todo!()
|
11212 12445 | /// }
|
11213 12446 | ///
|
11214 12447 | /// let config = RestJsonConfig::builder().build();
|
11215 12448 | /// let svc = ::tower::util::service_fn(handler);
|
11216 12449 | /// let app = RestJson::builder(config)
|
11217 - | /// .media_type_header_service(svc)
|
12450 + | /// .no_input_and_output_service(svc)
|
11218 12451 | /// /* Set other handlers */
|
11219 12452 | /// .build()
|
11220 12453 | /// .unwrap();
|
11221 12454 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11222 12455 | /// ```
|
11223 12456 | ///
|
11224 - | pub fn media_type_header_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12457 + | pub fn no_input_and_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11225 12458 | where
|
11226 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::MediaTypeHeader, ServiceExtractors>,
|
12459 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NoInputAndOutput, ServiceExtractors>,
|
11227 12460 |
|
11228 12461 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11229 12462 | RestJson<L>,
|
11230 - | crate::operation_shape::MediaTypeHeader,
|
11231 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::MediaTypeHeader, S>
|
12463 + | crate::operation_shape::NoInputAndOutput,
|
12464 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NoInputAndOutput, S>
|
11232 12465 | >,
|
11233 12466 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11234 12467 | RestJson<L>,
|
11235 - | crate::operation_shape::MediaTypeHeader,
|
12468 + | crate::operation_shape::NoInputAndOutput,
|
11236 12469 | ModelPl::Output
|
11237 12470 | >,
|
11238 12471 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11239 12472 | RestJson<L>,
|
11240 - | crate::operation_shape::MediaTypeHeader,
|
12473 + | crate::operation_shape::NoInputAndOutput,
|
11241 12474 | <
|
11242 12475 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11243 12476 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11244 12477 | RestJson<L>,
|
11245 - | crate::operation_shape::MediaTypeHeader,
|
12478 + | crate::operation_shape::NoInputAndOutput,
|
11246 12479 | ModelPl::Output
|
11247 12480 | >
|
11248 12481 | >::Output
|
11249 12482 | >,
|
11250 12483 |
|
11251 12484 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11252 12485 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11253 12486 |
|
11254 12487 | {
|
11255 12488 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11256 12489 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11257 - | let svc = crate::operation_shape::MediaTypeHeader::from_service(service);
|
12490 + | let svc = crate::operation_shape::NoInputAndOutput::from_service(service);
|
11258 12491 | let svc = self.model_plugin.apply(svc);
|
11259 12492 | let svc =
|
11260 12493 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11261 12494 | .apply(svc);
|
11262 12495 | let svc = self.http_plugin.apply(svc);
|
11263 - | self.media_type_header_custom(svc)
|
12496 + | self.no_input_and_output_custom(svc)
|
11264 12497 | }
|
11265 12498 |
|
11266 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) to a custom [`Service`](tower::Service).
|
12499 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) to a custom [`Service`](tower::Service).
|
11267 12500 | /// not constrained by the Smithy contract.
|
11268 - | fn media_type_header_custom<S>(mut self, svc: S) -> Self
|
12501 + | fn no_input_and_output_custom<S>(mut self, svc: S) -> Self
|
11269 12502 | where
|
11270 12503 | S: ::tower::Service<
|
11271 12504 | ::http::Request<Body>,
|
11272 12505 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11273 12506 | Error = ::std::convert::Infallible,
|
11274 12507 | > + Clone
|
11275 12508 | + Send
|
11276 12509 | + 'static,
|
11277 12510 | S::Future: Send + 'static,
|
11278 12511 | {
|
11279 - | self.media_type_header = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12512 + | self.no_input_and_output = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11280 12513 | self
|
11281 12514 | }
|
11282 12515 |
|
11283 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
12516 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
11284 12517 | ///
|
11285 12518 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11286 12519 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11287 12520 | ///
|
11288 12521 | /// # Example
|
11289 12522 | ///
|
11290 12523 | /// ```no_run
|
11291 12524 | /// use rest_json::{RestJson, RestJsonConfig};
|
11292 12525 | ///
|
11293 12526 | /// use rest_json::{input, output, error};
|
11294 12527 | ///
|
11295 - | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, error::NoInputAndNoOutputError> {
|
12528 + | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, error::NullAndEmptyHeadersClientError> {
|
11296 12529 | /// todo!()
|
11297 12530 | /// }
|
11298 12531 | ///
|
11299 12532 | /// let config = RestJsonConfig::builder().build();
|
11300 12533 | /// let app = RestJson::builder(config)
|
11301 - | /// .no_input_and_no_output(handler)
|
12534 + | /// .null_and_empty_headers_client(handler)
|
11302 12535 | /// /* Set other handlers */
|
11303 12536 | /// .build()
|
11304 12537 | /// .unwrap();
|
11305 12538 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11306 12539 | /// ```
|
11307 12540 | ///
|
11308 - | pub fn no_input_and_no_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12541 + | pub fn null_and_empty_headers_client<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11309 12542 | where
|
11310 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NoInputAndNoOutput, HandlerExtractors>,
|
12543 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersClient, HandlerExtractors>,
|
11311 12544 |
|
11312 12545 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11313 12546 | RestJson<L>,
|
11314 - | crate::operation_shape::NoInputAndNoOutput,
|
11315 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NoInputAndNoOutput, HandlerType>
|
12547 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
12548 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersClient, HandlerType>
|
11316 12549 | >,
|
11317 12550 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11318 12551 | RestJson<L>,
|
11319 - | crate::operation_shape::NoInputAndNoOutput,
|
12552 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11320 12553 | ModelPl::Output
|
11321 12554 | >,
|
11322 12555 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11323 12556 | RestJson<L>,
|
11324 - | crate::operation_shape::NoInputAndNoOutput,
|
12557 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11325 12558 | <
|
11326 12559 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11327 12560 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11328 12561 | RestJson<L>,
|
11329 - | crate::operation_shape::NoInputAndNoOutput,
|
12562 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11330 12563 | ModelPl::Output
|
11331 12564 | >
|
11332 12565 | >::Output
|
11333 12566 | >,
|
11334 12567 |
|
11335 12568 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11336 12569 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11337 12570 |
|
11338 12571 | {
|
11339 12572 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11340 12573 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11341 - | let svc = crate::operation_shape::NoInputAndNoOutput::from_handler(handler);
|
12574 + | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_handler(handler);
|
11342 12575 | let svc = self.model_plugin.apply(svc);
|
11343 12576 | let svc =
|
11344 12577 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11345 12578 | .apply(svc);
|
11346 12579 | let svc = self.http_plugin.apply(svc);
|
11347 - | self.no_input_and_no_output_custom(svc)
|
12580 + | self.null_and_empty_headers_client_custom(svc)
|
11348 12581 | }
|
11349 12582 |
|
11350 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
12583 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
11351 12584 | ///
|
11352 12585 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11353 12586 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11354 12587 | ///
|
11355 12588 | /// # Example
|
11356 12589 | ///
|
11357 12590 | /// ```no_run
|
11358 12591 | /// use rest_json::{RestJson, RestJsonConfig};
|
11359 12592 | ///
|
11360 12593 | /// use rest_json::{input, output, error};
|
11361 12594 | ///
|
11362 - | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, error::NoInputAndNoOutputError> {
|
12595 + | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, error::NullAndEmptyHeadersClientError> {
|
11363 12596 | /// todo!()
|
11364 12597 | /// }
|
11365 12598 | ///
|
11366 12599 | /// let config = RestJsonConfig::builder().build();
|
11367 12600 | /// let svc = ::tower::util::service_fn(handler);
|
11368 12601 | /// let app = RestJson::builder(config)
|
11369 - | /// .no_input_and_no_output_service(svc)
|
12602 + | /// .null_and_empty_headers_client_service(svc)
|
11370 12603 | /// /* Set other handlers */
|
11371 12604 | /// .build()
|
11372 12605 | /// .unwrap();
|
11373 12606 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11374 12607 | /// ```
|
11375 12608 | ///
|
11376 - | pub fn no_input_and_no_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12609 + | pub fn null_and_empty_headers_client_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11377 12610 | where
|
11378 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NoInputAndNoOutput, ServiceExtractors>,
|
12611 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersClient, ServiceExtractors>,
|
11379 12612 |
|
11380 12613 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11381 12614 | RestJson<L>,
|
11382 - | crate::operation_shape::NoInputAndNoOutput,
|
11383 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NoInputAndNoOutput, S>
|
12615 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
12616 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersClient, S>
|
11384 12617 | >,
|
11385 12618 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11386 12619 | RestJson<L>,
|
11387 - | crate::operation_shape::NoInputAndNoOutput,
|
12620 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11388 12621 | ModelPl::Output
|
11389 12622 | >,
|
11390 12623 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11391 12624 | RestJson<L>,
|
11392 - | crate::operation_shape::NoInputAndNoOutput,
|
12625 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11393 12626 | <
|
11394 12627 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11395 12628 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11396 12629 | RestJson<L>,
|
11397 - | crate::operation_shape::NoInputAndNoOutput,
|
12630 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11398 12631 | ModelPl::Output
|
11399 12632 | >
|
11400 12633 | >::Output
|
11401 12634 | >,
|
11402 12635 |
|
11403 12636 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11404 12637 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11405 12638 |
|
11406 12639 | {
|
11407 12640 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11408 12641 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11409 - | let svc = crate::operation_shape::NoInputAndNoOutput::from_service(service);
|
12642 + | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_service(service);
|
11410 12643 | let svc = self.model_plugin.apply(svc);
|
11411 12644 | let svc =
|
11412 12645 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11413 12646 | .apply(svc);
|
11414 12647 | let svc = self.http_plugin.apply(svc);
|
11415 - | self.no_input_and_no_output_custom(svc)
|
12648 + | self.null_and_empty_headers_client_custom(svc)
|
11416 12649 | }
|
11417 12650 |
|
11418 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) to a custom [`Service`](tower::Service).
|
12651 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) to a custom [`Service`](tower::Service).
|
11419 12652 | /// not constrained by the Smithy contract.
|
11420 - | fn no_input_and_no_output_custom<S>(mut self, svc: S) -> Self
|
12653 + | fn null_and_empty_headers_client_custom<S>(mut self, svc: S) -> Self
|
11421 12654 | where
|
11422 12655 | S: ::tower::Service<
|
11423 12656 | ::http::Request<Body>,
|
11424 12657 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11425 12658 | Error = ::std::convert::Infallible,
|
11426 12659 | > + Clone
|
11427 12660 | + Send
|
11428 12661 | + 'static,
|
11429 12662 | S::Future: Send + 'static,
|
11430 12663 | {
|
11431 - | self.no_input_and_no_output =
|
12664 + | self.null_and_empty_headers_client =
|
11432 12665 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11433 12666 | self
|
11434 12667 | }
|
11435 12668 |
|
11436 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
12669 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
11437 12670 | ///
|
11438 12671 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11439 12672 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11440 12673 | ///
|
11441 12674 | /// # Example
|
11442 12675 | ///
|
11443 12676 | /// ```no_run
|
11444 12677 | /// use rest_json::{RestJson, RestJsonConfig};
|
11445 12678 | ///
|
11446 12679 | /// use rest_json::{input, output, error};
|
11447 12680 | ///
|
11448 - | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, error::NoInputAndOutputError> {
|
12681 + | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, error::NullAndEmptyHeadersServerError> {
|
11449 12682 | /// todo!()
|
11450 12683 | /// }
|
11451 12684 | ///
|
11452 12685 | /// let config = RestJsonConfig::builder().build();
|
11453 12686 | /// let app = RestJson::builder(config)
|
11454 - | /// .no_input_and_output(handler)
|
12687 + | /// .null_and_empty_headers_server(handler)
|
11455 12688 | /// /* Set other handlers */
|
11456 12689 | /// .build()
|
11457 12690 | /// .unwrap();
|
11458 12691 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11459 12692 | /// ```
|
11460 12693 | ///
|
11461 - | pub fn no_input_and_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12694 + | pub fn null_and_empty_headers_server<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11462 12695 | where
|
11463 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NoInputAndOutput, HandlerExtractors>,
|
12696 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersServer, HandlerExtractors>,
|
11464 12697 |
|
11465 12698 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11466 12699 | RestJson<L>,
|
11467 - | crate::operation_shape::NoInputAndOutput,
|
11468 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NoInputAndOutput, HandlerType>
|
12700 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
12701 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersServer, HandlerType>
|
11469 12702 | >,
|
11470 12703 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11471 12704 | RestJson<L>,
|
11472 - | crate::operation_shape::NoInputAndOutput,
|
12705 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11473 12706 | ModelPl::Output
|
11474 12707 | >,
|
11475 12708 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11476 12709 | RestJson<L>,
|
11477 - | crate::operation_shape::NoInputAndOutput,
|
12710 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11478 12711 | <
|
11479 12712 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11480 12713 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11481 12714 | RestJson<L>,
|
11482 - | crate::operation_shape::NoInputAndOutput,
|
12715 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11483 12716 | ModelPl::Output
|
11484 12717 | >
|
11485 12718 | >::Output
|
11486 12719 | >,
|
11487 12720 |
|
11488 12721 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11489 12722 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11490 12723 |
|
11491 12724 | {
|
11492 12725 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11493 12726 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11494 - | let svc = crate::operation_shape::NoInputAndOutput::from_handler(handler);
|
12727 + | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_handler(handler);
|
11495 12728 | let svc = self.model_plugin.apply(svc);
|
11496 12729 | let svc =
|
11497 12730 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11498 12731 | .apply(svc);
|
11499 12732 | let svc = self.http_plugin.apply(svc);
|
11500 - | self.no_input_and_output_custom(svc)
|
12733 + | self.null_and_empty_headers_server_custom(svc)
|
11501 12734 | }
|
11502 12735 |
|
11503 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
12736 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
11504 12737 | ///
|
11505 12738 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11506 12739 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11507 12740 | ///
|
11508 12741 | /// # Example
|
11509 12742 | ///
|
11510 12743 | /// ```no_run
|
11511 12744 | /// use rest_json::{RestJson, RestJsonConfig};
|
11512 12745 | ///
|
11513 12746 | /// use rest_json::{input, output, error};
|
11514 12747 | ///
|
11515 - | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, error::NoInputAndOutputError> {
|
12748 + | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, error::NullAndEmptyHeadersServerError> {
|
11516 12749 | /// todo!()
|
11517 12750 | /// }
|
11518 12751 | ///
|
11519 12752 | /// let config = RestJsonConfig::builder().build();
|
11520 12753 | /// let svc = ::tower::util::service_fn(handler);
|
11521 12754 | /// let app = RestJson::builder(config)
|
11522 - | /// .no_input_and_output_service(svc)
|
12755 + | /// .null_and_empty_headers_server_service(svc)
|
11523 12756 | /// /* Set other handlers */
|
11524 12757 | /// .build()
|
11525 12758 | /// .unwrap();
|
11526 12759 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11527 12760 | /// ```
|
11528 12761 | ///
|
11529 - | pub fn no_input_and_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12762 + | pub fn null_and_empty_headers_server_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11530 12763 | where
|
11531 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NoInputAndOutput, ServiceExtractors>,
|
12764 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersServer, ServiceExtractors>,
|
11532 12765 |
|
11533 12766 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11534 12767 | RestJson<L>,
|
11535 - | crate::operation_shape::NoInputAndOutput,
|
11536 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NoInputAndOutput, S>
|
12768 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
12769 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersServer, S>
|
11537 12770 | >,
|
11538 12771 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11539 12772 | RestJson<L>,
|
11540 - | crate::operation_shape::NoInputAndOutput,
|
12773 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11541 12774 | ModelPl::Output
|
11542 12775 | >,
|
11543 12776 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11544 12777 | RestJson<L>,
|
11545 - | crate::operation_shape::NoInputAndOutput,
|
12778 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11546 12779 | <
|
11547 12780 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11548 12781 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11549 12782 | RestJson<L>,
|
11550 - | crate::operation_shape::NoInputAndOutput,
|
12783 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11551 12784 | ModelPl::Output
|
11552 12785 | >
|
11553 12786 | >::Output
|
11554 12787 | >,
|
11555 12788 |
|
11556 12789 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11557 12790 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11558 12791 |
|
11559 12792 | {
|
11560 12793 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11561 12794 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11562 - | let svc = crate::operation_shape::NoInputAndOutput::from_service(service);
|
12795 + | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_service(service);
|
11563 12796 | let svc = self.model_plugin.apply(svc);
|
11564 12797 | let svc =
|
11565 12798 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11566 12799 | .apply(svc);
|
11567 12800 | let svc = self.http_plugin.apply(svc);
|
11568 - | self.no_input_and_output_custom(svc)
|
12801 + | self.null_and_empty_headers_server_custom(svc)
|
11569 12802 | }
|
11570 12803 |
|
11571 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) to a custom [`Service`](tower::Service).
|
12804 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) to a custom [`Service`](tower::Service).
|
11572 12805 | /// not constrained by the Smithy contract.
|
11573 - | fn no_input_and_output_custom<S>(mut self, svc: S) -> Self
|
12806 + | fn null_and_empty_headers_server_custom<S>(mut self, svc: S) -> Self
|
11574 12807 | where
|
11575 12808 | S: ::tower::Service<
|
11576 12809 | ::http::Request<Body>,
|
11577 12810 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11578 12811 | Error = ::std::convert::Infallible,
|
11579 12812 | > + Clone
|
11580 12813 | + Send
|
11581 12814 | + 'static,
|
11582 12815 | S::Future: Send + 'static,
|
11583 12816 | {
|
11584 - | self.no_input_and_output = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12817 + | self.null_and_empty_headers_server =
|
12818 + | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11585 12819 | self
|
11586 12820 | }
|
11587 12821 |
|
11588 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
12822 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
11589 12823 | ///
|
11590 12824 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11591 12825 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11592 12826 | ///
|
11593 12827 | /// # Example
|
11594 12828 | ///
|
11595 12829 | /// ```no_run
|
11596 12830 | /// use rest_json::{RestJson, RestJsonConfig};
|
11597 12831 | ///
|
11598 12832 | /// use rest_json::{input, output, error};
|
11599 12833 | ///
|
11600 - | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, error::NullAndEmptyHeadersClientError> {
|
12834 + | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, error::OmitsNullSerializesEmptyStringError> {
|
11601 12835 | /// todo!()
|
11602 12836 | /// }
|
11603 12837 | ///
|
11604 12838 | /// let config = RestJsonConfig::builder().build();
|
11605 12839 | /// let app = RestJson::builder(config)
|
11606 - | /// .null_and_empty_headers_client(handler)
|
12840 + | /// .omits_null_serializes_empty_string(handler)
|
11607 12841 | /// /* Set other handlers */
|
11608 12842 | /// .build()
|
11609 12843 | /// .unwrap();
|
11610 12844 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11611 12845 | /// ```
|
11612 12846 | ///
|
11613 - | pub fn null_and_empty_headers_client<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12847 + | pub fn omits_null_serializes_empty_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11614 12848 | where
|
11615 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersClient, HandlerExtractors>,
|
12849 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerExtractors>,
|
11616 12850 |
|
11617 12851 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11618 12852 | RestJson<L>,
|
11619 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
11620 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersClient, HandlerType>
|
12853 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12854 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerType>
|
11621 12855 | >,
|
11622 12856 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11623 12857 | RestJson<L>,
|
11624 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12858 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11625 12859 | ModelPl::Output
|
11626 12860 | >,
|
11627 12861 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11628 12862 | RestJson<L>,
|
11629 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12863 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11630 12864 | <
|
11631 12865 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11632 12866 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11633 12867 | RestJson<L>,
|
11634 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12868 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11635 12869 | ModelPl::Output
|
11636 12870 | >
|
11637 12871 | >::Output
|
11638 12872 | >,
|
11639 12873 |
|
11640 12874 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11641 12875 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11642 12876 |
|
11643 12877 | {
|
11644 12878 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11645 12879 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11646 - | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_handler(handler);
|
12880 + | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_handler(handler);
|
11647 12881 | let svc = self.model_plugin.apply(svc);
|
11648 12882 | let svc =
|
11649 12883 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11650 12884 | .apply(svc);
|
11651 12885 | let svc = self.http_plugin.apply(svc);
|
11652 - | self.null_and_empty_headers_client_custom(svc)
|
12886 + | self.omits_null_serializes_empty_string_custom(svc)
|
11653 12887 | }
|
11654 12888 |
|
11655 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
12889 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
11656 12890 | ///
|
11657 12891 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11658 12892 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11659 12893 | ///
|
11660 12894 | /// # Example
|
11661 12895 | ///
|
11662 12896 | /// ```no_run
|
11663 12897 | /// use rest_json::{RestJson, RestJsonConfig};
|
11664 12898 | ///
|
11665 12899 | /// use rest_json::{input, output, error};
|
11666 12900 | ///
|
11667 - | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, error::NullAndEmptyHeadersClientError> {
|
12901 + | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, error::OmitsNullSerializesEmptyStringError> {
|
11668 12902 | /// todo!()
|
11669 12903 | /// }
|
11670 12904 | ///
|
11671 12905 | /// let config = RestJsonConfig::builder().build();
|
11672 12906 | /// let svc = ::tower::util::service_fn(handler);
|
11673 12907 | /// let app = RestJson::builder(config)
|
11674 - | /// .null_and_empty_headers_client_service(svc)
|
12908 + | /// .omits_null_serializes_empty_string_service(svc)
|
11675 12909 | /// /* Set other handlers */
|
11676 12910 | /// .build()
|
11677 12911 | /// .unwrap();
|
11678 12912 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11679 12913 | /// ```
|
11680 12914 | ///
|
11681 - | pub fn null_and_empty_headers_client_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12915 + | pub fn omits_null_serializes_empty_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11682 12916 | where
|
11683 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersClient, ServiceExtractors>,
|
12917 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OmitsNullSerializesEmptyString, ServiceExtractors>,
|
11684 12918 |
|
11685 12919 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11686 12920 | RestJson<L>,
|
11687 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
11688 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersClient, S>
|
12921 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12922 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OmitsNullSerializesEmptyString, S>
|
11689 12923 | >,
|
11690 12924 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11691 12925 | RestJson<L>,
|
11692 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12926 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11693 12927 | ModelPl::Output
|
11694 12928 | >,
|
11695 12929 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11696 12930 | RestJson<L>,
|
11697 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12931 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11698 12932 | <
|
11699 12933 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11700 12934 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11701 12935 | RestJson<L>,
|
11702 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12936 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11703 12937 | ModelPl::Output
|
11704 12938 | >
|
11705 12939 | >::Output
|
11706 12940 | >,
|
11707 12941 |
|
11708 12942 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11709 12943 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11710 12944 |
|
11711 12945 | {
|
11712 12946 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11713 12947 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11714 - | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_service(service);
|
12948 + | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_service(service);
|
11715 12949 | let svc = self.model_plugin.apply(svc);
|
11716 12950 | let svc =
|
11717 12951 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11718 12952 | .apply(svc);
|
11719 12953 | let svc = self.http_plugin.apply(svc);
|
11720 - | self.null_and_empty_headers_client_custom(svc)
|
12954 + | self.omits_null_serializes_empty_string_custom(svc)
|
11721 12955 | }
|
11722 12956 |
|
11723 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) to a custom [`Service`](tower::Service).
|
12957 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) to a custom [`Service`](tower::Service).
|
11724 12958 | /// not constrained by the Smithy contract.
|
11725 - | fn null_and_empty_headers_client_custom<S>(mut self, svc: S) -> Self
|
12959 + | fn omits_null_serializes_empty_string_custom<S>(mut self, svc: S) -> Self
|
11726 12960 | where
|
11727 12961 | S: ::tower::Service<
|
11728 12962 | ::http::Request<Body>,
|
11729 12963 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11730 12964 | Error = ::std::convert::Infallible,
|
11731 12965 | > + Clone
|
11732 12966 | + Send
|
11733 12967 | + 'static,
|
11734 12968 | S::Future: Send + 'static,
|
11735 12969 | {
|
11736 - | self.null_and_empty_headers_client =
|
12970 + | self.omits_null_serializes_empty_string =
|
11737 12971 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11738 12972 | self
|
11739 12973 | }
|
11740 12974 |
|
11741 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
12975 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
11742 12976 | ///
|
11743 12977 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11744 12978 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11745 12979 | ///
|
11746 12980 | /// # Example
|
11747 12981 | ///
|
11748 12982 | /// ```no_run
|
11749 12983 | /// use rest_json::{RestJson, RestJsonConfig};
|
11750 12984 | ///
|
11751 12985 | /// use rest_json::{input, output, error};
|
11752 12986 | ///
|
11753 - | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, error::NullAndEmptyHeadersServerError> {
|
12987 + | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
11754 12988 | /// todo!()
|
11755 12989 | /// }
|
11756 12990 | ///
|
11757 12991 | /// let config = RestJsonConfig::builder().build();
|
11758 12992 | /// let app = RestJson::builder(config)
|
11759 - | /// .null_and_empty_headers_server(handler)
|
12993 + | /// .omits_serializing_empty_lists(handler)
|
11760 12994 | /// /* Set other handlers */
|
11761 12995 | /// .build()
|
11762 12996 | /// .unwrap();
|
11763 12997 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11764 12998 | /// ```
|
11765 12999 | ///
|
11766 - | pub fn null_and_empty_headers_server<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13000 + | pub fn omits_serializing_empty_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11767 13001 | where
|
11768 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersServer, HandlerExtractors>,
|
13002 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OmitsSerializingEmptyLists, HandlerExtractors>,
|
11769 13003 |
|
11770 13004 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11771 13005 | RestJson<L>,
|
11772 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
11773 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersServer, HandlerType>
|
13006 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
13007 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OmitsSerializingEmptyLists, HandlerType>
|
11774 13008 | >,
|
11775 13009 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11776 13010 | RestJson<L>,
|
11777 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13011 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11778 13012 | ModelPl::Output
|
11779 13013 | >,
|
11780 13014 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11781 13015 | RestJson<L>,
|
11782 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13016 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11783 13017 | <
|
11784 13018 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11785 13019 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11786 13020 | RestJson<L>,
|
11787 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13021 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11788 13022 | ModelPl::Output
|
11789 13023 | >
|
11790 13024 | >::Output
|
11791 13025 | >,
|
11792 13026 |
|
11793 13027 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11794 13028 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11795 13029 |
|
11796 13030 | {
|
11797 13031 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11798 13032 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11799 - | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_handler(handler);
|
13033 + | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_handler(handler);
|
11800 13034 | let svc = self.model_plugin.apply(svc);
|
11801 13035 | let svc =
|
11802 13036 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11803 13037 | .apply(svc);
|
11804 13038 | let svc = self.http_plugin.apply(svc);
|
11805 - | self.null_and_empty_headers_server_custom(svc)
|
13039 + | self.omits_serializing_empty_lists_custom(svc)
|
11806 13040 | }
|
11807 13041 |
|
11808 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
13042 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
11809 13043 | ///
|
11810 13044 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11811 13045 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11812 13046 | ///
|
11813 13047 | /// # Example
|
11814 13048 | ///
|
11815 13049 | /// ```no_run
|
11816 13050 | /// use rest_json::{RestJson, RestJsonConfig};
|
11817 13051 | ///
|
11818 13052 | /// use rest_json::{input, output, error};
|
11819 13053 | ///
|
11820 - | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, error::NullAndEmptyHeadersServerError> {
|
13054 + | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
11821 13055 | /// todo!()
|
11822 13056 | /// }
|
11823 13057 | ///
|
11824 13058 | /// let config = RestJsonConfig::builder().build();
|
11825 13059 | /// let svc = ::tower::util::service_fn(handler);
|
11826 13060 | /// let app = RestJson::builder(config)
|
11827 - | /// .null_and_empty_headers_server_service(svc)
|
13061 + | /// .omits_serializing_empty_lists_service(svc)
|
11828 13062 | /// /* Set other handlers */
|
11829 13063 | /// .build()
|
11830 13064 | /// .unwrap();
|
11831 13065 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11832 13066 | /// ```
|
11833 13067 | ///
|
11834 - | pub fn null_and_empty_headers_server_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13068 + | pub fn omits_serializing_empty_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11835 13069 | where
|
11836 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersServer, ServiceExtractors>,
|
13070 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OmitsSerializingEmptyLists, ServiceExtractors>,
|
11837 13071 |
|
11838 13072 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11839 13073 | RestJson<L>,
|
11840 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
11841 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersServer, S>
|
13074 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
13075 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OmitsSerializingEmptyLists, S>
|
11842 13076 | >,
|
11843 13077 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11844 13078 | RestJson<L>,
|
11845 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13079 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11846 13080 | ModelPl::Output
|
11847 13081 | >,
|
11848 13082 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11849 13083 | RestJson<L>,
|
11850 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13084 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11851 13085 | <
|
11852 13086 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11853 13087 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11854 13088 | RestJson<L>,
|
11855 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
13089 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11856 13090 | ModelPl::Output
|
11857 13091 | >
|
11858 13092 | >::Output
|
11859 13093 | >,
|
11860 13094 |
|
11861 13095 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11862 13096 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11863 13097 |
|
11864 13098 | {
|
11865 13099 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11866 13100 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11867 - | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_service(service);
|
13101 + | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_service(service);
|
11868 13102 | let svc = self.model_plugin.apply(svc);
|
11869 13103 | let svc =
|
11870 13104 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11871 13105 | .apply(svc);
|
11872 13106 | let svc = self.http_plugin.apply(svc);
|
11873 - | self.null_and_empty_headers_server_custom(svc)
|
13107 + | self.omits_serializing_empty_lists_custom(svc)
|
11874 13108 | }
|
11875 13109 |
|
11876 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) to a custom [`Service`](tower::Service).
|
13110 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) to a custom [`Service`](tower::Service).
|
11877 13111 | /// not constrained by the Smithy contract.
|
11878 - | fn null_and_empty_headers_server_custom<S>(mut self, svc: S) -> Self
|
13112 + | fn omits_serializing_empty_lists_custom<S>(mut self, svc: S) -> Self
|
11879 13113 | where
|
11880 13114 | S: ::tower::Service<
|
11881 13115 | ::http::Request<Body>,
|
11882 13116 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
11883 13117 | Error = ::std::convert::Infallible,
|
11884 13118 | > + Clone
|
11885 13119 | + Send
|
11886 13120 | + 'static,
|
11887 13121 | S::Future: Send + 'static,
|
11888 13122 | {
|
11889 - | self.null_and_empty_headers_server =
|
13123 + | self.omits_serializing_empty_lists =
|
11890 13124 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
11891 13125 | self
|
11892 13126 | }
|
11893 13127 |
|
11894 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
13128 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11895 13129 | ///
|
11896 13130 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11897 13131 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11898 13132 | ///
|
11899 13133 | /// # Example
|
11900 13134 | ///
|
11901 13135 | /// ```no_run
|
11902 13136 | /// use rest_json::{RestJson, RestJsonConfig};
|
11903 13137 | ///
|
11904 13138 | /// use rest_json::{input, output, error};
|
11905 13139 | ///
|
11906 - | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, error::OmitsNullSerializesEmptyStringError> {
|
13140 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11907 13141 | /// todo!()
|
11908 13142 | /// }
|
11909 13143 | ///
|
11910 13144 | /// let config = RestJsonConfig::builder().build();
|
11911 13145 | /// let app = RestJson::builder(config)
|
11912 - | /// .omits_null_serializes_empty_string(handler)
|
13146 + | /// .operation_with_defaults(handler)
|
11913 13147 | /// /* Set other handlers */
|
11914 13148 | /// .build()
|
11915 13149 | /// .unwrap();
|
11916 13150 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11917 13151 | /// ```
|
11918 13152 | ///
|
11919 - | pub fn omits_null_serializes_empty_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13153 + | pub fn operation_with_defaults<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11920 13154 | where
|
11921 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerExtractors>,
|
13155 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OperationWithDefaults, HandlerExtractors>,
|
11922 13156 |
|
11923 13157 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11924 13158 | RestJson<L>,
|
11925 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11926 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerType>
|
13159 + | crate::operation_shape::OperationWithDefaults,
|
13160 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OperationWithDefaults, HandlerType>
|
11927 13161 | >,
|
11928 13162 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11929 13163 | RestJson<L>,
|
11930 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13164 + | crate::operation_shape::OperationWithDefaults,
|
11931 13165 | ModelPl::Output
|
11932 13166 | >,
|
11933 13167 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11934 13168 | RestJson<L>,
|
11935 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13169 + | crate::operation_shape::OperationWithDefaults,
|
11936 13170 | <
|
11937 13171 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11938 13172 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11939 13173 | RestJson<L>,
|
11940 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13174 + | crate::operation_shape::OperationWithDefaults,
|
11941 13175 | ModelPl::Output
|
11942 13176 | >
|
11943 13177 | >::Output
|
11944 13178 | >,
|
11945 13179 |
|
11946 13180 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11947 13181 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
11948 13182 |
|
11949 13183 | {
|
11950 13184 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
11951 13185 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
11952 - | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_handler(handler);
|
13186 + | let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
|
11953 13187 | let svc = self.model_plugin.apply(svc);
|
11954 13188 | let svc =
|
11955 13189 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11956 13190 | .apply(svc);
|
11957 13191 | let svc = self.http_plugin.apply(svc);
|
11958 - | self.omits_null_serializes_empty_string_custom(svc)
|
13192 + | self.operation_with_defaults_custom(svc)
|
11959 13193 | }
|
11960 13194 |
|
11961 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
13195 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11962 13196 | ///
|
11963 13197 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
11964 13198 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
11965 13199 | ///
|
11966 13200 | /// # Example
|
11967 13201 | ///
|
11968 13202 | /// ```no_run
|
11969 13203 | /// use rest_json::{RestJson, RestJsonConfig};
|
11970 13204 | ///
|
11971 13205 | /// use rest_json::{input, output, error};
|
11972 13206 | ///
|
11973 - | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, error::OmitsNullSerializesEmptyStringError> {
|
13207 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11974 13208 | /// todo!()
|
11975 13209 | /// }
|
11976 13210 | ///
|
11977 13211 | /// let config = RestJsonConfig::builder().build();
|
11978 13212 | /// let svc = ::tower::util::service_fn(handler);
|
11979 13213 | /// let app = RestJson::builder(config)
|
11980 - | /// .omits_null_serializes_empty_string_service(svc)
|
13214 + | /// .operation_with_defaults_service(svc)
|
11981 13215 | /// /* Set other handlers */
|
11982 13216 | /// .build()
|
11983 13217 | /// .unwrap();
|
11984 13218 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11985 13219 | /// ```
|
11986 13220 | ///
|
11987 - | pub fn omits_null_serializes_empty_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13221 + | pub fn operation_with_defaults_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11988 13222 | where
|
11989 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OmitsNullSerializesEmptyString, ServiceExtractors>,
|
13223 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OperationWithDefaults, ServiceExtractors>,
|
11990 13224 |
|
11991 13225 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11992 13226 | RestJson<L>,
|
11993 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11994 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OmitsNullSerializesEmptyString, S>
|
13227 + | crate::operation_shape::OperationWithDefaults,
|
13228 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OperationWithDefaults, S>
|
11995 13229 | >,
|
11996 13230 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
11997 13231 | RestJson<L>,
|
11998 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13232 + | crate::operation_shape::OperationWithDefaults,
|
11999 13233 | ModelPl::Output
|
12000 13234 | >,
|
12001 13235 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12002 13236 | RestJson<L>,
|
12003 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13237 + | crate::operation_shape::OperationWithDefaults,
|
12004 13238 | <
|
12005 13239 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12006 13240 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12007 13241 | RestJson<L>,
|
12008 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13242 + | crate::operation_shape::OperationWithDefaults,
|
12009 13243 | ModelPl::Output
|
12010 13244 | >
|
12011 13245 | >::Output
|
12012 13246 | >,
|
12013 13247 |
|
12014 13248 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12015 13249 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12016 13250 |
|
12017 13251 | {
|
12018 13252 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12019 13253 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12020 - | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_service(service);
|
13254 + | let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
|
12021 13255 | let svc = self.model_plugin.apply(svc);
|
12022 13256 | let svc =
|
12023 13257 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12024 13258 | .apply(svc);
|
12025 13259 | let svc = self.http_plugin.apply(svc);
|
12026 - | self.omits_null_serializes_empty_string_custom(svc)
|
13260 + | self.operation_with_defaults_custom(svc)
|
12027 13261 | }
|
12028 13262 |
|
12029 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) to a custom [`Service`](tower::Service).
|
13263 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
|
12030 13264 | /// not constrained by the Smithy contract.
|
12031 - | fn omits_null_serializes_empty_string_custom<S>(mut self, svc: S) -> Self
|
13265 + | fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
|
12032 13266 | where
|
12033 13267 | S: ::tower::Service<
|
12034 13268 | ::http::Request<Body>,
|
12035 13269 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
12036 13270 | Error = ::std::convert::Infallible,
|
12037 13271 | > + Clone
|
12038 13272 | + Send
|
12039 13273 | + 'static,
|
12040 13274 | S::Future: Send + 'static,
|
12041 13275 | {
|
12042 - | self.omits_null_serializes_empty_string =
|
13276 + | self.operation_with_defaults =
|
12043 13277 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12044 13278 | self
|
12045 13279 | }
|
12046 13280 |
|
12047 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
13281 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
12048 13282 | ///
|
12049 13283 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12050 13284 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12051 13285 | ///
|
12052 13286 | /// # Example
|
12053 13287 | ///
|
12054 13288 | /// ```no_run
|
12055 13289 | /// use rest_json::{RestJson, RestJsonConfig};
|
12056 13290 | ///
|
12057 13291 | /// use rest_json::{input, output, error};
|
12058 13292 | ///
|
12059 - | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
13293 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
12060 13294 | /// todo!()
|
12061 13295 | /// }
|
12062 13296 | ///
|
12063 13297 | /// let config = RestJsonConfig::builder().build();
|
12064 13298 | /// let app = RestJson::builder(config)
|
12065 - | /// .omits_serializing_empty_lists(handler)
|
13299 + | /// .operation_with_nested_structure(handler)
|
12066 13300 | /// /* Set other handlers */
|
12067 13301 | /// .build()
|
12068 13302 | /// .unwrap();
|
12069 13303 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12070 13304 | /// ```
|
12071 13305 | ///
|
12072 - | pub fn omits_serializing_empty_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13306 + | pub fn operation_with_nested_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12073 13307 | where
|
12074 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OmitsSerializingEmptyLists, HandlerExtractors>,
|
13308 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OperationWithNestedStructure, HandlerExtractors>,
|
12075 13309 |
|
12076 13310 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12077 13311 | RestJson<L>,
|
12078 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
12079 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OmitsSerializingEmptyLists, HandlerType>
|
13312 + | crate::operation_shape::OperationWithNestedStructure,
|
13313 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OperationWithNestedStructure, HandlerType>
|
12080 13314 | >,
|
12081 13315 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12082 13316 | RestJson<L>,
|
12083 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13317 + | crate::operation_shape::OperationWithNestedStructure,
|
12084 13318 | ModelPl::Output
|
12085 13319 | >,
|
12086 13320 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12087 13321 | RestJson<L>,
|
12088 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13322 + | crate::operation_shape::OperationWithNestedStructure,
|
12089 13323 | <
|
12090 13324 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12091 13325 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12092 13326 | RestJson<L>,
|
12093 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13327 + | crate::operation_shape::OperationWithNestedStructure,
|
12094 13328 | ModelPl::Output
|
12095 13329 | >
|
12096 13330 | >::Output
|
12097 13331 | >,
|
12098 13332 |
|
12099 13333 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12100 13334 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12101 13335 |
|
12102 13336 | {
|
12103 13337 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12104 13338 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12105 - | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_handler(handler);
|
13339 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_handler(handler);
|
12106 13340 | let svc = self.model_plugin.apply(svc);
|
12107 13341 | let svc =
|
12108 13342 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12109 13343 | .apply(svc);
|
12110 13344 | let svc = self.http_plugin.apply(svc);
|
12111 - | self.omits_serializing_empty_lists_custom(svc)
|
13345 + | self.operation_with_nested_structure_custom(svc)
|
12112 13346 | }
|
12113 13347 |
|
12114 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
13348 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
12115 13349 | ///
|
12116 13350 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12117 13351 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12118 13352 | ///
|
12119 13353 | /// # Example
|
12120 13354 | ///
|
12121 13355 | /// ```no_run
|
12122 13356 | /// use rest_json::{RestJson, RestJsonConfig};
|
12123 13357 | ///
|
12124 13358 | /// use rest_json::{input, output, error};
|
12125 13359 | ///
|
12126 - | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
13360 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
12127 13361 | /// todo!()
|
12128 13362 | /// }
|
12129 13363 | ///
|
12130 13364 | /// let config = RestJsonConfig::builder().build();
|
12131 13365 | /// let svc = ::tower::util::service_fn(handler);
|
12132 13366 | /// let app = RestJson::builder(config)
|
12133 - | /// .omits_serializing_empty_lists_service(svc)
|
13367 + | /// .operation_with_nested_structure_service(svc)
|
12134 13368 | /// /* Set other handlers */
|
12135 13369 | /// .build()
|
12136 13370 | /// .unwrap();
|
12137 13371 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12138 13372 | /// ```
|
12139 13373 | ///
|
12140 - | pub fn omits_serializing_empty_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13374 + | pub fn operation_with_nested_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12141 13375 | where
|
12142 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OmitsSerializingEmptyLists, ServiceExtractors>,
|
13376 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OperationWithNestedStructure, ServiceExtractors>,
|
12143 13377 |
|
12144 13378 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12145 13379 | RestJson<L>,
|
12146 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
12147 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OmitsSerializingEmptyLists, S>
|
13380 + | crate::operation_shape::OperationWithNestedStructure,
|
13381 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OperationWithNestedStructure, S>
|
12148 13382 | >,
|
12149 13383 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12150 13384 | RestJson<L>,
|
12151 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13385 + | crate::operation_shape::OperationWithNestedStructure,
|
12152 13386 | ModelPl::Output
|
12153 13387 | >,
|
12154 13388 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12155 13389 | RestJson<L>,
|
12156 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13390 + | crate::operation_shape::OperationWithNestedStructure,
|
12157 13391 | <
|
12158 13392 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12159 13393 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12160 13394 | RestJson<L>,
|
12161 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13395 + | crate::operation_shape::OperationWithNestedStructure,
|
12162 13396 | ModelPl::Output
|
12163 13397 | >
|
12164 13398 | >::Output
|
12165 13399 | >,
|
12166 13400 |
|
12167 13401 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12168 13402 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12169 13403 |
|
12170 13404 | {
|
12171 13405 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12172 13406 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12173 - | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_service(service);
|
13407 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_service(service);
|
12174 13408 | let svc = self.model_plugin.apply(svc);
|
12175 13409 | let svc =
|
12176 13410 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12177 13411 | .apply(svc);
|
12178 13412 | let svc = self.http_plugin.apply(svc);
|
12179 - | self.omits_serializing_empty_lists_custom(svc)
|
13413 + | self.operation_with_nested_structure_custom(svc)
|
12180 13414 | }
|
12181 13415 |
|
12182 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) to a custom [`Service`](tower::Service).
|
13416 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) to a custom [`Service`](tower::Service).
|
12183 13417 | /// not constrained by the Smithy contract.
|
12184 - | fn omits_serializing_empty_lists_custom<S>(mut self, svc: S) -> Self
|
13418 + | fn operation_with_nested_structure_custom<S>(mut self, svc: S) -> Self
|
12185 13419 | where
|
12186 13420 | S: ::tower::Service<
|
12187 13421 | ::http::Request<Body>,
|
12188 13422 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
12189 13423 | Error = ::std::convert::Infallible,
|
12190 13424 | > + Clone
|
12191 13425 | + Send
|
12192 13426 | + 'static,
|
12193 13427 | S::Future: Send + 'static,
|
12194 13428 | {
|
12195 - | self.omits_serializing_empty_lists =
|
13429 + | self.operation_with_nested_structure =
|
12196 13430 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12197 13431 | self
|
12198 13432 | }
|
12199 13433 |
|
12200 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
13434 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) operation.
|
12201 13435 | ///
|
12202 13436 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12203 13437 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12204 13438 | ///
|
12205 13439 | /// # Example
|
12206 13440 | ///
|
12207 13441 | /// ```no_run
|
12208 13442 | /// use rest_json::{RestJson, RestJsonConfig};
|
12209 13443 | ///
|
12210 13444 | /// use rest_json::{input, output, error};
|
12211 13445 | ///
|
12212 - | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
13446 + | /// async fn handler(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
|
12213 13447 | /// todo!()
|
12214 13448 | /// }
|
12215 13449 | ///
|
12216 13450 | /// let config = RestJsonConfig::builder().build();
|
12217 13451 | /// let app = RestJson::builder(config)
|
12218 - | /// .operation_with_defaults(handler)
|
13452 + | /// .output_stream(handler)
|
12219 13453 | /// /* Set other handlers */
|
12220 13454 | /// .build()
|
12221 13455 | /// .unwrap();
|
12222 13456 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12223 13457 | /// ```
|
12224 13458 | ///
|
12225 - | pub fn operation_with_defaults<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13459 + | pub fn output_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12226 13460 | where
|
12227 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OperationWithDefaults, HandlerExtractors>,
|
13461 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OutputStream, HandlerExtractors>,
|
12228 13462 |
|
12229 13463 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12230 13464 | RestJson<L>,
|
12231 - | crate::operation_shape::OperationWithDefaults,
|
12232 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OperationWithDefaults, HandlerType>
|
13465 + | crate::operation_shape::OutputStream,
|
13466 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OutputStream, HandlerType>
|
12233 13467 | >,
|
12234 13468 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12235 13469 | RestJson<L>,
|
12236 - | crate::operation_shape::OperationWithDefaults,
|
13470 + | crate::operation_shape::OutputStream,
|
12237 13471 | ModelPl::Output
|
12238 13472 | >,
|
12239 13473 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12240 13474 | RestJson<L>,
|
12241 - | crate::operation_shape::OperationWithDefaults,
|
13475 + | crate::operation_shape::OutputStream,
|
12242 13476 | <
|
12243 13477 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12244 13478 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12245 13479 | RestJson<L>,
|
12246 - | crate::operation_shape::OperationWithDefaults,
|
13480 + | crate::operation_shape::OutputStream,
|
12247 13481 | ModelPl::Output
|
12248 13482 | >
|
12249 13483 | >::Output
|
12250 13484 | >,
|
12251 13485 |
|
12252 13486 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12253 13487 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12254 13488 |
|
12255 13489 | {
|
12256 13490 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12257 13491 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12258 - | let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
|
13492 + | let svc = crate::operation_shape::OutputStream::from_handler(handler);
|
12259 13493 | let svc = self.model_plugin.apply(svc);
|
12260 13494 | let svc =
|
12261 13495 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12262 13496 | .apply(svc);
|
12263 13497 | let svc = self.http_plugin.apply(svc);
|
12264 - | self.operation_with_defaults_custom(svc)
|
13498 + | self.output_stream_custom(svc)
|
12265 13499 | }
|
12266 13500 |
|
12267 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
13501 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) operation.
|
12268 13502 | ///
|
12269 13503 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12270 13504 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12271 13505 | ///
|
12272 13506 | /// # Example
|
12273 13507 | ///
|
12274 13508 | /// ```no_run
|
12275 13509 | /// use rest_json::{RestJson, RestJsonConfig};
|
12276 13510 | ///
|
12277 13511 | /// use rest_json::{input, output, error};
|
12278 13512 | ///
|
12279 - | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
13513 + | /// async fn handler(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
|
12280 13514 | /// todo!()
|
12281 13515 | /// }
|
12282 13516 | ///
|
12283 13517 | /// let config = RestJsonConfig::builder().build();
|
12284 13518 | /// let svc = ::tower::util::service_fn(handler);
|
12285 13519 | /// let app = RestJson::builder(config)
|
12286 - | /// .operation_with_defaults_service(svc)
|
13520 + | /// .output_stream_service(svc)
|
12287 13521 | /// /* Set other handlers */
|
12288 13522 | /// .build()
|
12289 13523 | /// .unwrap();
|
12290 13524 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12291 13525 | /// ```
|
12292 13526 | ///
|
12293 - | pub fn operation_with_defaults_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13527 + | pub fn output_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12294 13528 | where
|
12295 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OperationWithDefaults, ServiceExtractors>,
|
13529 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OutputStream, ServiceExtractors>,
|
12296 13530 |
|
12297 13531 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12298 13532 | RestJson<L>,
|
12299 - | crate::operation_shape::OperationWithDefaults,
|
12300 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OperationWithDefaults, S>
|
13533 + | crate::operation_shape::OutputStream,
|
13534 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OutputStream, S>
|
12301 13535 | >,
|
12302 13536 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12303 13537 | RestJson<L>,
|
12304 - | crate::operation_shape::OperationWithDefaults,
|
13538 + | crate::operation_shape::OutputStream,
|
12305 13539 | ModelPl::Output
|
12306 13540 | >,
|
12307 13541 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12308 13542 | RestJson<L>,
|
12309 - | crate::operation_shape::OperationWithDefaults,
|
13543 + | crate::operation_shape::OutputStream,
|
12310 13544 | <
|
12311 13545 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12312 13546 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12313 13547 | RestJson<L>,
|
12314 - | crate::operation_shape::OperationWithDefaults,
|
13548 + | crate::operation_shape::OutputStream,
|
12315 13549 | ModelPl::Output
|
12316 13550 | >
|
12317 13551 | >::Output
|
12318 13552 | >,
|
12319 13553 |
|
12320 13554 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12321 13555 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12322 13556 |
|
12323 13557 | {
|
12324 13558 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12325 13559 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12326 - | let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
|
13560 + | let svc = crate::operation_shape::OutputStream::from_service(service);
|
12327 13561 | let svc = self.model_plugin.apply(svc);
|
12328 13562 | let svc =
|
12329 13563 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12330 13564 | .apply(svc);
|
12331 13565 | let svc = self.http_plugin.apply(svc);
|
12332 - | self.operation_with_defaults_custom(svc)
|
13566 + | self.output_stream_custom(svc)
|
12333 13567 | }
|
12334 13568 |
|
12335 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
|
13569 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) to a custom [`Service`](tower::Service).
|
12336 13570 | /// not constrained by the Smithy contract.
|
12337 - | fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
|
13571 + | fn output_stream_custom<S>(mut self, svc: S) -> Self
|
12338 13572 | where
|
12339 13573 | S: ::tower::Service<
|
12340 13574 | ::http::Request<Body>,
|
12341 13575 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
12342 13576 | Error = ::std::convert::Infallible,
|
12343 13577 | > + Clone
|
12344 13578 | + Send
|
12345 13579 | + 'static,
|
12346 13580 | S::Future: Send + 'static,
|
12347 13581 | {
|
12348 - | self.operation_with_defaults =
|
12349 - | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
13582 + | self.output_stream = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12350 13583 | self
|
12351 13584 | }
|
12352 13585 |
|
12353 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
13586 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) operation.
|
12354 13587 | ///
|
12355 13588 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12356 13589 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12357 13590 | ///
|
12358 13591 | /// # Example
|
12359 13592 | ///
|
12360 13593 | /// ```no_run
|
12361 13594 | /// use rest_json::{RestJson, RestJsonConfig};
|
12362 13595 | ///
|
12363 13596 | /// use rest_json::{input, output, error};
|
12364 13597 | ///
|
12365 - | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
13598 + | /// async fn handler(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
|
12366 13599 | /// todo!()
|
12367 13600 | /// }
|
12368 13601 | ///
|
12369 13602 | /// let config = RestJsonConfig::builder().build();
|
12370 13603 | /// let app = RestJson::builder(config)
|
12371 - | /// .operation_with_nested_structure(handler)
|
13604 + | /// .output_stream_with_initial_response(handler)
|
12372 13605 | /// /* Set other handlers */
|
12373 13606 | /// .build()
|
12374 13607 | /// .unwrap();
|
12375 13608 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12376 13609 | /// ```
|
12377 13610 | ///
|
12378 - | pub fn operation_with_nested_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13611 + | pub fn output_stream_with_initial_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12379 13612 | where
|
12380 - | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OperationWithNestedStructure, HandlerExtractors>,
|
13613 + | HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::OutputStreamWithInitialResponse, HandlerExtractors>,
|
12381 13614 |
|
12382 13615 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12383 13616 | RestJson<L>,
|
12384 - | crate::operation_shape::OperationWithNestedStructure,
|
12385 - | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OperationWithNestedStructure, HandlerType>
|
13617 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
13618 + | ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::OutputStreamWithInitialResponse, HandlerType>
|
12386 13619 | >,
|
12387 13620 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12388 13621 | RestJson<L>,
|
12389 - | crate::operation_shape::OperationWithNestedStructure,
|
13622 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12390 13623 | ModelPl::Output
|
12391 13624 | >,
|
12392 13625 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12393 13626 | RestJson<L>,
|
12394 - | crate::operation_shape::OperationWithNestedStructure,
|
13627 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12395 13628 | <
|
12396 13629 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12397 13630 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12398 13631 | RestJson<L>,
|
12399 - | crate::operation_shape::OperationWithNestedStructure,
|
13632 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12400 13633 | ModelPl::Output
|
12401 13634 | >
|
12402 13635 | >::Output
|
12403 13636 | >,
|
12404 13637 |
|
12405 13638 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12406 13639 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12407 13640 |
|
12408 13641 | {
|
12409 13642 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12410 13643 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12411 - | let svc = crate::operation_shape::OperationWithNestedStructure::from_handler(handler);
|
13644 + | let svc = crate::operation_shape::OutputStreamWithInitialResponse::from_handler(handler);
|
12412 13645 | let svc = self.model_plugin.apply(svc);
|
12413 13646 | let svc =
|
12414 13647 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12415 13648 | .apply(svc);
|
12416 13649 | let svc = self.http_plugin.apply(svc);
|
12417 - | self.operation_with_nested_structure_custom(svc)
|
13650 + | self.output_stream_with_initial_response_custom(svc)
|
12418 13651 | }
|
12419 13652 |
|
12420 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
13653 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) operation.
|
12421 13654 | ///
|
12422 13655 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12423 13656 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12424 13657 | ///
|
12425 13658 | /// # Example
|
12426 13659 | ///
|
12427 13660 | /// ```no_run
|
12428 13661 | /// use rest_json::{RestJson, RestJsonConfig};
|
12429 13662 | ///
|
12430 13663 | /// use rest_json::{input, output, error};
|
12431 13664 | ///
|
12432 - | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
13665 + | /// async fn handler(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
|
12433 13666 | /// todo!()
|
12434 13667 | /// }
|
12435 13668 | ///
|
12436 13669 | /// let config = RestJsonConfig::builder().build();
|
12437 13670 | /// let svc = ::tower::util::service_fn(handler);
|
12438 13671 | /// let app = RestJson::builder(config)
|
12439 - | /// .operation_with_nested_structure_service(svc)
|
13672 + | /// .output_stream_with_initial_response_service(svc)
|
12440 13673 | /// /* Set other handlers */
|
12441 13674 | /// .build()
|
12442 13675 | /// .unwrap();
|
12443 13676 | /// # let app: RestJson<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12444 13677 | /// ```
|
12445 13678 | ///
|
12446 - | pub fn operation_with_nested_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13679 + | pub fn output_stream_with_initial_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12447 13680 | where
|
12448 - | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OperationWithNestedStructure, ServiceExtractors>,
|
13681 + | S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::OutputStreamWithInitialResponse, ServiceExtractors>,
|
12449 13682 |
|
12450 13683 | ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12451 13684 | RestJson<L>,
|
12452 - | crate::operation_shape::OperationWithNestedStructure,
|
12453 - | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OperationWithNestedStructure, S>
|
13685 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
13686 + | ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::OutputStreamWithInitialResponse, S>
|
12454 13687 | >,
|
12455 13688 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12456 13689 | RestJson<L>,
|
12457 - | crate::operation_shape::OperationWithNestedStructure,
|
13690 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12458 13691 | ModelPl::Output
|
12459 13692 | >,
|
12460 13693 | HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12461 13694 | RestJson<L>,
|
12462 - | crate::operation_shape::OperationWithNestedStructure,
|
13695 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12463 13696 | <
|
12464 13697 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12465 13698 | as ::aws_smithy_legacy_http_server::plugin::Plugin<
|
12466 13699 | RestJson<L>,
|
12467 - | crate::operation_shape::OperationWithNestedStructure,
|
13700 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12468 13701 | ModelPl::Output
|
12469 13702 | >
|
12470 13703 | >::Output
|
12471 13704 | >,
|
12472 13705 |
|
12473 13706 | HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12474 13707 | <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
|
12475 13708 |
|
12476 13709 | {
|
12477 13710 | use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
|
12478 13711 | use ::aws_smithy_legacy_http_server::plugin::Plugin;
|
12479 - | let svc = crate::operation_shape::OperationWithNestedStructure::from_service(service);
|
13712 + | let svc = crate::operation_shape::OutputStreamWithInitialResponse::from_service(service);
|
12480 13713 | let svc = self.model_plugin.apply(svc);
|
12481 13714 | let svc =
|
12482 13715 | ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12483 13716 | .apply(svc);
|
12484 13717 | let svc = self.http_plugin.apply(svc);
|
12485 - | self.operation_with_nested_structure_custom(svc)
|
13718 + | self.output_stream_with_initial_response_custom(svc)
|
12486 13719 | }
|
12487 13720 |
|
12488 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) to a custom [`Service`](tower::Service).
|
13721 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) to a custom [`Service`](tower::Service).
|
12489 13722 | /// not constrained by the Smithy contract.
|
12490 - | fn operation_with_nested_structure_custom<S>(mut self, svc: S) -> Self
|
13723 + | fn output_stream_with_initial_response_custom<S>(mut self, svc: S) -> Self
|
12491 13724 | where
|
12492 13725 | S: ::tower::Service<
|
12493 13726 | ::http::Request<Body>,
|
12494 13727 | Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
|
12495 13728 | Error = ::std::convert::Infallible,
|
12496 13729 | > + Clone
|
12497 13730 | + Send
|
12498 13731 | + 'static,
|
12499 13732 | S::Future: Send + 'static,
|
12500 13733 | {
|
12501 - | self.operation_with_nested_structure =
|
13734 + | self.output_stream_with_initial_response =
|
12502 13735 | Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
|
12503 13736 | self
|
12504 13737 | }
|
12505 13738 |
|
12506 13739 | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
12507 13740 | ///
|
12508 13741 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
|
12509 13742 | /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
|
12510 13743 | ///
|
12511 13744 | /// # Example
|