/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** *

Specifies the method setting properties.

See Also:

AWS * API Reference

*/ class MethodSetting { public: AWS_APIGATEWAY_API MethodSetting(); AWS_APIGATEWAY_API MethodSetting(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API MethodSetting& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies whether Amazon CloudWatch metrics are enabled for this method. The * PATCH path for this setting is * /{method_setting_key}/metrics/enabled, and the value is a * Boolean.

*/ inline bool GetMetricsEnabled() const{ return m_metricsEnabled; } /** *

Specifies whether Amazon CloudWatch metrics are enabled for this method. The * PATCH path for this setting is * /{method_setting_key}/metrics/enabled, and the value is a * Boolean.

*/ inline bool MetricsEnabledHasBeenSet() const { return m_metricsEnabledHasBeenSet; } /** *

Specifies whether Amazon CloudWatch metrics are enabled for this method. The * PATCH path for this setting is * /{method_setting_key}/metrics/enabled, and the value is a * Boolean.

*/ inline void SetMetricsEnabled(bool value) { m_metricsEnabledHasBeenSet = true; m_metricsEnabled = value; } /** *

Specifies whether Amazon CloudWatch metrics are enabled for this method. The * PATCH path for this setting is * /{method_setting_key}/metrics/enabled, and the value is a * Boolean.

*/ inline MethodSetting& WithMetricsEnabled(bool value) { SetMetricsEnabled(value); return *this;} /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline const Aws::String& GetLoggingLevel() const{ return m_loggingLevel; } /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline bool LoggingLevelHasBeenSet() const { return m_loggingLevelHasBeenSet; } /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline void SetLoggingLevel(const Aws::String& value) { m_loggingLevelHasBeenSet = true; m_loggingLevel = value; } /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline void SetLoggingLevel(Aws::String&& value) { m_loggingLevelHasBeenSet = true; m_loggingLevel = std::move(value); } /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline void SetLoggingLevel(const char* value) { m_loggingLevelHasBeenSet = true; m_loggingLevel.assign(value); } /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline MethodSetting& WithLoggingLevel(const Aws::String& value) { SetLoggingLevel(value); return *this;} /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline MethodSetting& WithLoggingLevel(Aws::String&& value) { SetLoggingLevel(std::move(value)); return *this;} /** *

Specifies the logging level for this method, which affects the log entries * pushed to Amazon CloudWatch Logs. The PATCH path for this setting is * /{method_setting_key}/logging/loglevel, and the available levels * are OFF, ERROR, and INFO. Choose * ERROR to write only error-level entries to CloudWatch Logs, or * choose INFO to include all ERROR events as well as * extra informational events.

*/ inline MethodSetting& WithLoggingLevel(const char* value) { SetLoggingLevel(value); return *this;} /** *

Specifies whether data trace logging is enabled for this method, which * affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for * this setting is /{method_setting_key}/logging/dataTrace, and the * value is a Boolean.

*/ inline bool GetDataTraceEnabled() const{ return m_dataTraceEnabled; } /** *

Specifies whether data trace logging is enabled for this method, which * affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for * this setting is /{method_setting_key}/logging/dataTrace, and the * value is a Boolean.

*/ inline bool DataTraceEnabledHasBeenSet() const { return m_dataTraceEnabledHasBeenSet; } /** *

Specifies whether data trace logging is enabled for this method, which * affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for * this setting is /{method_setting_key}/logging/dataTrace, and the * value is a Boolean.

*/ inline void SetDataTraceEnabled(bool value) { m_dataTraceEnabledHasBeenSet = true; m_dataTraceEnabled = value; } /** *

Specifies whether data trace logging is enabled for this method, which * affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for * this setting is /{method_setting_key}/logging/dataTrace, and the * value is a Boolean.

*/ inline MethodSetting& WithDataTraceEnabled(bool value) { SetDataTraceEnabled(value); return *this;} /** *

Specifies the throttling burst limit. The PATCH path for this setting is * /{method_setting_key}/throttling/burstLimit, and the value is an * integer.

*/ inline int GetThrottlingBurstLimit() const{ return m_throttlingBurstLimit; } /** *

Specifies the throttling burst limit. The PATCH path for this setting is * /{method_setting_key}/throttling/burstLimit, and the value is an * integer.

*/ inline bool ThrottlingBurstLimitHasBeenSet() const { return m_throttlingBurstLimitHasBeenSet; } /** *

Specifies the throttling burst limit. The PATCH path for this setting is * /{method_setting_key}/throttling/burstLimit, and the value is an * integer.

*/ inline void SetThrottlingBurstLimit(int value) { m_throttlingBurstLimitHasBeenSet = true; m_throttlingBurstLimit = value; } /** *

Specifies the throttling burst limit. The PATCH path for this setting is * /{method_setting_key}/throttling/burstLimit, and the value is an * integer.

*/ inline MethodSetting& WithThrottlingBurstLimit(int value) { SetThrottlingBurstLimit(value); return *this;} /** *

Specifies the throttling rate limit. The PATCH path for this setting is * /{method_setting_key}/throttling/rateLimit, and the value is a * double.

*/ inline double GetThrottlingRateLimit() const{ return m_throttlingRateLimit; } /** *

Specifies the throttling rate limit. The PATCH path for this setting is * /{method_setting_key}/throttling/rateLimit, and the value is a * double.

*/ inline bool ThrottlingRateLimitHasBeenSet() const { return m_throttlingRateLimitHasBeenSet; } /** *

Specifies the throttling rate limit. The PATCH path for this setting is * /{method_setting_key}/throttling/rateLimit, and the value is a * double.

*/ inline void SetThrottlingRateLimit(double value) { m_throttlingRateLimitHasBeenSet = true; m_throttlingRateLimit = value; } /** *

Specifies the throttling rate limit. The PATCH path for this setting is * /{method_setting_key}/throttling/rateLimit, and the value is a * double.

*/ inline MethodSetting& WithThrottlingRateLimit(double value) { SetThrottlingRateLimit(value); return *this;} /** *

Specifies whether responses should be cached and returned for requests. A * cache cluster must be enabled on the stage for responses to be cached. The PATCH * path for this setting is /{method_setting_key}/caching/enabled, and * the value is a Boolean.

*/ inline bool GetCachingEnabled() const{ return m_cachingEnabled; } /** *

Specifies whether responses should be cached and returned for requests. A * cache cluster must be enabled on the stage for responses to be cached. The PATCH * path for this setting is /{method_setting_key}/caching/enabled, and * the value is a Boolean.

*/ inline bool CachingEnabledHasBeenSet() const { return m_cachingEnabledHasBeenSet; } /** *

Specifies whether responses should be cached and returned for requests. A * cache cluster must be enabled on the stage for responses to be cached. The PATCH * path for this setting is /{method_setting_key}/caching/enabled, and * the value is a Boolean.

*/ inline void SetCachingEnabled(bool value) { m_cachingEnabledHasBeenSet = true; m_cachingEnabled = value; } /** *

Specifies whether responses should be cached and returned for requests. A * cache cluster must be enabled on the stage for responses to be cached. The PATCH * path for this setting is /{method_setting_key}/caching/enabled, and * the value is a Boolean.

*/ inline MethodSetting& WithCachingEnabled(bool value) { SetCachingEnabled(value); return *this;} /** *

Specifies the time to live (TTL), in seconds, for cached responses. The * higher the TTL, the longer the response will be cached. The PATCH path for this * setting is /{method_setting_key}/caching/ttlInSeconds, and the * value is an integer.

*/ inline int GetCacheTtlInSeconds() const{ return m_cacheTtlInSeconds; } /** *

Specifies the time to live (TTL), in seconds, for cached responses. The * higher the TTL, the longer the response will be cached. The PATCH path for this * setting is /{method_setting_key}/caching/ttlInSeconds, and the * value is an integer.

*/ inline bool CacheTtlInSecondsHasBeenSet() const { return m_cacheTtlInSecondsHasBeenSet; } /** *

Specifies the time to live (TTL), in seconds, for cached responses. The * higher the TTL, the longer the response will be cached. The PATCH path for this * setting is /{method_setting_key}/caching/ttlInSeconds, and the * value is an integer.

*/ inline void SetCacheTtlInSeconds(int value) { m_cacheTtlInSecondsHasBeenSet = true; m_cacheTtlInSeconds = value; } /** *

Specifies the time to live (TTL), in seconds, for cached responses. The * higher the TTL, the longer the response will be cached. The PATCH path for this * setting is /{method_setting_key}/caching/ttlInSeconds, and the * value is an integer.

*/ inline MethodSetting& WithCacheTtlInSeconds(int value) { SetCacheTtlInSeconds(value); return *this;} /** *

Specifies whether the cached responses are encrypted. The PATCH path for this * setting is /{method_setting_key}/caching/dataEncrypted, and the * value is a Boolean.

*/ inline bool GetCacheDataEncrypted() const{ return m_cacheDataEncrypted; } /** *

Specifies whether the cached responses are encrypted. The PATCH path for this * setting is /{method_setting_key}/caching/dataEncrypted, and the * value is a Boolean.

*/ inline bool CacheDataEncryptedHasBeenSet() const { return m_cacheDataEncryptedHasBeenSet; } /** *

Specifies whether the cached responses are encrypted. The PATCH path for this * setting is /{method_setting_key}/caching/dataEncrypted, and the * value is a Boolean.

*/ inline void SetCacheDataEncrypted(bool value) { m_cacheDataEncryptedHasBeenSet = true; m_cacheDataEncrypted = value; } /** *

Specifies whether the cached responses are encrypted. The PATCH path for this * setting is /{method_setting_key}/caching/dataEncrypted, and the * value is a Boolean.

*/ inline MethodSetting& WithCacheDataEncrypted(bool value) { SetCacheDataEncrypted(value); return *this;} /** *

Specifies whether authorization is required for a cache invalidation request. * The PATCH path for this setting is * /{method_setting_key}/caching/requireAuthorizationForCacheControl, * and the value is a Boolean.

*/ inline bool GetRequireAuthorizationForCacheControl() const{ return m_requireAuthorizationForCacheControl; } /** *

Specifies whether authorization is required for a cache invalidation request. * The PATCH path for this setting is * /{method_setting_key}/caching/requireAuthorizationForCacheControl, * and the value is a Boolean.

*/ inline bool RequireAuthorizationForCacheControlHasBeenSet() const { return m_requireAuthorizationForCacheControlHasBeenSet; } /** *

Specifies whether authorization is required for a cache invalidation request. * The PATCH path for this setting is * /{method_setting_key}/caching/requireAuthorizationForCacheControl, * and the value is a Boolean.

*/ inline void SetRequireAuthorizationForCacheControl(bool value) { m_requireAuthorizationForCacheControlHasBeenSet = true; m_requireAuthorizationForCacheControl = value; } /** *

Specifies whether authorization is required for a cache invalidation request. * The PATCH path for this setting is * /{method_setting_key}/caching/requireAuthorizationForCacheControl, * and the value is a Boolean.

*/ inline MethodSetting& WithRequireAuthorizationForCacheControl(bool value) { SetRequireAuthorizationForCacheControl(value); return *this;} /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline const UnauthorizedCacheControlHeaderStrategy& GetUnauthorizedCacheControlHeaderStrategy() const{ return m_unauthorizedCacheControlHeaderStrategy; } /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline bool UnauthorizedCacheControlHeaderStrategyHasBeenSet() const { return m_unauthorizedCacheControlHeaderStrategyHasBeenSet; } /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline void SetUnauthorizedCacheControlHeaderStrategy(const UnauthorizedCacheControlHeaderStrategy& value) { m_unauthorizedCacheControlHeaderStrategyHasBeenSet = true; m_unauthorizedCacheControlHeaderStrategy = value; } /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline void SetUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy&& value) { m_unauthorizedCacheControlHeaderStrategyHasBeenSet = true; m_unauthorizedCacheControlHeaderStrategy = std::move(value); } /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline MethodSetting& WithUnauthorizedCacheControlHeaderStrategy(const UnauthorizedCacheControlHeaderStrategy& value) { SetUnauthorizedCacheControlHeaderStrategy(value); return *this;} /** *

Specifies how to handle unauthorized requests for cache invalidation. The * PATCH path for this setting is * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, * and the available values are FAIL_WITH_403, * SUCCEED_WITH_RESPONSE_HEADER, * SUCCEED_WITHOUT_RESPONSE_HEADER.

*/ inline MethodSetting& WithUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy&& value) { SetUnauthorizedCacheControlHeaderStrategy(std::move(value)); return *this;} private: bool m_metricsEnabled; bool m_metricsEnabledHasBeenSet = false; Aws::String m_loggingLevel; bool m_loggingLevelHasBeenSet = false; bool m_dataTraceEnabled; bool m_dataTraceEnabledHasBeenSet = false; int m_throttlingBurstLimit; bool m_throttlingBurstLimitHasBeenSet = false; double m_throttlingRateLimit; bool m_throttlingRateLimitHasBeenSet = false; bool m_cachingEnabled; bool m_cachingEnabledHasBeenSet = false; int m_cacheTtlInSeconds; bool m_cacheTtlInSecondsHasBeenSet = false; bool m_cacheDataEncrypted; bool m_cacheDataEncryptedHasBeenSet = false; bool m_requireAuthorizationForCacheControl; bool m_requireAuthorizationForCacheControlHasBeenSet = false; UnauthorizedCacheControlHeaderStrategy m_unauthorizedCacheControlHeaderStrategy; bool m_unauthorizedCacheControlHeaderStrategyHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws