com.amazonaws.services.cloudwatchrum.model.PutRumEventsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudwatchrum Show documentation
/*
* 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.cloudwatchrum.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutRumEventsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A structure that contains information about the app monitor that collected this telemetry information.
*
*/
private AppMonitorDetails appMonitorDetails;
/**
*
* A unique identifier for this batch of RUM event data.
*
*/
private String batchId;
/**
*
* The ID of the app monitor that is sending this data.
*
*/
private String id;
/**
*
* An array of structures that contain the telemetry event data.
*
*/
private java.util.List rumEvents;
/**
*
* A structure that contains information about the user session that this batch of events was collected from.
*
*/
private UserDetails userDetails;
/**
*
* A structure that contains information about the app monitor that collected this telemetry information.
*
*
* @param appMonitorDetails
* A structure that contains information about the app monitor that collected this telemetry information.
*/
public void setAppMonitorDetails(AppMonitorDetails appMonitorDetails) {
this.appMonitorDetails = appMonitorDetails;
}
/**
*
* A structure that contains information about the app monitor that collected this telemetry information.
*
*
* @return A structure that contains information about the app monitor that collected this telemetry information.
*/
public AppMonitorDetails getAppMonitorDetails() {
return this.appMonitorDetails;
}
/**
*
* A structure that contains information about the app monitor that collected this telemetry information.
*
*
* @param appMonitorDetails
* A structure that contains information about the app monitor that collected this telemetry information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withAppMonitorDetails(AppMonitorDetails appMonitorDetails) {
setAppMonitorDetails(appMonitorDetails);
return this;
}
/**
*
* A unique identifier for this batch of RUM event data.
*
*
* @param batchId
* A unique identifier for this batch of RUM event data.
*/
public void setBatchId(String batchId) {
this.batchId = batchId;
}
/**
*
* A unique identifier for this batch of RUM event data.
*
*
* @return A unique identifier for this batch of RUM event data.
*/
public String getBatchId() {
return this.batchId;
}
/**
*
* A unique identifier for this batch of RUM event data.
*
*
* @param batchId
* A unique identifier for this batch of RUM event data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withBatchId(String batchId) {
setBatchId(batchId);
return this;
}
/**
*
* The ID of the app monitor that is sending this data.
*
*
* @param id
* The ID of the app monitor that is sending this data.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the app monitor that is sending this data.
*
*
* @return The ID of the app monitor that is sending this data.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the app monitor that is sending this data.
*
*
* @param id
* The ID of the app monitor that is sending this data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withId(String id) {
setId(id);
return this;
}
/**
*
* An array of structures that contain the telemetry event data.
*
*
* @return An array of structures that contain the telemetry event data.
*/
public java.util.List getRumEvents() {
return rumEvents;
}
/**
*
* An array of structures that contain the telemetry event data.
*
*
* @param rumEvents
* An array of structures that contain the telemetry event data.
*/
public void setRumEvents(java.util.Collection rumEvents) {
if (rumEvents == null) {
this.rumEvents = null;
return;
}
this.rumEvents = new java.util.ArrayList(rumEvents);
}
/**
*
* An array of structures that contain the telemetry event data.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRumEvents(java.util.Collection)} or {@link #withRumEvents(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param rumEvents
* An array of structures that contain the telemetry event data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withRumEvents(RumEvent... rumEvents) {
if (this.rumEvents == null) {
setRumEvents(new java.util.ArrayList(rumEvents.length));
}
for (RumEvent ele : rumEvents) {
this.rumEvents.add(ele);
}
return this;
}
/**
*
* An array of structures that contain the telemetry event data.
*
*
* @param rumEvents
* An array of structures that contain the telemetry event data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withRumEvents(java.util.Collection rumEvents) {
setRumEvents(rumEvents);
return this;
}
/**
*
* A structure that contains information about the user session that this batch of events was collected from.
*
*
* @param userDetails
* A structure that contains information about the user session that this batch of events was collected from.
*/
public void setUserDetails(UserDetails userDetails) {
this.userDetails = userDetails;
}
/**
*
* A structure that contains information about the user session that this batch of events was collected from.
*
*
* @return A structure that contains information about the user session that this batch of events was collected
* from.
*/
public UserDetails getUserDetails() {
return this.userDetails;
}
/**
*
* A structure that contains information about the user session that this batch of events was collected from.
*
*
* @param userDetails
* A structure that contains information about the user session that this batch of events was collected from.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutRumEventsRequest withUserDetails(UserDetails userDetails) {
setUserDetails(userDetails);
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 (getAppMonitorDetails() != null)
sb.append("AppMonitorDetails: ").append(getAppMonitorDetails()).append(",");
if (getBatchId() != null)
sb.append("BatchId: ").append(getBatchId()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getRumEvents() != null)
sb.append("RumEvents: ").append(getRumEvents()).append(",");
if (getUserDetails() != null)
sb.append("UserDetails: ").append(getUserDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutRumEventsRequest == false)
return false;
PutRumEventsRequest other = (PutRumEventsRequest) obj;
if (other.getAppMonitorDetails() == null ^ this.getAppMonitorDetails() == null)
return false;
if (other.getAppMonitorDetails() != null && other.getAppMonitorDetails().equals(this.getAppMonitorDetails()) == false)
return false;
if (other.getBatchId() == null ^ this.getBatchId() == null)
return false;
if (other.getBatchId() != null && other.getBatchId().equals(this.getBatchId()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getRumEvents() == null ^ this.getRumEvents() == null)
return false;
if (other.getRumEvents() != null && other.getRumEvents().equals(this.getRumEvents()) == false)
return false;
if (other.getUserDetails() == null ^ this.getUserDetails() == null)
return false;
if (other.getUserDetails() != null && other.getUserDetails().equals(this.getUserDetails()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAppMonitorDetails() == null) ? 0 : getAppMonitorDetails().hashCode());
hashCode = prime * hashCode + ((getBatchId() == null) ? 0 : getBatchId().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getRumEvents() == null) ? 0 : getRumEvents().hashCode());
hashCode = prime * hashCode + ((getUserDetails() == null) ? 0 : getUserDetails().hashCode());
return hashCode;
}
@Override
public PutRumEventsRequest clone() {
return (PutRumEventsRequest) super.clone();
}
}