/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/ram/RAMRequest.h>
#include <aws/ram/RAM_EXPORTS.h>
#include <aws/ram/model/PermissionFeatureSet.h>
#include <aws/ram/model/ResourceShareAssociationStatus.h>

#include <utility>

namespace Aws {
namespace RAM {
namespace Model {

/**
 */
class ListPermissionAssociationsRequest : public RAMRequest {
 public:
  AWS_RAM_API ListPermissionAssociationsRequest() = default;

  // Service request name is the Operation name which will send this request out,
  // each operation should has unique request name, so that we can get operation's name from this request.
  // Note: this is not true for response, multiple operations may have the same response name,
  // so we can not get operation's name from response.
  inline virtual const char* GetServiceRequestName() const override { return "ListPermissionAssociations"; }

  AWS_RAM_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>Specifies the <a
   * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon
   * Resource Name (ARN)</a> of the managed permission.</p>
   */
  inline const Aws::String& GetPermissionArn() const { return m_permissionArn; }
  inline bool PermissionArnHasBeenSet() const { return m_permissionArnHasBeenSet; }
  template <typename PermissionArnT = Aws::String>
  void SetPermissionArn(PermissionArnT&& value) {
    m_permissionArnHasBeenSet = true;
    m_permissionArn = std::forward<PermissionArnT>(value);
  }
  template <typename PermissionArnT = Aws::String>
  ListPermissionAssociationsRequest& WithPermissionArn(PermissionArnT&& value) {
    SetPermissionArn(std::forward<PermissionArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies that you want to list only those associations with resource shares
   * that use this version of the managed permission. If you don't provide a value
   * for this parameter, then the operation returns information about associations
   * with resource shares that use any version of the managed permission.</p>
   */
  inline int GetPermissionVersion() const { return m_permissionVersion; }
  inline bool PermissionVersionHasBeenSet() const { return m_permissionVersionHasBeenSet; }
  inline void SetPermissionVersion(int value) {
    m_permissionVersionHasBeenSet = true;
    m_permissionVersion = value;
  }
  inline ListPermissionAssociationsRequest& WithPermissionVersion(int value) {
    SetPermissionVersion(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies that you want to list only those associations with resource shares
   * that match this status.</p>
   */
  inline ResourceShareAssociationStatus GetAssociationStatus() const { return m_associationStatus; }
  inline bool AssociationStatusHasBeenSet() const { return m_associationStatusHasBeenSet; }
  inline void SetAssociationStatus(ResourceShareAssociationStatus value) {
    m_associationStatusHasBeenSet = true;
    m_associationStatus = value;
  }
  inline ListPermissionAssociationsRequest& WithAssociationStatus(ResourceShareAssociationStatus value) {
    SetAssociationStatus(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies that you want to list only those associations with resource shares
   * that include at least one resource of this resource type.</p>
   */
  inline const Aws::String& GetResourceType() const { return m_resourceType; }
  inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
  template <typename ResourceTypeT = Aws::String>
  void SetResourceType(ResourceTypeT&& value) {
    m_resourceTypeHasBeenSet = true;
    m_resourceType = std::forward<ResourceTypeT>(value);
  }
  template <typename ResourceTypeT = Aws::String>
  ListPermissionAssociationsRequest& WithResourceType(ResourceTypeT&& value) {
    SetResourceType(std::forward<ResourceTypeT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies that you want to list only those associations with resource shares
   * that have a <code>featureSet</code> with this value.</p>
   */
  inline PermissionFeatureSet GetFeatureSet() const { return m_featureSet; }
  inline bool FeatureSetHasBeenSet() const { return m_featureSetHasBeenSet; }
  inline void SetFeatureSet(PermissionFeatureSet value) {
    m_featureSetHasBeenSet = true;
    m_featureSet = value;
  }
  inline ListPermissionAssociationsRequest& WithFeatureSet(PermissionFeatureSet value) {
    SetFeatureSet(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>When <code>true</code>, specifies that you want to list only those
   * associations with resource shares that use the default version of the specified
   * managed permission.</p> <p>When <code>false</code> (the default value), lists
   * associations with resource shares that use any version of the specified managed
   * permission.</p>
   */
  inline bool GetDefaultVersion() const { return m_defaultVersion; }
  inline bool DefaultVersionHasBeenSet() const { return m_defaultVersionHasBeenSet; }
  inline void SetDefaultVersion(bool value) {
    m_defaultVersionHasBeenSet = true;
    m_defaultVersion = value;
  }
  inline ListPermissionAssociationsRequest& WithDefaultVersion(bool value) {
    SetDefaultVersion(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies that you want to receive the next page of results. Valid only if
   * you received a <code>NextToken</code> response in the previous request. If you
   * did, it indicates that more output is available. Set this parameter to the value
   * provided by the previous call's <code>NextToken</code> response to request the
   * next page of results.</p>
   */
  inline const Aws::String& GetNextToken() const { return m_nextToken; }
  inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
  template <typename NextTokenT = Aws::String>
  void SetNextToken(NextTokenT&& value) {
    m_nextTokenHasBeenSet = true;
    m_nextToken = std::forward<NextTokenT>(value);
  }
  template <typename NextTokenT = Aws::String>
  ListPermissionAssociationsRequest& WithNextToken(NextTokenT&& value) {
    SetNextToken(std::forward<NextTokenT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the total number of results that you want included on each page of
   * the response. If you do not include this parameter, it defaults to a value that
   * is specific to the operation. If additional items exist beyond the number you
   * specify, the <code>NextToken</code> response element is returned with a value
   * (not null). Include the specified value as the <code>NextToken</code> request
   * parameter in the next call to the operation to get the next part of the results.
   * Note that the service might return fewer results than the maximum even when
   * there are more results available. You should check <code>NextToken</code> after
   * every operation to ensure that you receive all of the results.</p>
   */
  inline int GetMaxResults() const { return m_maxResults; }
  inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
  inline void SetMaxResults(int value) {
    m_maxResultsHasBeenSet = true;
    m_maxResults = value;
  }
  inline ListPermissionAssociationsRequest& WithMaxResults(int value) {
    SetMaxResults(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_permissionArn;

  int m_permissionVersion{0};

  ResourceShareAssociationStatus m_associationStatus{ResourceShareAssociationStatus::NOT_SET};

  Aws::String m_resourceType;

  PermissionFeatureSet m_featureSet{PermissionFeatureSet::NOT_SET};

  bool m_defaultVersion{false};

  Aws::String m_nextToken;

  int m_maxResults{0};
  bool m_permissionArnHasBeenSet = false;
  bool m_permissionVersionHasBeenSet = false;
  bool m_associationStatusHasBeenSet = false;
  bool m_resourceTypeHasBeenSet = false;
  bool m_featureSetHasBeenSet = false;
  bool m_defaultVersionHasBeenSet = false;
  bool m_nextTokenHasBeenSet = false;
  bool m_maxResultsHasBeenSet = false;
};

}  // namespace Model
}  // namespace RAM
}  // namespace Aws
