AWS SDK

AWS SDK

rev. dc1b11a614d928cff165eac12e20d37ae979d6cc

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-types/src/document.rs

@@ -202,202 +261,273 @@
  222    222   
        Document::Number(Number::Float(value))
  223    223   
    }
  224    224   
}
  225    225   
  226    226   
impl From<Number> for Document {
  227    227   
    fn from(value: Number) -> Self {
  228    228   
        Document::Number(value)
  229    229   
    }
  230    230   
}
  231    231   
         232  +
impl<T> From<Option<T>> for Document
         233  +
where
         234  +
    Document: From<T>,
         235  +
{
         236  +
    fn from(value: Option<T>) -> Self {
         237  +
        match value {
         238  +
            Some(inner) => inner.into(),
         239  +
            None => Document::Null,
         240  +
        }
         241  +
    }
         242  +
}
         243  +
  232    244   
/* ANCHOR END: document */
  233    245   
  234    246   
#[cfg(test)]
  235    247   
mod test {
  236    248   
    /// checks if a) serialization of json suceeds and b) it is compatible with serde_json
  237    249   
    #[test]
  238    250   
    #[cfg(all(
  239    251   
        aws_sdk_unstable,
  240    252   
        feature = "serde-serialize",
  241    253   
        feature = "serde-deserialize"

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/config/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/config/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/endpoint_lib/arn.rs

@@ -1,1 +42,42 @@
    2      2   
/*
    3      3   
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
 *  SPDX-License-Identifier: Apache-2.0
    5      5   
 */
    6      6   
    7      7   
use crate::endpoint_lib::diagnostic::DiagnosticCollector;
    8      8   
use std::borrow::Cow;
    9      9   
use std::error::Error;
   10     10   
use std::fmt::{Display, Formatter};
   11     11   
   12         -
#[derive(Debug, Eq, PartialEq)]
          12  +
#[derive(Debug, Eq, PartialEq, Clone, Default)]
   13     13   
pub(crate) struct Arn<'a> {
   14     14   
    partition: &'a str,
   15     15   
    service: &'a str,
   16     16   
    region: &'a str,
   17     17   
    account_id: &'a str,
   18     18   
    resource_id: Vec<&'a str>,
   19     19   
}
   20     20   
   21     21   
#[allow(unused)]
   22     22   
impl<'a> Arn<'a> {

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/ec2/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/ec2/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/ecs/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}