/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appmesh-2019-01-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.AppMesh.Model
{
///
/// An object that represents a retry policy. Specify at least one value for at least
/// one of the types of RetryEvents
, a value for maxRetries
,
/// and a value for perRetryTimeout
. Both server-error
and gateway-error
/// under httpRetryEvents
include the Envoy reset
policy. For
/// more information on the reset
policy, see the Envoy
/// documentation.
///
public partial class HttpRetryPolicy
{
private List _httpRetryEvents = new List();
private long? _maxRetries;
private Duration _perRetryTimeout;
private List _tcpRetryEvents = new List();
///
/// Gets and sets the property HttpRetryEvents.
///
/// Specify at least one of the following values.
///
/// -
///
/// server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508,
/// 510, and 511
///
///
-
///
/// gateway-error – HTTP status codes 502, 503, and 504
///
///
-
///
/// client-error – HTTP status code 409
///
///
-
///
/// stream-error – Retry on refused stream
///
///
///
[AWSProperty(Min=1, Max=25)]
public List HttpRetryEvents
{
get { return this._httpRetryEvents; }
set { this._httpRetryEvents = value; }
}
// Check to see if HttpRetryEvents property is set
internal bool IsSetHttpRetryEvents()
{
return this._httpRetryEvents != null && this._httpRetryEvents.Count > 0;
}
///
/// Gets and sets the property MaxRetries.
///
/// The maximum number of retry attempts.
///
///
[AWSProperty(Required=true, Min=0)]
public long MaxRetries
{
get { return this._maxRetries.GetValueOrDefault(); }
set { this._maxRetries = value; }
}
// Check to see if MaxRetries property is set
internal bool IsSetMaxRetries()
{
return this._maxRetries.HasValue;
}
///
/// Gets and sets the property PerRetryTimeout.
///
/// The timeout for each retry attempt.
///
///
[AWSProperty(Required=true)]
public Duration PerRetryTimeout
{
get { return this._perRetryTimeout; }
set { this._perRetryTimeout = value; }
}
// Check to see if PerRetryTimeout property is set
internal bool IsSetPerRetryTimeout()
{
return this._perRetryTimeout != null;
}
///
/// Gets and sets the property TcpRetryEvents.
///
/// Specify a valid value. The event occurs before any processing of a request has started
/// and is encountered when the upstream is temporarily or permanently unavailable.
///
///
[AWSProperty(Min=1, Max=1)]
public List TcpRetryEvents
{
get { return this._tcpRetryEvents; }
set { this._tcpRetryEvents = value; }
}
// Check to see if TcpRetryEvents property is set
internal bool IsSetTcpRetryEvents()
{
return this._tcpRetryEvents != null && this._tcpRetryEvents.Count > 0;
}
}
}