com.amazonaws.services.iotwireless.model.DeleteQueuedMessagesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotwireless 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.iotwireless.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 DeleteQueuedMessagesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of a given wireless device for which downlink messages will be deleted.
*
*/
private String id;
/**
*
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by the
* wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*
*/
private String messageId;
/**
*
* The wireless device type, which can be either Sidewalk or LoRaWAN.
*
*/
private String wirelessDeviceType;
/**
*
* The ID of a given wireless device for which downlink messages will be deleted.
*
*
* @param id
* The ID of a given wireless device for which downlink messages will be deleted.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of a given wireless device for which downlink messages will be deleted.
*
*
* @return The ID of a given wireless device for which downlink messages will be deleted.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of a given wireless device for which downlink messages will be deleted.
*
*
* @param id
* The ID of a given wireless device for which downlink messages will be deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteQueuedMessagesRequest withId(String id) {
setId(id);
return this;
}
/**
*
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by the
* wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*
*
* @param messageId
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by
* the wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*/
public void setMessageId(String messageId) {
this.messageId = messageId;
}
/**
*
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by the
* wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*
*
* @return If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by
* the wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*/
public String getMessageId() {
return this.messageId;
}
/**
*
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by the
* wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
*
*
* @param messageId
* If message ID is "*"
, it cleares the entire downlink queue for a given device, specified by
* the wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteQueuedMessagesRequest withMessageId(String messageId) {
setMessageId(messageId);
return this;
}
/**
*
* The wireless device type, which can be either Sidewalk or LoRaWAN.
*
*
* @param wirelessDeviceType
* The wireless device type, which can be either Sidewalk or LoRaWAN.
* @see WirelessDeviceType
*/
public void setWirelessDeviceType(String wirelessDeviceType) {
this.wirelessDeviceType = wirelessDeviceType;
}
/**
*
* The wireless device type, which can be either Sidewalk or LoRaWAN.
*
*
* @return The wireless device type, which can be either Sidewalk or LoRaWAN.
* @see WirelessDeviceType
*/
public String getWirelessDeviceType() {
return this.wirelessDeviceType;
}
/**
*
* The wireless device type, which can be either Sidewalk or LoRaWAN.
*
*
* @param wirelessDeviceType
* The wireless device type, which can be either Sidewalk or LoRaWAN.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WirelessDeviceType
*/
public DeleteQueuedMessagesRequest withWirelessDeviceType(String wirelessDeviceType) {
setWirelessDeviceType(wirelessDeviceType);
return this;
}
/**
*
* The wireless device type, which can be either Sidewalk or LoRaWAN.
*
*
* @param wirelessDeviceType
* The wireless device type, which can be either Sidewalk or LoRaWAN.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WirelessDeviceType
*/
public DeleteQueuedMessagesRequest withWirelessDeviceType(WirelessDeviceType wirelessDeviceType) {
this.wirelessDeviceType = wirelessDeviceType.toString();
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 (getMessageId() != null)
sb.append("MessageId: ").append(getMessageId()).append(",");
if (getWirelessDeviceType() != null)
sb.append("WirelessDeviceType: ").append(getWirelessDeviceType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DeleteQueuedMessagesRequest == false)
return false;
DeleteQueuedMessagesRequest other = (DeleteQueuedMessagesRequest) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getMessageId() == null ^ this.getMessageId() == null)
return false;
if (other.getMessageId() != null && other.getMessageId().equals(this.getMessageId()) == false)
return false;
if (other.getWirelessDeviceType() == null ^ this.getWirelessDeviceType() == null)
return false;
if (other.getWirelessDeviceType() != null && other.getWirelessDeviceType().equals(this.getWirelessDeviceType()) == 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 + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
hashCode = prime * hashCode + ((getWirelessDeviceType() == null) ? 0 : getWirelessDeviceType().hashCode());
return hashCode;
}
@Override
public DeleteQueuedMessagesRequest clone() {
return (DeleteQueuedMessagesRequest) super.clone();
}
}