/* * 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; /** *
* Represents a log group. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LogGroup implements Serializable, Cloneable, StructuredPojo { /** ** The name of the log group. *
*/ private String logGroupName; /** ** The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. *
*/ private Long creationTime; private Integer retentionInDays; /** ** The number of metric filters. *
*/ private Integer metricFilterCount; /** ** The Amazon Resource Name (ARN) of the log group. *
*/ private String arn; /** ** The number of bytes stored. *
*/ private Long storedBytes; /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. *
*/ private String kmsKeyId; /** ** Displays whether this log group has a protection policy, or whether it had one in the past. For more information, * see PutDataProtectionPolicy. *
*/ private String dataProtectionStatus; /** ** Displays all the properties that this log group has inherited from account-level settings. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the log group. *
* * @param logGroupName * The name of the log group. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** ** The name of the log group. *
* * @return The name of the log group. */ public String getLogGroupName() { return this.logGroupName; } /** ** The name of the log group. *
* * @param logGroupName * The name of the log group. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** ** The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. *
* * @param creationTime * The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 * UTC. */ public void setCreationTime(Long creationTime) { this.creationTime = creationTime; } /** ** The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. *
* * @return The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 * UTC. */ public Long getCreationTime() { return this.creationTime; } /** ** The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. *
* * @param creationTime * The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 * UTC. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withCreationTime(Long creationTime) { setCreationTime(creationTime); return this; } /** * @param retentionInDays */ public void setRetentionInDays(Integer retentionInDays) { this.retentionInDays = retentionInDays; } /** * @return */ public Integer getRetentionInDays() { return this.retentionInDays; } /** * @param retentionInDays * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withRetentionInDays(Integer retentionInDays) { setRetentionInDays(retentionInDays); return this; } /** ** The number of metric filters. *
* * @param metricFilterCount * The number of metric filters. */ public void setMetricFilterCount(Integer metricFilterCount) { this.metricFilterCount = metricFilterCount; } /** ** The number of metric filters. *
* * @return The number of metric filters. */ public Integer getMetricFilterCount() { return this.metricFilterCount; } /** ** The number of metric filters. *
* * @param metricFilterCount * The number of metric filters. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withMetricFilterCount(Integer metricFilterCount) { setMetricFilterCount(metricFilterCount); return this; } /** ** The Amazon Resource Name (ARN) of the log group. *
* * @param arn * The Amazon Resource Name (ARN) of the log group. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the log group. *
* * @return The Amazon Resource Name (ARN) of the log group. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the log group. *
* * @param arn * The Amazon Resource Name (ARN) of the log group. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withArn(String arn) { setArn(arn); return this; } /** ** The number of bytes stored. *
* * @param storedBytes * The number of bytes stored. */ public void setStoredBytes(Long storedBytes) { this.storedBytes = storedBytes; } /** ** The number of bytes stored. *
* * @return The number of bytes stored. */ public Long getStoredBytes() { return this.storedBytes; } /** ** The number of bytes stored. *
* * @param storedBytes * The number of bytes stored. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withStoredBytes(Long storedBytes) { setStoredBytes(storedBytes); return this; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. *
* * @param kmsKeyId * The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. *
* * @return The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. */ public String getKmsKeyId() { return this.kmsKeyId; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. *
* * @param kmsKeyId * The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. * @return Returns a reference to this object so that method calls can be chained together. */ public LogGroup withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** ** Displays whether this log group has a protection policy, or whether it had one in the past. For more information, * see PutDataProtectionPolicy. *
* * @param dataProtectionStatus * Displays whether this log group has a protection policy, or whether it had one in the past. For more * information, see PutDataProtectionPolicy. * @see DataProtectionStatus */ public void setDataProtectionStatus(String dataProtectionStatus) { this.dataProtectionStatus = dataProtectionStatus; } /** ** Displays whether this log group has a protection policy, or whether it had one in the past. For more information, * see PutDataProtectionPolicy. *
* * @return Displays whether this log group has a protection policy, or whether it had one in the past. For more * information, see PutDataProtectionPolicy. * @see DataProtectionStatus */ public String getDataProtectionStatus() { return this.dataProtectionStatus; } /** ** Displays whether this log group has a protection policy, or whether it had one in the past. For more information, * see PutDataProtectionPolicy. *
* * @param dataProtectionStatus * Displays whether this log group has a protection policy, or whether it had one in the past. For more * information, see PutDataProtectionPolicy. * @return Returns a reference to this object so that method calls can be chained together. * @see DataProtectionStatus */ public LogGroup withDataProtectionStatus(String dataProtectionStatus) { setDataProtectionStatus(dataProtectionStatus); return this; } /** ** Displays whether this log group has a protection policy, or whether it had one in the past. For more information, * see PutDataProtectionPolicy. *
* * @param dataProtectionStatus * Displays whether this log group has a protection policy, or whether it had one in the past. For more * information, see PutDataProtectionPolicy. * @return Returns a reference to this object so that method calls can be chained together. * @see DataProtectionStatus */ public LogGroup withDataProtectionStatus(DataProtectionStatus dataProtectionStatus) { this.dataProtectionStatus = dataProtectionStatus.toString(); return this; } /** ** Displays all the properties that this log group has inherited from account-level settings. *
* * @return Displays all the properties that this log group has inherited from account-level settings. * @see InheritedProperty */ public java.util.List* Displays all the properties that this log group has inherited from account-level settings. *
* * @param inheritedProperties * Displays all the properties that this log group has inherited from account-level settings. * @see InheritedProperty */ public void setInheritedProperties(java.util.Collection* Displays all the properties that this log group has inherited from account-level settings. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInheritedProperties(java.util.Collection)} or {@link #withInheritedProperties(java.util.Collection)} * if you want to override the existing values. *
* * @param inheritedProperties * Displays all the properties that this log group has inherited from account-level settings. * @return Returns a reference to this object so that method calls can be chained together. * @see InheritedProperty */ public LogGroup withInheritedProperties(String... inheritedProperties) { if (this.inheritedProperties == null) { setInheritedProperties(new com.amazonaws.internal.SdkInternalList* Displays all the properties that this log group has inherited from account-level settings. *
* * @param inheritedProperties * Displays all the properties that this log group has inherited from account-level settings. * @return Returns a reference to this object so that method calls can be chained together. * @see InheritedProperty */ public LogGroup withInheritedProperties(java.util.Collection* Displays all the properties that this log group has inherited from account-level settings. *
* * @param inheritedProperties * Displays all the properties that this log group has inherited from account-level settings. * @return Returns a reference to this object so that method calls can be chained together. * @see InheritedProperty */ public LogGroup withInheritedProperties(InheritedProperty... inheritedProperties) { com.amazonaws.internal.SdkInternalList