
com.amazonaws.services.apigateway.model.MethodSetting Maven / Gradle / Ivy
Show all versions of aws-java-sdk-api-gateway Show documentation
/*
* Copyright 2011-2016 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.
*/
package com.amazonaws.services.apigateway.model;
import java.io.Serializable;
/**
*
* Specifies the method setting properties.
*
*/
public class MethodSetting implements Serializable, Cloneable {
/**
*
* 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.
*
*/
private Boolean metricsEnabled;
/**
*
* Specifies the logging level for this method, which effects 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
.
*
*/
private String loggingLevel;
/**
*
* Specifies whether data trace logging is enabled for this method, which effects 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.
*
*/
private Boolean dataTraceEnabled;
/**
*
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*
*/
private Integer throttlingBurstLimit;
/**
*
* Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
*
*/
private Double throttlingRateLimit;
/**
*
* 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.
*
*/
private Boolean cachingEnabled;
/**
*
* 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.
*
*/
private Integer cacheTtlInSeconds;
/**
*
* 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.
*
*/
private Boolean cacheDataEncrypted;
/**
*
* 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.
*
*/
private Boolean requireAuthorizationForCacheControl;
/**
*
* 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
.
*
*/
private String unauthorizedCacheControlHeaderStrategy;
/**
*
* 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.
*
*
* @param 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.
*/
public void setMetricsEnabled(Boolean metricsEnabled) {
this.metricsEnabled = 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.
*
*
* @return 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.
*/
public Boolean getMetricsEnabled() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withMetricsEnabled(Boolean metricsEnabled) {
setMetricsEnabled(metricsEnabled);
return this;
}
/**
*
* 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.
*
*
* @return 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.
*/
public Boolean isMetricsEnabled() {
return this.metricsEnabled;
}
/**
*
* Specifies the logging level for this method, which effects 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
.
*
*
* @param loggingLevel
* Specifies the logging level for this method, which effects 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
.
*/
public void setLoggingLevel(String loggingLevel) {
this.loggingLevel = loggingLevel;
}
/**
*
* Specifies the logging level for this method, which effects 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
.
*
*
* @return Specifies the logging level for this method, which effects 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
.
*/
public String getLoggingLevel() {
return this.loggingLevel;
}
/**
*
* Specifies the logging level for this method, which effects 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
.
*
*
* @param loggingLevel
* Specifies the logging level for this method, which effects 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
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withLoggingLevel(String loggingLevel) {
setLoggingLevel(loggingLevel);
return this;
}
/**
*
* Specifies whether data trace logging is enabled for this method, which effects 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.
*
*
* @param dataTraceEnabled
* Specifies whether data trace logging is enabled for this method, which effects 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.
*/
public void setDataTraceEnabled(Boolean dataTraceEnabled) {
this.dataTraceEnabled = dataTraceEnabled;
}
/**
*
* Specifies whether data trace logging is enabled for this method, which effects 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.
*
*
* @return Specifies whether data trace logging is enabled for this method, which effects 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.
*/
public Boolean getDataTraceEnabled() {
return this.dataTraceEnabled;
}
/**
*
* Specifies whether data trace logging is enabled for this method, which effects 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.
*
*
* @param dataTraceEnabled
* Specifies whether data trace logging is enabled for this method, which effects 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withDataTraceEnabled(Boolean dataTraceEnabled) {
setDataTraceEnabled(dataTraceEnabled);
return this;
}
/**
*
* Specifies whether data trace logging is enabled for this method, which effects 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.
*
*
* @return Specifies whether data trace logging is enabled for this method, which effects 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.
*/
public Boolean isDataTraceEnabled() {
return this.dataTraceEnabled;
}
/**
*
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*
*
* @param throttlingBurstLimit
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*/
public void setThrottlingBurstLimit(Integer throttlingBurstLimit) {
this.throttlingBurstLimit = throttlingBurstLimit;
}
/**
*
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*
*
* @return Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*/
public Integer getThrottlingBurstLimit() {
return this.throttlingBurstLimit;
}
/**
*
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
*
*
* @param throttlingBurstLimit
* Specifies the throttling burst limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/burstLimit
, and the value is an integer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withThrottlingBurstLimit(Integer throttlingBurstLimit) {
setThrottlingBurstLimit(throttlingBurstLimit);
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.
*
*
* @param throttlingRateLimit
* Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
*/
public void setThrottlingRateLimit(Double throttlingRateLimit) {
this.throttlingRateLimit = throttlingRateLimit;
}
/**
*
* Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
*
*
* @return Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
*/
public Double getThrottlingRateLimit() {
return this.throttlingRateLimit;
}
/**
*
* Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
*
*
* @param throttlingRateLimit
* Specifies the throttling rate limit. The PATCH path for this setting is
* /{method_setting_key}/throttling/rateLimit
, and the value is a double.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withThrottlingRateLimit(Double throttlingRateLimit) {
setThrottlingRateLimit(throttlingRateLimit);
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.
*
*
* @param 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.
*/
public void setCachingEnabled(Boolean cachingEnabled) {
this.cachingEnabled = 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.
*
*
* @return 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.
*/
public Boolean getCachingEnabled() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withCachingEnabled(Boolean cachingEnabled) {
setCachingEnabled(cachingEnabled);
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.
*
*
* @return 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.
*/
public Boolean isCachingEnabled() {
return this.cachingEnabled;
}
/**
*
* 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.
*
*
* @param 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.
*/
public void setCacheTtlInSeconds(Integer cacheTtlInSeconds) {
this.cacheTtlInSeconds = 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.
*
*
* @return 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.
*/
public Integer getCacheTtlInSeconds() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withCacheTtlInSeconds(Integer cacheTtlInSeconds) {
setCacheTtlInSeconds(cacheTtlInSeconds);
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.
*
*
* @param 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.
*/
public void setCacheDataEncrypted(Boolean cacheDataEncrypted) {
this.cacheDataEncrypted = 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.
*
*
* @return 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.
*/
public Boolean getCacheDataEncrypted() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withCacheDataEncrypted(Boolean cacheDataEncrypted) {
setCacheDataEncrypted(cacheDataEncrypted);
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.
*
*
* @return 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.
*/
public Boolean isCacheDataEncrypted() {
return this.cacheDataEncrypted;
}
/**
*
* 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.
*
*
* @param 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.
*/
public void setRequireAuthorizationForCacheControl(Boolean requireAuthorizationForCacheControl) {
this.requireAuthorizationForCacheControl = 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.
*
*
* @return 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.
*/
public Boolean getRequireAuthorizationForCacheControl() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MethodSetting withRequireAuthorizationForCacheControl(Boolean requireAuthorizationForCacheControl) {
setRequireAuthorizationForCacheControl(requireAuthorizationForCacheControl);
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.
*
*
* @return 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.
*/
public Boolean isRequireAuthorizationForCacheControl() {
return this.requireAuthorizationForCacheControl;
}
/**
*
* 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
.
*
*
* @param 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
.
* @see UnauthorizedCacheControlHeaderStrategy
*/
public void setUnauthorizedCacheControlHeaderStrategy(String unauthorizedCacheControlHeaderStrategy) {
this.unauthorizedCacheControlHeaderStrategy = 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
.
*
*
* @return 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
.
* @see UnauthorizedCacheControlHeaderStrategy
*/
public String getUnauthorizedCacheControlHeaderStrategy() {
return this.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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UnauthorizedCacheControlHeaderStrategy
*/
public MethodSetting withUnauthorizedCacheControlHeaderStrategy(String unauthorizedCacheControlHeaderStrategy) {
setUnauthorizedCacheControlHeaderStrategy(unauthorizedCacheControlHeaderStrategy);
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
.
*
*
* @param 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
.
* @see UnauthorizedCacheControlHeaderStrategy
*/
public void setUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy unauthorizedCacheControlHeaderStrategy) {
this.unauthorizedCacheControlHeaderStrategy = unauthorizedCacheControlHeaderStrategy.toString();
}
/**
*
* 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UnauthorizedCacheControlHeaderStrategy
*/
public MethodSetting withUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy unauthorizedCacheControlHeaderStrategy) {
setUnauthorizedCacheControlHeaderStrategy(unauthorizedCacheControlHeaderStrategy);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getMetricsEnabled() != null)
sb.append("MetricsEnabled: " + getMetricsEnabled() + ",");
if (getLoggingLevel() != null)
sb.append("LoggingLevel: " + getLoggingLevel() + ",");
if (getDataTraceEnabled() != null)
sb.append("DataTraceEnabled: " + getDataTraceEnabled() + ",");
if (getThrottlingBurstLimit() != null)
sb.append("ThrottlingBurstLimit: " + getThrottlingBurstLimit() + ",");
if (getThrottlingRateLimit() != null)
sb.append("ThrottlingRateLimit: " + getThrottlingRateLimit() + ",");
if (getCachingEnabled() != null)
sb.append("CachingEnabled: " + getCachingEnabled() + ",");
if (getCacheTtlInSeconds() != null)
sb.append("CacheTtlInSeconds: " + getCacheTtlInSeconds() + ",");
if (getCacheDataEncrypted() != null)
sb.append("CacheDataEncrypted: " + getCacheDataEncrypted() + ",");
if (getRequireAuthorizationForCacheControl() != null)
sb.append("RequireAuthorizationForCacheControl: " + getRequireAuthorizationForCacheControl() + ",");
if (getUnauthorizedCacheControlHeaderStrategy() != null)
sb.append("UnauthorizedCacheControlHeaderStrategy: " + getUnauthorizedCacheControlHeaderStrategy());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MethodSetting == false)
return false;
MethodSetting other = (MethodSetting) obj;
if (other.getMetricsEnabled() == null ^ this.getMetricsEnabled() == null)
return false;
if (other.getMetricsEnabled() != null && other.getMetricsEnabled().equals(this.getMetricsEnabled()) == false)
return false;
if (other.getLoggingLevel() == null ^ this.getLoggingLevel() == null)
return false;
if (other.getLoggingLevel() != null && other.getLoggingLevel().equals(this.getLoggingLevel()) == false)
return false;
if (other.getDataTraceEnabled() == null ^ this.getDataTraceEnabled() == null)
return false;
if (other.getDataTraceEnabled() != null && other.getDataTraceEnabled().equals(this.getDataTraceEnabled()) == false)
return false;
if (other.getThrottlingBurstLimit() == null ^ this.getThrottlingBurstLimit() == null)
return false;
if (other.getThrottlingBurstLimit() != null && other.getThrottlingBurstLimit().equals(this.getThrottlingBurstLimit()) == false)
return false;
if (other.getThrottlingRateLimit() == null ^ this.getThrottlingRateLimit() == null)
return false;
if (other.getThrottlingRateLimit() != null && other.getThrottlingRateLimit().equals(this.getThrottlingRateLimit()) == false)
return false;
if (other.getCachingEnabled() == null ^ this.getCachingEnabled() == null)
return false;
if (other.getCachingEnabled() != null && other.getCachingEnabled().equals(this.getCachingEnabled()) == false)
return false;
if (other.getCacheTtlInSeconds() == null ^ this.getCacheTtlInSeconds() == null)
return false;
if (other.getCacheTtlInSeconds() != null && other.getCacheTtlInSeconds().equals(this.getCacheTtlInSeconds()) == false)
return false;
if (other.getCacheDataEncrypted() == null ^ this.getCacheDataEncrypted() == null)
return false;
if (other.getCacheDataEncrypted() != null && other.getCacheDataEncrypted().equals(this.getCacheDataEncrypted()) == false)
return false;
if (other.getRequireAuthorizationForCacheControl() == null ^ this.getRequireAuthorizationForCacheControl() == null)
return false;
if (other.getRequireAuthorizationForCacheControl() != null
&& other.getRequireAuthorizationForCacheControl().equals(this.getRequireAuthorizationForCacheControl()) == false)
return false;
if (other.getUnauthorizedCacheControlHeaderStrategy() == null ^ this.getUnauthorizedCacheControlHeaderStrategy() == null)
return false;
if (other.getUnauthorizedCacheControlHeaderStrategy() != null
&& other.getUnauthorizedCacheControlHeaderStrategy().equals(this.getUnauthorizedCacheControlHeaderStrategy()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMetricsEnabled() == null) ? 0 : getMetricsEnabled().hashCode());
hashCode = prime * hashCode + ((getLoggingLevel() == null) ? 0 : getLoggingLevel().hashCode());
hashCode = prime * hashCode + ((getDataTraceEnabled() == null) ? 0 : getDataTraceEnabled().hashCode());
hashCode = prime * hashCode + ((getThrottlingBurstLimit() == null) ? 0 : getThrottlingBurstLimit().hashCode());
hashCode = prime * hashCode + ((getThrottlingRateLimit() == null) ? 0 : getThrottlingRateLimit().hashCode());
hashCode = prime * hashCode + ((getCachingEnabled() == null) ? 0 : getCachingEnabled().hashCode());
hashCode = prime * hashCode + ((getCacheTtlInSeconds() == null) ? 0 : getCacheTtlInSeconds().hashCode());
hashCode = prime * hashCode + ((getCacheDataEncrypted() == null) ? 0 : getCacheDataEncrypted().hashCode());
hashCode = prime * hashCode + ((getRequireAuthorizationForCacheControl() == null) ? 0 : getRequireAuthorizationForCacheControl().hashCode());
hashCode = prime * hashCode + ((getUnauthorizedCacheControlHeaderStrategy() == null) ? 0 : getUnauthorizedCacheControlHeaderStrategy().hashCode());
return hashCode;
}
@Override
public MethodSetting clone() {
try {
return (MethodSetting) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}