/* * 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.mgn.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Source server properties. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SourceProperties implements Serializable, Cloneable, StructuredPojo { /** ** Source Server CPUs. *
*/ private java.util.List* Source Server disks. *
*/ private java.util.List* Source server identification hints. *
*/ private IdentificationHints identificationHints; /** ** Source server last update date and time. *
*/ private String lastUpdatedDateTime; /** ** Source server network interfaces. *
*/ private java.util.List* Source server OS. *
*/ private OS os; /** ** Source server RAM in bytes. *
*/ private Long ramBytes; /** ** Source server recommended instance type. *
*/ private String recommendedInstanceType; /** ** Source Server CPUs. *
* * @return Source Server CPUs. */ public java.util.List* Source Server CPUs. *
* * @param cpus * Source Server CPUs. */ public void setCpus(java.util.Collection* Source Server CPUs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCpus(java.util.Collection)} or {@link #withCpus(java.util.Collection)} if you want to override the * existing values. *
* * @param cpus * Source Server CPUs. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withCpus(CPU... cpus) { if (this.cpus == null) { setCpus(new java.util.ArrayList* Source Server CPUs. *
* * @param cpus * Source Server CPUs. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withCpus(java.util.Collection* Source Server disks. *
* * @return Source Server disks. */ public java.util.List* Source Server disks. *
* * @param disks * Source Server disks. */ public void setDisks(java.util.Collection* Source Server disks. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDisks(java.util.Collection)} or {@link #withDisks(java.util.Collection)} if you want to override the * existing values. *
* * @param disks * Source Server disks. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withDisks(Disk... disks) { if (this.disks == null) { setDisks(new java.util.ArrayList* Source Server disks. *
* * @param disks * Source Server disks. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withDisks(java.util.Collection* Source server identification hints. *
* * @param identificationHints * Source server identification hints. */ public void setIdentificationHints(IdentificationHints identificationHints) { this.identificationHints = identificationHints; } /** ** Source server identification hints. *
* * @return Source server identification hints. */ public IdentificationHints getIdentificationHints() { return this.identificationHints; } /** ** Source server identification hints. *
* * @param identificationHints * Source server identification hints. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withIdentificationHints(IdentificationHints identificationHints) { setIdentificationHints(identificationHints); return this; } /** ** Source server last update date and time. *
* * @param lastUpdatedDateTime * Source server last update date and time. */ public void setLastUpdatedDateTime(String lastUpdatedDateTime) { this.lastUpdatedDateTime = lastUpdatedDateTime; } /** ** Source server last update date and time. *
* * @return Source server last update date and time. */ public String getLastUpdatedDateTime() { return this.lastUpdatedDateTime; } /** ** Source server last update date and time. *
* * @param lastUpdatedDateTime * Source server last update date and time. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withLastUpdatedDateTime(String lastUpdatedDateTime) { setLastUpdatedDateTime(lastUpdatedDateTime); return this; } /** ** Source server network interfaces. *
* * @return Source server network interfaces. */ public java.util.List* Source server network interfaces. *
* * @param networkInterfaces * Source server network interfaces. */ public void setNetworkInterfaces(java.util.Collection* Source server network interfaces. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNetworkInterfaces(java.util.Collection)} or {@link #withNetworkInterfaces(java.util.Collection)} if * you want to override the existing values. *
* * @param networkInterfaces * Source server network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withNetworkInterfaces(NetworkInterface... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new java.util.ArrayList* Source server network interfaces. *
* * @param networkInterfaces * Source server network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withNetworkInterfaces(java.util.Collection* Source server OS. *
* * @param os * Source server OS. */ public void setOs(OS os) { this.os = os; } /** ** Source server OS. *
* * @return Source server OS. */ public OS getOs() { return this.os; } /** ** Source server OS. *
* * @param os * Source server OS. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withOs(OS os) { setOs(os); return this; } /** ** Source server RAM in bytes. *
* * @param ramBytes * Source server RAM in bytes. */ public void setRamBytes(Long ramBytes) { this.ramBytes = ramBytes; } /** ** Source server RAM in bytes. *
* * @return Source server RAM in bytes. */ public Long getRamBytes() { return this.ramBytes; } /** ** Source server RAM in bytes. *
* * @param ramBytes * Source server RAM in bytes. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withRamBytes(Long ramBytes) { setRamBytes(ramBytes); return this; } /** ** Source server recommended instance type. *
* * @param recommendedInstanceType * Source server recommended instance type. */ public void setRecommendedInstanceType(String recommendedInstanceType) { this.recommendedInstanceType = recommendedInstanceType; } /** ** Source server recommended instance type. *
* * @return Source server recommended instance type. */ public String getRecommendedInstanceType() { return this.recommendedInstanceType; } /** ** Source server recommended instance type. *
* * @param recommendedInstanceType * Source server recommended instance type. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceProperties withRecommendedInstanceType(String recommendedInstanceType) { setRecommendedInstanceType(recommendedInstanceType); 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 (getCpus() != null) sb.append("Cpus: ").append(getCpus()).append(","); if (getDisks() != null) sb.append("Disks: ").append(getDisks()).append(","); if (getIdentificationHints() != null) sb.append("IdentificationHints: ").append(getIdentificationHints()).append(","); if (getLastUpdatedDateTime() != null) sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(","); if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()).append(","); if (getOs() != null) sb.append("Os: ").append(getOs()).append(","); if (getRamBytes() != null) sb.append("RamBytes: ").append(getRamBytes()).append(","); if (getRecommendedInstanceType() != null) sb.append("RecommendedInstanceType: ").append(getRecommendedInstanceType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SourceProperties == false) return false; SourceProperties other = (SourceProperties) obj; if (other.getCpus() == null ^ this.getCpus() == null) return false; if (other.getCpus() != null && other.getCpus().equals(this.getCpus()) == false) return false; if (other.getDisks() == null ^ this.getDisks() == null) return false; if (other.getDisks() != null && other.getDisks().equals(this.getDisks()) == false) return false; if (other.getIdentificationHints() == null ^ this.getIdentificationHints() == null) return false; if (other.getIdentificationHints() != null && other.getIdentificationHints().equals(this.getIdentificationHints()) == false) return false; if (other.getLastUpdatedDateTime() == null ^ this.getLastUpdatedDateTime() == null) return false; if (other.getLastUpdatedDateTime() != null && other.getLastUpdatedDateTime().equals(this.getLastUpdatedDateTime()) == false) return false; if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false; if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; if (other.getOs() == null ^ this.getOs() == null) return false; if (other.getOs() != null && other.getOs().equals(this.getOs()) == false) return false; if (other.getRamBytes() == null ^ this.getRamBytes() == null) return false; if (other.getRamBytes() != null && other.getRamBytes().equals(this.getRamBytes()) == false) return false; if (other.getRecommendedInstanceType() == null ^ this.getRecommendedInstanceType() == null) return false; if (other.getRecommendedInstanceType() != null && other.getRecommendedInstanceType().equals(this.getRecommendedInstanceType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCpus() == null) ? 0 : getCpus().hashCode()); hashCode = prime * hashCode + ((getDisks() == null) ? 0 : getDisks().hashCode()); hashCode = prime * hashCode + ((getIdentificationHints() == null) ? 0 : getIdentificationHints().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getOs() == null) ? 0 : getOs().hashCode()); hashCode = prime * hashCode + ((getRamBytes() == null) ? 0 : getRamBytes().hashCode()); hashCode = prime * hashCode + ((getRecommendedInstanceType() == null) ? 0 : getRecommendedInstanceType().hashCode()); return hashCode; } @Override public SourceProperties clone() { try { return (SourceProperties) 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.mgn.model.transform.SourcePropertiesMarshaller.getInstance().marshall(this, protocolMarshaller); } }