/* * 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.iotfleetwise.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 UpdateModelManifestRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the vehicle model to update. *

*/ private String name; /** *

* A brief description of the vehicle model. *

*/ private String description; /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to the * vehicle model. *

*/ private java.util.List nodesToAdd; /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove from * the vehicle model. *

*/ private java.util.List nodesToRemove; /** *

* The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. If the * status is DRAFT, you can edit the vehicle model. *

*/ private String status; /** *

* The name of the vehicle model to update. *

* * @param name * The name of the vehicle model to update. */ public void setName(String name) { this.name = name; } /** *

* The name of the vehicle model to update. *

* * @return The name of the vehicle model to update. */ public String getName() { return this.name; } /** *

* The name of the vehicle model to update. *

* * @param name * The name of the vehicle model to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withName(String name) { setName(name); return this; } /** *

* A brief description of the vehicle model. *

* * @param description * A brief description of the vehicle model. */ public void setDescription(String description) { this.description = description; } /** *

* A brief description of the vehicle model. *

* * @return A brief description of the vehicle model. */ public String getDescription() { return this.description; } /** *

* A brief description of the vehicle model. *

* * @param description * A brief description of the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withDescription(String description) { setDescription(description); return this; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to the * vehicle model. *

* * @return A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to * the vehicle model. */ public java.util.List getNodesToAdd() { return nodesToAdd; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to the * vehicle model. *

* * @param nodesToAdd * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to * the vehicle model. */ public void setNodesToAdd(java.util.Collection nodesToAdd) { if (nodesToAdd == null) { this.nodesToAdd = null; return; } this.nodesToAdd = new java.util.ArrayList(nodesToAdd); } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to the * vehicle model. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setNodesToAdd(java.util.Collection)} or {@link #withNodesToAdd(java.util.Collection)} if you want to * override the existing values. *

* * @param nodesToAdd * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to * the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withNodesToAdd(String... nodesToAdd) { if (this.nodesToAdd == null) { setNodesToAdd(new java.util.ArrayList(nodesToAdd.length)); } for (String ele : nodesToAdd) { this.nodesToAdd.add(ele); } return this; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to the * vehicle model. *

* * @param nodesToAdd * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to add to * the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withNodesToAdd(java.util.Collection nodesToAdd) { setNodesToAdd(nodesToAdd); return this; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove from * the vehicle model. *

* * @return A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove * from the vehicle model. */ public java.util.List getNodesToRemove() { return nodesToRemove; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove from * the vehicle model. *

* * @param nodesToRemove * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove * from the vehicle model. */ public void setNodesToRemove(java.util.Collection nodesToRemove) { if (nodesToRemove == null) { this.nodesToRemove = null; return; } this.nodesToRemove = new java.util.ArrayList(nodesToRemove); } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove from * the vehicle model. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setNodesToRemove(java.util.Collection)} or {@link #withNodesToRemove(java.util.Collection)} if you want * to override the existing values. *

* * @param nodesToRemove * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove * from the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withNodesToRemove(String... nodesToRemove) { if (this.nodesToRemove == null) { setNodesToRemove(new java.util.ArrayList(nodesToRemove.length)); } for (String ele : nodesToRemove) { this.nodesToRemove.add(ele); } return this; } /** *

* A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove from * the vehicle model. *

* * @param nodesToRemove * A list of fullyQualifiedName of nodes, which are a general abstraction of signals, to remove * from the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateModelManifestRequest withNodesToRemove(java.util.Collection nodesToRemove) { setNodesToRemove(nodesToRemove); return this; } /** *

* The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. If the * status is DRAFT, you can edit the vehicle model. *

* * @param status * The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. * If the status is DRAFT, you can edit the vehicle model. * @see ManifestStatus */ public void setStatus(String status) { this.status = status; } /** *

* The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. If the * status is DRAFT, you can edit the vehicle model. *

* * @return The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. * If the status is DRAFT, you can edit the vehicle model. * @see ManifestStatus */ public String getStatus() { return this.status; } /** *

* The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. If the * status is DRAFT, you can edit the vehicle model. *

* * @param status * The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. * If the status is DRAFT, you can edit the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. * @see ManifestStatus */ public UpdateModelManifestRequest withStatus(String status) { setStatus(status); return this; } /** *

* The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. If the * status is DRAFT, you can edit the vehicle model. *

* * @param status * The state of the vehicle model. If the status is ACTIVE, the vehicle model can't be edited. * If the status is DRAFT, you can edit the vehicle model. * @return Returns a reference to this object so that method calls can be chained together. * @see ManifestStatus */ public UpdateModelManifestRequest withStatus(ManifestStatus status) { this.status = status.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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getNodesToAdd() != null) sb.append("NodesToAdd: ").append(getNodesToAdd()).append(","); if (getNodesToRemove() != null) sb.append("NodesToRemove: ").append(getNodesToRemove()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateModelManifestRequest == false) return false; UpdateModelManifestRequest other = (UpdateModelManifestRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getNodesToAdd() == null ^ this.getNodesToAdd() == null) return false; if (other.getNodesToAdd() != null && other.getNodesToAdd().equals(this.getNodesToAdd()) == false) return false; if (other.getNodesToRemove() == null ^ this.getNodesToRemove() == null) return false; if (other.getNodesToRemove() != null && other.getNodesToRemove().equals(this.getNodesToRemove()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getNodesToAdd() == null) ? 0 : getNodesToAdd().hashCode()); hashCode = prime * hashCode + ((getNodesToRemove() == null) ? 0 : getNodesToRemove().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public UpdateModelManifestRequest clone() { return (UpdateModelManifestRequest) super.clone(); } }