commonMain.aws.sdk.kotlin.services.appsync.model.UpdateApiCacheRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appsync-jvm Show documentation
Show all versions of appsync-jvm Show documentation
The AWS SDK for Kotlin client for AppSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appsync.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Represents the input of a `UpdateApiCache` operation.
*/
public class UpdateApiCacheRequest private constructor(builder: Builder) {
/**
* Caching behavior.
* + **FULL_REQUEST_CACHING**: All requests are fully cached.
* + **PER_RESOLVER_CACHING**: Individual resolvers that you specify are cached.
*/
public val apiCachingBehavior: aws.sdk.kotlin.services.appsync.model.ApiCachingBehavior? = builder.apiCachingBehavior
/**
* The GraphQL API ID.
*/
public val apiId: kotlin.String? = builder.apiId
/**
* Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:
* + NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration.
* + EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for diagnosing bottlenecks in a cache configuration.
*
* Metrics will be recorded by API ID. You can set the value to `ENABLED` or `DISABLED`.
*/
public val healthMetricsConfig: aws.sdk.kotlin.services.appsync.model.CacheHealthMetricsConfig? = builder.healthMetricsConfig
/**
* TTL in seconds for cache entries.
*
* Valid values are 1–3,600 seconds.
*/
public val ttl: kotlin.Long? = builder.ttl
/**
* The cache instance type. Valid values are
* + `SMALL`
* + `MEDIUM`
* + `LARGE`
* + `XLARGE`
* + `LARGE_2X`
* + `LARGE_4X`
* + `LARGE_8X` (not available in all regions)
* + `LARGE_12X`
*
* Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.
*
* The following legacy instance types are available, but their use is discouraged:
* + **T2_SMALL**: A t2.small instance type.
* + **T2_MEDIUM**: A t2.medium instance type.
* + **R4_LARGE**: A r4.large instance type.
* + **R4_XLARGE**: A r4.xlarge instance type.
* + **R4_2XLARGE**: A r4.2xlarge instance type.
* + **R4_4XLARGE**: A r4.4xlarge instance type.
* + **R4_8XLARGE**: A r4.8xlarge instance type.
*/
public val type: aws.sdk.kotlin.services.appsync.model.ApiCacheType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appsync.model.UpdateApiCacheRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateApiCacheRequest(")
append("apiCachingBehavior=$apiCachingBehavior,")
append("apiId=$apiId,")
append("healthMetricsConfig=$healthMetricsConfig,")
append("ttl=$ttl,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = apiCachingBehavior?.hashCode() ?: 0
result = 31 * result + (apiId?.hashCode() ?: 0)
result = 31 * result + (healthMetricsConfig?.hashCode() ?: 0)
result = 31 * result + (ttl?.hashCode() ?: 0)
result = 31 * result + (type?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as UpdateApiCacheRequest
if (apiCachingBehavior != other.apiCachingBehavior) return false
if (apiId != other.apiId) return false
if (healthMetricsConfig != other.healthMetricsConfig) return false
if (ttl != other.ttl) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appsync.model.UpdateApiCacheRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Caching behavior.
* + **FULL_REQUEST_CACHING**: All requests are fully cached.
* + **PER_RESOLVER_CACHING**: Individual resolvers that you specify are cached.
*/
public var apiCachingBehavior: aws.sdk.kotlin.services.appsync.model.ApiCachingBehavior? = null
/**
* The GraphQL API ID.
*/
public var apiId: kotlin.String? = null
/**
* Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:
* + NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration.
* + EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for diagnosing bottlenecks in a cache configuration.
*
* Metrics will be recorded by API ID. You can set the value to `ENABLED` or `DISABLED`.
*/
public var healthMetricsConfig: aws.sdk.kotlin.services.appsync.model.CacheHealthMetricsConfig? = null
/**
* TTL in seconds for cache entries.
*
* Valid values are 1–3,600 seconds.
*/
public var ttl: kotlin.Long? = null
/**
* The cache instance type. Valid values are
* + `SMALL`
* + `MEDIUM`
* + `LARGE`
* + `XLARGE`
* + `LARGE_2X`
* + `LARGE_4X`
* + `LARGE_8X` (not available in all regions)
* + `LARGE_12X`
*
* Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.
*
* The following legacy instance types are available, but their use is discouraged:
* + **T2_SMALL**: A t2.small instance type.
* + **T2_MEDIUM**: A t2.medium instance type.
* + **R4_LARGE**: A r4.large instance type.
* + **R4_XLARGE**: A r4.xlarge instance type.
* + **R4_2XLARGE**: A r4.2xlarge instance type.
* + **R4_4XLARGE**: A r4.4xlarge instance type.
* + **R4_8XLARGE**: A r4.8xlarge instance type.
*/
public var type: aws.sdk.kotlin.services.appsync.model.ApiCacheType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appsync.model.UpdateApiCacheRequest) : this() {
this.apiCachingBehavior = x.apiCachingBehavior
this.apiId = x.apiId
this.healthMetricsConfig = x.healthMetricsConfig
this.ttl = x.ttl
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appsync.model.UpdateApiCacheRequest = UpdateApiCacheRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}