com.amazonaws.services.braket.model.JobEventDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-braket Show documentation
/*
* Copyright 2017-2022 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.braket.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Details about the type and time events occurred related to the Amazon Braket job.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class JobEventDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The type of event that occurred related to the Amazon Braket job.
*
*/
private String eventType;
/**
*
* A message describing the event that occurred related to the Amazon Braket job.
*
*/
private String message;
/**
*
* TThe type of event that occurred related to the Amazon Braket job.
*
*/
private java.util.Date timeOfEvent;
/**
*
* The type of event that occurred related to the Amazon Braket job.
*
*
* @param eventType
* The type of event that occurred related to the Amazon Braket job.
* @see JobEventType
*/
public void setEventType(String eventType) {
this.eventType = eventType;
}
/**
*
* The type of event that occurred related to the Amazon Braket job.
*
*
* @return The type of event that occurred related to the Amazon Braket job.
* @see JobEventType
*/
public String getEventType() {
return this.eventType;
}
/**
*
* The type of event that occurred related to the Amazon Braket job.
*
*
* @param eventType
* The type of event that occurred related to the Amazon Braket job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobEventType
*/
public JobEventDetails withEventType(String eventType) {
setEventType(eventType);
return this;
}
/**
*
* The type of event that occurred related to the Amazon Braket job.
*
*
* @param eventType
* The type of event that occurred related to the Amazon Braket job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobEventType
*/
public JobEventDetails withEventType(JobEventType eventType) {
this.eventType = eventType.toString();
return this;
}
/**
*
* A message describing the event that occurred related to the Amazon Braket job.
*
*
* @param message
* A message describing the event that occurred related to the Amazon Braket job.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* A message describing the event that occurred related to the Amazon Braket job.
*
*
* @return A message describing the event that occurred related to the Amazon Braket job.
*/
public String getMessage() {
return this.message;
}
/**
*
* A message describing the event that occurred related to the Amazon Braket job.
*
*
* @param message
* A message describing the event that occurred related to the Amazon Braket job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobEventDetails withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* TThe type of event that occurred related to the Amazon Braket job.
*
*
* @param timeOfEvent
* TThe type of event that occurred related to the Amazon Braket job.
*/
public void setTimeOfEvent(java.util.Date timeOfEvent) {
this.timeOfEvent = timeOfEvent;
}
/**
*
* TThe type of event that occurred related to the Amazon Braket job.
*
*
* @return TThe type of event that occurred related to the Amazon Braket job.
*/
public java.util.Date getTimeOfEvent() {
return this.timeOfEvent;
}
/**
*
* TThe type of event that occurred related to the Amazon Braket job.
*
*
* @param timeOfEvent
* TThe type of event that occurred related to the Amazon Braket job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobEventDetails withTimeOfEvent(java.util.Date timeOfEvent) {
setTimeOfEvent(timeOfEvent);
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 (getEventType() != null)
sb.append("EventType: ").append(getEventType()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage()).append(",");
if (getTimeOfEvent() != null)
sb.append("TimeOfEvent: ").append(getTimeOfEvent());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof JobEventDetails == false)
return false;
JobEventDetails other = (JobEventDetails) obj;
if (other.getEventType() == null ^ this.getEventType() == null)
return false;
if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == false)
return false;
if (other.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
if (other.getTimeOfEvent() == null ^ this.getTimeOfEvent() == null)
return false;
if (other.getTimeOfEvent() != null && other.getTimeOfEvent().equals(this.getTimeOfEvent()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getTimeOfEvent() == null) ? 0 : getTimeOfEvent().hashCode());
return hashCode;
}
@Override
public JobEventDetails clone() {
try {
return (JobEventDetails) 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.braket.model.transform.JobEventDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}