com.amazonaws.services.private5g.model.Order Maven / Gradle / Ivy
Show all versions of aws-java-sdk-private5g 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.private5g.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about an order.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Order implements Serializable, Cloneable, StructuredPojo {
/**
*
* The acknowledgement status of the order.
*
*/
private String acknowledgmentStatus;
/**
*
* The creation time of the order.
*
*/
private java.util.Date createdAt;
/**
*
* The Amazon Resource Name (ARN) of the network associated with this order.
*
*/
private String networkArn;
/**
*
* The Amazon Resource Name (ARN) of the network site associated with this order.
*
*/
private String networkSiteArn;
/**
*
* The Amazon Resource Name (ARN) of the order.
*
*/
private String orderArn;
/**
*
* A list of the network resources placed in the order.
*
*/
private java.util.List orderedResources;
/**
*
* The shipping address of the order.
*
*/
private Address shippingAddress;
/**
*
* The tracking information of the order.
*
*/
private java.util.List trackingInformation;
/**
*
* The acknowledgement status of the order.
*
*
* @param acknowledgmentStatus
* The acknowledgement status of the order.
* @see AcknowledgmentStatus
*/
public void setAcknowledgmentStatus(String acknowledgmentStatus) {
this.acknowledgmentStatus = acknowledgmentStatus;
}
/**
*
* The acknowledgement status of the order.
*
*
* @return The acknowledgement status of the order.
* @see AcknowledgmentStatus
*/
public String getAcknowledgmentStatus() {
return this.acknowledgmentStatus;
}
/**
*
* The acknowledgement status of the order.
*
*
* @param acknowledgmentStatus
* The acknowledgement status of the order.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcknowledgmentStatus
*/
public Order withAcknowledgmentStatus(String acknowledgmentStatus) {
setAcknowledgmentStatus(acknowledgmentStatus);
return this;
}
/**
*
* The acknowledgement status of the order.
*
*
* @param acknowledgmentStatus
* The acknowledgement status of the order.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcknowledgmentStatus
*/
public Order withAcknowledgmentStatus(AcknowledgmentStatus acknowledgmentStatus) {
this.acknowledgmentStatus = acknowledgmentStatus.toString();
return this;
}
/**
*
* The creation time of the order.
*
*
* @param createdAt
* The creation time of the order.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The creation time of the order.
*
*
* @return The creation time of the order.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The creation time of the order.
*
*
* @param createdAt
* The creation time of the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the network associated with this order.
*
*
* @param networkArn
* The Amazon Resource Name (ARN) of the network associated with this order.
*/
public void setNetworkArn(String networkArn) {
this.networkArn = networkArn;
}
/**
*
* The Amazon Resource Name (ARN) of the network associated with this order.
*
*
* @return The Amazon Resource Name (ARN) of the network associated with this order.
*/
public String getNetworkArn() {
return this.networkArn;
}
/**
*
* The Amazon Resource Name (ARN) of the network associated with this order.
*
*
* @param networkArn
* The Amazon Resource Name (ARN) of the network associated with this order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withNetworkArn(String networkArn) {
setNetworkArn(networkArn);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the network site associated with this order.
*
*
* @param networkSiteArn
* The Amazon Resource Name (ARN) of the network site associated with this order.
*/
public void setNetworkSiteArn(String networkSiteArn) {
this.networkSiteArn = networkSiteArn;
}
/**
*
* The Amazon Resource Name (ARN) of the network site associated with this order.
*
*
* @return The Amazon Resource Name (ARN) of the network site associated with this order.
*/
public String getNetworkSiteArn() {
return this.networkSiteArn;
}
/**
*
* The Amazon Resource Name (ARN) of the network site associated with this order.
*
*
* @param networkSiteArn
* The Amazon Resource Name (ARN) of the network site associated with this order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withNetworkSiteArn(String networkSiteArn) {
setNetworkSiteArn(networkSiteArn);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the order.
*
*
* @param orderArn
* The Amazon Resource Name (ARN) of the order.
*/
public void setOrderArn(String orderArn) {
this.orderArn = orderArn;
}
/**
*
* The Amazon Resource Name (ARN) of the order.
*
*
* @return The Amazon Resource Name (ARN) of the order.
*/
public String getOrderArn() {
return this.orderArn;
}
/**
*
* The Amazon Resource Name (ARN) of the order.
*
*
* @param orderArn
* The Amazon Resource Name (ARN) of the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withOrderArn(String orderArn) {
setOrderArn(orderArn);
return this;
}
/**
*
* A list of the network resources placed in the order.
*
*
* @return A list of the network resources placed in the order.
*/
public java.util.List getOrderedResources() {
return orderedResources;
}
/**
*
* A list of the network resources placed in the order.
*
*
* @param orderedResources
* A list of the network resources placed in the order.
*/
public void setOrderedResources(java.util.Collection orderedResources) {
if (orderedResources == null) {
this.orderedResources = null;
return;
}
this.orderedResources = new java.util.ArrayList(orderedResources);
}
/**
*
* A list of the network resources placed in the order.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOrderedResources(java.util.Collection)} or {@link #withOrderedResources(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param orderedResources
* A list of the network resources placed in the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withOrderedResources(OrderedResourceDefinition... orderedResources) {
if (this.orderedResources == null) {
setOrderedResources(new java.util.ArrayList(orderedResources.length));
}
for (OrderedResourceDefinition ele : orderedResources) {
this.orderedResources.add(ele);
}
return this;
}
/**
*
* A list of the network resources placed in the order.
*
*
* @param orderedResources
* A list of the network resources placed in the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withOrderedResources(java.util.Collection orderedResources) {
setOrderedResources(orderedResources);
return this;
}
/**
*
* The shipping address of the order.
*
*
* @param shippingAddress
* The shipping address of the order.
*/
public void setShippingAddress(Address shippingAddress) {
this.shippingAddress = shippingAddress;
}
/**
*
* The shipping address of the order.
*
*
* @return The shipping address of the order.
*/
public Address getShippingAddress() {
return this.shippingAddress;
}
/**
*
* The shipping address of the order.
*
*
* @param shippingAddress
* The shipping address of the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withShippingAddress(Address shippingAddress) {
setShippingAddress(shippingAddress);
return this;
}
/**
*
* The tracking information of the order.
*
*
* @return The tracking information of the order.
*/
public java.util.List getTrackingInformation() {
return trackingInformation;
}
/**
*
* The tracking information of the order.
*
*
* @param trackingInformation
* The tracking information of the order.
*/
public void setTrackingInformation(java.util.Collection trackingInformation) {
if (trackingInformation == null) {
this.trackingInformation = null;
return;
}
this.trackingInformation = new java.util.ArrayList(trackingInformation);
}
/**
*
* The tracking information of the order.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTrackingInformation(java.util.Collection)} or {@link #withTrackingInformation(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param trackingInformation
* The tracking information of the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withTrackingInformation(TrackingInformation... trackingInformation) {
if (this.trackingInformation == null) {
setTrackingInformation(new java.util.ArrayList(trackingInformation.length));
}
for (TrackingInformation ele : trackingInformation) {
this.trackingInformation.add(ele);
}
return this;
}
/**
*
* The tracking information of the order.
*
*
* @param trackingInformation
* The tracking information of the order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Order withTrackingInformation(java.util.Collection trackingInformation) {
setTrackingInformation(trackingInformation);
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 (getAcknowledgmentStatus() != null)
sb.append("AcknowledgmentStatus: ").append(getAcknowledgmentStatus()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getNetworkArn() != null)
sb.append("NetworkArn: ").append(getNetworkArn()).append(",");
if (getNetworkSiteArn() != null)
sb.append("NetworkSiteArn: ").append(getNetworkSiteArn()).append(",");
if (getOrderArn() != null)
sb.append("OrderArn: ").append(getOrderArn()).append(",");
if (getOrderedResources() != null)
sb.append("OrderedResources: ").append(getOrderedResources()).append(",");
if (getShippingAddress() != null)
sb.append("ShippingAddress: ").append(getShippingAddress()).append(",");
if (getTrackingInformation() != null)
sb.append("TrackingInformation: ").append(getTrackingInformation());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Order == false)
return false;
Order other = (Order) obj;
if (other.getAcknowledgmentStatus() == null ^ this.getAcknowledgmentStatus() == null)
return false;
if (other.getAcknowledgmentStatus() != null && other.getAcknowledgmentStatus().equals(this.getAcknowledgmentStatus()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getNetworkArn() == null ^ this.getNetworkArn() == null)
return false;
if (other.getNetworkArn() != null && other.getNetworkArn().equals(this.getNetworkArn()) == false)
return false;
if (other.getNetworkSiteArn() == null ^ this.getNetworkSiteArn() == null)
return false;
if (other.getNetworkSiteArn() != null && other.getNetworkSiteArn().equals(this.getNetworkSiteArn()) == false)
return false;
if (other.getOrderArn() == null ^ this.getOrderArn() == null)
return false;
if (other.getOrderArn() != null && other.getOrderArn().equals(this.getOrderArn()) == false)
return false;
if (other.getOrderedResources() == null ^ this.getOrderedResources() == null)
return false;
if (other.getOrderedResources() != null && other.getOrderedResources().equals(this.getOrderedResources()) == false)
return false;
if (other.getShippingAddress() == null ^ this.getShippingAddress() == null)
return false;
if (other.getShippingAddress() != null && other.getShippingAddress().equals(this.getShippingAddress()) == false)
return false;
if (other.getTrackingInformation() == null ^ this.getTrackingInformation() == null)
return false;
if (other.getTrackingInformation() != null && other.getTrackingInformation().equals(this.getTrackingInformation()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAcknowledgmentStatus() == null) ? 0 : getAcknowledgmentStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getNetworkArn() == null) ? 0 : getNetworkArn().hashCode());
hashCode = prime * hashCode + ((getNetworkSiteArn() == null) ? 0 : getNetworkSiteArn().hashCode());
hashCode = prime * hashCode + ((getOrderArn() == null) ? 0 : getOrderArn().hashCode());
hashCode = prime * hashCode + ((getOrderedResources() == null) ? 0 : getOrderedResources().hashCode());
hashCode = prime * hashCode + ((getShippingAddress() == null) ? 0 : getShippingAddress().hashCode());
hashCode = prime * hashCode + ((getTrackingInformation() == null) ? 0 : getTrackingInformation().hashCode());
return hashCode;
}
@Override
public Order clone() {
try {
return (Order) 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.private5g.model.transform.OrderMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}