/**
 * 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/core/utils/memory/stl/AWSVector.h>
#include <aws/synthetics/SyntheticsRequest.h>
#include <aws/synthetics/Synthetics_EXPORTS.h>
#include <aws/synthetics/model/BrowserType.h>

#include <utility>

namespace Aws {
namespace Synthetics {
namespace Model {

/**
 */
class DescribeCanariesLastRunRequest : public SyntheticsRequest {
 public:
  AWS_SYNTHETICS_API DescribeCanariesLastRunRequest() = 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 "DescribeCanariesLastRun"; }

  AWS_SYNTHETICS_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>A token that indicates that there is more data available. You can use this
   * token in a subsequent <code>DescribeCanariesLastRun</code> operation to retrieve
   * the next set 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>
  DescribeCanariesLastRunRequest& WithNextToken(NextTokenT&& value) {
    SetNextToken(std::forward<NextTokenT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specify this parameter to limit how many runs are returned each time you use
   * the <code>DescribeLastRun</code> operation. If you omit this parameter, the
   * default of 100 is used.</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 DescribeCanariesLastRunRequest& WithMaxResults(int value) {
    SetMaxResults(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Use this parameter to return only canaries that match the names that you
   * specify here. You can specify as many as five canary names.</p> <p>If you
   * specify this parameter, the operation is successful only if you have
   * authorization to view all the canaries that you specify in your request. If you
   * do not have permission to view any of the canaries, the request fails with a 403
   * response.</p> <p>You are required to use the <code>Names</code> parameter if you
   * are logged on to a user or role that has an IAM policy that restricts which
   * canaries that you are allowed to view. For more information, see <a
   * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
   * Limiting a user to viewing specific canaries</a>.</p>
   */
  inline const Aws::Vector<Aws::String>& GetNames() const { return m_names; }
  inline bool NamesHasBeenSet() const { return m_namesHasBeenSet; }
  template <typename NamesT = Aws::Vector<Aws::String>>
  void SetNames(NamesT&& value) {
    m_namesHasBeenSet = true;
    m_names = std::forward<NamesT>(value);
  }
  template <typename NamesT = Aws::Vector<Aws::String>>
  DescribeCanariesLastRunRequest& WithNames(NamesT&& value) {
    SetNames(std::forward<NamesT>(value));
    return *this;
  }
  template <typename NamesT = Aws::String>
  DescribeCanariesLastRunRequest& AddNames(NamesT&& value) {
    m_namesHasBeenSet = true;
    m_names.emplace_back(std::forward<NamesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The type of browser to use for the canary run.</p>
   */
  inline BrowserType GetBrowserType() const { return m_browserType; }
  inline bool BrowserTypeHasBeenSet() const { return m_browserTypeHasBeenSet; }
  inline void SetBrowserType(BrowserType value) {
    m_browserTypeHasBeenSet = true;
    m_browserType = value;
  }
  inline DescribeCanariesLastRunRequest& WithBrowserType(BrowserType value) {
    SetBrowserType(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_nextToken;

  int m_maxResults{0};

  Aws::Vector<Aws::String> m_names;

  BrowserType m_browserType{BrowserType::NOT_SET};
  bool m_nextTokenHasBeenSet = false;
  bool m_maxResultsHasBeenSet = false;
  bool m_namesHasBeenSet = false;
  bool m_browserTypeHasBeenSet = false;
};

}  // namespace Model
}  // namespace Synthetics
}  // namespace Aws
