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

com.amazonaws.services.devopsguru.model.LogAnomalyClass Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.devopsguru.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about an anomalous log event found within a log group. *

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

* The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a sequence * of log events that share the same source. *

*/ private String logStreamName; /** *

* The type of log anomaly that has been detected. *

*/ private String logAnomalyType; /** *

* The token where the anomaly was detected. This may refer to an exception or another location, or it may be blank * for log anomalies such as format anomalies. *

*/ private String logAnomalyToken; /** *

* The ID of the log event. *

*/ private String logEventId; /** *

* The explanation for why the log event is considered an anomaly. *

*/ private String explanation; /** *

* The number of log lines where this anomalous log event occurs. *

*/ private Integer numberOfLogLinesOccurrences; /** *

* The time of the first occurrence of the anomalous log event. *

*/ private java.util.Date logEventTimestamp; /** *

* The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a sequence * of log events that share the same source. *

* * @param logStreamName * The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a * sequence of log events that share the same source. */ public void setLogStreamName(String logStreamName) { this.logStreamName = logStreamName; } /** *

* The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a sequence * of log events that share the same source. *

* * @return The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a * sequence of log events that share the same source. */ public String getLogStreamName() { return this.logStreamName; } /** *

* The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a sequence * of log events that share the same source. *

* * @param logStreamName * The name of the Amazon CloudWatch log stream that the anomalous log event belongs to. A log stream is a * sequence of log events that share the same source. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withLogStreamName(String logStreamName) { setLogStreamName(logStreamName); return this; } /** *

* The type of log anomaly that has been detected. *

* * @param logAnomalyType * The type of log anomaly that has been detected. * @see LogAnomalyType */ public void setLogAnomalyType(String logAnomalyType) { this.logAnomalyType = logAnomalyType; } /** *

* The type of log anomaly that has been detected. *

* * @return The type of log anomaly that has been detected. * @see LogAnomalyType */ public String getLogAnomalyType() { return this.logAnomalyType; } /** *

* The type of log anomaly that has been detected. *

* * @param logAnomalyType * The type of log anomaly that has been detected. * @return Returns a reference to this object so that method calls can be chained together. * @see LogAnomalyType */ public LogAnomalyClass withLogAnomalyType(String logAnomalyType) { setLogAnomalyType(logAnomalyType); return this; } /** *

* The type of log anomaly that has been detected. *

* * @param logAnomalyType * The type of log anomaly that has been detected. * @return Returns a reference to this object so that method calls can be chained together. * @see LogAnomalyType */ public LogAnomalyClass withLogAnomalyType(LogAnomalyType logAnomalyType) { this.logAnomalyType = logAnomalyType.toString(); return this; } /** *

* The token where the anomaly was detected. This may refer to an exception or another location, or it may be blank * for log anomalies such as format anomalies. *

* * @param logAnomalyToken * The token where the anomaly was detected. This may refer to an exception or another location, or it may be * blank for log anomalies such as format anomalies. */ public void setLogAnomalyToken(String logAnomalyToken) { this.logAnomalyToken = logAnomalyToken; } /** *

* The token where the anomaly was detected. This may refer to an exception or another location, or it may be blank * for log anomalies such as format anomalies. *

* * @return The token where the anomaly was detected. This may refer to an exception or another location, or it may * be blank for log anomalies such as format anomalies. */ public String getLogAnomalyToken() { return this.logAnomalyToken; } /** *

* The token where the anomaly was detected. This may refer to an exception or another location, or it may be blank * for log anomalies such as format anomalies. *

* * @param logAnomalyToken * The token where the anomaly was detected. This may refer to an exception or another location, or it may be * blank for log anomalies such as format anomalies. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withLogAnomalyToken(String logAnomalyToken) { setLogAnomalyToken(logAnomalyToken); return this; } /** *

* The ID of the log event. *

* * @param logEventId * The ID of the log event. */ public void setLogEventId(String logEventId) { this.logEventId = logEventId; } /** *

* The ID of the log event. *

* * @return The ID of the log event. */ public String getLogEventId() { return this.logEventId; } /** *

* The ID of the log event. *

* * @param logEventId * The ID of the log event. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withLogEventId(String logEventId) { setLogEventId(logEventId); return this; } /** *

* The explanation for why the log event is considered an anomaly. *

* * @param explanation * The explanation for why the log event is considered an anomaly. */ public void setExplanation(String explanation) { this.explanation = explanation; } /** *

* The explanation for why the log event is considered an anomaly. *

* * @return The explanation for why the log event is considered an anomaly. */ public String getExplanation() { return this.explanation; } /** *

* The explanation for why the log event is considered an anomaly. *

* * @param explanation * The explanation for why the log event is considered an anomaly. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withExplanation(String explanation) { setExplanation(explanation); return this; } /** *

* The number of log lines where this anomalous log event occurs. *

* * @param numberOfLogLinesOccurrences * The number of log lines where this anomalous log event occurs. */ public void setNumberOfLogLinesOccurrences(Integer numberOfLogLinesOccurrences) { this.numberOfLogLinesOccurrences = numberOfLogLinesOccurrences; } /** *

* The number of log lines where this anomalous log event occurs. *

* * @return The number of log lines where this anomalous log event occurs. */ public Integer getNumberOfLogLinesOccurrences() { return this.numberOfLogLinesOccurrences; } /** *

* The number of log lines where this anomalous log event occurs. *

* * @param numberOfLogLinesOccurrences * The number of log lines where this anomalous log event occurs. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withNumberOfLogLinesOccurrences(Integer numberOfLogLinesOccurrences) { setNumberOfLogLinesOccurrences(numberOfLogLinesOccurrences); return this; } /** *

* The time of the first occurrence of the anomalous log event. *

* * @param logEventTimestamp * The time of the first occurrence of the anomalous log event. */ public void setLogEventTimestamp(java.util.Date logEventTimestamp) { this.logEventTimestamp = logEventTimestamp; } /** *

* The time of the first occurrence of the anomalous log event. *

* * @return The time of the first occurrence of the anomalous log event. */ public java.util.Date getLogEventTimestamp() { return this.logEventTimestamp; } /** *

* The time of the first occurrence of the anomalous log event. *

* * @param logEventTimestamp * The time of the first occurrence of the anomalous log event. * @return Returns a reference to this object so that method calls can be chained together. */ public LogAnomalyClass withLogEventTimestamp(java.util.Date logEventTimestamp) { setLogEventTimestamp(logEventTimestamp); 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 (getLogStreamName() != null) sb.append("LogStreamName: ").append(getLogStreamName()).append(","); if (getLogAnomalyType() != null) sb.append("LogAnomalyType: ").append(getLogAnomalyType()).append(","); if (getLogAnomalyToken() != null) sb.append("LogAnomalyToken: ").append(getLogAnomalyToken()).append(","); if (getLogEventId() != null) sb.append("LogEventId: ").append(getLogEventId()).append(","); if (getExplanation() != null) sb.append("Explanation: ").append(getExplanation()).append(","); if (getNumberOfLogLinesOccurrences() != null) sb.append("NumberOfLogLinesOccurrences: ").append(getNumberOfLogLinesOccurrences()).append(","); if (getLogEventTimestamp() != null) sb.append("LogEventTimestamp: ").append(getLogEventTimestamp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LogAnomalyClass == false) return false; LogAnomalyClass other = (LogAnomalyClass) obj; if (other.getLogStreamName() == null ^ this.getLogStreamName() == null) return false; if (other.getLogStreamName() != null && other.getLogStreamName().equals(this.getLogStreamName()) == false) return false; if (other.getLogAnomalyType() == null ^ this.getLogAnomalyType() == null) return false; if (other.getLogAnomalyType() != null && other.getLogAnomalyType().equals(this.getLogAnomalyType()) == false) return false; if (other.getLogAnomalyToken() == null ^ this.getLogAnomalyToken() == null) return false; if (other.getLogAnomalyToken() != null && other.getLogAnomalyToken().equals(this.getLogAnomalyToken()) == false) return false; if (other.getLogEventId() == null ^ this.getLogEventId() == null) return false; if (other.getLogEventId() != null && other.getLogEventId().equals(this.getLogEventId()) == false) return false; if (other.getExplanation() == null ^ this.getExplanation() == null) return false; if (other.getExplanation() != null && other.getExplanation().equals(this.getExplanation()) == false) return false; if (other.getNumberOfLogLinesOccurrences() == null ^ this.getNumberOfLogLinesOccurrences() == null) return false; if (other.getNumberOfLogLinesOccurrences() != null && other.getNumberOfLogLinesOccurrences().equals(this.getNumberOfLogLinesOccurrences()) == false) return false; if (other.getLogEventTimestamp() == null ^ this.getLogEventTimestamp() == null) return false; if (other.getLogEventTimestamp() != null && other.getLogEventTimestamp().equals(this.getLogEventTimestamp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLogStreamName() == null) ? 0 : getLogStreamName().hashCode()); hashCode = prime * hashCode + ((getLogAnomalyType() == null) ? 0 : getLogAnomalyType().hashCode()); hashCode = prime * hashCode + ((getLogAnomalyToken() == null) ? 0 : getLogAnomalyToken().hashCode()); hashCode = prime * hashCode + ((getLogEventId() == null) ? 0 : getLogEventId().hashCode()); hashCode = prime * hashCode + ((getExplanation() == null) ? 0 : getExplanation().hashCode()); hashCode = prime * hashCode + ((getNumberOfLogLinesOccurrences() == null) ? 0 : getNumberOfLogLinesOccurrences().hashCode()); hashCode = prime * hashCode + ((getLogEventTimestamp() == null) ? 0 : getLogEventTimestamp().hashCode()); return hashCode; } @Override public LogAnomalyClass clone() { try { return (LogAnomalyClass) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.devopsguru.model.transform.LogAnomalyClassMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy