/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Inspector2 { namespace Model { /** *

The details that define an aggregation based on Amazon EC2 * instances.

See Also:

AWS * API Reference

*/ class Ec2InstanceAggregation { public: AWS_INSPECTOR2_API Ec2InstanceAggregation(); AWS_INSPECTOR2_API Ec2InstanceAggregation(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API Ec2InstanceAggregation& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline const Aws::Vector& GetAmis() const{ return m_amis; } /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline bool AmisHasBeenSet() const { return m_amisHasBeenSet; } /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline void SetAmis(const Aws::Vector& value) { m_amisHasBeenSet = true; m_amis = value; } /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline void SetAmis(Aws::Vector&& value) { m_amisHasBeenSet = true; m_amis = std::move(value); } /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline Ec2InstanceAggregation& WithAmis(const Aws::Vector& value) { SetAmis(value); return *this;} /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline Ec2InstanceAggregation& WithAmis(Aws::Vector&& value) { SetAmis(std::move(value)); return *this;} /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline Ec2InstanceAggregation& AddAmis(const StringFilter& value) { m_amisHasBeenSet = true; m_amis.push_back(value); return *this; } /** *

The AMI IDs associated with the Amazon EC2 instances to aggregate findings * for.

*/ inline Ec2InstanceAggregation& AddAmis(StringFilter&& value) { m_amisHasBeenSet = true; m_amis.push_back(std::move(value)); return *this; } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline const Aws::Vector& GetInstanceIds() const{ return m_instanceIds; } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline void SetInstanceIds(const Aws::Vector& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline void SetInstanceIds(Aws::Vector&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline Ec2InstanceAggregation& WithInstanceIds(const Aws::Vector& value) { SetInstanceIds(value); return *this;} /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline Ec2InstanceAggregation& WithInstanceIds(Aws::Vector&& value) { SetInstanceIds(std::move(value)); return *this;} /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline Ec2InstanceAggregation& AddInstanceIds(const StringFilter& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

The Amazon EC2 instance IDs to aggregate findings for.

*/ inline Ec2InstanceAggregation& AddInstanceIds(StringFilter&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline const Aws::Vector& GetInstanceTags() const{ return m_instanceTags; } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline bool InstanceTagsHasBeenSet() const { return m_instanceTagsHasBeenSet; } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline void SetInstanceTags(const Aws::Vector& value) { m_instanceTagsHasBeenSet = true; m_instanceTags = value; } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline void SetInstanceTags(Aws::Vector&& value) { m_instanceTagsHasBeenSet = true; m_instanceTags = std::move(value); } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline Ec2InstanceAggregation& WithInstanceTags(const Aws::Vector& value) { SetInstanceTags(value); return *this;} /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline Ec2InstanceAggregation& WithInstanceTags(Aws::Vector&& value) { SetInstanceTags(std::move(value)); return *this;} /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline Ec2InstanceAggregation& AddInstanceTags(const MapFilter& value) { m_instanceTagsHasBeenSet = true; m_instanceTags.push_back(value); return *this; } /** *

The Amazon EC2 instance tags to aggregate findings for.

*/ inline Ec2InstanceAggregation& AddInstanceTags(MapFilter&& value) { m_instanceTagsHasBeenSet = true; m_instanceTags.push_back(std::move(value)); return *this; } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline const Aws::Vector& GetOperatingSystems() const{ return m_operatingSystems; } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline bool OperatingSystemsHasBeenSet() const { return m_operatingSystemsHasBeenSet; } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline void SetOperatingSystems(const Aws::Vector& value) { m_operatingSystemsHasBeenSet = true; m_operatingSystems = value; } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline void SetOperatingSystems(Aws::Vector&& value) { m_operatingSystemsHasBeenSet = true; m_operatingSystems = std::move(value); } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline Ec2InstanceAggregation& WithOperatingSystems(const Aws::Vector& value) { SetOperatingSystems(value); return *this;} /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline Ec2InstanceAggregation& WithOperatingSystems(Aws::Vector&& value) { SetOperatingSystems(std::move(value)); return *this;} /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline Ec2InstanceAggregation& AddOperatingSystems(const StringFilter& value) { m_operatingSystemsHasBeenSet = true; m_operatingSystems.push_back(value); return *this; } /** *

The operating system types to aggregate findings for. Valid values must be * uppercase and underscore separated, examples are ORACLE_LINUX_7 and * ALPINE_LINUX_3_8.

*/ inline Ec2InstanceAggregation& AddOperatingSystems(StringFilter&& value) { m_operatingSystemsHasBeenSet = true; m_operatingSystems.push_back(std::move(value)); return *this; } /** *

The value to sort results by.

*/ inline const Ec2InstanceSortBy& GetSortBy() const{ return m_sortBy; } /** *

The value to sort results by.

*/ inline bool SortByHasBeenSet() const { return m_sortByHasBeenSet; } /** *

The value to sort results by.

*/ inline void SetSortBy(const Ec2InstanceSortBy& value) { m_sortByHasBeenSet = true; m_sortBy = value; } /** *

The value to sort results by.

*/ inline void SetSortBy(Ec2InstanceSortBy&& value) { m_sortByHasBeenSet = true; m_sortBy = std::move(value); } /** *

The value to sort results by.

*/ inline Ec2InstanceAggregation& WithSortBy(const Ec2InstanceSortBy& value) { SetSortBy(value); return *this;} /** *

The value to sort results by.

*/ inline Ec2InstanceAggregation& WithSortBy(Ec2InstanceSortBy&& value) { SetSortBy(std::move(value)); return *this;} /** *

The order to sort results by.

*/ inline const SortOrder& GetSortOrder() const{ return m_sortOrder; } /** *

The order to sort results by.

*/ inline bool SortOrderHasBeenSet() const { return m_sortOrderHasBeenSet; } /** *

The order to sort results by.

*/ inline void SetSortOrder(const SortOrder& value) { m_sortOrderHasBeenSet = true; m_sortOrder = value; } /** *

The order to sort results by.

*/ inline void SetSortOrder(SortOrder&& value) { m_sortOrderHasBeenSet = true; m_sortOrder = std::move(value); } /** *

The order to sort results by.

*/ inline Ec2InstanceAggregation& WithSortOrder(const SortOrder& value) { SetSortOrder(value); return *this;} /** *

The order to sort results by.

*/ inline Ec2InstanceAggregation& WithSortOrder(SortOrder&& value) { SetSortOrder(std::move(value)); return *this;} private: Aws::Vector m_amis; bool m_amisHasBeenSet = false; Aws::Vector m_instanceIds; bool m_instanceIdsHasBeenSet = false; Aws::Vector m_instanceTags; bool m_instanceTagsHasBeenSet = false; Aws::Vector m_operatingSystems; bool m_operatingSystemsHasBeenSet = false; Ec2InstanceSortBy m_sortBy; bool m_sortByHasBeenSet = false; SortOrder m_sortOrder; bool m_sortOrderHasBeenSet = false; }; } // namespace Model } // namespace Inspector2 } // namespace Aws