All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.logs.model.GetLogAnomalyDetectorResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudWatch Logs module holds the client classes that are used for communicating with Amazon CloudWatch Logs Service

The newest version!
/*
 * Copyright 2019-2024 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;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetLogAnomalyDetectorResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* The name of the log anomaly detector *

*/ private String detectorName; /** *

* An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. *

*/ private com.amazonaws.internal.SdkInternalList logGroupArnList; /** *

* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency * that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, * then setting evaluationFrequency to FIFTEEN_MIN might be appropriate. *

*/ private String evaluationFrequency; private String filterPattern; /** *

* Specifies whether the anomaly detector is currently active. To change its status, use the enabled * parameter in the UpdateLogAnomalyDetector operation. *

*/ private String anomalyDetectorStatus; /** *

* The ID of the KMS key assigned to this anomaly detector, if any. *

*/ private String kmsKeyId; /** *

* The date and time when this anomaly detector was created. *

*/ private Long creationTimeStamp; /** *

* The date and time when this anomaly detector was most recently modified. *

*/ private Long lastModifiedTimeStamp; /** *

* The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined * and the anomaly detector model will treat new occurrences of similar event as normal. *

*/ private Long anomalyVisibilityTime; /** *

* The name of the log anomaly detector *

* * @param detectorName * The name of the log anomaly detector */ public void setDetectorName(String detectorName) { this.detectorName = detectorName; } /** *

* The name of the log anomaly detector *

* * @return The name of the log anomaly detector */ public String getDetectorName() { return this.detectorName; } /** *

* The name of the log anomaly detector *

* * @param detectorName * The name of the log anomaly detector * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withDetectorName(String detectorName) { setDetectorName(detectorName); return this; } /** *

* An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. *

* * @return An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. */ public java.util.List getLogGroupArnList() { if (logGroupArnList == null) { logGroupArnList = new com.amazonaws.internal.SdkInternalList(); } return logGroupArnList; } /** *

* An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. *

* * @param logGroupArnList * An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. */ public void setLogGroupArnList(java.util.Collection logGroupArnList) { if (logGroupArnList == null) { this.logGroupArnList = null; return; } this.logGroupArnList = new com.amazonaws.internal.SdkInternalList(logGroupArnList); } /** *

* An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLogGroupArnList(java.util.Collection)} or {@link #withLogGroupArnList(java.util.Collection)} if you * want to override the existing values. *

* * @param logGroupArnList * An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withLogGroupArnList(String... logGroupArnList) { if (this.logGroupArnList == null) { setLogGroupArnList(new com.amazonaws.internal.SdkInternalList(logGroupArnList.length)); } for (String ele : logGroupArnList) { this.logGroupArnList.add(ele); } return this; } /** *

* An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. *

* * @param logGroupArnList * An array of structures, where each structure contains the ARN of a log group associated with this anomaly * detector. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withLogGroupArnList(java.util.Collection logGroupArnList) { setLogGroupArnList(logGroupArnList); return this; } /** *

* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency * that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, * then setting evaluationFrequency to FIFTEEN_MIN might be appropriate. *

* * @param evaluationFrequency * Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the * frequency that the log group receives new logs. For example, if the log group receives new log events * every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be * appropriate. * @see EvaluationFrequency */ public void setEvaluationFrequency(String evaluationFrequency) { this.evaluationFrequency = evaluationFrequency; } /** *

* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency * that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, * then setting evaluationFrequency to FIFTEEN_MIN might be appropriate. *

* * @return Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the * frequency that the log group receives new logs. For example, if the log group receives new log events * every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be * appropriate. * @see EvaluationFrequency */ public String getEvaluationFrequency() { return this.evaluationFrequency; } /** *

* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency * that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, * then setting evaluationFrequency to FIFTEEN_MIN might be appropriate. *

* * @param evaluationFrequency * Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the * frequency that the log group receives new logs. For example, if the log group receives new log events * every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be * appropriate. * @return Returns a reference to this object so that method calls can be chained together. * @see EvaluationFrequency */ public GetLogAnomalyDetectorResult withEvaluationFrequency(String evaluationFrequency) { setEvaluationFrequency(evaluationFrequency); return this; } /** *

* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency * that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, * then setting evaluationFrequency to FIFTEEN_MIN might be appropriate. *

* * @param evaluationFrequency * Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the * frequency that the log group receives new logs. For example, if the log group receives new log events * every 10 minutes, then setting evaluationFrequency to FIFTEEN_MIN might be * appropriate. * @return Returns a reference to this object so that method calls can be chained together. * @see EvaluationFrequency */ public GetLogAnomalyDetectorResult withEvaluationFrequency(EvaluationFrequency evaluationFrequency) { this.evaluationFrequency = evaluationFrequency.toString(); return this; } /** * @param filterPattern */ public void setFilterPattern(String filterPattern) { this.filterPattern = filterPattern; } /** * @return */ public String getFilterPattern() { return this.filterPattern; } /** * @param filterPattern * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withFilterPattern(String filterPattern) { setFilterPattern(filterPattern); return this; } /** *

* Specifies whether the anomaly detector is currently active. To change its status, use the enabled * parameter in the UpdateLogAnomalyDetector operation. *

* * @param anomalyDetectorStatus * Specifies whether the anomaly detector is currently active. To change its status, use the * enabled parameter in the UpdateLogAnomalyDetector operation. * @see AnomalyDetectorStatus */ public void setAnomalyDetectorStatus(String anomalyDetectorStatus) { this.anomalyDetectorStatus = anomalyDetectorStatus; } /** *

* Specifies whether the anomaly detector is currently active. To change its status, use the enabled * parameter in the UpdateLogAnomalyDetector operation. *

* * @return Specifies whether the anomaly detector is currently active. To change its status, use the * enabled parameter in the UpdateLogAnomalyDetector operation. * @see AnomalyDetectorStatus */ public String getAnomalyDetectorStatus() { return this.anomalyDetectorStatus; } /** *

* Specifies whether the anomaly detector is currently active. To change its status, use the enabled * parameter in the UpdateLogAnomalyDetector operation. *

* * @param anomalyDetectorStatus * Specifies whether the anomaly detector is currently active. To change its status, use the * enabled parameter in the UpdateLogAnomalyDetector operation. * @return Returns a reference to this object so that method calls can be chained together. * @see AnomalyDetectorStatus */ public GetLogAnomalyDetectorResult withAnomalyDetectorStatus(String anomalyDetectorStatus) { setAnomalyDetectorStatus(anomalyDetectorStatus); return this; } /** *

* Specifies whether the anomaly detector is currently active. To change its status, use the enabled * parameter in the UpdateLogAnomalyDetector operation. *

* * @param anomalyDetectorStatus * Specifies whether the anomaly detector is currently active. To change its status, use the * enabled parameter in the UpdateLogAnomalyDetector operation. * @return Returns a reference to this object so that method calls can be chained together. * @see AnomalyDetectorStatus */ public GetLogAnomalyDetectorResult withAnomalyDetectorStatus(AnomalyDetectorStatus anomalyDetectorStatus) { this.anomalyDetectorStatus = anomalyDetectorStatus.toString(); return this; } /** *

* The ID of the KMS key assigned to this anomaly detector, if any. *

* * @param kmsKeyId * The ID of the KMS key assigned to this anomaly detector, if any. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The ID of the KMS key assigned to this anomaly detector, if any. *

* * @return The ID of the KMS key assigned to this anomaly detector, if any. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The ID of the KMS key assigned to this anomaly detector, if any. *

* * @param kmsKeyId * The ID of the KMS key assigned to this anomaly detector, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The date and time when this anomaly detector was created. *

* * @param creationTimeStamp * The date and time when this anomaly detector was created. */ public void setCreationTimeStamp(Long creationTimeStamp) { this.creationTimeStamp = creationTimeStamp; } /** *

* The date and time when this anomaly detector was created. *

* * @return The date and time when this anomaly detector was created. */ public Long getCreationTimeStamp() { return this.creationTimeStamp; } /** *

* The date and time when this anomaly detector was created. *

* * @param creationTimeStamp * The date and time when this anomaly detector was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withCreationTimeStamp(Long creationTimeStamp) { setCreationTimeStamp(creationTimeStamp); return this; } /** *

* The date and time when this anomaly detector was most recently modified. *

* * @param lastModifiedTimeStamp * The date and time when this anomaly detector was most recently modified. */ public void setLastModifiedTimeStamp(Long lastModifiedTimeStamp) { this.lastModifiedTimeStamp = lastModifiedTimeStamp; } /** *

* The date and time when this anomaly detector was most recently modified. *

* * @return The date and time when this anomaly detector was most recently modified. */ public Long getLastModifiedTimeStamp() { return this.lastModifiedTimeStamp; } /** *

* The date and time when this anomaly detector was most recently modified. *

* * @param lastModifiedTimeStamp * The date and time when this anomaly detector was most recently modified. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withLastModifiedTimeStamp(Long lastModifiedTimeStamp) { setLastModifiedTimeStamp(lastModifiedTimeStamp); return this; } /** *

* The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined * and the anomaly detector model will treat new occurrences of similar event as normal. *

* * @param anomalyVisibilityTime * The number of days used as the life cycle of anomalies. After this time, anomalies are automatically * baselined and the anomaly detector model will treat new occurrences of similar event as normal. */ public void setAnomalyVisibilityTime(Long anomalyVisibilityTime) { this.anomalyVisibilityTime = anomalyVisibilityTime; } /** *

* The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined * and the anomaly detector model will treat new occurrences of similar event as normal. *

* * @return The number of days used as the life cycle of anomalies. After this time, anomalies are automatically * baselined and the anomaly detector model will treat new occurrences of similar event as normal. */ public Long getAnomalyVisibilityTime() { return this.anomalyVisibilityTime; } /** *

* The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined * and the anomaly detector model will treat new occurrences of similar event as normal. *

* * @param anomalyVisibilityTime * The number of days used as the life cycle of anomalies. After this time, anomalies are automatically * baselined and the anomaly detector model will treat new occurrences of similar event as normal. * @return Returns a reference to this object so that method calls can be chained together. */ public GetLogAnomalyDetectorResult withAnomalyVisibilityTime(Long anomalyVisibilityTime) { setAnomalyVisibilityTime(anomalyVisibilityTime); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDetectorName() != null) sb.append("DetectorName: ").append(getDetectorName()).append(","); if (getLogGroupArnList() != null) sb.append("LogGroupArnList: ").append(getLogGroupArnList()).append(","); if (getEvaluationFrequency() != null) sb.append("EvaluationFrequency: ").append(getEvaluationFrequency()).append(","); if (getFilterPattern() != null) sb.append("FilterPattern: ").append(getFilterPattern()).append(","); if (getAnomalyDetectorStatus() != null) sb.append("AnomalyDetectorStatus: ").append(getAnomalyDetectorStatus()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getCreationTimeStamp() != null) sb.append("CreationTimeStamp: ").append(getCreationTimeStamp()).append(","); if (getLastModifiedTimeStamp() != null) sb.append("LastModifiedTimeStamp: ").append(getLastModifiedTimeStamp()).append(","); if (getAnomalyVisibilityTime() != null) sb.append("AnomalyVisibilityTime: ").append(getAnomalyVisibilityTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetLogAnomalyDetectorResult == false) return false; GetLogAnomalyDetectorResult other = (GetLogAnomalyDetectorResult) obj; if (other.getDetectorName() == null ^ this.getDetectorName() == null) return false; if (other.getDetectorName() != null && other.getDetectorName().equals(this.getDetectorName()) == false) return false; if (other.getLogGroupArnList() == null ^ this.getLogGroupArnList() == null) return false; if (other.getLogGroupArnList() != null && other.getLogGroupArnList().equals(this.getLogGroupArnList()) == false) return false; if (other.getEvaluationFrequency() == null ^ this.getEvaluationFrequency() == null) return false; if (other.getEvaluationFrequency() != null && other.getEvaluationFrequency().equals(this.getEvaluationFrequency()) == false) return false; if (other.getFilterPattern() == null ^ this.getFilterPattern() == null) return false; if (other.getFilterPattern() != null && other.getFilterPattern().equals(this.getFilterPattern()) == false) return false; if (other.getAnomalyDetectorStatus() == null ^ this.getAnomalyDetectorStatus() == null) return false; if (other.getAnomalyDetectorStatus() != null && other.getAnomalyDetectorStatus().equals(this.getAnomalyDetectorStatus()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getCreationTimeStamp() == null ^ this.getCreationTimeStamp() == null) return false; if (other.getCreationTimeStamp() != null && other.getCreationTimeStamp().equals(this.getCreationTimeStamp()) == false) return false; if (other.getLastModifiedTimeStamp() == null ^ this.getLastModifiedTimeStamp() == null) return false; if (other.getLastModifiedTimeStamp() != null && other.getLastModifiedTimeStamp().equals(this.getLastModifiedTimeStamp()) == false) return false; if (other.getAnomalyVisibilityTime() == null ^ this.getAnomalyVisibilityTime() == null) return false; if (other.getAnomalyVisibilityTime() != null && other.getAnomalyVisibilityTime().equals(this.getAnomalyVisibilityTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDetectorName() == null) ? 0 : getDetectorName().hashCode()); hashCode = prime * hashCode + ((getLogGroupArnList() == null) ? 0 : getLogGroupArnList().hashCode()); hashCode = prime * hashCode + ((getEvaluationFrequency() == null) ? 0 : getEvaluationFrequency().hashCode()); hashCode = prime * hashCode + ((getFilterPattern() == null) ? 0 : getFilterPattern().hashCode()); hashCode = prime * hashCode + ((getAnomalyDetectorStatus() == null) ? 0 : getAnomalyDetectorStatus().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getCreationTimeStamp() == null) ? 0 : getCreationTimeStamp().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTimeStamp() == null) ? 0 : getLastModifiedTimeStamp().hashCode()); hashCode = prime * hashCode + ((getAnomalyVisibilityTime() == null) ? 0 : getAnomalyVisibilityTime().hashCode()); return hashCode; } @Override public GetLogAnomalyDetectorResult clone() { try { return (GetLogAnomalyDetectorResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy