use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeInstancesResponse {
#[serde(rename(serialize = "ReservationSet", deserialize = "reservationSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub reservations: Vec<Reservation>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeInstancesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
reservations: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Reservation {
#[serde(rename(serialize = "ReservationId", deserialize = "reservationId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub reservation_id: Option<String>,
#[serde(rename(serialize = "InstancesSet", deserialize = "instancesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub instances: Vec<Instance>,
}
impl Reservation {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
reservation_id: Some("test-reservation_id".into()),
instances: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Instance {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "InstanceType", deserialize = "instanceType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option<String>,
#[serde(rename(serialize = "InstanceState", deserialize = "instanceState"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<InstanceState>,
#[serde(rename(serialize = "Placement", deserialize = "placement"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub placement: Option<Placement>,
#[serde(rename(serialize = "SubnetId", deserialize = "subnetId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "IpAddress", deserialize = "ipAddress"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub public_ip_address: Option<String>,
#[serde(rename(serialize = "BlockDeviceMapping", deserialize = "blockDeviceMapping"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub block_device_mappings: Vec<InstanceBlockDeviceMapping>,
#[serde(rename(serialize = "GroupSet", deserialize = "groupSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub security_groups: Vec<GroupIdentifier>,
#[serde(rename(serialize = "LaunchTime", deserialize = "launchTime"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_time: Option<String>,
#[serde(rename(serialize = "ImageId", deserialize = "imageId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename(serialize = "IamInstanceProfile", deserialize = "iamInstanceProfile"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_instance_profile: Option<IamInstanceProfile>,
#[serde(rename(serialize = "Monitoring", deserialize = "monitoring"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub monitoring: Option<Monitoring>,
#[serde(rename(serialize = "MetadataOptions", deserialize = "metadataOptions"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata_options: Option<InstanceMetadataOptionsResponse>,
#[serde(rename(serialize = "EbsOptimized", deserialize = "ebsOptimized"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebs_optimized: Option<bool>,
#[serde(rename(serialize = "VirtualizationType", deserialize = "virtualizationType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtualization_type: Option<String>,
#[serde(rename(serialize = "NetworkInterfaceSet", deserialize = "networkInterfaceSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub network_interfaces: Vec<InstanceNetworkInterface>,
#[serde(rename(serialize = "TagSet", deserialize = "tagSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<Tag>,
}
impl Instance {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: Some("test-instance_id".into()),
instance_type: Some("test-instance_type".into()),
state: Some(InstanceState::fixture()),
placement: Some(Placement::fixture()),
subnet_id: Some("test-subnet_id".into()),
vpc_id: Some("test-vpc_id".into()),
public_ip_address: Some("test-public_ip_address".into()),
block_device_mappings: vec![],
security_groups: vec![],
launch_time: Some("test-launch_time".into()),
image_id: Some("test-image_id".into()),
iam_instance_profile: Some(IamInstanceProfile::fixture()),
monitoring: Some(Monitoring::fixture()),
metadata_options: Some(InstanceMetadataOptionsResponse::fixture()),
ebs_optimized: Some(false),
virtualization_type: Some("test-virtualization_type".into()),
network_interfaces: vec![],
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceState {
#[serde(rename(serialize = "Code", deserialize = "code"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<i32>,
#[serde(rename(serialize = "Name", deserialize = "name"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl InstanceState {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
code: Some(100),
name: Some("test-name".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Placement {
#[serde(rename(serialize = "AvailabilityZone", deserialize = "availabilityZone"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone: Option<String>,
}
impl Placement {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
availability_zone: Some("test-availability_zone".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceBlockDeviceMapping {
#[serde(rename(serialize = "DeviceName", deserialize = "deviceName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename(serialize = "Ebs", deserialize = "ebs"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebs: Option<EbsInstanceBlockDevice>,
}
impl InstanceBlockDeviceMapping {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
device_name: Some("test-device_name".into()),
ebs: Some(EbsInstanceBlockDevice::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EbsInstanceBlockDevice {
#[serde(rename(serialize = "VolumeId", deserialize = "volumeId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename(serialize = "Status", deserialize = "status"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
impl EbsInstanceBlockDevice {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: Some("test-volume_id".into()),
status: Some("test-status".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IamInstanceProfile {
#[serde(rename(serialize = "Arn", deserialize = "arn"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename(serialize = "Id", deserialize = "id"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
impl IamInstanceProfile {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
arn: Some("test-arn".into()),
id: Some("test-id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Monitoring {
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
impl Monitoring {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
state: Some("test-state".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceMetadataOptionsResponse {
#[serde(rename(serialize = "HttpTokens", deserialize = "httpTokens"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_tokens: Option<String>,
#[serde(rename(serialize = "HttpEndpoint", deserialize = "httpEndpoint"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_endpoint: Option<String>,
}
impl InstanceMetadataOptionsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
http_tokens: Some("test-http_tokens".into()),
http_endpoint: Some("test-http_endpoint".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceNetworkInterface {
#[serde(rename(serialize = "NetworkInterfaceId", deserialize = "networkInterfaceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
}
impl InstanceNetworkInterface {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
network_interface_id: Some("test-network_interface_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GroupIdentifier {
#[serde(rename(serialize = "GroupId", deserialize = "groupId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename(serialize = "GroupName", deserialize = "groupName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
impl GroupIdentifier {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
group_name: Some("test-group_name".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename(serialize = "Key", deserialize = "key"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename(serialize = "Value", deserialize = "value"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl Tag {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
key: Some("test-key".into()),
value: Some("test-value".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVolumesResponse {
#[serde(rename(serialize = "VolumeSet", deserialize = "volumeSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub volumes: Vec<Volume>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeVolumesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volumes: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Volume {
#[serde(rename(serialize = "VolumeId", deserialize = "volumeId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename(serialize = "AvailabilityZone", deserialize = "availabilityZone"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone: Option<String>,
#[serde(rename(serialize = "Size", deserialize = "size"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<i32>,
#[serde(rename(serialize = "Status", deserialize = "status"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "VolumeType", deserialize = "volumeType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
#[serde(rename(serialize = "Encrypted", deserialize = "encrypted"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename(serialize = "KmsKeyId", deserialize = "kmsKeyId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename(serialize = "CreateTime", deserialize = "createTime"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_time: Option<String>,
#[serde(rename(serialize = "Iops", deserialize = "iops"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub iops: Option<i32>,
#[serde(rename(serialize = "Throughput", deserialize = "throughput"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub throughput: Option<i32>,
#[serde(rename(serialize = "AttachmentSet", deserialize = "attachmentSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<VolumeAttachment>,
#[serde(rename(serialize = "TagSet", deserialize = "tagSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<Tag>,
}
impl Volume {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: Some("test-volume_id".into()),
availability_zone: Some("test-availability_zone".into()),
size: Some(100),
state: Some("test-state".into()),
volume_type: Some("test-volume_type".into()),
encrypted: Some(false),
kms_key_id: Some("test-kms_key_id".into()),
create_time: Some("test-create_time".into()),
iops: Some(100),
throughput: Some(100),
attachments: vec![],
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VolumeAttachment {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "Status", deserialize = "status"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "Device", deserialize = "device"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub device: Option<String>,
#[serde(rename(serialize = "VolumeId", deserialize = "volumeId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
}
impl VolumeAttachment {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: Some("test-instance_id".into()),
state: Some("test-state".into()),
device: Some("test-device".into()),
volume_id: Some("test-volume_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSnapshotsResponse {
#[serde(rename(serialize = "SnapshotSet", deserialize = "snapshotSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub snapshots: Vec<Snapshot>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeSnapshotsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshots: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Snapshot {
#[serde(rename(serialize = "SnapshotId", deserialize = "snapshotId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename(serialize = "VolumeId", deserialize = "volumeId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename(serialize = "VolumeSize", deserialize = "volumeSize"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size: Option<i32>,
#[serde(rename(serialize = "Status", deserialize = "status"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "StartTime", deserialize = "startTime"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<String>,
#[serde(rename(serialize = "Description", deserialize = "description"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename(serialize = "Encrypted", deserialize = "encrypted"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename(serialize = "TagSet", deserialize = "tagSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<Tag>,
}
impl Snapshot {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: Some("test-snapshot_id".into()),
volume_id: Some("test-volume_id".into()),
volume_size: Some(100),
state: Some("test-state".into()),
start_time: Some("test-start_time".into()),
description: Some("test-description".into()),
encrypted: Some(false),
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSnapshotAttributeResponse {
#[serde(rename(serialize = "SnapshotId", deserialize = "snapshotId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename(
serialize = "CreateVolumePermission",
deserialize = "createVolumePermission"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub create_volume_permissions: Vec<CreateVolumePermission>,
}
impl DescribeSnapshotAttributeResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: Some("test-snapshot_id".into()),
create_volume_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateVolumePermission {
#[serde(rename(serialize = "Group", deserialize = "group"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<String>,
#[serde(rename(serialize = "UserId", deserialize = "userId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
impl CreateVolumePermission {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group: Some("test-group".into()),
user_id: Some("test-user_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeImagesResponse {
#[serde(rename(serialize = "ImagesSet", deserialize = "imagesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub images: Vec<Image>,
}
impl DescribeImagesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self { images: vec![] }
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Image {
#[serde(rename(serialize = "ImageId", deserialize = "imageId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename(serialize = "Name", deserialize = "name"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename(serialize = "ImageState", deserialize = "imageState"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "IsPublic", deserialize = "isPublic"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub public: Option<bool>,
#[serde(rename(serialize = "ImageType", deserialize = "imageType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_type: Option<String>,
#[serde(rename(serialize = "PlatformDetails", deserialize = "platformDetails"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_details: Option<String>,
#[serde(rename(serialize = "CreationDate", deserialize = "creationDate"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<String>,
#[serde(rename(serialize = "Description", deserialize = "description"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename(serialize = "BlockDeviceMapping", deserialize = "blockDeviceMapping"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub block_device_mappings: Vec<BlockDeviceMapping>,
#[serde(rename(serialize = "TagSet", deserialize = "tagSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<Tag>,
}
impl Image {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_id: Some("test-image_id".into()),
name: Some("test-name".into()),
state: Some("test-state".into()),
public: Some(false),
image_type: Some("test-image_type".into()),
platform_details: Some("test-platform_details".into()),
creation_date: Some("test-creation_date".into()),
description: Some("test-description".into()),
block_device_mappings: vec![],
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct BlockDeviceMapping {
#[serde(rename(serialize = "DeviceName", deserialize = "deviceName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(rename(serialize = "Ebs", deserialize = "ebs"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebs: Option<EbsBlockDevice>,
}
impl BlockDeviceMapping {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
device_name: Some("test-device_name".into()),
ebs: Some(EbsBlockDevice::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EbsBlockDevice {
#[serde(rename(serialize = "SnapshotId", deserialize = "snapshotId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename(serialize = "VolumeSize", deserialize = "volumeSize"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size: Option<i32>,
#[serde(rename(serialize = "VolumeType", deserialize = "volumeType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
#[serde(rename(serialize = "Encrypted", deserialize = "encrypted"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
}
impl EbsBlockDevice {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: Some("test-snapshot_id".into()),
volume_size: Some(100),
volume_type: Some("test-volume_type".into()),
encrypted: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSecurityGroupsResponse {
#[serde(rename(serialize = "SecurityGroupInfo", deserialize = "securityGroupInfo"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub security_groups: Vec<SecurityGroup>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeSecurityGroupsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
security_groups: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SecurityGroup {
#[serde(rename(serialize = "GroupId", deserialize = "groupId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename(serialize = "GroupName", deserialize = "groupName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename(serialize = "GroupDescription", deserialize = "groupDescription"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "IpPermissions", deserialize = "ipPermissions"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_permissions: Vec<IpPermission>,
#[serde(rename(serialize = "IpPermissionsEgress", deserialize = "ipPermissionsEgress"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_permissions_egress: Vec<IpPermission>,
#[serde(rename(serialize = "TagSet", deserialize = "tagSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<Tag>,
}
impl SecurityGroup {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
group_name: Some("test-group_name".into()),
description: Some("test-description".into()),
vpc_id: Some("test-vpc_id".into()),
ip_permissions: vec![],
ip_permissions_egress: vec![],
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IpPermission {
#[serde(rename(serialize = "IpProtocol", deserialize = "ipProtocol"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_protocol: Option<String>,
#[serde(rename(serialize = "FromPort", deserialize = "fromPort"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub from_port: Option<i32>,
#[serde(rename(serialize = "ToPort", deserialize = "toPort"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub to_port: Option<i32>,
#[serde(rename(serialize = "IpRanges", deserialize = "ipRanges"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_ranges: Vec<IpRange>,
#[serde(rename(serialize = "Ipv6Ranges", deserialize = "ipv6Ranges"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ipv6_ranges: Vec<Ipv6Range>,
}
impl IpPermission {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
ip_protocol: Some("test-ip_protocol".into()),
from_port: Some(100),
to_port: Some(100),
ip_ranges: vec![],
ipv6_ranges: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IpRange {
#[serde(rename(serialize = "CidrIp", deserialize = "cidrIp"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ip: Option<String>,
#[serde(rename(serialize = "Description", deserialize = "description"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl IpRange {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
cidr_ip: Some("test-cidr_ip".into()),
description: Some("test-description".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Ipv6Range {
#[serde(rename(serialize = "CidrIpv6", deserialize = "cidrIpv6"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ipv6: Option<String>,
#[serde(rename(serialize = "Description", deserialize = "description"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl Ipv6Range {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
cidr_ipv6: Some("test-cidr_ipv6".into()),
description: Some("test-description".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeAddressesResponse {
#[serde(rename(serialize = "AddressesSet", deserialize = "addressesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub addresses: Vec<Address>,
}
impl DescribeAddressesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self { addresses: vec![] }
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Address {
#[serde(rename(serialize = "AllocationId", deserialize = "allocationId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub allocation_id: Option<String>,
#[serde(rename(serialize = "PublicIp", deserialize = "publicIp"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub public_ip: Option<String>,
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "AssociationId", deserialize = "associationId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename(serialize = "NetworkInterfaceId", deserialize = "networkInterfaceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
#[serde(rename(serialize = "Domain", deserialize = "domain"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
}
impl Address {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
allocation_id: Some("test-allocation_id".into()),
public_ip: Some("test-public_ip".into()),
instance_id: Some("test-instance_id".into()),
association_id: Some("test-association_id".into()),
network_interface_id: Some("test-network_interface_id".into()),
domain: Some("test-domain".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeNatGatewaysResponse {
#[serde(rename(serialize = "NatGatewaySet", deserialize = "natGatewaySet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub nat_gateways: Vec<NatGateway>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeNatGatewaysResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
nat_gateways: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NatGateway {
#[serde(rename(serialize = "NatGatewayId", deserialize = "natGatewayId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub nat_gateway_id: Option<String>,
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "SubnetId", deserialize = "subnetId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(
serialize = "NatGatewayAddressSet",
deserialize = "natGatewayAddressSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub nat_gateway_addresses: Vec<NatGatewayAddress>,
#[serde(rename(serialize = "CreateTime", deserialize = "createTime"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_time: Option<String>,
}
impl NatGateway {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
nat_gateway_id: Some("test-nat_gateway_id".into()),
state: Some("test-state".into()),
subnet_id: Some("test-subnet_id".into()),
vpc_id: Some("test-vpc_id".into()),
nat_gateway_addresses: vec![],
create_time: Some("test-create_time".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NatGatewayAddress {
#[serde(rename(serialize = "AllocationId", deserialize = "allocationId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub allocation_id: Option<String>,
#[serde(rename(serialize = "PublicIp", deserialize = "publicIp"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub public_ip: Option<String>,
}
impl NatGatewayAddress {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
allocation_id: Some("test-allocation_id".into()),
public_ip: Some("test-public_ip".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeRouteTablesResponse {
#[serde(rename(serialize = "RouteTableSet", deserialize = "routeTableSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub route_tables: Vec<RouteTable>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeRouteTablesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
route_tables: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RouteTable {
#[serde(rename(serialize = "RouteTableId", deserialize = "routeTableId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_table_id: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "RouteSet", deserialize = "routeSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub routes: Vec<Route>,
#[serde(rename(serialize = "AssociationSet", deserialize = "associationSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub associations: Vec<RouteTableAssociation>,
}
impl RouteTable {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
route_table_id: Some("test-route_table_id".into()),
vpc_id: Some("test-vpc_id".into()),
routes: vec![],
associations: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Route {
#[serde(rename(
serialize = "DestinationCidrBlock",
deserialize = "destinationCidrBlock"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_cidr_block: Option<String>,
#[serde(rename(serialize = "NatGatewayId", deserialize = "natGatewayId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub nat_gateway_id: Option<String>,
#[serde(rename(serialize = "GatewayId", deserialize = "gatewayId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_id: Option<String>,
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
impl Route {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
destination_cidr_block: Some("test-destination_cidr_block".into()),
nat_gateway_id: Some("test-nat_gateway_id".into()),
gateway_id: Some("test-gateway_id".into()),
state: Some("test-state".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RouteTableAssociation {
#[serde(rename(serialize = "SubnetId", deserialize = "subnetId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename(serialize = "Main", deserialize = "main"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub main: Option<bool>,
}
impl RouteTableAssociation {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
subnet_id: Some("test-subnet_id".into()),
main: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeNetworkAclsResponse {
#[serde(rename(serialize = "NetworkAclSet", deserialize = "networkAclSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub network_acls: Vec<NetworkAcl>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeNetworkAclsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
network_acls: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NetworkAcl {
#[serde(rename(serialize = "NetworkAclId", deserialize = "networkAclId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_acl_id: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "Default", deserialize = "default"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
#[serde(rename(serialize = "EntrySet", deserialize = "entrySet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub entries: Vec<NetworkAclEntry>,
}
impl NetworkAcl {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
network_acl_id: Some("test-network_acl_id".into()),
vpc_id: Some("test-vpc_id".into()),
is_default: Some(false),
entries: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NetworkAclEntry {
#[serde(rename(serialize = "RuleNumber", deserialize = "ruleNumber"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_number: Option<i32>,
#[serde(rename(serialize = "Protocol", deserialize = "protocol"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
#[serde(rename(serialize = "RuleAction", deserialize = "ruleAction"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_action: Option<String>,
#[serde(rename(serialize = "Egress", deserialize = "egress"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress: Option<bool>,
#[serde(rename(serialize = "CidrBlock", deserialize = "cidrBlock"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block: Option<String>,
#[serde(rename(serialize = "PortRange", deserialize = "portRange"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub port_range: Option<PortRange>,
}
impl NetworkAclEntry {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
rule_number: Some(100),
protocol: Some("test-protocol".into()),
rule_action: Some("test-rule_action".into()),
egress: Some(false),
cidr_block: Some("test-cidr_block".into()),
port_range: Some(PortRange::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PortRange {
#[serde(rename(serialize = "From", deserialize = "from"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub from: Option<i32>,
#[serde(rename(serialize = "To", deserialize = "to"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub to: Option<i32>,
}
impl PortRange {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
from: Some(100),
to: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeFlowLogsResponse {
#[serde(rename(serialize = "FlowLogSet", deserialize = "flowLogSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub flow_logs: Vec<FlowLog>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeFlowLogsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
flow_logs: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FlowLog {
#[serde(rename(serialize = "FlowLogId", deserialize = "flowLogId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub flow_log_id: Option<String>,
#[serde(rename(serialize = "ResourceId", deserialize = "resourceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
#[serde(rename(serialize = "TrafficType", deserialize = "trafficType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub traffic_type: Option<String>,
#[serde(rename(serialize = "LogGroupName", deserialize = "logGroupName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_group_name: Option<String>,
#[serde(rename(serialize = "FlowLogStatus", deserialize = "flowLogStatus"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub flow_log_status: Option<String>,
}
impl FlowLog {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
flow_log_id: Some("test-flow_log_id".into()),
resource_id: Some("test-resource_id".into()),
traffic_type: Some("test-traffic_type".into()),
log_group_name: Some("test-log_group_name".into()),
flow_log_status: Some("test-flow_log_status".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcsResponse {
#[serde(rename(serialize = "VpcSet", deserialize = "vpcSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpcs: Vec<Vpc>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeVpcsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpcs: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Vpc {
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "CidrBlock", deserialize = "cidrBlock"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block: Option<String>,
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "IsDefault", deserialize = "isDefault"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
}
impl Vpc {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_id: Some("test-vpc_id".into()),
cidr_block: Some("test-cidr_block".into()),
state: Some("test-state".into()),
is_default: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcEndpointsResponse {
#[serde(rename(serialize = "VpcEndpointSet", deserialize = "vpcEndpointSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpc_endpoints: Vec<VpcEndpoint>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeVpcEndpointsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_endpoints: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VpcEndpoint {
#[serde(rename(serialize = "VpcEndpointId", deserialize = "vpcEndpointId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_endpoint_id: Option<String>,
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "ServiceName", deserialize = "serviceName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_name: Option<String>,
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename(serialize = "RouteTableIdSet", deserialize = "routeTableIdSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub route_table_ids: Vec<String>,
#[serde(rename(serialize = "SubnetIdSet", deserialize = "subnetIdSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub subnet_ids: Vec<String>,
}
impl VpcEndpoint {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_endpoint_id: Some("test-vpc_endpoint_id".into()),
vpc_id: Some("test-vpc_id".into()),
service_name: Some("test-service_name".into()),
state: Some("test-state".into()),
route_table_ids: vec![],
subnet_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcPeeringConnectionsResponse {
#[serde(rename(
serialize = "VpcPeeringConnectionSet",
deserialize = "vpcPeeringConnectionSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpc_peering_connections: Vec<VpcPeeringConnection>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeVpcPeeringConnectionsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_peering_connections: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VpcPeeringConnection {
#[serde(rename(
serialize = "VpcPeeringConnectionId",
deserialize = "vpcPeeringConnectionId"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_peering_connection_id: Option<String>,
#[serde(rename(serialize = "Status", deserialize = "status"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<VpcPeeringConnectionStateReason>,
#[serde(rename(serialize = "AccepterVpcInfo", deserialize = "accepterVpcInfo"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub accepter_vpc_info: Option<VpcPeeringConnectionVpcInfo>,
#[serde(rename(serialize = "RequesterVpcInfo", deserialize = "requesterVpcInfo"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_vpc_info: Option<VpcPeeringConnectionVpcInfo>,
}
impl VpcPeeringConnection {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_peering_connection_id: Some("test-vpc_peering_connection_id".into()),
status: Some(VpcPeeringConnectionStateReason::fixture()),
accepter_vpc_info: Some(VpcPeeringConnectionVpcInfo::fixture()),
requester_vpc_info: Some(VpcPeeringConnectionVpcInfo::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VpcPeeringConnectionStateReason {
#[serde(rename(serialize = "Code", deserialize = "code"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename(serialize = "Message", deserialize = "message"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
impl VpcPeeringConnectionStateReason {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
code: Some("test-code".into()),
message: Some("test-message".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VpcPeeringConnectionVpcInfo {
#[serde(rename(serialize = "VpcId", deserialize = "vpcId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename(serialize = "OwnerId", deserialize = "ownerId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename(serialize = "CidrBlock", deserialize = "cidrBlock"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block: Option<String>,
#[serde(rename(serialize = "Region", deserialize = "region"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
}
impl VpcPeeringConnectionVpcInfo {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_id: Some("test-vpc_id".into()),
owner_id: Some("test-owner_id".into()),
cidr_block: Some("test-cidr_block".into()),
region: Some("test-region".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeLaunchTemplatesResponse {
#[serde(rename(serialize = "LaunchTemplates", deserialize = "launchTemplates"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub launch_templates: Vec<LaunchTemplate>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeLaunchTemplatesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_templates: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchTemplate {
#[serde(rename(serialize = "LaunchTemplateId", deserialize = "launchTemplateId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_id: Option<String>,
#[serde(rename(serialize = "LaunchTemplateName", deserialize = "launchTemplateName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_name: Option<String>,
}
impl LaunchTemplate {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_template_id: Some("test-launch_template_id".into()),
launch_template_name: Some("test-launch_template_name".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeLaunchTemplateVersionsResponse {
#[serde(rename(
serialize = "LaunchTemplateVersionSet",
deserialize = "launchTemplateVersionSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub launch_template_versions: Vec<LaunchTemplateVersion>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
impl DescribeLaunchTemplateVersionsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_template_versions: vec![],
next_token: Some("test-next_token".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchTemplateVersion {
#[serde(rename(serialize = "LaunchTemplateId", deserialize = "launchTemplateId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_id: Option<String>,
#[serde(rename(serialize = "LaunchTemplateName", deserialize = "launchTemplateName"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_name: Option<String>,
#[serde(rename(serialize = "VersionNumber", deserialize = "versionNumber"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_number: Option<i64>,
#[serde(rename(serialize = "LaunchTemplateData", deserialize = "launchTemplateData"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_data: Option<ResponseLaunchTemplateData>,
}
impl LaunchTemplateVersion {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_template_id: Some("test-launch_template_id".into()),
launch_template_name: Some("test-launch_template_name".into()),
version_number: Some(100),
launch_template_data: Some(ResponseLaunchTemplateData::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ResponseLaunchTemplateData {
#[serde(rename(serialize = "ImageId", deserialize = "imageId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename(serialize = "InstanceType", deserialize = "instanceType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option<String>,
#[serde(rename(serialize = "MetadataOptions", deserialize = "metadataOptions"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata_options: Option<LaunchTemplateInstanceMetadataOptions>,
#[serde(rename(serialize = "NetworkInterfaceSet", deserialize = "networkInterfaceSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub network_interfaces: Vec<LaunchTemplateInstanceNetworkInterfaceSpecification>,
}
impl ResponseLaunchTemplateData {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_id: Some("test-image_id".into()),
instance_type: Some("test-instance_type".into()),
metadata_options: Some(LaunchTemplateInstanceMetadataOptions::fixture()),
network_interfaces: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchTemplateInstanceMetadataOptions {
#[serde(rename(serialize = "HttpTokens", deserialize = "httpTokens"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_tokens: Option<String>,
}
impl LaunchTemplateInstanceMetadataOptions {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
http_tokens: Some("test-http_tokens".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchTemplateInstanceNetworkInterfaceSpecification {
#[serde(rename(
serialize = "AssociatePublicIpAddress",
deserialize = "associatePublicIpAddress"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub associate_public_ip_address: Option<bool>,
}
impl LaunchTemplateInstanceNetworkInterfaceSpecification {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
associate_public_ip_address: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetEbsEncryptionByDefaultResponse {
#[serde(rename(
serialize = "EbsEncryptionByDefault",
deserialize = "ebsEncryptionByDefault"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebs_encryption_by_default: Option<bool>,
}
impl GetEbsEncryptionByDefaultResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
ebs_encryption_by_default: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableEbsEncryptionByDefaultResponse {
#[serde(rename(
serialize = "EbsEncryptionByDefault",
deserialize = "ebsEncryptionByDefault"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ebs_encryption_by_default: Option<bool>,
}
impl EnableEbsEncryptionByDefaultResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
ebs_encryption_by_default: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableSnapshotBlockPublicAccessResponse {
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
impl EnableSnapshotBlockPublicAccessResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
state: Some("test-state".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableImageBlockPublicAccessResponse {
#[serde(rename(
serialize = "ImageBlockPublicAccessState",
deserialize = "imageBlockPublicAccessState"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_block_public_access_state: Option<String>,
}
impl EnableImageBlockPublicAccessResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_block_public_access_state: Some("test-image_block_public_access_state".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct TerminateInstancesResponse {
#[serde(rename(serialize = "InstancesSet", deserialize = "instancesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub terminating_instances: Vec<InstanceStateChange>,
}
impl TerminateInstancesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
terminating_instances: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceStateChange {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "CurrentState", deserialize = "currentState"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_state: Option<InstanceState>,
#[serde(rename(serialize = "PreviousState", deserialize = "previousState"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub previous_state: Option<InstanceState>,
}
impl InstanceStateChange {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: Some("test-instance_id".into()),
current_state: Some(InstanceState::fixture()),
previous_state: Some(InstanceState::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct StopInstancesResponse {
#[serde(rename(serialize = "InstancesSet", deserialize = "instancesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub stopping_instances: Vec<InstanceStateChange>,
}
impl StopInstancesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
stopping_instances: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct StartInstancesResponse {
#[serde(rename(serialize = "InstancesSet", deserialize = "instancesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub starting_instances: Vec<InstanceStateChange>,
}
impl StartInstancesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
starting_instances: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyInstanceMetadataOptionsResponse {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(
serialize = "InstanceMetadataOptions",
deserialize = "instanceMetadataOptions"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_metadata_options: Option<InstanceMetadataOptionsResponse>,
}
impl ModifyInstanceMetadataOptionsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: Some("test-instance_id".into()),
instance_metadata_options: Some(InstanceMetadataOptionsResponse::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MonitorInstancesResponse {
#[serde(rename(serialize = "InstancesSet", deserialize = "instancesSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub instance_monitorings: Vec<InstanceMonitoring>,
}
impl MonitorInstancesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_monitorings: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InstanceMonitoring {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "Monitoring", deserialize = "monitoring"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub monitoring: Option<Monitoring>,
}
impl InstanceMonitoring {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: Some("test-instance_id".into()),
monitoring: Some(Monitoring::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct AssociateIamInstanceProfileResponse {
#[serde(rename(
serialize = "IamInstanceProfileAssociation",
deserialize = "iamInstanceProfileAssociation"
))]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_instance_profile_association: Option<IamInstanceProfileAssociation>,
}
impl AssociateIamInstanceProfileResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
iam_instance_profile_association: Some(IamInstanceProfileAssociation::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IamInstanceProfileAssociation {
#[serde(rename(serialize = "AssociationId", deserialize = "associationId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename(serialize = "IamInstanceProfile", deserialize = "iamInstanceProfile"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_instance_profile: Option<IamInstanceProfile>,
#[serde(rename(serialize = "State", deserialize = "state"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
impl IamInstanceProfileAssociation {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
association_id: Some("test-association_id".into()),
instance_id: Some("test-instance_id".into()),
iam_instance_profile: Some(IamInstanceProfile::fixture()),
state: Some("test-state".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyVolumeResponse {
#[serde(rename(serialize = "VolumeModification", deserialize = "volumeModification"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_modification: Option<VolumeModification>,
}
impl ModifyVolumeResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_modification: Some(VolumeModification::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct VolumeModification {
#[serde(rename(serialize = "VolumeId", deserialize = "volumeId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename(serialize = "ModificationState", deserialize = "modificationState"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub modification_state: Option<String>,
#[serde(rename(serialize = "TargetVolumeType", deserialize = "targetVolumeType"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_volume_type: Option<String>,
#[serde(rename(serialize = "TargetIops", deserialize = "targetIops"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_iops: Option<i32>,
#[serde(rename(serialize = "TargetThroughput", deserialize = "targetThroughput"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_throughput: Option<i32>,
}
impl VolumeModification {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: Some("test-volume_id".into()),
modification_state: Some("test-modification_state".into()),
target_volume_type: Some("test-target_volume_type".into()),
target_iops: Some(100),
target_throughput: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteNatGatewayResponse {
#[serde(rename(serialize = "NatGatewayId", deserialize = "natGatewayId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub nat_gateway_id: Option<String>,
}
impl DeleteNatGatewayResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
nat_gateway_id: Some("test-nat_gateway_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteVpcEndpointsResponse {
#[serde(rename(serialize = "Unsuccessful", deserialize = "unsuccessful"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub unsuccessful: Vec<UnsuccessfulItem>,
}
impl DeleteVpcEndpointsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
unsuccessful: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UnsuccessfulItem {
#[serde(rename(serialize = "ResourceId", deserialize = "resourceId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
#[serde(rename(serialize = "Error", deserialize = "error"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<UnsuccessfulItemError>,
}
impl UnsuccessfulItem {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
resource_id: Some("test-resource_id".into()),
error: Some(UnsuccessfulItemError::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UnsuccessfulItemError {
#[serde(rename(serialize = "Code", deserialize = "code"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename(serialize = "Message", deserialize = "message"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
impl UnsuccessfulItemError {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
code: Some("test-code".into()),
message: Some("test-message".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateFlowLogsResponse {
#[serde(rename(serialize = "FlowLogIdSet", deserialize = "flowLogIdSet"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub flow_log_ids: Vec<String>,
#[serde(rename(serialize = "Unsuccessful", deserialize = "unsuccessful"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub unsuccessful: Vec<UnsuccessfulItem>,
}
impl CreateFlowLogsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
flow_log_ids: vec![],
unsuccessful: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RevokeSecurityGroupIngressResponse {
#[serde(rename(
serialize = "UnknownIpPermissionSet",
deserialize = "unknownIpPermissionSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub unknown_ip_permissions: Vec<IpPermission>,
}
impl RevokeSecurityGroupIngressResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
unknown_ip_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RevokeSecurityGroupEgressResponse {
#[serde(rename(
serialize = "UnknownIpPermissionSet",
deserialize = "unknownIpPermissionSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub unknown_ip_permissions: Vec<IpPermission>,
}
impl RevokeSecurityGroupEgressResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
unknown_ip_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct AuthorizeSecurityGroupIngressResponse {
#[serde(rename(
serialize = "SecurityGroupRuleSet",
deserialize = "securityGroupRuleSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub security_group_rules: Vec<SecurityGroupRule>,
}
impl AuthorizeSecurityGroupIngressResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
security_group_rules: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SecurityGroupRule {
#[serde(rename(serialize = "SecurityGroupRuleId", deserialize = "securityGroupRuleId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_rule_id: Option<String>,
#[serde(rename(serialize = "GroupId", deserialize = "groupId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename(serialize = "IpProtocol", deserialize = "ipProtocol"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_protocol: Option<String>,
#[serde(rename(serialize = "FromPort", deserialize = "fromPort"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub from_port: Option<i32>,
#[serde(rename(serialize = "ToPort", deserialize = "toPort"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub to_port: Option<i32>,
#[serde(rename(serialize = "CidrIpv4", deserialize = "cidrIpv4"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ipv4: Option<String>,
}
impl SecurityGroupRule {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
security_group_rule_id: Some("test-security_group_rule_id".into()),
group_id: Some("test-group_id".into()),
ip_protocol: Some("test-ip_protocol".into()),
from_port: Some(100),
to_port: Some(100),
cidr_ipv4: Some("test-cidr_ipv4".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteSecurityGroupResponse {
#[serde(rename(serialize = "GroupId", deserialize = "groupId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
}
impl DeleteSecurityGroupResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeregisterImageResponse {
#[serde(rename(
serialize = "DeleteSnapshotResultSet",
deserialize = "deleteSnapshotResultSet"
))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub delete_snapshot_results: Vec<DeleteSnapshotReturnCode>,
}
impl DeregisterImageResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
delete_snapshot_results: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeInstancesRequest {
#[serde(rename = "InstanceId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub instance_ids: Vec<String>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename(serialize = "MaxResults", deserialize = "maxResults"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeInstancesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVolumesRequest {
#[serde(rename = "VolumeId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub volume_ids: Vec<String>,
#[serde(rename(serialize = "NextToken", deserialize = "nextToken"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename(serialize = "MaxResults", deserialize = "maxResults"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeVolumesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSnapshotsRequest {
#[serde(rename = "Owner")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub owner_ids: Vec<String>,
#[serde(rename = "SnapshotId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub snapshot_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeSnapshotsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
owner_ids: vec![],
snapshot_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeImagesRequest {
#[serde(rename = "Owner")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub owners: Vec<String>,
#[serde(rename = "ImageId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub image_ids: Vec<String>,
}
impl DescribeImagesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
owners: vec![],
image_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSecurityGroupsRequest {
#[serde(rename = "GroupId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub group_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeSecurityGroupsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeAddressesRequest {
#[serde(rename = "AllocationId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub allocation_ids: Vec<String>,
#[serde(rename = "PublicIp")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub public_ips: Vec<String>,
}
impl DescribeAddressesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
allocation_ids: vec![],
public_ips: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeNatGatewaysRequest {
#[serde(rename = "NatGatewayId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub nat_gateway_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeNatGatewaysRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
nat_gateway_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeRouteTablesRequest {
#[serde(rename = "RouteTableId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub route_table_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeRouteTablesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
route_table_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeNetworkAclsRequest {
#[serde(rename = "NetworkAclId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub network_acl_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeNetworkAclsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
network_acl_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeFlowLogsRequest {
#[serde(rename = "FlowLogId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub flow_log_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeFlowLogsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
flow_log_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcsRequest {
#[serde(rename = "VpcId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpc_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeVpcsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcEndpointsRequest {
#[serde(rename = "VpcEndpointId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpc_endpoint_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeVpcEndpointsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_endpoint_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeVpcPeeringConnectionsRequest {
#[serde(rename = "VpcPeeringConnectionId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub vpc_peering_connection_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeVpcPeeringConnectionsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_peering_connection_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeLaunchTemplatesRequest {
#[serde(rename = "LaunchTemplateId")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub launch_template_ids: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeLaunchTemplatesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_template_ids: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeLaunchTemplateVersionsRequest {
#[serde(rename = "LaunchTemplateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_template_id: Option<String>,
#[serde(rename = "LaunchTemplateVersion")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub versions: Vec<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i32>,
}
impl DescribeLaunchTemplateVersionsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
launch_template_id: Some("test-launch_template_id".into()),
versions: vec![],
next_token: Some("test-next_token".into()),
max_results: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DescribeSnapshotAttributeRequest {
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
#[serde(rename = "Attribute")]
pub attribute: String,
}
impl DescribeSnapshotAttributeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: "test-snapshot_id".into(),
attribute: "test-attribute".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetEbsEncryptionByDefaultRequest {
#[serde(rename = "DryRun")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
}
impl GetEbsEncryptionByDefaultRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
dry_run: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct TerminateInstancesRequest {
#[serde(rename = "InstanceId")]
#[serde(default)]
pub instance_ids: Vec<String>,
}
impl TerminateInstancesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct StopInstancesRequest {
#[serde(rename = "InstanceId")]
#[serde(default)]
pub instance_ids: Vec<String>,
}
impl StopInstancesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct StartInstancesRequest {
#[serde(rename = "InstanceId")]
#[serde(default)]
pub instance_ids: Vec<String>,
}
impl StartInstancesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyInstanceAttributeRequest {
#[serde(rename(serialize = "InstanceId", deserialize = "instanceId"))]
pub instance_id: String,
}
impl ModifyInstanceAttributeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: "test-instance_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyInstanceMetadataOptionsRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "HttpTokens")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_tokens: Option<String>,
#[serde(rename = "HttpEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_endpoint: Option<String>,
}
impl ModifyInstanceMetadataOptionsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_id: "test-instance_id".into(),
http_tokens: Some("test-http_tokens".into()),
http_endpoint: Some("test-http_endpoint".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MonitorInstancesRequest {
#[serde(rename = "InstanceId")]
#[serde(default)]
pub instance_ids: Vec<String>,
}
impl MonitorInstancesRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
instance_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct AssociateIamInstanceProfileRequest {
#[serde(rename = "IamInstanceProfile")]
pub iam_instance_profile: IamInstanceProfileSpecification,
#[serde(rename = "InstanceId")]
pub instance_id: String,
}
impl AssociateIamInstanceProfileRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
iam_instance_profile: IamInstanceProfileSpecification::fixture(),
instance_id: "test-instance_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IamInstanceProfileSpecification {
#[serde(rename(serialize = "Arn", deserialize = "arn"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename(serialize = "Name", deserialize = "name"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl IamInstanceProfileSpecification {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
arn: Some("test-arn".into()),
name: Some("test-name".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DetachVolumeRequest {
#[serde(rename = "VolumeId")]
pub volume_id: String,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
}
impl DetachVolumeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: "test-volume_id".into(),
instance_id: Some("test-instance_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteVolumeRequest {
#[serde(rename = "VolumeId")]
pub volume_id: String,
}
impl DeleteVolumeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: "test-volume_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyVolumeRequest {
#[serde(rename = "VolumeId")]
pub volume_id: String,
#[serde(rename = "VolumeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
#[serde(rename = "Iops")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iops: Option<i32>,
#[serde(rename = "Throughput")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throughput: Option<i32>,
}
impl ModifyVolumeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: "test-volume_id".into(),
volume_type: Some("test-volume_type".into()),
iops: Some(100),
throughput: Some(100),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateSnapshotRequest {
#[serde(rename = "VolumeId")]
pub volume_id: String,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl CreateSnapshotRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
volume_id: "test-volume_id".into(),
description: Some("test-description".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteSnapshotRequest {
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
}
impl DeleteSnapshotRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: "test-snapshot_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifySnapshotAttributeRequest {
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
#[serde(rename = "Attribute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute: Option<String>,
#[serde(rename = "CreateVolumePermission")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_volume_permission: Option<CreateVolumePermissionModifications>,
}
impl ModifySnapshotAttributeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: "test-snapshot_id".into(),
attribute: Some("test-attribute".into()),
create_volume_permission: Some(CreateVolumePermissionModifications::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateVolumePermissionModifications {
#[serde(rename = "Add")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub add: Vec<CreateVolumePermission>,
#[serde(rename = "Remove")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub remove: Vec<CreateVolumePermission>,
}
impl CreateVolumePermissionModifications {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
add: vec![],
remove: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableSnapshotBlockPublicAccessRequest {
#[serde(rename = "State")]
pub state: String,
}
impl EnableSnapshotBlockPublicAccessRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
state: "test-state".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ReleaseAddressRequest {
#[serde(rename = "AllocationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allocation_id: Option<String>,
}
impl ReleaseAddressRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
allocation_id: Some("test-allocation_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeregisterImageRequest {
#[serde(rename = "ImageId")]
pub image_id: String,
}
impl DeregisterImageRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_id: "test-image_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ModifyImageAttributeRequest {
#[serde(rename = "ImageId")]
pub image_id: String,
#[serde(rename = "LaunchPermission")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_permission: Option<LaunchPermissionModifications>,
}
impl ModifyImageAttributeRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_id: "test-image_id".into(),
launch_permission: Some(LaunchPermissionModifications::fixture()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchPermissionModifications {
#[serde(rename = "Add")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub add: Vec<LaunchPermission>,
#[serde(rename = "Remove")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub remove: Vec<LaunchPermission>,
}
impl LaunchPermissionModifications {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
add: vec![],
remove: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct LaunchPermission {
#[serde(rename(serialize = "Group", deserialize = "group"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub group: Option<String>,
#[serde(rename(serialize = "UserId", deserialize = "userId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
impl LaunchPermission {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group: Some("test-group".into()),
user_id: Some("test-user_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableImageBlockPublicAccessRequest {
#[serde(rename = "ImageBlockPublicAccessState")]
pub image_block_public_access_state: String,
}
impl EnableImageBlockPublicAccessRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
image_block_public_access_state: "test-image_block_public_access_state".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RevokeSecurityGroupIngressRequest {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "IpPermissions")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_permissions: Vec<IpPermission>,
}
impl RevokeSecurityGroupIngressRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
ip_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RevokeSecurityGroupEgressRequest {
#[serde(rename(serialize = "GroupId", deserialize = "groupId"))]
pub group_id: String,
#[serde(rename(serialize = "IpPermissions", deserialize = "ipPermissions"))]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_permissions: Vec<IpPermission>,
}
impl RevokeSecurityGroupEgressRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: "test-group_id".into(),
ip_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct AuthorizeSecurityGroupIngressRequest {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "IpPermissions")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub ip_permissions: Vec<IpPermission>,
}
impl AuthorizeSecurityGroupIngressRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
ip_permissions: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteSecurityGroupRequest {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
}
impl DeleteSecurityGroupRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
group_id: Some("test-group_id".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteNatGatewayRequest {
#[serde(rename = "NatGatewayId")]
pub nat_gateway_id: String,
}
impl DeleteNatGatewayRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
nat_gateway_id: "test-nat_gateway_id".into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteVpcEndpointsRequest {
#[serde(rename = "VpcEndpointId")]
#[serde(default)]
pub vpc_endpoint_ids: Vec<String>,
}
impl DeleteVpcEndpointsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
vpc_endpoint_ids: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateFlowLogsRequest {
#[serde(rename = "ResourceId")]
#[serde(default)]
pub resource_ids: Vec<String>,
#[serde(rename = "ResourceType")]
pub resource_type: String,
#[serde(rename = "TrafficType")]
pub traffic_type: String,
#[serde(rename = "LogGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_group_name: Option<String>,
#[serde(rename = "DeliverLogsPermissionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deliver_logs_permission_arn: Option<String>,
}
impl CreateFlowLogsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
resource_ids: vec![],
resource_type: "test-resource_type".into(),
traffic_type: "test-traffic_type".into(),
log_group_name: Some("test-log_group_name".into()),
deliver_logs_permission_arn: Some("test-deliver_logs_permission_arn".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateTagsRequest {
#[serde(rename = "ResourceId")]
#[serde(default)]
pub resources: Vec<String>,
#[serde(rename = "Tag")]
#[serde(default)]
pub tags: Vec<Tag>,
}
impl CreateTagsRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
resources: vec![],
tags: vec![],
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct EnableEbsEncryptionByDefaultRequest {
#[serde(rename = "DryRun")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
}
impl EnableEbsEncryptionByDefaultRequest {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
dry_run: Some(false),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteSnapshotReturnCode {
#[serde(rename(serialize = "SnapshotId", deserialize = "snapshotId"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename(serialize = "ReturnCode", deserialize = "returnCode"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub return_code: Option<String>,
}
impl DeleteSnapshotReturnCode {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
snapshot_id: Some("test-snapshot_id".into()),
return_code: Some("test-return_code".into()),
}
}
}