AWS SDK for C++  1.8.7
AWS SDK for C++
DescribeSecurityGroupsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
11 #include <aws/ec2/model/Filter.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "DescribeSecurityGroups"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
96  inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
97 
153  inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
154 
210  inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
211 
267  inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
268 
324  inline DescribeSecurityGroupsRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
325 
381  inline DescribeSecurityGroupsRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
382 
438  inline DescribeSecurityGroupsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
439 
495  inline DescribeSecurityGroupsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
496 
497 
502  inline const Aws::Vector<Aws::String>& GetGroupIds() const{ return m_groupIds; }
503 
508  inline bool GroupIdsHasBeenSet() const { return m_groupIdsHasBeenSet; }
509 
514  inline void SetGroupIds(const Aws::Vector<Aws::String>& value) { m_groupIdsHasBeenSet = true; m_groupIds = value; }
515 
520  inline void SetGroupIds(Aws::Vector<Aws::String>&& value) { m_groupIdsHasBeenSet = true; m_groupIds = std::move(value); }
521 
526  inline DescribeSecurityGroupsRequest& WithGroupIds(const Aws::Vector<Aws::String>& value) { SetGroupIds(value); return *this;}
527 
532  inline DescribeSecurityGroupsRequest& WithGroupIds(Aws::Vector<Aws::String>&& value) { SetGroupIds(std::move(value)); return *this;}
533 
538  inline DescribeSecurityGroupsRequest& AddGroupIds(const Aws::String& value) { m_groupIdsHasBeenSet = true; m_groupIds.push_back(value); return *this; }
539 
544  inline DescribeSecurityGroupsRequest& AddGroupIds(Aws::String&& value) { m_groupIdsHasBeenSet = true; m_groupIds.push_back(std::move(value)); return *this; }
545 
550  inline DescribeSecurityGroupsRequest& AddGroupIds(const char* value) { m_groupIdsHasBeenSet = true; m_groupIds.push_back(value); return *this; }
551 
552 
559  inline const Aws::Vector<Aws::String>& GetGroupNames() const{ return m_groupNames; }
560 
567  inline bool GroupNamesHasBeenSet() const { return m_groupNamesHasBeenSet; }
568 
575  inline void SetGroupNames(const Aws::Vector<Aws::String>& value) { m_groupNamesHasBeenSet = true; m_groupNames = value; }
576 
583  inline void SetGroupNames(Aws::Vector<Aws::String>&& value) { m_groupNamesHasBeenSet = true; m_groupNames = std::move(value); }
584 
591  inline DescribeSecurityGroupsRequest& WithGroupNames(const Aws::Vector<Aws::String>& value) { SetGroupNames(value); return *this;}
592 
599  inline DescribeSecurityGroupsRequest& WithGroupNames(Aws::Vector<Aws::String>&& value) { SetGroupNames(std::move(value)); return *this;}
600 
607  inline DescribeSecurityGroupsRequest& AddGroupNames(const Aws::String& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
608 
615  inline DescribeSecurityGroupsRequest& AddGroupNames(Aws::String&& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(std::move(value)); return *this; }
616 
623  inline DescribeSecurityGroupsRequest& AddGroupNames(const char* value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
624 
625 
632  inline bool GetDryRun() const{ return m_dryRun; }
633 
640  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
641 
648  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
649 
656  inline DescribeSecurityGroupsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
657 
658 
662  inline const Aws::String& GetNextToken() const{ return m_nextToken; }
663 
667  inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
668 
672  inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
673 
677  inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
678 
682  inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
683 
687  inline DescribeSecurityGroupsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
688 
692  inline DescribeSecurityGroupsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
693 
697  inline DescribeSecurityGroupsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
698 
699 
706  inline int GetMaxResults() const{ return m_maxResults; }
707 
714  inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
715 
722  inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
723 
730  inline DescribeSecurityGroupsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
731 
732  private:
733 
734  Aws::Vector<Filter> m_filters;
735  bool m_filtersHasBeenSet;
736 
737  Aws::Vector<Aws::String> m_groupIds;
738  bool m_groupIdsHasBeenSet;
739 
740  Aws::Vector<Aws::String> m_groupNames;
741  bool m_groupNamesHasBeenSet;
742 
743  bool m_dryRun;
744  bool m_dryRunHasBeenSet;
745 
746  Aws::String m_nextToken;
747  bool m_nextTokenHasBeenSet;
748 
749  int m_maxResults;
750  bool m_maxResultsHasBeenSet;
751  };
752 
753 } // namespace Model
754 } // namespace EC2
755 } // namespace Aws
DescribeSecurityGroupsRequest & AddGroupNames(const Aws::String &value)
void SetGroupNames(const Aws::Vector< Aws::String > &value)
DescribeSecurityGroupsRequest & AddGroupIds(const char *value)
DescribeSecurityGroupsRequest & AddGroupNames(const char *value)
DescribeSecurityGroupsRequest & WithNextToken(Aws::String &&value)
const Aws::Vector< Aws::String > & GetGroupIds() const
DescribeSecurityGroupsRequest & AddGroupNames(Aws::String &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
DescribeSecurityGroupsRequest & WithGroupIds(Aws::Vector< Aws::String > &&value)
virtual const char * GetServiceRequestName() const override
DescribeSecurityGroupsRequest & WithNextToken(const char *value)
const Aws::Vector< Aws::String > & GetGroupNames() const
void SetGroupIds(const Aws::Vector< Aws::String > &value)
DescribeSecurityGroupsRequest & WithNextToken(const Aws::String &value)
DescribeSecurityGroupsRequest & WithFilters(Aws::Vector< Filter > &&value)
DescribeSecurityGroupsRequest & WithGroupIds(const Aws::Vector< Aws::String > &value)
DescribeSecurityGroupsRequest & WithGroupNames(Aws::Vector< Aws::String > &&value)
DescribeSecurityGroupsRequest & AddGroupIds(const Aws::String &value)
DescribeSecurityGroupsRequest & WithMaxResults(int value)
void SetGroupIds(Aws::Vector< Aws::String > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DescribeSecurityGroupsRequest & WithGroupNames(const Aws::Vector< Aws::String > &value)
void SetGroupNames(Aws::Vector< Aws::String > &&value)
DescribeSecurityGroupsRequest & AddFilters(const Filter &value)
void SetFilters(const Aws::Vector< Filter > &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
DescribeSecurityGroupsRequest & WithFilters(const Aws::Vector< Filter > &value)
DescribeSecurityGroupsRequest & WithDryRun(bool value)
DescribeSecurityGroupsRequest & AddGroupIds(Aws::String &&value)
DescribeSecurityGroupsRequest & AddFilters(Filter &&value)