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

com.amazonaws.services.applicationinsights.model.Observation Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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.applicationinsights.model;

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

/**
 * 

* Describes an anomaly or error with the application. *

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

* The ID of the observation type. *

*/ private String id; /** *

* The time when the observation was first detected, in epoch seconds. *

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

* The time when the observation ended, in epoch seconds. *

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

* The source type of the observation. *

*/ private String sourceType; /** *

* The source resource ARN of the observation. *

*/ private String sourceARN; /** *

* The log group name. *

*/ private String logGroup; /** *

* The timestamp in the CloudWatch Logs that specifies when the matched line occurred. *

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

* The log text of the observation. *

*/ private String logText; /** *

* The log filter of the observation. *

*/ private String logFilter; /** *

* The namespace of the observation metric. *

*/ private String metricNamespace; /** *

* The name of the observation metric. *

*/ private String metricName; /** *

* The unit of the source observation metric. *

*/ private String unit; /** *

* The value of the source observation metric. *

*/ private Double value; /** *

* The ID of the observation type. *

* * @param id * The ID of the observation type. */ public void setId(String id) { this.id = id; } /** *

* The ID of the observation type. *

* * @return The ID of the observation type. */ public String getId() { return this.id; } /** *

* The ID of the observation type. *

* * @param id * The ID of the observation type. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withId(String id) { setId(id); return this; } /** *

* The time when the observation was first detected, in epoch seconds. *

* * @param startTime * The time when the observation was first detected, in epoch seconds. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The time when the observation was first detected, in epoch seconds. *

* * @return The time when the observation was first detected, in epoch seconds. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The time when the observation was first detected, in epoch seconds. *

* * @param startTime * The time when the observation was first detected, in epoch seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The time when the observation ended, in epoch seconds. *

* * @param endTime * The time when the observation ended, in epoch seconds. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The time when the observation ended, in epoch seconds. *

* * @return The time when the observation ended, in epoch seconds. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The time when the observation ended, in epoch seconds. *

* * @param endTime * The time when the observation ended, in epoch seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The source type of the observation. *

* * @param sourceType * The source type of the observation. */ public void setSourceType(String sourceType) { this.sourceType = sourceType; } /** *

* The source type of the observation. *

* * @return The source type of the observation. */ public String getSourceType() { return this.sourceType; } /** *

* The source type of the observation. *

* * @param sourceType * The source type of the observation. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withSourceType(String sourceType) { setSourceType(sourceType); return this; } /** *

* The source resource ARN of the observation. *

* * @param sourceARN * The source resource ARN of the observation. */ public void setSourceARN(String sourceARN) { this.sourceARN = sourceARN; } /** *

* The source resource ARN of the observation. *

* * @return The source resource ARN of the observation. */ public String getSourceARN() { return this.sourceARN; } /** *

* The source resource ARN of the observation. *

* * @param sourceARN * The source resource ARN of the observation. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withSourceARN(String sourceARN) { setSourceARN(sourceARN); return this; } /** *

* The log group name. *

* * @param logGroup * The log group name. */ public void setLogGroup(String logGroup) { this.logGroup = logGroup; } /** *

* The log group name. *

* * @return The log group name. */ public String getLogGroup() { return this.logGroup; } /** *

* The log group name. *

* * @param logGroup * The log group name. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withLogGroup(String logGroup) { setLogGroup(logGroup); return this; } /** *

* The timestamp in the CloudWatch Logs that specifies when the matched line occurred. *

* * @param lineTime * The timestamp in the CloudWatch Logs that specifies when the matched line occurred. */ public void setLineTime(java.util.Date lineTime) { this.lineTime = lineTime; } /** *

* The timestamp in the CloudWatch Logs that specifies when the matched line occurred. *

* * @return The timestamp in the CloudWatch Logs that specifies when the matched line occurred. */ public java.util.Date getLineTime() { return this.lineTime; } /** *

* The timestamp in the CloudWatch Logs that specifies when the matched line occurred. *

* * @param lineTime * The timestamp in the CloudWatch Logs that specifies when the matched line occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withLineTime(java.util.Date lineTime) { setLineTime(lineTime); return this; } /** *

* The log text of the observation. *

* * @param logText * The log text of the observation. */ public void setLogText(String logText) { this.logText = logText; } /** *

* The log text of the observation. *

* * @return The log text of the observation. */ public String getLogText() { return this.logText; } /** *

* The log text of the observation. *

* * @param logText * The log text of the observation. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withLogText(String logText) { setLogText(logText); return this; } /** *

* The log filter of the observation. *

* * @param logFilter * The log filter of the observation. * @see LogFilter */ public void setLogFilter(String logFilter) { this.logFilter = logFilter; } /** *

* The log filter of the observation. *

* * @return The log filter of the observation. * @see LogFilter */ public String getLogFilter() { return this.logFilter; } /** *

* The log filter of the observation. *

* * @param logFilter * The log filter of the observation. * @return Returns a reference to this object so that method calls can be chained together. * @see LogFilter */ public Observation withLogFilter(String logFilter) { setLogFilter(logFilter); return this; } /** *

* The log filter of the observation. *

* * @param logFilter * The log filter of the observation. * @return Returns a reference to this object so that method calls can be chained together. * @see LogFilter */ public Observation withLogFilter(LogFilter logFilter) { this.logFilter = logFilter.toString(); return this; } /** *

* The namespace of the observation metric. *

* * @param metricNamespace * The namespace of the observation metric. */ public void setMetricNamespace(String metricNamespace) { this.metricNamespace = metricNamespace; } /** *

* The namespace of the observation metric. *

* * @return The namespace of the observation metric. */ public String getMetricNamespace() { return this.metricNamespace; } /** *

* The namespace of the observation metric. *

* * @param metricNamespace * The namespace of the observation metric. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withMetricNamespace(String metricNamespace) { setMetricNamespace(metricNamespace); return this; } /** *

* The name of the observation metric. *

* * @param metricName * The name of the observation metric. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** *

* The name of the observation metric. *

* * @return The name of the observation metric. */ public String getMetricName() { return this.metricName; } /** *

* The name of the observation metric. *

* * @param metricName * The name of the observation metric. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withMetricName(String metricName) { setMetricName(metricName); return this; } /** *

* The unit of the source observation metric. *

* * @param unit * The unit of the source observation metric. */ public void setUnit(String unit) { this.unit = unit; } /** *

* The unit of the source observation metric. *

* * @return The unit of the source observation metric. */ public String getUnit() { return this.unit; } /** *

* The unit of the source observation metric. *

* * @param unit * The unit of the source observation metric. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withUnit(String unit) { setUnit(unit); return this; } /** *

* The value of the source observation metric. *

* * @param value * The value of the source observation metric. */ public void setValue(Double value) { this.value = value; } /** *

* The value of the source observation metric. *

* * @return The value of the source observation metric. */ public Double getValue() { return this.value; } /** *

* The value of the source observation metric. *

* * @param value * The value of the source observation metric. * @return Returns a reference to this object so that method calls can be chained together. */ public Observation withValue(Double value) { setValue(value); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getSourceType() != null) sb.append("SourceType: ").append(getSourceType()).append(","); if (getSourceARN() != null) sb.append("SourceARN: ").append(getSourceARN()).append(","); if (getLogGroup() != null) sb.append("LogGroup: ").append(getLogGroup()).append(","); if (getLineTime() != null) sb.append("LineTime: ").append(getLineTime()).append(","); if (getLogText() != null) sb.append("LogText: ").append(getLogText()).append(","); if (getLogFilter() != null) sb.append("LogFilter: ").append(getLogFilter()).append(","); if (getMetricNamespace() != null) sb.append("MetricNamespace: ").append(getMetricNamespace()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Observation == false) return false; Observation other = (Observation) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getSourceType() == null ^ this.getSourceType() == null) return false; if (other.getSourceType() != null && other.getSourceType().equals(this.getSourceType()) == false) return false; if (other.getSourceARN() == null ^ this.getSourceARN() == null) return false; if (other.getSourceARN() != null && other.getSourceARN().equals(this.getSourceARN()) == false) return false; if (other.getLogGroup() == null ^ this.getLogGroup() == null) return false; if (other.getLogGroup() != null && other.getLogGroup().equals(this.getLogGroup()) == false) return false; if (other.getLineTime() == null ^ this.getLineTime() == null) return false; if (other.getLineTime() != null && other.getLineTime().equals(this.getLineTime()) == false) return false; if (other.getLogText() == null ^ this.getLogText() == null) return false; if (other.getLogText() != null && other.getLogText().equals(this.getLogText()) == false) return false; if (other.getLogFilter() == null ^ this.getLogFilter() == null) return false; if (other.getLogFilter() != null && other.getLogFilter().equals(this.getLogFilter()) == false) return false; if (other.getMetricNamespace() == null ^ this.getMetricNamespace() == null) return false; if (other.getMetricNamespace() != null && other.getMetricNamespace().equals(this.getMetricNamespace()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getUnit() == null ^ this.getUnit() == null) return false; if (other.getUnit() != null && other.getUnit().equals(this.getUnit()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); hashCode = prime * hashCode + ((getSourceARN() == null) ? 0 : getSourceARN().hashCode()); hashCode = prime * hashCode + ((getLogGroup() == null) ? 0 : getLogGroup().hashCode()); hashCode = prime * hashCode + ((getLineTime() == null) ? 0 : getLineTime().hashCode()); hashCode = prime * hashCode + ((getLogText() == null) ? 0 : getLogText().hashCode()); hashCode = prime * hashCode + ((getLogFilter() == null) ? 0 : getLogFilter().hashCode()); hashCode = prime * hashCode + ((getMetricNamespace() == null) ? 0 : getMetricNamespace().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; } @Override public Observation clone() { try { return (Observation) 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.applicationinsights.model.transform.ObservationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy