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

#pragma once
#include <aws/synthetics/Synthetics_EXPORTS.h>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace Synthetics {
namespace Model {

/**
 * <p>This structure contains information about the canary's retry
 * configuration.</p>  <p>The default account level concurrent execution
 * limit from Lambda is 1000. When you have more than 1000 canaries, it's possible
 * there are more than 1000 Lambda invocations due to retries and the console might
 * hang. For more information on the Lambda execution limit, see <a
 * href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html#:~:text=As%20your%20functions%20receive%20more,functions%20in%20an%20AWS%20Region">Understanding
 * Lambda function scaling</a>.</p>   <p>For canary with
 * <code>MaxRetries = 2</code>, you need to set the
 * <code>CanaryRunConfigInput.TimeoutInSeconds</code> to less than 600 seconds to
 * avoid validation errors.</p> <p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/RetryConfigInput">AWS
 * API Reference</a></p>
 */
class RetryConfigInput {
 public:
  AWS_SYNTHETICS_API RetryConfigInput() = default;
  AWS_SYNTHETICS_API RetryConfigInput(Aws::Utils::Json::JsonView jsonValue);
  AWS_SYNTHETICS_API RetryConfigInput& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_SYNTHETICS_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The maximum number of retries. The value must be less than or equal to 2.</p>
   */
  inline int GetMaxRetries() const { return m_maxRetries; }
  inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
  inline void SetMaxRetries(int value) {
    m_maxRetriesHasBeenSet = true;
    m_maxRetries = value;
  }
  inline RetryConfigInput& WithMaxRetries(int value) {
    SetMaxRetries(value);
    return *this;
  }
  ///@}
 private:
  int m_maxRetries{0};
  bool m_maxRetriesHasBeenSet = false;
};

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