/* * 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.devopsguru.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An Amazon Web Services resource event. Amazon Web Services resource events and metrics are analyzed by DevOps Guru to * find anomalous behavior and provide recommendations to improve your operational solutions. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Event implements Serializable, Cloneable, StructuredPojo { private ResourceCollection resourceCollection; /** ** The ID of the event. *
*/ private String id; /** *
* A Timestamp
that specifies the time the event occurred.
*
* The Amazon Web Services source that emitted the event. *
*/ private String eventSource; /** ** The name of the event. *
*/ private String name; /** *
* The source, AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found the
* event.
*
* The class of the event. The class specifies what the event is related to, such as an infrastructure change, a * deployment, or a schema change. *
*/ private String eventClass; /** *
* An EventResource
object that contains information about the resource that emitted the event.
*
* The ID of the event. *
* * @param id * The ID of the event. */ public void setId(String id) { this.id = id; } /** ** The ID of the event. *
* * @return The ID of the event. */ public String getId() { return this.id; } /** ** The ID of the event. *
* * @param id * The ID of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withId(String id) { setId(id); return this; } /** *
* A Timestamp
that specifies the time the event occurred.
*
Timestamp
that specifies the time the event occurred.
*/
public void setTime(java.util.Date time) {
this.time = time;
}
/**
*
* A Timestamp
that specifies the time the event occurred.
*
Timestamp
that specifies the time the event occurred.
*/
public java.util.Date getTime() {
return this.time;
}
/**
*
* A Timestamp
that specifies the time the event occurred.
*
Timestamp
that specifies the time the event occurred.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withTime(java.util.Date time) {
setTime(time);
return this;
}
/**
* * The Amazon Web Services source that emitted the event. *
* * @param eventSource * The Amazon Web Services source that emitted the event. */ public void setEventSource(String eventSource) { this.eventSource = eventSource; } /** ** The Amazon Web Services source that emitted the event. *
* * @return The Amazon Web Services source that emitted the event. */ public String getEventSource() { return this.eventSource; } /** ** The Amazon Web Services source that emitted the event. *
* * @param eventSource * The Amazon Web Services source that emitted the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withEventSource(String eventSource) { setEventSource(eventSource); return this; } /** ** The name of the event. *
* * @param name * The name of the event. */ public void setName(String name) { this.name = name; } /** ** The name of the event. *
* * @return The name of the event. */ public String getName() { return this.name; } /** ** The name of the event. *
* * @param name * The name of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withName(String name) { setName(name); return this; } /** *
* The source, AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found the
* event.
*
AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found
* the event.
* @see EventDataSource
*/
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
/**
*
* The source, AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found the
* event.
*
AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis
* found the event.
* @see EventDataSource
*/
public String getDataSource() {
return this.dataSource;
}
/**
*
* The source, AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found the
* event.
*
AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found
* the event.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventDataSource
*/
public Event withDataSource(String dataSource) {
setDataSource(dataSource);
return this;
}
/**
*
* The source, AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found the
* event.
*
AWS_CLOUD_TRAIL
or AWS_CODE_DEPLOY
, where DevOps Guru analysis found
* the event.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventDataSource
*/
public Event withDataSource(EventDataSource dataSource) {
this.dataSource = dataSource.toString();
return this;
}
/**
* * The class of the event. The class specifies what the event is related to, such as an infrastructure change, a * deployment, or a schema change. *
* * @param eventClass * The class of the event. The class specifies what the event is related to, such as an infrastructure * change, a deployment, or a schema change. * @see EventClass */ public void setEventClass(String eventClass) { this.eventClass = eventClass; } /** ** The class of the event. The class specifies what the event is related to, such as an infrastructure change, a * deployment, or a schema change. *
* * @return The class of the event. The class specifies what the event is related to, such as an infrastructure * change, a deployment, or a schema change. * @see EventClass */ public String getEventClass() { return this.eventClass; } /** ** The class of the event. The class specifies what the event is related to, such as an infrastructure change, a * deployment, or a schema change. *
* * @param eventClass * The class of the event. The class specifies what the event is related to, such as an infrastructure * change, a deployment, or a schema change. * @return Returns a reference to this object so that method calls can be chained together. * @see EventClass */ public Event withEventClass(String eventClass) { setEventClass(eventClass); return this; } /** ** The class of the event. The class specifies what the event is related to, such as an infrastructure change, a * deployment, or a schema change. *
* * @param eventClass * The class of the event. The class specifies what the event is related to, such as an infrastructure * change, a deployment, or a schema change. * @return Returns a reference to this object so that method calls can be chained together. * @see EventClass */ public Event withEventClass(EventClass eventClass) { this.eventClass = eventClass.toString(); return this; } /** *
* An EventResource
object that contains information about the resource that emitted the event.
*
EventResource
object that contains information about the resource that emitted the event.
*/
public java.util.List
* An EventResource
object that contains information about the resource that emitted the event.
*
EventResource
object that contains information about the resource that emitted the event.
*/
public void setResources(java.util.Collection
* An EventResource
object that contains information about the resource that emitted the event.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to * override the existing values. *
* * @param resources * AnEventResource
object that contains information about the resource that emitted the event.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withResources(EventResource... resources) {
if (this.resources == null) {
setResources(new java.util.ArrayList
* An EventResource
object that contains information about the resource that emitted the event.
*
EventResource
object that contains information about the resource that emitted the event.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Event withResources(java.util.Collection