/* * Copyright 2018-2023 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.appsync.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The caching configuration for a resolver that has caching activated. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CachingConfig implements Serializable, Cloneable, StructuredPojo { /** ** The TTL in seconds for a resolver that has caching activated. *
** Valid values are 1–3,600 seconds. *
*/ private Long ttl; /** ** The caching keys for a resolver that has caching activated. *
*
* Valid values are entries from the $context.arguments
, $context.source
, and
* $context.identity
maps.
*
* The TTL in seconds for a resolver that has caching activated. *
** Valid values are 1–3,600 seconds. *
* * @param ttl * The TTL in seconds for a resolver that has caching activated. ** Valid values are 1–3,600 seconds. */ public void setTtl(Long ttl) { this.ttl = ttl; } /** *
* The TTL in seconds for a resolver that has caching activated. *
** Valid values are 1–3,600 seconds. *
* * @return The TTL in seconds for a resolver that has caching activated. ** Valid values are 1–3,600 seconds. */ public Long getTtl() { return this.ttl; } /** *
* The TTL in seconds for a resolver that has caching activated. *
** Valid values are 1–3,600 seconds. *
* * @param ttl * The TTL in seconds for a resolver that has caching activated. ** Valid values are 1–3,600 seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public CachingConfig withTtl(Long ttl) { setTtl(ttl); return this; } /** *
* The caching keys for a resolver that has caching activated. *
*
* Valid values are entries from the $context.arguments
, $context.source
, and
* $context.identity
maps.
*
* Valid values are entries from the
* The caching keys for a resolver that has caching activated.
*
* Valid values are entries from the $context.arguments
, $context.source
, and
* $context.identity
maps.
*/
public java.util.List$context.arguments
, $context.source
, and
* $context.identity
maps.
*
* Valid values are entries from the
* The caching keys for a resolver that has caching activated.
*
* Valid values are entries from the
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCachingKeys(java.util.Collection)} or {@link #withCachingKeys(java.util.Collection)} if you want to
* override the existing values.
* $context.arguments
, $context.source
, and
* $context.identity
maps.
*/
public void setCachingKeys(java.util.Collection$context.arguments
, $context.source
, and
* $context.identity
maps.
*
* Valid values are entries from the
* The caching keys for a resolver that has caching activated.
*
* Valid values are entries from the $context.arguments
, $context.source
, and
* $context.identity
maps.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CachingConfig withCachingKeys(String... cachingKeys) {
if (this.cachingKeys == null) {
setCachingKeys(new java.util.ArrayList$context.arguments
, $context.source
, and
* $context.identity
maps.
*
* Valid values are entries from the $context.arguments
, $context.source
, and
* $context.identity
maps.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CachingConfig withCachingKeys(java.util.Collection