/* * 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.logs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* This structure contains details about a saved CloudWatch Logs Insights query definition. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class QueryDefinition implements Serializable, Cloneable, StructuredPojo { /** ** The unique ID of the query definition. *
*/ private String queryDefinitionId; /** ** The name of the query definition. *
*/ private String name; /** ** The query string to use for this definition. For more information, see CloudWatch Logs Insights * Query Syntax. *
*/ private String queryString; /** ** The date that the query definition was most recently modified. *
*/ private Long lastModified; /** ** If this query definition contains a list of log groups that it is limited to, that list appears here. *
*/ private com.amazonaws.internal.SdkInternalList* The unique ID of the query definition. *
* * @param queryDefinitionId * The unique ID of the query definition. */ public void setQueryDefinitionId(String queryDefinitionId) { this.queryDefinitionId = queryDefinitionId; } /** ** The unique ID of the query definition. *
* * @return The unique ID of the query definition. */ public String getQueryDefinitionId() { return this.queryDefinitionId; } /** ** The unique ID of the query definition. *
* * @param queryDefinitionId * The unique ID of the query definition. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withQueryDefinitionId(String queryDefinitionId) { setQueryDefinitionId(queryDefinitionId); return this; } /** ** The name of the query definition. *
* * @param name * The name of the query definition. */ public void setName(String name) { this.name = name; } /** ** The name of the query definition. *
* * @return The name of the query definition. */ public String getName() { return this.name; } /** ** The name of the query definition. *
* * @param name * The name of the query definition. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withName(String name) { setName(name); return this; } /** ** The query string to use for this definition. For more information, see CloudWatch Logs Insights * Query Syntax. *
* * @param queryString * The query string to use for this definition. For more information, see CloudWatch Logs * Insights Query Syntax. */ public void setQueryString(String queryString) { this.queryString = queryString; } /** ** The query string to use for this definition. For more information, see CloudWatch Logs Insights * Query Syntax. *
* * @return The query string to use for this definition. For more information, see CloudWatch Logs * Insights Query Syntax. */ public String getQueryString() { return this.queryString; } /** ** The query string to use for this definition. For more information, see CloudWatch Logs Insights * Query Syntax. *
* * @param queryString * The query string to use for this definition. For more information, see CloudWatch Logs * Insights Query Syntax. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withQueryString(String queryString) { setQueryString(queryString); return this; } /** ** The date that the query definition was most recently modified. *
* * @param lastModified * The date that the query definition was most recently modified. */ public void setLastModified(Long lastModified) { this.lastModified = lastModified; } /** ** The date that the query definition was most recently modified. *
* * @return The date that the query definition was most recently modified. */ public Long getLastModified() { return this.lastModified; } /** ** The date that the query definition was most recently modified. *
* * @param lastModified * The date that the query definition was most recently modified. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withLastModified(Long lastModified) { setLastModified(lastModified); return this; } /** ** If this query definition contains a list of log groups that it is limited to, that list appears here. *
* * @return If this query definition contains a list of log groups that it is limited to, that list appears here. */ public java.util.List* If this query definition contains a list of log groups that it is limited to, that list appears here. *
* * @param logGroupNames * If this query definition contains a list of log groups that it is limited to, that list appears here. */ public void setLogGroupNames(java.util.Collection* If this query definition contains a list of log groups that it is limited to, that list appears here. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setLogGroupNames(java.util.Collection)} or {@link #withLogGroupNames(java.util.Collection)} if you want * to override the existing values. *
* * @param logGroupNames * If this query definition contains a list of log groups that it is limited to, that list appears here. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withLogGroupNames(String... logGroupNames) { if (this.logGroupNames == null) { setLogGroupNames(new com.amazonaws.internal.SdkInternalList* If this query definition contains a list of log groups that it is limited to, that list appears here. *
* * @param logGroupNames * If this query definition contains a list of log groups that it is limited to, that list appears here. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryDefinition withLogGroupNames(java.util.Collection